jinhang / fcn

Fully Convolutional Networks (Chainer Implementation)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fcn - Fully Convolutional Networks

https://travis-ci.org/wkentaro/fcn.svg?branch=master

This is Chainer implementation of fcn.berkeleyvision.org.

Features

  • Provide FCN8s model for Chainer. [v1.0.0]
  • Copy caffemodel to chainermodel. [v1.0.0]
  • Forwarding with Chainer for pascal dataset. [v1.0.0]
  • Training with Chainer for pascal dataset. [v2.0.0]
  • Training for APC2015 dataset. [v3.0.0]

License

Copyright (C) 2016 Kentaro Wada
Released under the MIT license

For Beginners

Installation

pip install fcn

Forwarding

Forwarding is done as below, and computation graph is here.

# Download sample image
wget https://farm2.staticflickr.com/1522/26471792680_a485afb024_z_d.jpg -O sample.jpg

# forwaring of the networks
fcn_forward.py --img-files sample.jpg --gpu -1  # cpu mode
fcn_forward.py --img-files sample.jpg  # gpu mode

https://raw.githubusercontent.com/wkentaro/fcn/master/_images/fcn8s_26471792680.jpg

Original Image: https://www.flickr.com/photos/faceme/26471792680/

For Developers

Installation

git clone https://github.com/wkentaro/fcn.git
cd fcn

python setup.py install

You need to download pascal VOC2012 dataset from here, and install it as below construction:

- fcn - data - pascal - VOC2012 -- JPEGImages
                                 - SegmentationClass
                                 - ...

Fowarding

Forwarding with trained model in caffe is done as below:

# This downloads caffemodel and convert it to chainermodel
./scripts/caffe_to_chainermodel.py

# forwarding of the networks
./scripts/fcn_forward.py --img-files data/pascal/VOC2012/JPEGImages/2007_000129.jpg

https://raw.githubusercontent.com/wkentaro/fcn/master/_images/fcn8s_2007_000129.jpg

Original Image: http://host.robots.ox.ac.uk/pascal/VOC/voc2012/

Training

./scripts/fcn_train.py

Currently we support only training FCN32s. The learning curve looks like below:

https://raw.githubusercontent.com/wkentaro/fcn/master/_images/fcn32s_learning_curve.png

Forwarding with fcn32s_60000.chainermodel ends with below result:

https://raw.githubusercontent.com/wkentaro/fcn/master/_images/fcn32s_2007_000129.jpg

About

Fully Convolutional Networks (Chainer Implementation)


Languages

Language:Python 100.0%