Comments (7)
你好,可以尝试使用matplotlib并设置cmap='jet'
.
from dcls-sr.
作者您好,我儲存R特徵圖的code是這樣
test = self.channel_1(f2) #將R特徵圖channel做1*1con讓channel為1
test = np.squeeze(test, axis=2)
ndarr = test.detach().squeeze().cpu().numpy()
ndarr = (ndarr * 255).clip(0, 255).astype(np.uint8)
print("ndarr-------------------", ndarr.shape)
print("ndarr dtype-------------------", ndarr.dtype)
print("ndarr min/max-----------------", ndarr.min(), ndarr.max())
ndarr = ndarr.astype(np.uint8)
ndarr_transposed = np.transpose(ndarr, (0, 1)) # 对于二维数组,不需要改变轴的顺序
plt.imshow(ndarr_transposed, cmap='jet')
plt.savefig('feature_map.png')
plt.show()
感覺應該正常不會長這樣,再麻煩您跟我說一下,謝謝!
from dcls-sr.
看起来不对= =。你为什么要加一个1x1卷积让channel为1呢?可以直接只取第一个(或者前N个)通道的特征不?
from dcls-sr.
我原本的理解是如果只使用第一個channel的話會導致資訊流失,依照您給的建議有嘗試過使用第1個channel來測試,如下:
first_channel = f2[0, :1, :, :]
test = np.squeeze(first_channel, axis=0)
ndarr = test.detach().squeeze().cpu().numpy()
ndarr = (ndarr * 255).clip(0, 255).astype(np.uint8)
plt.imshow(ndarr, cmap='jet')
plt.savefig('feature_map.png')
plt.show()
好像更加的不太對的樣子,不太確定我哪邊理解有問題或操作,再麻煩您給我點指導,謝謝您!
from dcls-sr.
你这是学习后的模型吗还是random weights?可以多打印几个feature通道看看呢,理论上有些通道信息比较多。
from dcls-sr.
作者您好,我是使用已經訓練完後的權重檔案去印出圖片,作者您說的多印幾個是指我針對第一個通道、第二個通道、第三個通道打印出來分別儲存起來的意思嗎?
from dcls-sr.
是的,有的通道信息应该会多一点
from dcls-sr.
Related Issues (20)
- 关于feature的问题 HOT 4
- 关于Deep Constrained Least Squares理论问题 HOT 2
- 關於train時發生的錯誤問題 HOT 12
- 关于公式9的问题 HOT 6
- 训练效果越来越差 HOT 2
- 拉普拉斯算子p HOT 1
- 关于怎么给图片添加噪声的问题 HOT 2
- 为什么训练时的模糊核,X2 、X3、X4的方差设置为[0.2,2] [0.2,3] [0.2,4] HOT 2
- 关于训练时psnr提高不多的问题 HOT 13
- 复现相关问题 HOT 2
- 训练时程序卡住不动,显存没有也没有占满,请问您了解是什么问题吗? HOT 2
- datasets HOT 4
- 请问这项工作没有提供训练好的模型吗? HOT 1
- deg_util中的高斯模糊和高斯噪声问题 HOT 1
- 关于数据集的一些问题 HOT 2
- 您好,以上的問題已解決,並且沒有出錯,但卻出現以下狀況 HOT 3
- 您好,想實現各項異性高斯核的相關問題 HOT 1
- 在运行codes/scripts/generate_mod_blur_LR_bic.py中报的错误 HOT 1
- 断点续训 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcls-sr.