2.1 KiB
2.1 KiB
In [6]:
from PIL import Image
import numpy as np
import cv2In [10]:
img = Image.open("/data/ssd1/tmp/meihup_facedata/571a7061-f2c6-4e6b-ad0e-a7ca72f8f2ea.png")
img = np.array(img)
img = img /255In [11]:
img.shapeOut [11]:
(1080, 1080, 3)
In [12]:
a = cv2.resize(img, (1024, 1024))In [13]:
a.shapeOut [13]:
(1024, 1024, 3)
In [14]:
img.shapeOut [14]:
(1080, 1080, 3)
In [ ]: