Skip to content

Commit

Permalink
Update create_test_lfdofdataset.py
Browse files Browse the repository at this point in the history
  • Loading branch information
erfect2020 authored Aug 19, 2024
1 parent 68c5e68 commit 36fdb87
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions data/create_test_lfdofdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,11 @@ def __getitem__(self, index):
_, (l_img, r_img, b_img, c_img) = self.uegt_imgs[index]
c_img_name = b_img

l_img = cv2.imread(l_img, cv2.IMREAD_COLOR)
r_img = cv2.imread(r_img, cv2.IMREAD_COLOR)
gt_img = cv2.imread(c_img, cv2.IMREAD_COLOR)
b_img = cv2.imread(b_img, cv2.IMREAD_COLOR)


l_img = torch.tensor(l_img / 255.0).float().permute(2, 0, 1)
r_img = torch.tensor(r_img / 255.0).float().permute(2, 0, 1)
gt_img = torch.tensor(gt_img / 255.0).float().permute(2, 0, 1)
b_img = torch.tensor(b_img / 255.).float().permute(2, 0, 1)

return l_img, r_img, gt_img, b_img, os.path.basename(c_img_name).split('.')
return gt_img, b_img, os.path.basename(c_img_name).split('.')

0 comments on commit 36fdb87

Please sign in to comment.