face3d icon indicating copy to clipboard operation
face3d copied to clipboard

`2_3dmm.py Lossy conversion problem

Open YuTingLiu opened this issue 5 years ago • 2 comments

Lossy conversion from float32 to uint8. Range [-2.5365238189697266, 31.68016815185547]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [-15.381681442260742, 16.904739379882812]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [-322.37890625, 1381.71484375]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [-353.31640625, 820.2724609375]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [-19.9322509765625, 506.154296875]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [-3.3485708236694336, 9.674751281738281]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [-87.1246337890625, 1.7592124938964844]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [-6.374320983886719, 2.4354400634765625]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [-38.636474609375, 6.33953857421875]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float32 to uint8. Range [-36.821044921875, 6.34783935546875]. Convert image to uint8 prior to saving to suppress this warning. Has any one got this warning ?

YuTingLiu avatar May 20 '19 06:05 YuTingLiu

This is the warning from package 'imageio', if you find it annoying, you can Commented-Out it in path_to_imageio/imageio/core/util.py.

xinwen-cs avatar Aug 01 '19 12:08 xinwen-cs

you can change some code. such as from io.imsave('{}/rendering.jpg'.format(save_folder), rendering) to io.imsave('{}/rendering.jpg'.format(save_folder), (rendering * 255).astype(np.uint8)) in examples/1_pipeline.py

fashionguy avatar Oct 07 '20 12:10 fashionguy