2

The code which is available at http://www.cs.berkeley.edu/~rbg/latent/voc-release5.tgz is widely used in object detection. There is a imgdetect function which returns ds, bs and trees. It seems ds contains detection boxes and bs contains which of the filters used for detection responded in the image, while trees contains some information about the part scores. I was not able to find out how to get the part scores using trees and bs. Basically, given a detection box, I would like to find out which filters responded in detection and what was the score for each filter (sub part) which was used for detecting an object.

4

1 回答 1

0

我想出了如何做到这一点,在 gdetect_parse.m 的末尾,添加以下行,边界框(x1,x2,y1,y2)将对应于bs中的框,分数将在倒数第二行在树上{i}

node_id = 8; //确保它是一个叶子节点,即第二行树{i}应该是1

tree_id = 1; //其中一个检测树

scale = (model.sbin/pyra.scales(trees{tree_id}(8, node_id)));

x1 = (trees{tree_id}(6, node_id) - 1 - pyra.padx*(2^trees{tree_id}(9, node_id)))*scale + 1

y1 = (trees{tree_id}(7, node_id) - 1 - pyra.pady*(2^trees{tree_id}(9, node_id)))*scale + 1

filter_id = model.symbols(trees{1}(3, node_id)).filter;

fx = model.filters(filter_id).size(2);

fy = model.filters(filter_id).size(1);

x2 = x1 + fx*比例 - 1

y2 = y1 + fy*scale - 1

于 2014-01-11T01:22:18.193 回答