lightly-ai / lightly

A python library for self-supervised learning on images.
https://docs.lightly.ai/self-supervised-learning/
MIT License
2.91k stars 248 forks source link

Grad-CAM or attention map #1587

Open s9021025292140 opened 1 month ago

s9021025292140 commented 1 month ago

Would it be possible to add functionality for Grad-CAM or attention map similar to those used in DINO?

Thank you!

guarin commented 1 month ago

Hi! For Grad-CAM it is probably best if you just use the grad cam library: https://github.com/jacobgil/pytorch-grad-cam For the attention map visualization from DINO (here) the issue is mostly on how to make it work with other models than DINO. I guess it should be possible for any TIMM vision transformer, would definitely be a nice addition!