【源码】用于图片分类的GoogLeNet网络的深度学习工具箱模型
GoogLeNet是一个预先训练的模型,利用了ImageNet大规模视觉识别挑战(ILSVRC)的ImageNet数据库的一个子集进行训练。
GoogLeNet is a pretrained model that has been trained on a subset of the ImageNet database which is used in the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC).
该模型训练了100多万张图像,包含144层网络,可以将图像分为1000种对象类别(如键盘、鼠标、铅笔和各种动物等)。
The model is trained on more than a million images, has 144 layers, and can classify images into 1000 object categories (e.g. keyboard, mouse, pencil, and many animals).
从操作系统或Matlab中打开googlenet.mlpkginstal文件,将启动您所拥有版本的安装过程。
Opening the googlenet.mlpkginstall file from your operating system or from within MATLAB will initiate the installation process for the release you have.
本模型要求MATLAB2017b及其以上版本。
示例如下:
% 访问训练模型 Access the trained model
net = googlenet;
% 观察网络的具体结构细节 See details of the architecture
net.Layers
% 读取图片进行分类 Read the image to classify
I = imread(‘peppers.png’);
% 调整图片的尺寸大小 Adjust size of the image
sz = net.Layers(1).InputSize
I = I(1:sz(1),1:sz(2),1:sz(3));
% 采用GoogLeNet进行图片分类 Classify the image using GoogLeNet
label = classify(net, I)
% 显示图片及分类结果 Show the image and the classification results
figure
imshow(I)
text(10,20,char(label),‘Color’,‘white’)
工具箱下载地址:
http://page2.dfpan.com/fs/clcj1221b2915601658/
更多精彩文章请关注微信号: