yfeng95 / face3d

Python tools for 3D face: 3DMM, Mesh processing(transform, camera, light, render), 3D face representations.
2.65k stars 611 forks source link

`2_3dmm.py Lossy conversion problem #45

Open YuTingLiu opened 5 years ago

YuTingLiu commented 5 years ago

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 ?

xinwen-cs commented 5 years ago

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.

fashionguy commented 3 years ago

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