A simple pedestrian detection count based on hog

Source: Internet
Author: User

The basic understanding of hog is the reference to Dalal's histograms of oriented gradients for Human detection This paper, and reference to the on-line still image hog pedestrian detection code changed to the basic video of pedestrian detection.

The basic idea of hog feature extraction:

The appearance and shape of the local target can be well described by the distribution of the local gradient or edge direction, even if we do not know the corresponding gradient and the position of the edge.

Data set: Inria

I also downloaded the Inria data set and then do a simple training, the number of samples less than the correct rate is simply terrible, and later added to difficult cases after the correct rate slightly better, but later in the video of pedestrian detection or decisive download of the online others have trained XML files for testing, The correct rate is quite considerable in the case of no occlusion.

The Hog process:

(1) Individuals think that the first step of grayscale is not necessary, but the grayscale will reduce the performance of detection, I use the results of my own training is quite obvious.

(2) The simplest ( -1,0,1) operator is chosen when calculating the gradient, and no smoothing is necessary.

(3) The operation of cell units and OPENCV has been performed by functions.

(4) Then use the classifier to classify, draw a rectangle, if the rectangle appears coincident, take the outside rectangle and then draw the appropriate reduction

I added the pedestrian detection in the video is the simplest to divide the video into video frames for each frame of the pedestrian detection, and the current number of pedestrians to the frame display, then the number of pedestrian location and pedestrian count, then the frame sequence into a new video, you can achieve the simplest video pedestrian detection. Personally, it can be combined with moving target detection and hog to achieve better pedestrian detection results.

The following is a list of my test results in Figure two:

Pedestrian detection in occlusion situations can be clearly seen, but it is acceptable if no occlusion is present.

A simple pedestrian detection count based on hog

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.