From this blog, we will gradually introduce DPM + latent SVM. For a brief introduction to DPM + latent SVM under opencv, refer to the previous blog: opencv latent SVM discriminatively trained part
Based Models for Object Detection
Take cat. XML (Sample/C in the opencv installation directory) as an example.
<Model>
<! -- Number of components -->
<Numcomponents> 2 </numcomponents>
<! -- Number of features -->
<P> 31 </P>
<! -- Score threshold -->
<Scorethreshold>-1.0028649999999999 </scorethreshold>
<Component>
<! -- Root filterdescription -->
<Rootfilter>
<! -- Dimensions -->
<Sizex> 5 </sizex>
<Sizey> 9 </sizey>
<! -- Weights (binary representation) -->
<Weights>
...
</Weights>
<! -- Linear termin Score Function -->
<Linearterm>-2.2535784347835031 </linearterm>
</Rootfilter>
<! -- Part filtersdescription -->
<Partfilters>
<Numpartfilters> 6 </numpartfilters>
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
</Partfilters>
</Component>
<Component>
<! -- Root filterdescription -->
<Rootfilter>
<! -- Dimensions -->
<Sizex> 5 </sizex>
<Sizey> 9 </sizey>
<! -- Weights (binary representation) -->
<Weights>
...
</Weights>
<! -- Linear termin Score Function -->
<Linearterm>-2.5835343890077622 </linearterm>
</Rootfilter>
<! -- Part filters description -->
<Partfilters>
<Numpartfilters> 6 </numpartfilters>
<! -- Part filter? Description -->
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
<Partfilter>... </partfilter>
</Partfilters>
</Component>
</Model>
Internal Structure of partfilter:
<Partfilter>
<Sizex> 6 </sizex>
<Sizey> 6 </sizey>
<! -- Weights (binary representation) -->
<Weights> </weights>
<! -- Part filter offset -->
<V>
<VX> 3 </VX>
<Vy> 1 </Vy>
</V>
<! -- Quadratic penalty functioncoefficients -->
<Penalty>
<DX> 0.0004031731821276 </dx>
<Dy>-1, 0.0003745111759062 </dy>
<Dxx> 0.0100010270581015 </dxx>
<Dyy> 0.0205820897831230 </dyy>
</Penalty>
</Partfilter>
Note: 1. The data here is only for illustration. The weight node has a large data volume and is omitted. The partfilter node is a bit complicated and is listed in a single column;
2. Some concise descriptive text is not comprehensive. In partfilter, VX and Vy are the migration of hog. The items under the penalty node are used to calculate the Deformation
Model.