hasanirtiza / Pedestron

[Pedestron] Generalizable Pedestrian Detection: The Elephant In The Room. @ CVPR2021
https://openaccess.thecvf.com/content/CVPR2021/papers/Hasan_Generalizable_Pedestrian_Detection_The_Elephant_in_the_Room_CVPR_2021_paper.pdf
Apache License 2.0
682 stars 159 forks source link

Training citypersons with all the instances? #158

Closed 123dddd closed 1 year ago

123dddd commented 1 year ago

Hey, thanks for the great repo!

I have a question regarding the training with citypersons dataset.

In the convert_cityperson_to_coco.py script (line 111-121), I found all the other instances besides the pedestrians(class label 1) are appended to the annotation list, which means that all the ignore regions (class label 0), riders (class label 2) and others are loaded into the training set. And in the training script, there are no specific lines to eliminate them during training.

I am just curious that if I miss something or indeed that all the instances regardless if they are labeled as ignore are used to train the detector?

Also for the crowdhuman dataset it seems that all the persons labeled as ignore are also loaded into the training set. convert_crowdhuman_to_coco.py line 45-54.

Thank you in advance and looking forward to your reply!

hasanirtiza commented 1 year ago

I think "magic" is happening at multiple instances. For example in 'convert_cityperson_to_coco.py', here, you only add bboxes with label 1 to list with is_crowd flag set to false, else you add bboxes with is_crowd flag set to true (lines 111). Subsequently, while loading in 'mmdet/datasets/coco.py' here you check for is_crowd flag.