from PIL import Image PIL_image = Image.fromarray(numpy_image.astype('uint8'), 'RGB')
Image.fromarray(data, 'RGB')