ssd_keras icon indicating copy to clipboard operation
ssd_keras copied to clipboard

Why aspect_ratios is not equal to num_priors?

Open shuuchen opened this issue 7 years ago • 1 comments

Hi All, I am reading the code to understand it better. I find that in ssd.py, there is only one element in the aspect_ratios list while num_priors is 3. Shouldn't that be equal?

138     num_priors = 3
...
152     priorbox = PriorBox(img_size, 30.0, aspect_ratios=[2],
153                         variances=[0.1, 0.1, 0.2, 0.2],
154                         name='conv4_3_norm_mbox_priorbox')

For that in ssd_layers.py, num_priors_ is equal to the length of aspect_ratios list.

112         num_priors_ = len(self.aspect_ratios)

Can someone explain this?

shuuchen avatar Aug 25 '17 09:08 shuuchen

aspect_ratios = [2] with Max_size set to None means you will have the ratios 1.0, 2.0 and 1/2.0. So actually you will have 3 priors

JordanPeltier avatar Nov 08 '17 10:11 JordanPeltier