how to read a pil image from img to array code example
Example: pil image from numpy
from PIL import Image
PIL_image = Image.fromarray(numpy_image.astype('uint8'), 'RGB')
from PIL import Image
PIL_image = Image.fromarray(numpy_image.astype('uint8'), 'RGB')