Code Monkey home page Code Monkey logo

carnd-semantic-segmentation's Introduction

Semantic Segmentation

Introduction

In this project a Fully Convolutional Network (FCN) is trained to label the pixels of a road in images.

Setup

Frameworks and Packages

Make sure you have the following is installed:

Kitti Dataset

The kitti dataset is used to train the model. First try to download Kitti Road dataset with this command:

  • wget http://kitti.is.tue.mpg.de/kitti/data_road.zip

If that link has expired request download link to Kitti Road dataset from here.

Once downloaded extract the dataset in the data folder. This will create the folder data_road with all the training a test images.

How to Run

Use the following command to run the project:

  • python3 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.

Note If running on AWS here are some helpful command templates:

  • You need to change the IP address in the link to your specific instance which can be found on AWS EC2 management console Instances group by clicking "Connect" on the instance:
  • You need the AWS key file, e.g. "demo.pem", in your current directory
    • SSH connection to AWS instance:
    • Copy data_road.zip from local machine to instance:
      • scp -i "demo.pem" '/mnt/c/Users/nxa09564/OneDrive - NXP/Udacity/SDCND/projects/term3/data_road.zip' [email protected]:~/CarND-Semantic-Segmentation/data
    • Copy vgg.zip from local machine to instance:
      • scp -i "demo.pem" '/mnt/c/Users/nxa09564/OneDrive - NXP/Udacity/SDCND/projects/term3/vgg.zip' [email protected]:~/CarND-Semantic-Segmentation/data
    • Copy run output images from instance to local machine:
      • scp -i "demo.pem" [email protected]:~/CarND-Semantic-Segmentation/runs/1516820578.872475/*.png '/mnt/c/Users/nxa09564/OneDrive - NXP/Udacity/SDCND/projects/term3/CarND-Semantic-Segmentation/runs/1516820578.872475'

Submission

  1. Ensure you've passed all the unit tests.
  2. Ensure you pass all points on the rubric.
  3. Submit the following in a zip file.
  • helper.py
  • main.py
  • project_tests.py
  • Newest inference images from runs folder (all images from the most recent run)

Tips

  • The link for the frozen VGG16 model is hardcoded into helper.py. The model can be found here
  • The model is not vanilla VGG16, but a fully convolutional version, which already contains the 1x1 convolutions to replace the fully connected layers. Please see this forum post for more information. A summary of additional points, follow.
  • The original FCN-8s was trained in stages. The authors later uploaded a version that was trained all at once to their GitHub repo. The version in the GitHub repo has one important difference: The outputs of pooling layers 3 and 4 are scaled before they are fed into the 1x1 convolutions. As a result, some students have found that the model learns much better with the scaling layers included. The model may not converge substantially faster, but may reach a higher IoU and accuracy.
  • When adding l2-regularization, setting a regularizer in the arguments of the tf.layers is not enough. Regularization loss terms must be manually added to your loss function. otherwise regularization is not implemented.

Using GitHub and Creating Effective READMEs

If you are unfamiliar with GitHub , Udacity has a brief GitHub tutorial to get you started. Udacity also provides a more detailed free course on git and GitHub.

To learn about REAMDE files and Markdown, Udacity provides a free course on READMEs, as well.

GitHub also provides a tutorial about creating Markdown files.

carnd-semantic-segmentation's People

Contributors

baumanab avatar brok-bucholtz avatar

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.