dk-liang / FIDTM

[IEEE TMM] Focal Inverse Distance Transform Maps for Crowd Localization
MIT License
173 stars 42 forks source link

Too many False positives #12

Closed RawanLaz closed 3 years ago

RawanLaz commented 3 years ago

I tried to run the video demo code on a video and using the model mode_best_57.pth or the model model_best.pth I got so many false positives? what can I do to be able to run the model on other data? (note that I didn't scale down the frames in the video) Screenshot from 2021-05-20 16-48-19

dk-liang commented 3 years ago

Thanks for your attention! The model_best_57 is trained from ShanghaiTech PartA, a small crowd dataset. Maybe you can try to utilize the pre-trained model from the NWPU-Crowd dataset. You can download the pre-trained model from https://1drv.ms/u/s!Ak_WZsh5Fl0lhCneubkIv1mTllAZ?e=0zMHSM. Additionally, sometimes change the test video's resolution is useful, do you try to test it based on 1920 x 1080 or 960 x 560?

RawanLaz commented 3 years ago

Thank you for your response! I tried the other model (ShanghaiTechB) and this is the output. The number of people in the image is around ~60 people but the counter shows 243 and The video resolution is 1280*720 note that there are multiple overlapping boxes on the same person (should I use non maximum suppression?)

Screenshot from 2021-05-22 14-08-41

dk-liang commented 3 years ago

Hey, we sorry that we only uploaded the PartA and PartB pre-trained model in Onedrive in the past. We now have successful upload the other datasets’ pre-trained models in the Onedrive. Could you try to utilize the other model to test the video? Besides, I think NMS is out necessary, and you can change the LMDS code to suppress the false positive. Specifically, you can modify the threshold in "input[input < 100.0 / 255.0 * torch.max(input)] = 0”. The default threshold is set as 100.

RawanLaz commented 3 years ago

Wow! I tried the model "model_best_nwpu.pth" and it did REALLY well!! Thanks for sharing the other models! Screenshot from 2021-05-23 16-53-31