【电器识别】基于matlab GUI AlexNet网络电器设备识别【含Matlab源码 1391期】

一、AlexNet网络简介

AlexNet网络模型由Hinton以及他的学生Alex Krizhevsky所设计,并在2012年的ImageNet竞赛中获得冠军,其物体分类错误率仅有16.4%,相比于传统的机器学习分类算法而言极其出色。该模型由11层组成,分别为5个卷积层、3个池化层以及3个全连接层,其中图像特征信息的提取工作主要由卷积层和池化层完成,而全连接层的作用则是整合局部特征信息,将特征信息扁平化处理,传递给Softmax层继续完成分类任务。

相比于传统的CNN,AlexNet网络采用了许多有效的改动,例如采用了ReLU函数进行激活,起到稀疏网络减少参数的作用。ReLU函数的表达式如下:
ReLU(x)=max(0,x)。 (1)
其次,重叠池化(Overlapping Pooling)、局部归一化处理(Local Response Normalization)、在全连接层采用Dropout处理等等,这些操作大大减少了网络复杂度以及参数数量,提高了网络的训练速度,减少了过拟合。这也是本文选用该网络的主要原因之一。

Alex Net模型如图2所示,该网络由5个卷积层和3个全连接层组成,深度总共8层。最后一个全连接层的输出被送到Softmax层,会产生一个覆盖多类标签的分布。与传统神经网络相比,Alex Net模型具有以下优势:(1)采用Re Lu激活函数;(2)增强数据集来抑制过拟合;(3)采用Drop Out方法抑制过拟合;(4)采用局部响应归一化(LRN)层增强泛化。

图2 Alex Net模型

二、部分源代码

function varargout = zhuti(varargin)
% ZHUTI MATLAB code for zhuti.fig
%      ZHUTI, by itself, creates a new ZHUTI or raises the existing
%      singleton*.
%
%      H = ZHUTI returns the handle to a new ZHUTI or the handle to
%      the existing singleton*.
%
%      ZHUTI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in ZHUTI.M with the given input arguments.
%
%      ZHUTI('Property','Value',...) creates a new ZHUTI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before zhuti_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to zhuti_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 zhuti

% Last Modified by GUIDE v2.5 26-Apr-2022 23:34:18

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @zhuti_OpeningFcn, ...
                   'gui_OutputFcn',  @zhuti_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 zhuti is made visible.
function zhuti_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 zhuti (see VARARGIN)
axes(handles.axes1);
imshow([255]);
axes(handles.axes2);
imshow([255]);
axes(handles.axes3);
imshow([255]);
axes(handles.axes4);
imshow([255]);
axes(handles.axes5);
imshow([255]);
% Choose default command line output for zhuti
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes zhuti wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = zhuti_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 pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
global tu
global testImd
axes(handles.axes1)
[filename,pathname]=uigetfile({ ...
    '*.*','All Files(*.*)';},...
    '选择文件');
%
if isequal([filename,pathname],[0,0])
    return

三、运行结果





四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 蔡利梅.MATLAB图像处理——理论、算法与实例分析[M].清华大学出版社,2020.
[2]杨丹,赵海滨,龙哲.MATLAB图像处理实例详解[M].清华大学出版社,2013.
[3]周品.MATLAB图像处理与图形用户界面设计[M].清华大学出版社,2013.
[4]刘成龙.精通MATLAB图像处理[M].清华大学出版社,2015.
[5]徐兢成,王丽华.基于AlexNet网络的交通标志识别方法[J].无线电工程. 2022,52(03)
[6]费宏运,陈庚,迟兆瑞,赵增顺.基于AlexNet的新冠肺炎CT图像识别的可行性分析[J].信息与电脑(理论版). 2021,33(04)

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2022年5月26日
下一篇 2022年5月26日

相关推荐