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
} 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;
}
}
}
}
}
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. ^_^
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.