当前位置: 首页 > news >正文

【图像识别】基于卷积神经网络CNN实现人脸识别系统matlab代码

1 简介

随着计算机应用的发展和人们对信息保密意识的增强,人脸识别技术作为一种生物识别技术越来越受到人们的重视.而卷积神经网络的出现大大提高了计算机对图像内容的识别和判断能力,因此我们考虑将卷积神经网络应用于人脸识别技术,形成一套以卷积神经网络为技术核心的人脸识别系统.

就卷积神经网络而言,其低隐层包括两大部分:卷积层和采样层,高层则是逻辑回归分类器以及由全连接层与多层感知器所对应的隐含层。输入到第一个全连接层的特征图像是提取子采样层以及卷积层的特征而得到的。最后一个输出层属于分类器,以输入图像为对象可利用逻辑回归作出分类,支持向量机算法也同样可以。传统神经网络最为常见的激活函数为 ReLU 和tanh,正是由于上述函数的存在神经网络具备了非线性映射能力。站在数学的视角上对上述函数展开分析,非线性函数 ReLU 和 tanh 对两侧区表现出较小的信号增益,对中央区则表现出较大的增益,就特征空间映射而言,效果还是相当好的。ReLU和 tanh 的公式如下:

2 部分代码

function varargout = pushbuttonrlkjl(varargin) % PUSHBUTTONRLKJL MATLAB code for pushbuttonrlkjl.fig %人脸库建立按钮对应的窗体 % PUSHBUTTONRLKJL, by itself, creates a new PUSHBUTTONRLKJL or raises the existing % singleton*. % % H = PUSHBUTTONRLKJL returns the handle to a new PUSHBUTTONRLKJL or the handle to % the existing singleton*. % % PUSHBUTTONRLKJL('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in PUSHBUTTONRLKJL.M with the given input arguments. % % PUSHBUTTONRLKJL('Property','Value',...) creates a new PUSHBUTTONRLKJL or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before pushbuttonrlkjl_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to pushbuttonrlkjl_OpeningFcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help pushbuttonrlkjl % Last Modified by GUIDE v2.5 19-Dec-2019 12:03:28 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @pushbuttonrlkjl_OpeningFcn, ... 'gui_OutputFcn', @pushbuttonrlkjl_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT % --- Executes just before pushbuttonrlkjl is made visible. function pushbuttonrlkjl_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to pushbuttonrlkjl (see VARARGIN) % Choose default command line output for pushbuttonrlkjl handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes pushbuttonrlkjl wait for user response (see UIRESUME) % uiwait(handles.figurepushbuttonrlkjl); % --- Outputs from this function are returned to the command line. function varargout = pushbuttonrlkjl_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); %人脸库建立按钮对应的窗体 % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure varargout{1} = handles.output; % --- Executes on button press in pushbuttonsplz. function pushbuttonsplz_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonsplz (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) capturefacesfromvideo; % --- Executes on button press in pushbuttonspjz. function pushbuttonspjz_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonspjz (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) shipingzhuantupian; % --- Executes on button press in radiobuttonfh. function radiobuttonfh_Callback(hObject, eventdata, handles) % hObject handle to radiobuttonfh (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close(gcf); pause(1); cnnFaceRecognition; % Hint: get(hObject,'Value') returns toggle state of radiobuttonfh

3 仿真结果

4 参考文献

[1]丁冠祺, 刘宇涵, 杨皓博. 基于卷积神经网络的人脸识别[J]. 信息记录材料, 2018, 19(9):2.

**部分理论引用网络文献,若有侵权联系博主删除。**

http://www.jsqmd.com/news/1290429/

相关文章:

  • 3个痛点告诉你为什么需要专业的用户脚本管理平台
  • 全自动冻干机工厂推荐几家?挑对设备得看这几点 - 热点品牌推荐
  • 2026年有实力的HS40D单头卧式四工位钻植平一体机选购推荐 - 热点品牌推荐
  • 2026江阴泰榕光电所属控制面板厂家综合排行一览 - 起跑123
  • 船用割渔网刀具厂家哪个好?看工艺与交付实力就对了 - 热点品牌推荐
  • ThreadLocal(存取变量)实战获取当前登录的员工
  • 洛阳地区选购二手圆锥破碎机需要注意哪些关键问题 - 热点品牌推荐
  • 2026年评估广东防静电UPE板热门厂家看哪些维度 - 热点品牌推荐
  • 【单片机毕业设计推荐】基于 STM32 的智能停车场闸道计费控制系统设计与实现 基于 STM32 的 IC 卡识别停车场管理装置与安卓 APP 开发(016504)
  • 材料力学三要素:弹性、塑性、粘性原理与应用解析
  • 2026年暖通空调除湿核心部件企业深度解析与推荐 - 装修教育财税推荐2026
  • 5分钟快速搞定Windows开发环境:VisualCppRedist AIO终极解决方案
  • 提示词版本管理实战手册(Git式提示词迭代+AB测试+效果归因,附可落地的CLI工具链)
  • GBFR-Logs终极指南:如何用免费工具轻松提升你的《碧蓝幻想:Relink》游戏表现
  • #怎么找安阳正规的精细全麻床垫生产厂家才稳妥 - 热点品牌推荐
  • 液冷互锁球阀供应厂家找哪家?选对精密智造很关键 - 热点品牌推荐
  • 武汉离婚财产保全律师推荐:离婚时如何守住你应得的资产 - 本地品牌推荐
  • 宁波航空五金精密铸造制造厂项目落地怎么选厂家 - 热点品牌推荐
  • 2026年高温电线热门厂家哪家强挑选指南 - 热点品牌推荐
  • INAV飞控配置终极指南:从零到稳定飞行的完整解决方案
  • 如何快速获取B站直播推流码:免费开源工具的完整教程
  • 提示词效果归因难题破解:构建可审计的批判性反馈追踪系统(含开源TracePrompt v2.1实测数据)
  • PotatoNV终极指南:快速解锁华为麒麟设备Bootloader的完整教程
  • 免费降AI率工具红黑榜:2026年实测20款,虚假宣传曝光
  • 反向提示词不是“黑名单”!(2024最新语义抑制模型与动态负向嵌入技术白皮书)
  • 青岛工程纠纷律师咨询避坑指南,资深律师实战案例剖析维权路径。 - 行业洞察分析师
  • 轮轴磁粉探伤设备产品哪家靠谱怎么选 - 热点品牌推荐
  • 叠石桥顶楼漏水维修怎么选靠谱服务商 - 热点品牌推荐
  • 气动冲切水口机源头厂家推荐哪家(2026注塑车间选型参考) - 热点品牌推荐
  • 2026年江苏实力比较强不锈钢中厚板割方制造厂选哪家 - 热点品牌推荐