Skip to content

Transfer learning with VGG16 (fcn) for semantic segmentation of roads (in images taken from KITTI dataset)

License

Notifications You must be signed in to change notification settings

rekon/CarND-Semantic-Segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantic Segmentation

Introduction

In this project, we will label the pixels of a road in images using a Fully Convolutional Network (FCN).

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:

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.

Implementation

Run

Run the following command to run the project:

python main.py

The project was ran for 20 epochs with a batch size of 2, the learning rate was 9e-5

Results

Pic1 Pic2
Pic3 Pic4

Loss Curve

Loss function

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.

About

Transfer learning with VGG16 (fcn) for semantic segmentation of roads (in images taken from KITTI dataset)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages