Sensor Car by jcjgraf - 1


Software for a self-driving car, based on neural networks. An Unity simulation is provided to run the car.

Unknown VersionMIT LicenseUpdated 2 years agoCreated on May 10th, 2018
Go to source


Software for a self-driving car, based on artificial neural networks (ANNs). An Unity simulation is provided to run the car.

Gif of the SensorCar in action

Multiple sensors provide distance information to the ANN. In the evaluation process, these data is used to get the steering angle.

A module is provided for generating an infinitely long, randomly generated road. The SensorCar is capable of driving through this road map without any collisions.

❗️ This project started as a proof of principle and contains two different networks. One is programmed without the use of any high-level libraries whereas the other is build with Tensorflow.

Getting Started

These instructions will get you a copy of the project up and running on your local machine.


This project requires Unity3D and Python +3.6.


  • Download a copy of this project.

  • Install the required Python packages with pip:

pip install -r requirements.txt

Run the Car on the ANN

  • Load TF Network and start socket server
python3 --drive ./examples/21-100-50-20-1-0_001-21SensorsTF/model
  • Open the scene infinityRoad21 from ./simulation/sensorCar/Assets/Scenes/ with Unity and start it by pressing on the play button.

Generate a Training Dataset

  • Load the scene infinityRoad{3|21} from ./simulation/sensorCar/Assets/Scenes/ with Unity.

  • Start the scene and manoeuvre the car with the , , , keys.

  • Press r to start the recording and then f to stop it again.

Train The Neural Network

  • Train a TF network
python3 --train ./examples/dataset21Sensors/ds21.txt \
--shape 21 100 50 20 1 --learningrate 0.001 --epochs 1000 --saveinterval 10


This project is licensed under the MIT License - see the file for details

Show all projects by jcjgraf