DEV Community


The GhostCar - An-Autonomous-Car-Project

sgagankumar profile image Gagan Kumar ・2 min read



The Aim of this Project was to build a Fully Autonomous Car Simulation using Behavioural Cloning on Convolution Neural Networks Model.


Autonomous cars are a boon for the vision of a smart world. Tesla, BMW, Google, NVIDIA are some of the companies contributing to this technology and have overcome major milestones in developing autonomous vehicles. With the development of autonomous cars, they can cause a huge boost to the transportation and automobile industries and hence we aimed to contribute to the Autonomous Car Development Industry.


1) - The Python Program hosts a Flask server on Local host to communicate controls to the simulation softwares.

2) Behavioural Cloning.ipynb - Python Notebook File that shows the procedure and methods developed and used in order to build and train the CNN Model for the Autonomous Car.

3) Model.h5 - Weights file for several trained models.


1) model1.h5 - Trained over 4053 samples and gives a loss of 0.0743

2) model2.h5 - Trained over 8205 samples and gives a loss of 0.369

3) model3.h5 - (Best) Trained over 30227 samples and gives a loss of 0.0276

Summary of the Design CNN Model

Note: The Model Developed is as per the Nvidia End-to-End Self Driving Car Documentation

Layer (type) Output Shape Param #

conv2d_21 (Conv2D) (None, 31, 98, 24) 1824

conv2d_22 (Conv2D) (None, 14, 47, 36) 21636

conv2d_23 (Conv2D) (None, 5, 22, 48) 43248

conv2d_24 (Conv2D) (None, 3, 20, 64) 27712

conv2d_25 (Conv2D) (None, 1, 18, 64) 36928

flatten_5 (Flatten) (None, 1152) 0

dense_17 (Dense) (None, 100) 115300

dense_18 (Dense) (None, 50) 5050

dense_19 (Dense) (None, 10) 510

dense_20 (Dense) (None, 1) 11

Total params: 252,219

Trainable params: 252,219


Editor guide