caffe icon indicating copy to clipboard operation
caffe copied to clipboard

Calculation of default boxes min_sizes / max_sizes is not consistent with paper?

Open mvoelk opened this issue 7 years ago • 5 comments

According to the paper, the naive approach to do the calculation of min_sizes and max_sizes in models/VGGNet/VOC0712Plus/SSD_512x512/ssd_pascal_512.py would be something similar to

min_dim = 512
mbox_source_layers = ['conv4_3', 'fc7', 'conv6_2', 'conv7_2', 'conv8_2', 'conv9_2', 'conv10_2']
min_ratio = 15
max_ratio = 90
n = len(mbox_source_layers)

np.linspace(min_ratio, max_ratio, n+1) * min_dim / 100.

array([ 76.8 , 131.6571, 186.5143, 241.3714, 296.2286, 351.0857, 405.9429, 460.8 ])

But how the calculation is done in the implementation leads to different values and code equivalent to


a = np.linspace(min_ratio, max_ratio, n-1)
a = np.concatenate((np.array([7]), a ,np.array([a[-1]+min_ratio])))
a * min_dim / 100.

array([ 35.84, 76.8 , 153.6 , 230.4 , 307.2 , 384. , 460.8 , 537.6 ])

Is there a reason for the different values?

mvoelk avatar Jul 31 '17 07:07 mvoelk

@mvoelk Did you solve the problem? I can't find any theory suport the min_size setting. @weiliu89 is it min_size just a experience value or there are tricks about setting.Thanks!

abrams90 avatar Aug 28 '17 01:08 abrams90

@abrams90 Theory should be equation 4 in the SSD paper...

mvoelk avatar Sep 14 '17 18:09 mvoelk

can yo please explain what is the meaning of min_ratio and max_ratio?

isalirezag avatar Sep 19 '18 15:09 isalirezag

@isalirezag did you get the answer?

eng100200 avatar Feb 28 '19 09:02 eng100200

@eng100200 nope

isalirezag avatar Feb 28 '19 21:02 isalirezag