Giter VIP home page Giter VIP logo

tf-segnet's Introduction

SegNet --> AirNet

AirNet is a segmentation network based on SegNet, but with some modifications. The goal is to use the model to segment multispectral images, so that geographical information (e.g. building information) can be extracted. The model is implemented in Tensorflow.

Recognition

Architecture

NB! If you are unfamiliar with how convolutional neural networks work, I have written a blogpost that explains the basic concepts.

I've implemented four different version of the models:

All the AirNet models have:

  • an encoder-decoder structure with different number of layers for the different versions
  • batch normalization with a moving avarage decay of 0.99
  • usampling layers that use pooling indices from the maxpool in the encoder. The positions for the original pixels that are kept during maxpooling in the encoder is saved, and used in the decoder to place the pixels back to their original positions.

Airnet extended architecture

Optimizers and initializers

Different optimizers and initializers have been tested on each of the models. The ones that were tested are listed below, and the ones that was chosen based on performance is given in the model description.

Optimizers:

  • Stochastic gradient descent
  • Adam
  • Adagrad
  • Momentum

Weight initializers:

  • Variance scale
  • Xavier

AirNet Basic

  • Four encoders and four decoders
  • Stochastic gradient descent optimizer
  • Xavier initializer

AirNet Basic dropout

Same architecture as Basic, except for dropoutlayers that are added after the pooling layers, with a dropout rate of 0.5.

AirNet Extended

The extended model is much larger and has 5 encoders and 5 decoders. It takes longer time to train, it is slower during inference, but achieves higher performance when trained sufficiently.

  • Five encoder and decoders
  • Adagrad optimizer
  • Variance scale weight initializer

AirNet Extended dropout

Same architecture as Extended, except for dropoutlayers that are added after the pooling layers, with a dropout rate of 0.5.

Usage

Requirements

  • Tensorflow GPU 1.3.0
  • Python 3.5

pip install -r AirNet/requirements.txt

Run TensorBoard:

tensorboard --logdir=path/to/log-directory

Dataset

To verify the model I used the CamVid dataset. This can be downloaded from: https://github.com/alexgkendall/SegNet-Tutorial, and used in the model by setting the correct paths and dataset size in AirNet/_init_.py

The datasets of aerial images used to train and test the model is constructed through an automatic mapping of vector data and aerial images of Norway. Both a dataset with IR images, and with RGB images was constructed, both containing around 4500 images. The data is unfortunately not open source.

Example dataset

Results

The IR images gave a small increase in performance, and examples of the segmentation can be seen here:

tf-segnet's People

Contributors

mathildor avatar

Stargazers

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