In this section, we will take a look at one such feature extraction technique, the The Histogram of oriented Gradients , which transforms image pixels into a vector representation that is sensitive to broadly informative image features regardless of confounding factors like illumination. We will use these features to develop a simple vehicle detection pipeline, using machine learning algorithms .
GTI_Far : contains all the zoomed version of vehicles that are far.
GTI_Left : contains all the left and zoomed version of vehicles that are far.
GTI_Right : contains all the right and zoomed version of vehicles that are far.
GTI_MiddleClose : contains all the middle and zoomed version of vehicles that are far.
KITTI_extracted : contains images extracted from publically available kitty dataset , these images contains distinguished orientations.
Using these HOG features, we can build up a simple Vehicle detection algorithm with any Scikit-Learn estimator; here we will use a linear support vector machine. The steps are as follows:
-
Obtain a set of image thumbnails of Vehicles to constitute "positive" training samples.
-
Obtain a set of image thumbnails of non-Vehicles to constitute "negative" training samples.
-
Extract HOG features from these training samples.
-
Train a linear SVM classifier on these samples.
-
For an "unknown" image, pass a sliding window across the image, using the model to evaluate whether that window contains a Vehicle or not.
All of the detected patches overlap and found the Vehicle in the image!