Algorithm Search⌘K

Modeladvanced

Deformable part model

Also called DPM, Felzenszwalb deformable parts.

Score an object as a root HOG filter plus part filters at displaced positions minus a quadratic deformation cost, maximized fast with generalized distance transforms.

The deformable part model (DPM) is an object model for sliding-window detection. It scores a window as a coarse root filter that covers the whole object, plus several part filters at twice the resolution, each allowed to move away from its rest position at a quadratic cost. It is a star-shaped pictorial structure on HOG features, so the best placement of the parts at every root position is found with generalized distance transforms in time linear in the number of positions. Felzenszwalb, Girshick, McAllester and Ramanan trained it discriminatively as a latent SVM, in which the part positions are hidden variables, and it was among the best detectors on PASCAL VOC from 2008 until convolutional networks such as R-CNN replaced it in 2014.

The machine

The feature pyramid. A HOG feature map with cells of 8 by 8 pixels is computed at each level of an image pyramid. Each cell has a 31-dimensional vector: 18 contrast-sensitive orientation bins, 9 contrast-insensitive orientation bins and 4 gradient energy terms. The last 13 numbers are an analytic projection of the 36 numbers that the four block normalizations of Dalal and Triggs give for one cell. The pyramid has λ\lambda levels per octave, and a part filter is placed λ\lambda levels below its root, where the cells are half as big, so the parts see twice the detail.

The model. A model with nn parts is (F0,P1,…,Pn,b)(F_0, P_1, \ldots, P_n, b). F0F_0 is the root filter, a w0×h0w_0 \times h_0 array of 31-vectors. Each part is Pi=(Fi,vi,di)P_i = (F_i, v_i, d_i): a filter FiF_i, an anchor position viv_i relative to the root, and four deformation coefficients did_i. The bias bb makes the scores of different models comparable.

The score. A placement is z=(p0,…,pn)z = (p_0, \ldots, p_n), with pi=(xi,yi,li)p_i = (x_i, y_i, l_i) a cell and a level, and li=l0−λl_i = l_0 - \lambda for the parts. Its score is (Eq. (2) of the paper)

score(p0,…,pn)=∑i=0nFi⋅ϕ(H,pi)−∑i=1ndi⋅ϕd(dxi,dyi)+b,\mathrm{score}(p_0, \ldots, p_n) = \sum_{i=0}^{n} F_i \cdot \phi(H, p_i) - \sum_{i=1}^{n} d_i \cdot \phi_d(dx_i, dy_i) + b,

where ϕ(H,p)\phi(H, p) is the subwindow of features at pp the size of the filter, (dxi,dyi)=(xi,yi)−(2(x0,y0)+vi)(dx_i, dy_i) = (x_i, y_i) - (2(x_0, y_0) + v_i) is the displacement of part ii from its anchor (Eq. (3)), and ϕd(dx,dy)=(dx,dy,dx2,dy2)\phi_d(dx, dy) = (dx, dy, dx^2, dy^2) (Eq. (4)). With did_i having positive quadratic terms, the deformation cost is a separable quadratic spring.

Detection. The score of a root placement is the best score over the part placements:

score(x0,y0,l0)=R0,l0(x0,y0)+∑i=1nDi,l0−λ(2(x0,y0)+vi)+b,\mathrm{score}(x_0, y_0, l_0) = R_{0, l_0}(x_0, y_0) + \sum_{i=1}^{n} D_{i, l_0 - \lambda}\big(2(x_0, y_0) + v_i\big) + b,

where Ri,lR_{i, l} is the response of filter FiF_i on level ll (a correlation) and

Di,l(x,y)=max⁡dx,dy(Ri,l(x+dx,y+dy)−di⋅ϕd(dx,dy))D_{i, l}(x, y) = \max_{dx, dy} \big( R_{i, l}(x + dx, y + dy) - d_i \cdot \phi_d(dx, dy) \big)

is a generalized distance transform of that response (Eq. (8) and (9)). The root placements with a score above a threshold are detections; the argmax of each DiD_i gives the part positions. Then:

  • Bounding-box prediction. A linear function of the root and part positions, fit by least squares, predicts a better box (Section 7.1).
  • Non-maximum suppression. Detections are sorted by score, and a detection is dropped when more than 50 percent of its box is covered by a box already kept (Section 7.2). This is the coverage test, not the intersection over union of later box non-maximum suppression.
  • Context. A second classifier rescores each detection with the best scores of all the class models in the image (Section 7.3).

Mixtures. A mixture model has mm components, each a full star model, for example for the front and the side view of a car. The score of a root placement is the best over the components (Section 3.3).

What it counts

The model counts the work of scoring a whole feature pyramid. Let kk be the number of cells of the pyramid and nn the number of parts. The filter responses are correlations; each distance transform is O(k)O(k) by the lower envelope method, so matching all parts at all root placements costs O(nk)O(nk) beyond the correlations. Compared with a single rigid filter of the same size, the parts add a small constant factor to the cost.

For training, it counts the solution of the latent SVM problem. With a vector β\beta of all filter weights, deformation coefficients and the bias, and a feature vector Φ(x,z)\Phi(x, z) for an example xx and a latent value zz (the component and the part placements),

fβ(x)=max⁡z∈Z(x)β⋅Φ(x,z),f_\beta(x) = \max_{z \in Z(x)} \beta \cdot \Phi(x, z),

and the training objective over labelled examples (xi,yi)(x_i, y_i), yi∈{−1,1}y_i \in \{-1, 1\}, is (Eq. (14))

LD(β)=12∥β∥2+C∑imax⁡(0,1−yifβ(xi)).L_D(\beta) = \frac{1}{2} \|\beta\|^2 + C \sum_{i} \max\big(0, 1 - y_i f_\beta(x_i)\big).

Relation to other models

  • Pictorial structures. The DPM is a pictorial structure with a star graph, the root as the centre, and quadratic springs; the dynamic program of that model becomes one distance transform per part.
  • The Dalal-Triggs detector. With no parts, the model is a single HOG filter scored by a linear SVM, which is the Dalal-Triggs detector with a different feature map. The paper reports that the root filter alone gives an average precision of 0.24 on the person class of PASCAL VOC 2006, and the full model 0.39 (Section 8).
  • Support vector machines. With a single latent value for each example, fβf_\beta is linear, and the objective is that of a linear support vector machine. Multiple-instance SVMs are another special case, where the latent value picks one instance from a bag.
  • The implicit shape model. The implicit shape model is also a star of local appearance around a centre, but it is generative, uses many small codebook patches instead of a few learned part filters, and finds objects by voting instead of by scanning.
  • Convolutional networks. Girshick and others later showed that the DPM can be written as a convolutional network with distance transform pooling. Region-based detectors such as R-CNN replaced it from 2014.

Known results in the model

Semi-convexity (Section 4.1). fβf_\beta is a maximum of linear functions of β\beta, so it is convex. The hinge loss max⁡(0,1−yfβ(x))\max(0, 1 - y f_\beta(x)) is then convex for a negative example (y=−1y = -1), but not for a positive one. If the latent value of each positive example is fixed to one zz, the objective becomes convex. This gives a coordinate descent (Section 4.2): fix the best latent value of each positive under the current β\beta, then solve the convex problem in β\beta, which is a standard SVM over the fixed positives and all latent values of the negatives; repeat. Neither step increases LDL_D, so the objective goes down monotonically, but only to a local optimum, and the method needs a good start.

Data mining of hard negatives (Section 4.4). A negative image gives a very large number of windows. Let β∗(C)\beta^*(C) be the minimizer of the objective on a cache CC of examples, and H(β,D)H(\beta, D) the hard examples of DD under β\beta: those with yifβ(xi)<1y_i f_\beta(x_i) < 1. Theorem 1 states that if H(β∗(C),D)⊆CH(\beta^*(C), D) \subseteq C, then β∗(C)=β∗(D)\beta^*(C) = \beta^*(D), so the cache can be grown with hard examples and shrunk of easy ones while the solution on the cache stays correct for all of DD. Theorem 2 gives conditions under which this loop terminates.

Training procedure (Section 5). Train the root filters of the components first, with the data split by the aspect ratio of the boxes; combine them into a mixture; then place 6 parts per component greedily on high-energy regions of the root filter at twice the resolution, and train the whole model with the coordinate descent and data mining above. The quadratic deformation coefficients are kept at least 0.01, so every spring stays a proper quadratic cost.

Matching cost. The cost O(nk)O(nk) for nn parts and kk positions follows from the linear-time Felzenszwalb distance transform: without it, the best part placement for every root position by brute force would cost O(nk⋅r)O(nk \cdot r) for a search region of rr cells per part.

Results (Section 8). On PASCAL VOC 2008 the system had the best average precision of the entries in 9 of the 20 classes and the second best in 8, and on the INRIA person data it reached an average precision of 0.869.

References

  1. Pedro F. Felzenszwalb, Ross B. Girshick, David McAllester and Deva Ramanan, Object detection with discriminatively trained part-based models, IEEE Transactions on Pattern Analysis and Machine Intelligence 32(9), 2010, 1627-1645, Section 3 (Eq. (2) to (4) the score and deformation features, Eq. (8) and (9) matching with distance transforms, Section 3.3 mixtures), Section 4 (latent SVM, semi-convexity, coordinate descent, stochastic gradient descent, data mining with Theorems 1 and 2), Section 5 (training), Section 6 (features), Section 7 (bounding-box prediction, non-maximum suppression, context), Section 8 (results)
  2. Pedro F. Felzenszwalb, David McAllester and Deva Ramanan, A discriminatively trained, multiscale, deformable part model, CVPR 2008, The first version: a root filter, part filters at twice its resolution, and latent SVM training
  3. Pedro F. Felzenszwalb and Daniel P. Huttenlocher, Pictorial structures for object recognition, International Journal of Computer Vision 61(1), 2005, 55-79, Section 4.1 (matching a tree model with generalized distance transforms)
  4. Navneet Dalal and Bill Triggs, Histograms of oriented gradients for human detection, CVPR 2005, The HOG features and the rigid linear template that the root filter extends

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/5X16YR/text.yaml