经典网络的 TensorFlow 实现资源汇总

本文简单整理了网上公布的基于 TensorFlow 实现图像语义分析的一些经典网络,方便大家参考学习。

1. TensorFlow-Slim

TF-Slim 是 tensorflow 较新版本的扩充包,可以简化繁杂的网络定义,其中也提供了一些demo:

  • AlexNet
  • InceptionV1/V2/V3
  • OverFeat
  • ResNet
  • VGG

例如 VGG-16 网络,寥寥数行就可以定义完毕:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def vgg16(inputs):
with slim.arg_scope([slim.conv2d, slim.fully_connected],
activation_fn=tf.nn.relu,
weights_initializer=tf.truncated_normal_initializer(0.0, 0.01),
weights_regularizer=slim.l2_regularizer(0.0005)):
net = slim.repeat(inputs, 2, slim.conv2d, 64, [3, 3], scope='conv1')
net = slim.max_pool2d(net, [2, 2], scope='pool1')
net = slim.repeat(net, 2, slim.conv2d, 128, [3, 3], scope='conv2')
net = slim.max_pool2d(net, [2, 2], scope='pool2')
net = slim.repeat(net, 3, slim.conv2d, 256, [3, 3], scope='conv3')
net = slim.max_pool2d(net, [2, 2], scope='pool3')
net = slim.repeat(net, 3, slim.conv2d, 512, [3, 3], scope='conv4')
net = slim.max_pool2d(net, [2, 2], scope='pool4')
net = slim.repeat(net, 3, slim.conv2d, 512, [3, 3], scope='conv5')
net = slim.max_pool2d(net, [2, 2], scope='pool5')
net = slim.fully_connected(net, 4096, scope='fc6')
net = slim.dropout(net, 0.5, scope='dropout6')
net = slim.fully_connected(net, 4096, scope='fc7')
net = slim.dropout(net, 0.5, scope='dropout7')
net = slim.fully_connected(net, 1000, activation_fn=None, scope='fc8')
return net

2. tensorpack

tensorpack 是一个比较全面的工具包:

tensorpack

GitHub 地址 : ppwwyyxx/tensorpack


3. TF-Tutorials

TF-Tutorials 是一个简短的教程,包括如下内容:

tf-tutorials

GitHub 地址: awjuliani/TF-Tutorials


4. Others

还有一些单一网络实现的工程,例如:


持续更新。。。。。。