【转载】VGG in TensorFlow

原文链接:http://www.cs.toronto.edu/~frossard/post/vgg16/

VGG in TensorFlow

Model and pre-trained parameters for VGG16 in TensorFlow

17 Jun 2016, 01:34

machine learning/tensorflow/classification

convolutional neural networks/pre-trained models/vgg16

Intermediate

Contents

Files

Introduction

Architecture

Weights

Class Names

Future Content

Files

Model weights -vgg16_weights.npz

TensorFlow model -vgg16.py

Class names -imagenet_classes.py

Example input -laska.png

To test run it, download all files to the same folder and run

python vgg16.py

Introduction

VGG is a convolutional neural network model proposed by K. Simonyan and A. Zisserman from the University of Oxford in the paper “Very Deep Convolutional Networks for Large-Scale Image Recognition”. The model achieves 92.7% top-5 test accuracy in ImageNet, which is a dataset of over 14 million images belonging to 1000 classes.

In this short post we provide an implementation of VGG16 and the weights from the original Caffe modelconverted to TensorFlow.

IMAGE CLASSIFICATION TASK

Architecture

The macroarchitecture of VGG16 can be seen in Fig. 2. We code it in TensorFlow in filevgg16.py. Notice that we include a preprocessing layer that takes the RGB image with pixels values in the range of 0-255 and subtracts the mean image values (calculated over the entire ImageNet training set).

MACROARCHITECTURE OF VGG16

Weights

We convert the Caffe weights publicly available in the author’sGitHub profileusing aspecialized tool. Some post-processing is done to ensure the model is in agreement with the TensorFlow standards. Finally, we arrive at the weights available invgg16_weights.npz.

Class Names

In order to associate the outputs of the model to class names we have the mapping available inimagenet_classes.py.

Future Content

We encourage you to get familiar with this model since it is widely used and will be the baseline for future content on knowledge transfer, guided backpropagation and other interesting topics on convolutional neural networks.

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 當一大波人被迫調到心外的時候,我卻從這個水深火熱的科室解脫出來,定在號稱“外科的天堂”骨外。 是不是有點幸運了。 ...
    Victoria青兒阅读 3,093评论 0 3
  • 阅读书目:《如何高效学习》机械工业出版社 斯科特 扬著 阅读方法:检视阅读 第一部分:整体性学习策略 【整体性学习...
    文魁大脑阅读 1,769评论 0 1
  • 盛开在夏季
    流水生活阅读 2,299评论 0 0
  • 生命是什么?它是一个证明人还活着的词语还是证明活过?我不知道,也想不出答案。最近,我一直在担虑自己的身体状态。慢性...
    好想赖床阅读 1,324评论 0 0

友情链接更多精彩内容