Skip to content

Commit

Permalink
Merge pull request #25 from zhhezhhe/patch-6
Browse files Browse the repository at this point in the history
maybe better
  • Loading branch information
baowenbo authored Oct 8, 2019
2 parents ebf4f22 + b92b8c2 commit 36fe0e8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions datasets/listdatasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ def Vimeo_90K_loader(root, im_path, input_frame_size = (3, 256, 448), output_fra

if data_aug and random.randint(0, 1):
path_pre2 = os.path.join(root, "im1.png")
path_pre1 = os.path.join(root, "im2.png")
path_mid = os.path.join(root, "im3.png")
path_mid = os.path.join(root, "im2.png")
path_pre1 = os.path.join(root, "im3.png")
else:
path_pre2 = os.path.join(root, "im1.png")
path_pre1 = os.path.join(root, "im2.png")
path_mid = os.path.join(root, "im3.png")
path_pre1 = os.path.join(root, "im1.png")
path_mid = os.path.join(root, "im2.png")
path_pre2 = os.path.join(root, "im3.png")

im_pre2 = imread(path_pre2)
im_pre1 = imread(path_pre1)
Expand All @@ -40,10 +40,10 @@ def Vimeo_90K_loader(root, im_path, input_frame_size = (3, 256, 448), output_fra
im_mid = np.flipud(im_mid)
im_pre1 = np.flipud(im_pre1)

X0 = np.transpose(im_pre2,(2,0,1))
X2 = np.transpose(im_mid, (2, 0, 1))
X0 = np.transpose(im_pre1,(2,0,1))
X2 = np.transpose(im_pre2, (2, 0, 1))

y = np.transpose(im_pre1, (2, 0, 1))
y = np.transpose(im_mid, (2, 0, 1))
return X0.astype("float32")/ 255.0, \
X2.astype("float32")/ 255.0,\
y.astype("float32")/ 255.0
Expand Down

0 comments on commit 36fe0e8

Please sign in to comment.