vgg19

VGG-19卷积神经网络

描述

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

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

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

例子

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

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

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

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

例子

全部折叠

这个例子展示了如何下载和安装深度学习工具箱模型VGG-19网络万博1manbetx支持包。

类型vgg19在命令行。

vgg19

如果深度学习工具箱模型VGG-19网络万博1manbetx未安装支持包,则该函数在加载项资源管理器中提供到所需支持包的链接。要安装支持包,请单击链接,然后万博1manbetx单击安装。通过键入检查安装是否成功vgg19在命令行。

vgg19
ans = SeriesNetwork with properties: Layers:[47×1 nnet.cn .layer. layer]

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

使用vgg19加载一个预先训练好的VGG-19网络。输出是一个SeriesNetwork对象。

网= vgg19
net = SeriesNetwork with properties: Layers:[47×1 nnet.cn .layer. layer]

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

net.Layers
ans = 47x1层数组与层: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 'conv3_4' Convolution 256 3x3x256 convolutions with stride [1 1] and padding [1 1 1 1] 19 'relu3_4' ReLU ReLU 20 'pool3' Max Pooling 2x2 max pooling with stride [2 2] and padding [0 0 0 0] 21 'conv4_1' Convolution 512 3x3x256 convolutions with stride [1 1] and padding [1 1 1 1] 22 'relu4_1' ReLU ReLU 23 'conv4_2' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 24 'relu4_2' ReLU ReLU 25 'conv4_3' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 26 'relu4_3' ReLU ReLU 27 'conv4_4' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 28 'relu4_4' ReLU ReLU 29 'pool4' Max Pooling 2x2 max pooling with stride [2 2] and padding [0 0 0 0] 30 'conv5_1' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 31 'relu5_1' ReLU ReLU 32 'conv5_2' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 33 'relu5_2' ReLU ReLU 34 'conv5_3' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 35 'relu5_3' ReLU ReLU 36 'conv5_4' Convolution 512 3x3x512 convolutions with stride [1 1] and padding [1 1 1 1] 37 'relu5_4' ReLU ReLU 38 'pool5' Max Pooling 2x2 max pooling with stride [2 2] and padding [0 0 0 0] 39 'fc6' Fully Connected 4096 fully connected layer 40 'relu6' ReLU ReLU 41 'drop6' Dropout 50% dropout 42 'fc7' Fully Connected 4096 fully connected layer 43 'relu7' ReLU ReLU 44 'drop7' Dropout 50% dropout 45 'fc8' Fully Connected 1000 fully connected layer 46 'prob' Softmax softmax 47 'output' Classification Output crossentropyex with 'tench' and 999 other classes

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

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

输出参数

全部折叠

训练好的VGG-19卷积神经网络作为a返回SeriesNetwork对象。

未经训练的VGG-19卷积神经网络架构,以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