Udaicty self-driving car engineer nanodegree. The udacity project solution.
In this project, you'll label the pixels of a road in images using a Fully Convolutional Network (FCN). We use the FCN based on the VGG-16 image classifier architecture for semantic segmentation with some data from [kitti data set(both with trainning and testing)]( Download the Kitti Road dataset from here.
The layers 3, 4 and 7 of VGG16 are utilized in creating skip layers, and we can find the reasons in this paper.
We get the VGG-16 model which is pre-trainned. And use the AdamOptimizer, the loss function is cross_entropy loss. The hyperparameters are as below:
hyperparameters | values |
---|---|
learning_rate | 0.00001 |
keep_prob | 0.5 |
epochs | 48 |
batch_size | 5 |
There are some result for the Semantic Segmentation in test images:
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.
Make sure you have the following is installed:
You may also need Python Image Library (PIL) for SciPy's imresize
function.
I install it in this way:
pip3 install -r requirements.txt
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.
Implement the code in the main.py
module indicated by the "TODO" comments.
The comments indicated with "OPTIONAL" tag are not required to complete.
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.