mahmoodlab / CLAM

Data-efficient and weakly supervised computational pathology on whole slide images - Nature Biomedical Engineering
http://clam.mahmoodlab.org
GNU General Public License v3.0
1.07k stars 350 forks source link

Attention maps for multiple predictions #256

Closed otto863 closed 3 weeks ago

otto863 commented 3 months ago

Hello, I trained a model for classification using slide-level labels. For my PhD project, I would like to have CLAM return attention maps for both prediction 1 and 2. Is there a easy way to adapt the script(s) to achieve this? Thanks a lot for your help!

fedshyvana commented 3 weeks ago

If you're using CLAM_SB there should just be one set of attention scores for each slide, but it's always interpreted as the attention for that particular slide / class.