Identify and track vehicles from a front-facing camera on a car with CV and ML techniques
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Vehicle Detection and Tracking

Identification and tracking of vehicles.


conda env create -f environment.yml
source activate environment


 Usage: [-i <file>] [-o <file>] -h | --help

  -h --help
  -i <file> --input <file>   Input text file [default: ../videos/project_video.mp4]
  -o <file> --output <file>  Output generated file [default: ../videos/project_video_output.mp4]


  • Input video needs to be a feed from centered onboard camera.
  • You will need to download the training data (vehicle and non-vehicle images) and put in a folder named data. It has been ignored for sizing issues.


python ../videos/project_video.mp4 -o ../videos/project_video_output.mp4

alt text

Detailed description

In this project, my main goal is to write a software pipeline to identify and track vehicles in a video from a front-facing camera on a car (without any false positives).

You will find the exploration code for this project is in the IPython Notebook and a video displaying how my pipeline can allow to detect and track vehicles on the road. A more detailed report of the project is available here.

The steps of this project are the following:

  • Build a feature engineering pipeline to create a dependent variable for our classification model.
  • Train a classifier using the selected features (HOG features and color features in our case).
  • Implement a sliding window search and use the trained classifier to search for vehicles in images
  • Create a video pipeline that create bounding boxes and identify vehicles most of the time with minimal false positives.