lightly-ai / lightly

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

Grad-CAM or attention map #1587

Open s9021025292140 opened 4 months ago

s9021025292140 commented 4 months ago

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

Thank you!

guarin commented 4 months 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!