-
Notifications
You must be signed in to change notification settings - Fork 478
Description
Hello, thank you very much for sharing your code. I’ve encountered an issue while trying to visualize the attention scores from my model.
The attention scores are stored in a variable attn, which is a np.ndarray with a shape of (4643,). The values range from [0.019, 1.0], with an average of around 0.192. I want to visualize them on the lowest-level WSI. My data consists of two WSIs—one at 20X magnification and the other at 40X. After averaging the attention scores from my model for these two magnifications, I use them as the scores for the heatmap, while the coords I pass are the patch coordinates from the 20X WSI. However, after running the code, the visualization doesn’t show the regions of attention—instead, I only see either the original image background or a completely blank image.
Could you please advise on what might be causing this issue? I’ve been debugging for a while but haven’t been able to successfully visualize the attention. I’d really appreciate your help. Looking forward to your reply—thank you very much!