# FCN.tensorflow
Tensorflow implementation of [Fully Convolutional Networks for Semantic Segmentation](http://arxiv.org/pdf/1605.06211v1.pdf) (FCNs).
The implementation is largely based on the reference code provided by the authors of the paper [link](https://github.com/shelhamer/fcn.berkeleyvision.org). The model was applied on the Scene Parsing Challenge dataset provided by MIT [http://sceneparsing.csail.mit.edu/](http://sceneparsing.csail.mit.edu/).
1. [Prerequisites](#prerequisites)
2. [Results](#results)
3. [Observations](#observations)
4. [Useful links](#useful-links)
## Prerequisites
- The results were obtained after training for ~6-7 hrs on a 12GB TitanX.
- The code was originally written and tested with `tensorflow0.11` and `python2.7`.
The tf.summary calls have been updated to work with tensorflow version 0.12. To work with older versions of tensorflow use branch [tf.0.11_compatible](https://github.com/shekkizh/FCN.tensorflow/tree/tf.0.11_compatible).
- Some of the problems while working with tensorflow1.0 and in windows have been discussed in [Issue #9](https://github.com/shekkizh/FCN.tensorflow/issues/9).
- To train model simply execute `python FCN.py`
- To visualize results for a random batch of images use flag `--mode=visualize`
- `debug` flag can be set during training to add information regarding activations, gradients, variables etc.
- The [IPython notebook](https://github.com/shekkizh/FCN.tensorflow/blob/master/logs/images/Image_Cmaped.ipynb) in logs folder can be used to view results in color as below.
## Results
Results were obtained by training the model in batches of 2 with resized image of 256x256. Note that although the training is done at this image size - Nothing prevents the model from working on arbitrary sized images. No post processing was done on the predicted images. Training was done for 9 epochs - The shorter training time explains why certain concepts seem semantically understood by the model while others were not. Results below are from randomly chosen images from validation dataset.
Pretty much used the same network design as in the reference model implementation of the paper in caffe. The weights for the new layers added were initialized with small values, and the learning was done using Adam Optimizer (Learning rate = 1e-4).
  
  
  
  
  
## Observations
- The small batch size was necessary to fit the training model in memory but explains the slow learning
- Concepts that had many examples seem to be correctly identified and segmented - in the example above you can see that cars, persons were identified better. I believe this can be solved by training for longer epochs.
- Also the resizing of images cause loss of information - you can notice this in the fact smaller objects are segmented with less accuracy.

Now for the gradients,
- If you closely watch the gradients you will notice the inital training is almost entirely on the new layers added - it is only after these layers are reasonably trained do we see the VGG layers get some gradient flow. This is understandable as changes the new layers affect the loss objective much more in the beginning.
- The earlier layers of the netowrk are initialized with VGG weights and so conceptually would require less tuning unless the train data is extremely varied - which in this case is not.
- The first layer of convolutional model captures low level information and since this entrirely dataset dependent you notice the gradients adjusting the first layer weights to accustom the model to the dataset.
- The other conv layers from VGG have very small gradients flowing as the concepts captured here are good enough for our end objective - Segmentation.
- This is the core reason **Transfer Learning** works so well. Just thought of pointing this out while here.
   
## Useful Links
- Video of the presentaion given by the authors on the paper - [link](http://techtalks.tv/talks/fully-convolutional-networks-for-semantic-segmentation/61606/)
没有合适的资源?快使用搜索试试~ 我知道了~
FCN-TensorFlow1.4源码

共61个文件
png:46个
py:5个
pyc:3个

需积分: 28 67 下载量 38 浏览量
2018-04-24
20:44:28
上传
评论
收藏 1.04MB ZIP 举报
温馨提示
全卷积神经网络(FCN),将全连接层改为卷积替代并将其用于语义分割上,详情见论文《Fully Convolutional Networks for Semantic Segmentation》这里应用在tensorflow1.4上并有详细的代码介绍
资源推荐
资源详情
资源评论

















收起资源包目录



































































共 61 条
- 1
资源评论


Eternity丶
- 粉丝: 79
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 第一章复杂动态网络基本概念.ppt
- 前端开发工程师如何在里提升自己.doc
- 数据库课程方案设计书---企业客户信息管理系统.doc
- 大学课程设计方案计算机应用基础.doc
- 建设工程项目管理模拟练习五.doc
- PLC电气控制柜的布局与结构设计方案.doc
- 中山大学C程序设计方案课件c4.doc
- 医院药品管理系统《软件工程》设计备份.doc
- 提高中职生计算机学习能力的方法研究.docx
- 医院信息化解决方案技术建议书-精简IT.doc
- SAAS软件即服务简介.doc
- 对公路工程施工项目管理存在问题浅析.docx
- 2017-2018学年高中数学-第一章-算法初步-1.3-算法案例-新人教A版必修3.ppt
- 物联网在武警部队仓库物资管理中的应用研究.docx
- 网络社会行为的进化心理学解析.docx
- PLC控制的花样喷泉系统设计方案.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
