OpenCV中Latent SVM模型文件XML

原文:http://blog.csdn.net/loadstar_kun/article/details/8754359

从该blog开始,逐步介绍DPM + Latent SVM。关于OpenCV下DPM+Latent SVM简单介绍参考上一篇博文:OpenCV Latent SVM Discriminatively Trained Part Based Models for Object Detection

 

Cat.xmlopencv安装目录下sample/c内)为例

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

 

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>-0.0003745111759062</dy>

                   <dxx>0.0100010270581015</dxx>

                   <dyy>0.0205820897831230</dyy>

         </Penalty>

</PartFilter>

 

注:1.里面的数据仅是为了说明,weight节点数据量太大,省略,PartFilter节点有点复杂,单列出来;

2.其中有些简洁说明性文字,不是很全,PartFilterVxVyHOG的位移。Penalty节点下的各项是为了计算deformation model

你可能感兴趣的:(SVM,DPM)