facebookresearch / unbiased-teacher

PyTorch code for ICLR 2021 paper Unbiased Teacher for Semi-Supervised Object Detection
https://arxiv.org/abs/2102.09480
MIT License
409 stars 84 forks source link

Visualize the pseudo-labels #34

Closed ogamache closed 2 years ago

ogamache commented 2 years ago

Hello! Thanks for your great work, it is really nice.

I was wondering, is it possible to visualize the job done by the Student to assign pseudo-labels to the images while running the training? My goal is to see the Student improves directly on the images from the dataset! (by example, see the bounding boxes around the objects and notice that the evaluation is better and better when the iterations increase)

Thank you for your help!

ycliu93 commented 2 years ago

My suggestion is to add the visualize_training(a function under GeneralizedRCNN class) to the output of student's prediction output in TwoStagePseudoLabGeneralizedRCNN (rcnn.py).

Here is the reference:

https://github.com/facebookresearch/unbiased-teacher/blob/6977c6f77c812fae4064dc1b3865658c2ed247b1/ubteacher/modeling/meta_arch/rcnn.py#L7

visualize_training function in class GeneralizedRCNN is defined in this link: https://github.com/facebookresearch/detectron2/blob/9eb0027d795bb9a38098bb05e2ceb273bfc9cf41/detectron2/modeling/meta_arch/rcnn.py#L87

Thanks

ogamache commented 2 years ago

Thanks for the tip! It works fine with some slight modifications :)