matlab中latent,Matlab中Latent SVM model参数含义

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 nosymmetry 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节点内容

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值