c-yn / FocalNet

[ICCV23] Focal Network for Image Restoration
MIT License
52 stars 3 forks source link

How to draw the feature maps in Figure 2 #5

Closed wonlp closed 10 months ago

wonlp commented 10 months ago

hello, I want to draw a middle feature map same as the Figure 2. Could you tell me how to draw it? Thank you!

c-yn commented 10 months ago

Hi, given a feature map visual, the snippet is as follows:

plt.figure(dpi=300) visual = torch.mean(visual, dim=1) plt.imshow(visual.squeeze(0).detach().cpu().numpy()) plt.axis('off') plt.show()

wonlp commented 10 months ago

ok, I got it. Thank you.