Skip to content
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

unet预测全黑 #39

Open
luckylypig opened this issue Mar 17, 2022 · 2 comments
Open

unet预测全黑 #39

luckylypig opened this issue Mar 17, 2022 · 2 comments

Comments

@luckylypig
Copy link

您好,UNet多次修改学习率(e-3/-4/-5/-6/-7) 训练,但是预测结果图全黑,请问 该怎么办呢? 按照网上说的方法修改后,还是全黑。只有lr=e-6,epoch=200时预测结果显示,但是效果非常不好!

@zlckanata
Copy link
Owner

使用 DeepGlobe 的原始数据进行训练和测试,预期能够完全复现论文中的结果。
预测结果全黑有可能和训练数据或者 python 版本有关,需要检查是否和要求的版本一致。

@ai25395
Copy link

ai25395 commented Apr 16, 2023

我试了一下,发现只是看起来全黑,但打印mask.max()发现结果是6.7,也就是说灰度值太小了,导致人眼看起来全黑。因此只要把预测的mask的灰度映射到0-255就好了,代码如下:
mask = mask - mask.min()
mask = mask * 255 / mask.max()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants