Merge pull request #20 from WeiChengTseng/master
fix the bug about the image dimension
This commit is contained in:
commit
d2d9d7dc7c
2 changed files with 7 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@
|
|||
*.dae
|
||||
data/*
|
||||
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))
|
||||
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 = tf.image.resize_area(imgs, [400, 400]).numpy()
|
||||
|
||||
|
|
Loading…
Reference in a new issue