Vehicle Detection and Tracking Project for Self-Driving Car ND
The goals / steps of this project are the following:
- Perform a Histogram of Oriented Gradients (HOG) feature extraction on a labeled training set of images and train a classifier Linear SVM classifier
- Optionally, apply a color transform and append binned color features, as well as histograms of color, to your HOG feature vector.
- Implement a sliding-window technique and use the trained classifier to search for vehicles in images.
- Run the pipeline on a video stream (start with the test_video.mp4 and later implement on full project_video.mp4) and create a heat map of recurring detections frame by frame to reject outliers and follow detected vehicles.
- Estimate a bounding box for vehicles detected.
Here are links to the labeled data for vehicle and non-vehicle examples to train the classifier. These example images come from a combination of the GTI vehicle image database, the KITTI vision benchmark suite, and examples extracted from the project video itself.
Some example images for testing the pipeline on single frames are located in the
test_images folder. Examples of the output from each stage of the pipeline is located in the folder called
Starting to work on this project consists of the following steps:
minicondaon your computer
- Create a new
condaenvironment using this project
- Each time you wish to work, activate your
Download the latest version of
miniconda that matches your system.
NOTE: There have been reports of issues creating an environment using miniconda
v4.3.13. If it gives you issues try versions
4.2.12 from here.
|64-bit||64-bit (bash installer)||64-bit (bash installer)||64-bit (exe installer)|
|32-bit||32-bit (bash installer)||32-bit (exe installer)|
Install miniconda on your machine. Detailed instructions:
- Linux: http://conda.pydata.org/docs/install/quick.html#linux-miniconda-install
- Mac: http://conda.pydata.org/docs/install/quick.html#os-x-miniconda-install
- Windows: http://conda.pydata.org/docs/install/quick.html#windows-miniconda-install
Clone the project:
git clone https://github.com/gdangelo/CarND-Vehicle-Detection.git cd CarND-Vehicle-Detection
Download the datasets as described in the
Project section above, and unzip it under the
If you are on Windows, rename
Create carnd. Running this command will create a new
conda environment that is provisioned with all libraries you need to be successful in this program.
conda env create -f environment.yml
Note: Some Mac users have reported issues installing TensorFlow using this method. The cause is unknown but seems to be related to
pip. For the time being, we recommend opening environment.yml in a text editor and swapping
Verify that the carnd environment was created in your environments:
conda info --envs
Cleanup downloaded libraries (remove tarballs, zip files, etc):
conda clean -tp
To uninstall the environment:
conda env remove -n carnd
Now that you have created an environment, in order to use it, you will need to activate the environment. This must be done each time you begin a new working session i.e. open a new terminal window.
OS X and Linux
$ source activate carnd
Depending on shell either:
$ source activate carnd
$ activate carnd
Now all of the
carnd libraries are available to you.
Launch the main python file:
$ python vehicle_detection.py
Questions or Feedback
Contact me anytime for anything about my projects or machine learning in general. I'd be happy to help you