Caffe: The meanings of parameter "variance" in PriorBox layer

Created on 30 Jul 2016  路  2Comments  路  Source: weiliu89/caffe

Hi, wei~
I was confused with the parameter "variance" in PriorBox layer (the meaning of this parameter is not given in your paper). I kindly ask you the usage of this parameter. Why do you design such a parameter? Thanks~


Corresponding codes are given in following:

top_data += top[0]->offset(0, 1);
if (variance_.size() == 1) {
caffe_set(dim, Dtype(variance_[0]), top_data);
} else {
int count = 0;
for (int h = 0; h < layer_height; ++h) {
for (int w = 0; w < layer_width; ++w) {
for (int i = 0; i < num_priors_; ++i) {
for (int j = 0; j < 4; ++j) {
top_data[count] = variance_[j];
++count;
}
}
}
}
}

Most helpful comment

It is used to encode the ground truth box w.r.t. the prior box. You can check this function. Note that it is used in the original MultiBox paper by Erhan etal. It is also used in Faster R-CNN as well. I think the major goal of including the variance is to scale the gradient. Of course you can also think of it as approximate a gaussian distribution with variance of 0.1 around the box coordinates.

All 2 comments

It is used to encode the ground truth box w.r.t. the prior box. You can check this function. Note that it is used in the original MultiBox paper by Erhan etal. It is also used in Faster R-CNN as well. I think the major goal of including the variance is to scale the gradient. Of course you can also think of it as approximate a gaussian distribution with variance of 0.1 around the box coordinates.

Thanks for your prompt reply. I also find a similar parameter in the python version code of Faster R-CNN. It is named as "stds" rather than "variance", but has a same meaning with "variance". Besides, your answers help me further understand this parameter. Thanks. ^_^

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stoneyang picture stoneyang  路  3Comments

yeongrok picture yeongrok  路  6Comments

Sundrops picture Sundrops  路  4Comments

alenaliu picture alenaliu  路  3Comments

HaozhiQi picture HaozhiQi  路  6Comments