Giter Site home page Giter Site logo

carnd-semantic-segmentation-p2's Introduction

CarND-Semantic-Segmentation-P2

Self-Driving Car Engineer Nanodegree Program - Semantic Segmentation Project

Goal

In this project, the goal is to setup a Fully Convolutional Network (FCN), train the model and then use it to label the pixels of a road in images. The paper of FCN-8 architecture can be downloaded here: https://people.eecs.berkeley.edu/~jonlong/long_shelhamer_fcn.pdf

Setup

Frameworks and Packages

Make sure you have the following is installed:

Dataset

Download the Kitti Road dataset from here. Extract the dataset in the data folder. This will create the folder data_road with all the training a test images.

In this project I am using the workspace Udacity provided, and the dataset is ready under /data.

Run

Run the following command to run the project:

python main.py

Implementation

Network design

The code downloads a pre-trained VGG16 model and extract the outputs of certain layers, based on these outputs I created the rest of the network (in lines 62~91) which consists of:

  • 1x1 convolution layer * 3
  • upsample layer * 3
  • skip connection layer * 2

Result

For training the model I have tried the epochs with number 10, 20 and 50.

  • Epochs with 10 -> Loss = 0.1 (Time-consuming: 750s)
  • Epochs with 20 -> Loss = 0.05 (Time-consuming: 1500s)
  • Epochs with 50 -> Loss = 0.02 (Time-consuming: 3700s)

Following are sample images processed by our final FCN network.

Conclusion

The core of the solution is FCN:

  1. Replace fully connected layers with one by one convolutional layers
  2. Up-sampling through the use of transposed convolutional layers
  3. Skip connections, which allow the network to use information from multiple resolution scales

PS: Each convolution and transpose convolution layer includes a kernel initializer and regularizer, which indeed improve the training efficiency quite a lot.

carnd-semantic-segmentation-p2's People

Contributors

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