Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 2.98 KB

File metadata and controls

41 lines (27 loc) · 2.98 KB

hog-descriptor-for-vehicle-detection

Portion-Watermarking

Intro

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 .

Reading all Vehicale images and converting them to Grayscale

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.

image

Visualization of HOG features

image

HOG in Action: A Simple Vehicle Detector

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. image

  • 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. image

  • If detections overlap, combine them into a single window. image

All of the detected patches overlap and found the Vehicle in the image!

😉 Thanks