Git Product home page Git Product logo

semantic-segmentation's Introduction

Semantic Segmentation

Discription

Labeling pixels on a road in images using a Fully Convolutional Network (FCN).

Architecture / Rubic points

Load pre-trained vgg model

Function load_vgg loads loads pre-trained vgg model.

Learn the correct features from the images

The project has layers functions implemented.

alt text

Optimize the neural network

The optimize function for the network is cross-entropy, and an Adam optimizer is used.

    cross_entropy_loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=labels))
    optimizer = tf.train.AdamOptimizer(learning_rate)
    train_op = optimizer.minimize(cross_entropy_loss)

Train the neural network

The train_nn function is implemented and prints time and loss per epoch/epochs of training.

Train the model correctly with reasonable hyper parameters

The project trains model correctly, about 48s per epoch, 48sx40 epochs in total.

Final hyperparamters used for training.

    L2_REG = 1e-5
    STDEV = 1e-2
    KEEP_PROB = 0.8
    LEARNING_RATE = 1e-4
    EPOCHS = 40
    BATCH_SIZE = 8
    IMAGE_SHAPE_KITI = (160,576)
    NUM_CLASSES = 2

Correctly labeling the road

Results from the test images. From the GIF below, A pre-trained VGG-16 network combined with a fully convolutional network will successfully label the road. Performance was also improved through the use of skip connections and adding element-wise to upsampled lower-level layers.

Alt Text

Setup

GPU

main.py will check to make sure you are using GPU - if you don't have a GPU on your system, you can use AWS or another cloud computing platform.

Frameworks and Packages

Make sure you have the following is installed:

You may also need Python Image Library (PIL) for SciPy's imresize function.

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.

QuickStart

Run

Run the following command to run the project:

python main.py

Note: If running this in Jupyter Notebook system messages, such as those regarding test status, may appear in the terminal rather than the notebook.

semantic-segmentation's People

Watchers

 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.