Giter Club home page Giter Club logo

image-segmentation-fcn's Introduction

Semantic Image Segmentation using a Fully Convolutional Neural Network

Overview

The programs in this repository train and use a fully convolutional neural network to take an image and classify its pixels. The network is transfer-trained basing on the VGG-16 model using the approach described in this paper by Jonathan Long et al. The software is generic and easily extendable to any dataset, although I only tried with KITTI Road Dataset and Cityscapes dataset so far. All you need to do to introduce a new dataset is to create a new source_xxxxxx.py file defining your dataset. The definition is a class that contains seven attributes:

  • image_size - self-evident, both horizontal and vertical dimention need to be divisible by 32
  • num_classes - number of classes that the model is supposed to handle
  • label_colors - a dictionary mapping a class number to a color; used for blending of the classification results with input image
  • num_training - number of training samples
  • num_validation - number of validation samples
  • train_generator - a generator producing training batches
  • valid_generator - a generator producing validation batches

See source_kitti.py or source_cityscapes.py for a concrete example. The trainer picks the source based on the value of the --data-source parameter.

The KITTI dataset

Training the model on the KITTI Road Dataset essentially means that infer.py will be able to take images from a car's dashcam and paint the road pink. It generalizes fairly well even to pretty complicated cases:

Example #1 Example #2 Example #3

The model that produced the above images was trained for 500 epochs on the images contained in this zip file. The training program fills tensorboard with the loss summary and a sneak peek of the current performance on validation examples. The top row contains the ground truth and the bottom one the network's output.

Loss Validation examples

The Cityscapes dataset

This dataset is more complex than the previous one. It has fine image annotations for 29 classes of objects. The images are video frames taken in German cities and there is around 11GB of them.

Example #1 Example #2 Example #3

The model that produced the images was trained for 150 epochs.

Loss Validation examples

image-segmentation-fcn's People

Contributors

ljanyst avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.