This is a project for Udacity Self-Driving Car Nanodegree program. In this project, I implemented free space searching algorithm on the road image based on the semantic segmentation technique. All codes are written on the iPython notebook.
- Python 3.0 >
- Tensorflow 1.0 >
- Numpy
- Scipy
- Kitty Road Dataset
Download the Kitti Road dataset. Extract the dataset in the 'data' folder. This will create the folder data_road with all the training a test images. Open the 'semantic_segmentation.ipynb' file and run it sequencially.
- Neural Network Architecture
- I used FCN-8 encoder/decoder architecture. I loaded pretrained VGG16 model into tensorflow followed by 1 by 1 convolution for spartial information. Then, I created the layers for a FCN (Fully Convolutional Network) using deconvolution and skip connection technique. For the detailed undertanding, please refer to below architecture image which I used in this project.
- Parameters
- I used 30 Epochs & 8 batches for the neural network training in this project. 8 batches is the best fitting number for my system environment. When I used 30 epochs, the loss goes down from 5.0 to 0.02 even though there are ups and downs of losses between the epochs. If I use more than 30 epochs, the network was overfitted, and caused more errors to training images. Finally, I found that learning rate was optimal when it was 0.0001.
- Image Augmentations
- I implemented this in the helper.py. I used mainly 2 techniques. First, I used image rotation and expansion/shrinking technique. Second, I used the brightness control technique for the images. Then, I added those images to the training set, which made 2x image numbers for training. When I compared the result, image augmentation showed better accuracy, especially when there are dark shades on the images.
- KITTY road segmentation test images
- Recored road video
- I applied the trained model to the real road video. It showed good performance. You can see the full video in my repo.
I will apply this model to 'CityScape Dataset' which requires more complex segmentation!!!!