Skip to main content

Fully Convolutional Networks

Project description

fcn - Fully Convolutional Networks
==================================

.. image:: https://badge.fury.io/gh/wkentaro%2Ffcn.svg
:target: https://badge.fury.io/gh/wkentaro%2Ffcn
.. image:: https://travis-ci.org/wkentaro/fcn.svg?branch=master
:target: https://travis-ci.org/wkentaro/fcn


This is Chainer_ implementation of fcn.berkeleyvision.org_.

.. _fcn.berkeleyvision.org: https://github.com/shelhamer/fcn.berkeleyvision.org.git
.. _Chainer: https://github.com/pfnet/chainer.git


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_]

.. _v1.0.0: https://github.com/wkentaro/fcn/releases/tag/v1.0.0
.. _v2.0.0: https://github.com/wkentaro/fcn/releases/tag/v2.0.0
.. _v3.0.0: https://github.com/wkentaro/fcn/releases/tag/v3.0.0


License
-------
| Copyright (C) 2016 Kentaro Wada
| Released under the MIT license
| http://opensource.org/licenses/mit-license.php


For Beginners
-------------

Installation
++++++++++++

.. code-block:: bash

# LINUX: install required libraries via apt
sudo apt-get install liblapack-dev # for numpy
sudo apt-get install libhdf5-dev # for h5py
sudo apt-get install libleveldb-dev # for plyvel
# OS X: install required libraries via brew
brew install gfortran # for numpy
brew install leveldb # for plyvel
brew install hdf5 # for h5py

pip install -U setuptools
pip install fcn

fcn_install_trained_data.py


Forwarding
++++++++++

Forwarding is done as below, and computation graph is `here <https://github.com/wkentaro/fcn/blob/master/_images/fcn8s_forward.jpg>`_.

.. code-block:: bash

# 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

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

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


For Developers
--------------


Installation
++++++++++++

.. code-block:: bash

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

python setup.py install
fcn_install_trained_data.py

You need to download pascal VOC2012 dataset from `here <http://host.robots.ox.ac.uk/pascal/VOC/voc2012/>`_,
and install it as below construction::

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

Fowarding
+++++++++

Forwarding with trained model in caffe is done as below:

.. code-block:: bash

# 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

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

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


Training
++++++++

.. code-block:: bash

./scripts/fcn_train.py

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

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

Forwarding with ``fcn32s_60000.chainermodel`` ends with below result:

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fcn-4.0.0.tar.gz (1.2 MB view details)

Uploaded Source

File details

Details for the file fcn-4.0.0.tar.gz.

File metadata

  • Download URL: fcn-4.0.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fcn-4.0.0.tar.gz
Algorithm Hash digest
SHA256 72be29c65b5c80ac1b795fa083224976a35863bf8e9b16401a754339fa2af8f4
MD5 ad27f23c5fd4d355c4f09a73710f575c
BLAKE2b-256 b51d7ede6cf7a6a2ab13b5dcaff9d0ecf4ce1f6d10169fdf0eaf6caa16bd1677

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page