vgg16

VGG-16卷积神经网络

描述

VGG-16是一个深度为16层的卷积神经网络。您可以从ImageNet数据库中加载经过训练的网络的预训练版本,该版本包含了100多万张图像[1].这个预先训练好的网络可以将图像分成1000个对象类别,比如键盘、鼠标、铅笔和许多动物。因此,该网络学会了丰富的特征表示,为广泛的图像。网络的图像输入大小为224×224。用于MATLAB中更多的预训练网络®,请参阅预先训练的深度神经网络.

您可以使用分类使用VGG-16网络对新图像进行分类。遵循以下步骤使用GoogLeNet对图像进行分类用VGG-16替换GoogLeNet。

要对网络进行新的分类任务再培训,请遵循以下步骤训练深度学习网络对新图像进行分类加载VGG-16而不是GoogLeNet。

例子

= vgg16返回一个在ImageNet数据集上训练的VGG-16网络。

此功能需要深度学习工具箱™模型VGG-16网络万博1manbetx支持包。如果未安装此支持万博1manbetx包,则该函数提供下载链接。

= vgg16(“权重”,“imagenet”)返回一个在ImageNet数据集上训练的VGG-16网络净= vgg16.

= vgg16(“权重”,“没有”)返回未经训练的VGG-16网络架构。未经训练的模型不需要支持包。万博1manbetx

例子

全部折叠

下载并安装深度学习工具箱模型VGG-16网络万博1manbetx支持包。

类型vgg16在命令行。

vgg16

如果深度学习工具箱模型VGG-16网络万博1manbetx支持包没有安装,那么函数提供了附加在资源管理器链接到所需的支持包。要安装支持包,点击链接,然后点万博1manbetx击安装.检查安装是否成功通过打字vgg16在命令行。

vgg16
ANS = SeriesNetwork与属性:层:[41×1 nnet.cnn.layer.Layer]

加载一个预先训练好的VGG-16卷积神经网络,并检查层和类。

使用vgg16加载预先训练好的VGG-16网络。输出是一个SeriesNetwork宾语。

净= vgg16
net = SeriesNetwork with properties: Layers:[41×1 nnet.cn .layer. layer]

使用。查看网络体系结构财产。网络有41层。有16个层,有可学习的权值:13个卷积层,3个全连接层。

net.Layers
ans = 41x1层数组与层:224 x224x3输入的图像输入图像2”zerocenter“正常化”conv1_1卷积64子集要旋转步[1]和填充[1 1 1 1]3‘relu1_1 ReLU ReLU 4 conv1_2卷积64 3 x3x64旋转步[1]和填充[1 1 1 1]5‘relu1_2 ReLU ReLU 6“pool1”马克斯池2 x2马克斯池步(2 - 2)和填充[0 0 0 0]7 conv2_1卷积128 3 x3x64旋转步[1]和填充(1 1 1)8“relu2_1”ReLU ReLU 9 conv2_2卷积128 3 x3x128旋转步[1]和填充[1 1 1 1]10“relu2_2”ReLU ReLU 11“pool2”马克斯池2 x2马克斯池步(2 - 2)和填充[0 0 0 0]12 conv3_1卷积256 3 x3x128旋转步[1]和填充[1 1 1 1]13的relu3_1 ReLU ReLU 14 conv3_2卷积256 3 x3x256旋转步[1]和填充[1 1 1 1]15 ' relu3_2 ReLU ReLU 16 conv3_3卷积256 3 x3x256旋转步[1]和填充[1 1 1 1]17 relu3_3 ReLUReLU 18 'pool3' Max Pooling 2x2 max pooling with stride [2 2] and padding [0 0 0 0] 19 'conv4_1' Convolution 512 3x3x256 convolutions with stride [1 1] and padding [1 1 1 1] 20 'relu4_1' ReLU ReLU 21 'conv4_2' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 22 'relu4_2' ReLU ReLU 23 'conv4_3' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 24 'relu4_3' ReLU ReLU 25 'pool4' Max Pooling 2x2 max pooling with stride [2 2] and padding [0 0 0 0] 26 'conv5_1' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 27 'relu5_1' ReLU ReLU 28 'conv5_2' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 29 'relu5_2' ReLU ReLU 30 'conv5_3' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 31 'relu5_3' ReLU ReLU 32 'pool5' Max Pooling 2x2 max pooling with stride [2 2] and padding [0 0 0 0] 33 'fc6' Fully Connected 4096 fully connected layer 34 'relu6' ReLU ReLU 35 'drop6' Dropout 50% dropout 36 'fc7' Fully Connected 4096 fully connected layer 37 'relu7' ReLU ReLU 38 'drop7' Dropout 50% dropout 39 'fc8' Fully Connected 1000 fully connected layer 40 'prob' Softmax softmax 41 'output' Classification Output crossentropyex with 'tench' and 999 other classes

要查看通过网络学习的类的名称,可以查看分类输出层(最终层)的属性。通过指定前10个元素来查看前10个类。

net.Layers(结束). class (1:10)
ans =10×1分类数组金鱼大白鲨虎鲨双髻鲨电鳐黄貂鸡鸵鸟

输出参数

全部折叠

训练好的VGG-16卷积神经网络作为a返回SeriesNetwork宾语。

未经训练的VGG-16卷积神经网络结构,返回为a数组中。

参考

[1]ImageNet.http://www.image-net.org

罗萨科夫斯基,O.,邓,J.,苏,H.,等,< ImageNet大规模视觉识别挑战>。国际计算机视觉杂志(IJCV).第115卷,2015年第3期,第211-252页

[3] Simonyan, Karen和Andrew Zisserman。“用于大规模图像识别的深度卷积网络”,arXiv预印本arXiv:1409.1556(2014)。

[4]用于大规模视觉识别的深度卷积网络http://www.robots.ox.ac.uk/~vgg/research/very_deep/

扩展功能

介绍了R2017a