Object Recognition and Scene Understanding(八)Matlab中Latent SVM model參數含義

來源:互聯網
上載者:User
Matlab中mat檔案model參數含義

模型檔案是按照Latent SVM模型儲存文法儲存參數的,利用了查表的思想,具體細節需要參考原始論文。這樣儲存的目的好像是計算方便。

1.model簡單節點內容

 model.class= 'bottle'

model.year= 2011

model.note= 15-50-36

 2.  model有以下關鍵節點

filters:[1x42 struct]

  rules: {1x81 cell}

symbols:[1x81 struct]

  start: 2

 裡面的數字僅為了說明使用

 model.symbols(i)=

       type: 'T'

    filter: 3

 T:terminal,對應一個filter,並且給出其index。N->non-terminal,非filter,而是一個deformation
model

 model.filters{i}=

              w: [7x11x31 double]

    blocklabel: 1

     symmetric: 'M'

          size: [7 11]

          flip: 0

        symbol: 1

 包含the filter weights和 blocklabel,symmetric有兩種情況M和N,M表明有一個垂直鏡像部分;N表示沒有。如果symmetric
== 'M'那麼將會有兩個filters有相同的blocklabel。

flip表明w需要filp組成filter。

symbol記錄model.symbol的標記,例如model.symbols{8}.filter = 3,那麼model.filter{3}.bymbol =
8;

 model.rules是模型存取的關鍵,model.rules和symbol大小相同,每個model.rules中都有一個symbol。

 LHS: lefthand side

 RHS: righthand side

 The cellmodel.rules{i} holds an array struct that lists the rules for which I acts asthe left-hand side symbol.  So,model.rules{4}(1) and model.rules{4}(2)
are the first two productions forsymbol 4 in some imaginary grammar.  Thefield model.start holds the distinguished start symbol for the grammar.  Let's use that symbol as an example.

 

model.rules{model.start}(1)=

      type: 'S'

       lhs: 2

       rhs: [1 11 15 19 23 27 31]

    offset: { w: -3.394  blocklabel: 2 }

    anchor: {[0 0 0]  [12 0 1] [4 5 1]  [13 8 1]  [0 0 1] [16 0 1]  [0 5 1]}

 Here isthe first rule with model.start on the LHS. In the case of a 6 component mixture model, model.rules {model.start} isa struct array of 6 elements. 
The fieldlhs is simply a convenience field indicating what the production's LHS is.  The field rhs holds the symbols that appearon the production's right-hand side.  Thefield type is 'S' if this is a structural rule or 'D' if this is a deformationrule.  Now
I'll split the description intotwo cases.

 case 1:structural rule

 The fieldoffset holds the offset value and its blocklabel (these will be shared for mirroredcomponents).  The anchor field holds theparameters of
the "structure function" that defines how each of thesymbols in the rhs is placed relative to a placement of the lhs symbol.  The format is [dx dy ds], where 2^ds is thescale change.  So ds = 1 implies that therhs symbol

lives attwice resolution of the lhs symbol.  Thevalues of dx, dy are HOG cell displacements at the rhs's native scale.  Note that dx and dy are displacements, sothey are 1 less than the anchor values that
were defined in the old model.  The first symbol on the rhs has anchor = [0 00], because this symbol is a terminal for the root filter.

 case 2:deformation rule

 Let'slook at the second symbol on the rhs in the rule above.

 model.rules{11}=

     type: 'D'

     lhs: 11

     rhs: 10

     def: {

             w: [0.0209 -0.0015 0.0155 0.0010]

    blocklabel: 8

          flip: 0

     symmetric: 'M'

     }

     offset: { w: 0  blocklabel: 7 }

 Deformationrules don't have an anchor field, but do have a def field.  The def field describes the deformation modelfor this rule, and so it includes
the coefficients and the blocklabel.  The def.symmetric field can be 'M' if thereis a vertically mirrored deformation rule or 'N' if there is no
symmetry constraint.  In the case of 'M', flipindicates how to write features and read models (just like features.flip).  There's an implicit assumption in the codethat deformation rules only have one
symbol on the right-hand side (though itneed not be a terminal).

 def.w用於求取deformation model,也就是XML中的Penalty節點內容

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.