website templates

A Self Driving Car using Machine Learning

A machine learning based AI that can navigate the track whilst avoiding other cars.

Mobirise

This project was my first experience of using machine learning algorithms to create something. I decided to create a self driving car within Unity using Python and Tensorflow. The catch is that the only input to the neural network is the image from the front of the car.

The system is a convolutional neural network which analyses each frame to determine whether to drive forward, turn right or turn left. To train the network I drove around a random track multiple times for 2 hours. Whilst I was controlling the car, I set up a Python program to capture the view from the front of the car as well as my current input (left, right or forward) for that frame. This was the data I used to train the network. 
 

Mobirise
Mobirise

I was very happy with the result of the project as after training it was able to complete a full lap of the track whilst avoiding the other stationary cars. It was also able to complete (or work for a while) a randomly generated track, showing good generalisation.