In this project, a conventional computer vision method Histogram of oriented gradients(HOG) is implemented with machine learning classifier Support Vector Machine(SVM) to perform the vehicle detection. In addition, the result is benchmarked with the state-of-art deep learning methods: You only look once version 3 (YOLOv3) and Single Shot MultiBox Detector(SSD).
SVM classifier (click image to check the video)
Benchmark with:
YOLOv3 and SSD (click image to check the video)
In this repository contains a lot of ipython notebook files, the functionalities are as following:
-
train_classifier_hog.ipynb: Explore the dataset and train the SVM classifier
-
vehicle_detection_hog.ipynb: Implement HOG sub-sampling and search the vehicle base on pre-defined grids.
-
vehicle_detection_YOLOv3.ipynb: Use keras-yolo3 to perform object detection.
-
vehicle detection_SSD.ipynb: Use Tensorflow Object Detection API and pre-trained ssd_mobilenet_v1_coco_2017_11_17 model to perform object detection.
Requirements and more tech details: Write up
Notes:
- For using SSD, follow: keras-yolo3
- For using YOLOv3, follow: Tensorflow Object Detection API
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, you can also apply a color transform and append binned color features, as well as histograms of color, to your HOG feature vector.
- Note: for those first two steps don't forget to normalize your features and randomize a selection for training and testing.
- Implement a sliding-window technique and use your trained classifier to search for vehicles in images.
- Run your 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 your 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. You are welcome and encouraged to take advantage of the recently released Udacity labeled dataset to augment your training data.