IDEA-Research / detrex

detrex is a research platform for DETR-based object detection, segmentation, pose estimation and other visual recognition tasks.
https://detrex.readthedocs.io/en/latest/
Apache License 2.0
1.9k stars 199 forks source link

Visualize the output #318

Open Cao-PeiPei opened 8 months ago

Cao-PeiPei commented 8 months ago

Hello,I'm having a problem where I don't know how to visualize the output of each feature layer. Does anyone have already made it happen? I'd appreciate it if you could open source the code!

rentainhe commented 7 months ago

Hello, sry for the late reply. What kind of visualization do you need in DETR models, maybe you can try to hack in our source code and collect the intern features for further usage like visualizations.

Cao-PeiPei commented 7 months ago

Thanks for your answer, pls when will the heat map visualization be implemented?like grad cam.

rentainhe commented 7 months ago

Thanks for your answer, pls when will the heat map visualization be implemented?like grad cam.

Sry we did not support heat map visualization now, but you can refer to this part of the code here to see how to implement the training visualization under DINO and you can implement the visualization by yourself

Cao-PeiPei commented 7 months ago

Thanks for the answer, I tried to add grad_cam code, but I have a problem, when I “from dino_r50 import model” with visual code, I get this error,--“ File "projects/dino/configs/models/main_vit.py", line 89, in main() File "projects/dino/configs/models/main_vit.py", line 41, in main model = model() UnboundLocalError: local variable 'model' referenced before assignment” how can I fix it?