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. [**not yet**]

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


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


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

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

.. code-block:: bash

pip install fcn


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/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

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/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-2.0.0.tar.gz (1.2 MB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for fcn-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9c888b7c16979aa6f318076bac835a266ac8030dceaed0358cbde4a04535c308
MD5 995a7f2aeb77089f0f7077854f0b9036
BLAKE2b-256 60a87ec8693bf47b9e17dd01d85426ee082150a8a209033efd5f9422c0bc6c8f

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