-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code for heatmap in figure2 #3
Comments
For the heatmap, we first average a feature map in the channel dimension and then visualize it. For example, feature = torch.mean(feature,1)[0,:,:] The "0" in [0,:,:] means we use the first image of a batch. Then we can just use matplotlib to visualize it: plt.matshow(feature)
plt.axis('off') |
Can the visualization code of feature map be published? |
As mentioned in the paper:
You can try this: # feature [h, w]
max_ = float(feature.max()) # > 0
min_ = float(feature.min()) # < 0
# make white color represent 0 value
m = -max(abs(max_), abs(min_))
feature[0,0] = m
plt.matshow(feature, interpolation='nearest', cmap='seismic')
plt.colorbar() @q760019473 @ximu1211 |
thnks sir! have 1 doubt, can you please let me know that why the feature maps are of green color. |
Because the default setting of |
This type of heatmap has rarely been seen before. If possible, is there a code?
The text was updated successfully, but these errors were encountered: