ucbdrive / few-shot-object-detection

Implementations of few-shot object detection benchmarks
Apache License 2.0
1.08k stars 225 forks source link

Question about few-shot versions of Pascal VOC #132

Closed piddnad closed 2 years ago

piddnad commented 2 years ago

Firstly, thanks for your great work!

The question is about prepare_voc_few_shot.py, which ramdomly samples training shots for each category:

https://github.com/ucbdrive/few-shot-object-detection/blob/6b0769b5d682fbf7fdcdaed0c1d0dfd51c373468/datasets/prepare_voc_few_shot.py#L52

The question is, according to the code, the shots(eg. 1, 3, 5, and 10) are sampled incrementally and independently, therefore some duplicate images may be sampled, resulting in insufficient instances of some shots (mostly occurring in 10 shots).

For example, in seed 3, class 'sofa', shots 10, datasets/VOC2012/JPEGImages/2009_004076.jpg occurs twice, so there are only 9 sofa instance for 10-shot training in fact.

I want to know if this will cause any problems , thank you!

thomasehuang commented 2 years ago

You point out a good issue, I think the sampling code may not have been written in the best way. It shouldn't cause any issues though, since the goal of multi-seed evaluation is lower variance in performance estimate anyways.

piddnad commented 2 years ago

I see. Thank you for your reply! :)