Skip to content

🚗Learning to drive a car via behavioral cloning.

Notifications You must be signed in to change notification settings

aritrakar/behavioral-cloning-car

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning to Drive via Behavioural Cloning

This project aims to teach a virtual car to drive autonomously by mimicking human driving behavior. Using a deep neural network, the model analyzes driving data collected from human drivers and learns to execute driving actions such as steering (for now, the acceleration is not controlled by the model). This project leverages the power of behavioral cloning, a form of supervised learning, to enable machines to learn complex behaviors directly from data.

Technologies

  1. Python 3.8+
  2. PyTorch (torch and torchvision)
  3. OpenCV
  4. Udacity Car Simulator

Critical dependencies: These two packages are critical for communicating with the simulator. The exact versions are required.

  1. python-socketio v4.6.1
  2. [python-engineio] (https://pypi.org/project/python-engineio/) v3.13

Getting started

# Clone the repository
git clone 

# Install the dependncies
pip install -r requirements.txt

# Start the simulator separately

# After the simulator is started, run the following
python drive_pt.py

Technical details

Data collection

See the Acknowledgements section.

Image preprocessing

There are two rounds of image preprocessing. The first round is exclusive to training data, wherein different transformations (affine, flip, translation, rotation, brightness adjustment) were applied to the training data.

The second transformation involves using the YUV color space instead of the RGB color space, applying a Gaussian blur, and resizing the image. These transformations are common for all data.

Model Architecture

The NVIDIA DAVE-2 CNN model architecture was used. Read more about it here.

Results

Demo

Acknowledgements

I got the training data from this repository.

About

🚗Learning to drive a car via behavioral cloning.

Topics

Resources

Stars

Watchers

Forks