Histograms of Oriented gradients for human detection

Source: Internet
Author: User
Histograms of Oriented gradients for human detection

This article is the paper note.

Reprinted Note: http://blog.csdn.net/stdcoutzyx/article/details/40299383

Hog operator for pedestrian detection is a classic article published on cvpr in. Use the hog operator to extract features and then use SVM for classification.

1. Definition

Hog descriptor: locally normalized histogram of gradient orientation in dense overlapping grids, that is, the partial normalized gradient direction histogram.

2. Important Properties
  1. Fine-scale gradients for better gradient calculation
  2. Fine orientation binning, better direction Partition
  3. Relatively coarse spatial binning, relatively coarse-grained space partition
  4. High-quality local contrast normalization in overlapping descriptor blocks, high-quality local contrast normalization in overlapping Blocks
3. Algorithms
Default detector properties:
  • RGB color space with no Gamma Correction.
  • [-1, 0, 1] gradient filter with no smoothing.
  • Linear Gradient voting into 9 orientation bins in 0-180
  • 16 × 16 pixel blocks of four 8 × 8 pixel cells.
  • Gaussian spatial window with variance = 8.
  • L2-Hys (Lowe-style clipped L2 norm) block normalization.
  • Block spacing stride of 8 pixels (hence 4-fold coverage of each cell ).
  • 64 × 128 Detection Window
  • Linear SVM Classifier
3.1 Process

Basic concepts:

  • Cell: The minimum unit for calculating the gradient histogram, which is 8 × 8 in this paper.
  • Blocks: the Unit for histogram normalization. In this paper, there are 2x2 cells, that is, the block size is 16x16.

The hog + SVM algorithm consists of the following steps:

  • Use the Gamma transform to normalize the image.
  • Calculate the gradient direction of each pixel.
  • Calculate the gradient direction in cell to obtain the histogram.
  • The cell gradient histogram is normalized in the block. The block slides over each cell in the window, and the block can overlap.
  • Concatenates the histograms of each block to form the feature vectors of the entire image.
  • It should be noted that each cell may be divided into feature vectors of the entire image as sub-parts of multiple blocks.
  • Use the linear SVM algorithm to classify feature vectors and obtain the final model.
3.2 gamma/colour Normalization
  • Pixel representation: grayscale, RGB, lab.
  • Optionally with power law (gamma) Equalization or log Compression
  • Best: lab and RGB with square root gamma Compression
3.3 gradient Computation
Compare on schemes below:
  • Various 1-D point Derivatives
    • Uncentred [-1, 1]
    • Centred [-1, 0, 1]
    • Cubic-corrected [1,-8, 0, 8,-1]).
    • Those with Gaussian derivatives.
  • 3 × 3 Sobel masks.
  • 2 × 2 diagonal ones (the most compact centred 2-D derivative masks)

Simplest scheme turns out to be the best. uncentred [-1, 0, 1] without Gaussian smooth work best. Larger mask and smoothing damages the performance significantly.

For color images, calculate separate gradients for each channel, take the one with largest norm as the pixel's gradient vector.

3.4 spatial/orientation binning
To obtain a histogram for each cell, follow these steps:
  • Calculate a weighted vote for each pixel Based on the orientation of the gradient element centred on it.
    • Vote weight is function of the gradient magn=at the pixel
      • Magnw.itself
      • Its Square
      • Its square root
    • Magnw.itself gives the best result.
  • Accumulated into orientation bins over local spatial regions that called cells
    • Orientation bins have two kinds:
      • 0-180: Unsigned gradient
      • 0-360: signed gradient
    • Unsigned gradient is better, for human's wide range of clothing and background color make the signs of contrasts uninformative.
      • Include the signs information maybe helpful in some other object recognition task like cars, motobikes.
    • Number of orientation bins get to the best at 9 Using unsigned gradient.
    • To reduce aliasing, votes are interpolated bilinearly between the neighbouring bin centers in both orientation and position.
3.5 normalization and descriptor Blocks
  • Gradient strengths vary over a wide range owing to local variations in illumination and fore-background contrast, so local contrast normalization is essential.
  • Grouping cells into larger spatial blocks and contrast normalization each block separately.
    • An alternative center-surround style cell normalization scheme is also investigated.
      • Take a cell as the center, use Gaussian as the peripheral cell weighting, use the cell and peripheral cell to get a total value, and then normalize the total value. In this way, the weight of a cell appears only once in the final result. The effect is also reduced.
  • Overlapping of the blocks seems redundant but improves the performance significantly.
  • The paper uses two operators: R-HOG and C-hog.
  • Vertical cell (2 × 1) and horizontal cell (1 × 2) are also considered.
  • It's useful to down-weight pixels near the edges of the blocks by applying a Gaussian spatial window to each pixel before accumulating orientation votes into cells.
3.6 block Normalization schemes
After combining multiple cells into a block, a block vector V is formed. For V, there are several methods to normalize:
  • L2-norm
  • L2-Hys
  • L1-norm
  • L1-sqrt
4. Experiment
Perform the following groups of experiments:
  • Compare with previous Algorithm
    • Generalized Haar wavelets
    • PCA-Sift
    • Shape contexts
  • Effect of gradient Scale
    • Test the effect of Gaussian smoothing during gradient calculation
  • Effect of orientation bins 'Number
    • Measure the test taker's knowledge about the effects of angle partitioning.
  • Effect of normalization method
    • Evaluate the effects of different normalization methods during block normalization.
  • Effect of Overlap
    • The Effects of Different overlap when combining block and cell. The cell size is 8 × 8.
    • Note: The stride parameter indicates the number of shards at each sliding interval of the block.
  • Effects of Different block sizes and cell sizes
  • Effect changes caused by different detection window sizes
  • Effects of SVM Parameters

Inspection indicators:

  • Miss rate: error rate. The ratio of all samples that are judged to be pedestrian (No pedestrian is identified as pedestrian.
  • Fppw: false positives per window. The average missed detection rate of each window is determined as the ratio of samples with no pedestrians. Average to each Detection Window
5. a deep understanding of hog Operators

The most important idea of the hog operator is that in an image, the appearance and shape of a local target can be well described by the Direction density distribution of the gradient or edge.

The hog operator has many advantages:
  • Because it operates on the local cell units of the image, the geometric and optical deformation of the image can be well maintained without deformation, because these two types of deformation only appear in a larger space area.

  • Experiments show that, under the conditions of coarse space sampling (coarse spatial sampling), fine orientation sampling, and strong local optical normalization (strong local photometric normalization, as long as a pedestrian can maintain an upright posture, some minor physical movements are allowed without affecting the detection effect.

R-HOG and sift descriptors look very similar, but their difference is: the R-HOG is calculated in a single scale, in a dense grid, without sorting the direction (are computed in dense grids at some single scale without orientation alignment ); the sift descriptor is calculated based on multi-scale, sparse image key points, and directed sorting (are computed at sparse, scale-invariant key image points and are rotated to align orientation ). In addition, R-HOG is a combination of intervals used to encode airspace information (are used in conjunction to encode spatial form information ), the descriptors of Sift are used independently (are used singly ).

6. Reference
  • [1]. dalal N, triggs B. histograms of Oriented gradients for human detection [c] // computer vision and pattern recognition, 2005. cvpr 2005. IEEE Computer Society Conference on. IEEE, 2005, 1: 886-893.

Histograms of Oriented gradients for human detection

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.