amdegroot / ssd.pytorch

A PyTorch Implementation of Single Shot MultiBox Detector
MIT License
5.11k stars 1.74k forks source link

in config.py, did min_sizes and max_sizes mean scale? #78

Open squirrel16 opened 6 years ago

squirrel16 commented 6 years ago

Nice work, thanks very much. But I have a little question:

    'min_sizes' : [30, 60, 111, 162, 213, 264],

    'max_sizes' : [60, 111, 162, 213, 264, 315],

Did this mean the scale of default boxes in ssd? Why did you set in this way?why is it different with 0.2-0.95 in the original caffe implementation?

AndrewZhao commented 6 years ago

the size of default box in caffe is also different from paper. min_size means the minimum object size in the current layer. you can change the sizes in order to fit your object size.

jxlijunhao commented 6 years ago

Actually, the paper and the origin caffe implement have some differences, so if you want to match this, you need read the origin caffe code

chi0tzp commented 6 years ago

@AndrewZhao could you elaborate a bit on that? What does the "minimum object size in the current layer" means? For instance, the last layer, which is 1x1, is for finding big objects, that would occupy the whole input image. What do the min_size=264 and max_size=315 mean in such a case? And also in the first layer, which is 38x38, what do the min_size=30 and max_size=60 mean?

Who should I set them for a new dataset? Should I measure the objects in their original dimensions and compute some statistics?

Many thanks.

WeihongM commented 5 years ago

@chi0tzp This size is relative to origin image size(such as 300x300). A helpful tutorial to understand this repo. Learning Note Single Shot MultiBox Detector with Pytorch

jamiechoi1995 commented 5 years ago

see https://github.com/weiliu89/caffe/blob/ssd/examples/ssd/ssd_pascal.py#L299-L317