我有GANs生成的float64类型的图像,并通过^{
Lossy conversion from float64 to uint8. Range [-0.9999998807907104, 0.9999175071716309]. Convert image to uint8 prior to saving to suppress this warning.
然后,在使用函数^{
UserWarning: Possible precision loss when converting from float64 to uint8 .format(dtypeobj_in, dtypeobj_out))
在保存之前,我也尝试过使用其他函数,比如来自tensorflow^{
来自the documentation of ^{} that you linked :
因为你的图像在[-1,1]的范围内,一半的数据将被设置为0,这就是为什么东西看起来更暗。在调用
skimage.img_as_ubyte
之前,请先尝试将图像缩放到一个仅为正的范围,例如将1添加到其中。在我用
就这样!在
相关问题 更多 >
编程相关推荐