roytseng-tw / Detectron.pytorch

A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available.
MIT License
2.82k stars 567 forks source link

Accounting for varying object size in images of constant size #220

Open ashnair1 opened 5 years ago

ashnair1 commented 5 years ago

This issue is somewhat related to #86. I understand that TRAIN.SCALES parameter allows us to show the scaled version of the image to the model. My question is will this also work in the case where object sizes vary but image size is constant?

In my case, the size of images is mostly consistent (1024 x 1024). But the sizes of my objects of interest can vary from 8x8 pixels to 128 x 128 pixels. Should I change the FPN.RPN_ANCHOR_START_SIZE to start from 8 or should I modify the set of TRAIN.SCALES or perhaps both?

ZY-Zeng commented 3 years ago

This issue is somewhat related to #86. I understand that TRAIN.SCALES parameter allows us to show the scaled version of the image to the model. My question is will this also work in the case where object sizes vary but image size is constant?

In my case, the size of images is mostly consistent (1024 x 1024). But the sizes of my objects of interest can vary from 8x8 pixels to 128 x 128 pixels. Should I change the FPN.RPN_ANCHOR_START_SIZE to start from 8 or should I modify the set of TRAIN.SCALES or perhaps both?

Thank you for your answer. The size of image in my data is 1200 * 1600. And an assert error has been appeared which is len(roidb) == len(acched_roidb). How can I resolve this problem. Thank you very very much!!!