Self Driving Car Using CNN
End to End CNN Model
Problem Definition
We have built a minimal version of the self-driving car, using the Deep Learning algorithm Convolutional Neural Network which predicts the steering angle to avoid all sorts of collisions. Predicting the steering angle can be thought of as a regression problem. We have trained our algorithm with images along with the label of steering angle after the model has learned the steering angle as per the turns in the image we finally predicted the steering angle for unknown images.
Prerequisites
You need to have installed the following software and libraries in your machine before running this project.
- Python 3: https://www.python.org/downloads/
- Anaconda: It will install python notebook and most of the libraries which are needed like pandas, matplotlib, NumPy and scipy: https://www.anaconda.com/download/
Libraries:
- Tensorflow: It is a deep learning library.
- pip install TensorFlow
- OpenCV: It is used for processing images.
- pip install OpenCV-python
Dataset
Download Dataset by Sully Chen: [https://drive.google.com/file/d/0B-KJCaaF7elleG1RbzVPZWV4Tlk/view] Size: 25 minutes = 25{min} x 60{1 min = 60 sec} x 30{fps} = 45,000 images ~ 2.3 GB
There is a total of 45500 images in the dataset along with their steering angles. We will split the dataset into a train and test in a ratio of 80:20 sequentially.
Demo
How to Run
Visit my Github Repository —
- Use “Self Driving Car atan.ipynb” file for training the model.
- After training the model, use “run_dataset(1).py” to visualize the output.
Conclusion-
- This demonstrated that CNNs are able to learn the entire task of lane and road following without manual decomposition into road or lane marking detection, semantic abstraction, path planning, and control. The system learns, for example, to detect the outline of a road without the need for explicit labels during training.
- A small amount of training data from less than a hundred hours of driving was sufficient to train the car to operate in diverse conditions, on highways, local and residential roads in sunny, cloudy, and rainy conditions.
- CNN is able to learn meaningful road features from a very sparse training signal (steering alone).
- More work is needed to improve the robustness of the network, to find methods to verify the robustness and to improve visualization of the network-internal processing steps.
Watch Real Car Running Autonomously using this Algorithm -
A TensorFlow/Keras implementation of this Nvidia paper with some changes.
Thank you! Give a clap if you find it useful, for any queries you can mail me at mohdsaquib0998@gmail.com
Acknowledgments
• Applied AI Course