fix the bug about the image dimension
This commit is contained in:
parent
b02703bec5
commit
7b6dfba1d1
2 changed files with 7 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -6,4 +6,5 @@
|
||||||
*.npz
|
*.npz
|
||||||
*.dae
|
*.dae
|
||||||
data/*
|
data/*
|
||||||
logs/*
|
logs/*
|
||||||
|
.vscode/
|
|
@ -81,7 +81,11 @@ def load_blender_data(basedir, half_res=False, testskip=1):
|
||||||
|
|
||||||
imgs_half_res = np.zeros((imgs.shape[0], H, W, 4))
|
imgs_half_res = np.zeros((imgs.shape[0], H, W, 4))
|
||||||
for i, img in enumerate(imgs):
|
for i, img in enumerate(imgs):
|
||||||
imgs_half_res[i] = cv2.resize(img, (H, W), interpolation=cv2.INTER_AREA)
|
# According to the api defined in the link below, the dimension
|
||||||
|
# should be represented as (W, H).
|
||||||
|
# https://www.tutorialkart.com/opencv/python/opencv-python-resize-image/
|
||||||
|
imgs_half_res[i] = cv2.resize(img, (W, H), interpolation=cv2.INTER_AREA)
|
||||||
|
# imgs_half_res[i] = cv2.resize(img, (H, W), interpolation=cv2.INTER_AREA)
|
||||||
imgs = imgs_half_res
|
imgs = imgs_half_res
|
||||||
# imgs = tf.image.resize_area(imgs, [400, 400]).numpy()
|
# imgs = tf.image.resize_area(imgs, [400, 400]).numpy()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue