Files
hieuck-ComfyUI-BiRefNet/debug.ipynb
T
2024-03-21 19:24:54 +08:00

2.1 KiB

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