1 将numpy.array 转换为 PIL.Image 类型
from PIL import Image
image = Image.fromarray(image)
2 将 PIL.Image 转换为 numpy.array 类型
import numpy as np
img = np.asarray(img)
from PIL import Image
image = Image.fromarray(image)
import numpy as np
img = np.asarray(img)