Skip to content

Commit

Permalink
Update llff.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kwea123 authored Sep 25, 2020
1 parent c739e49 commit e6110d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datasets/llff.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def read_meta(self):
continue
c2w = torch.FloatTensor(self.poses[i])

img = Image.open(image_path)
img = Image.open(image_path).convert('RGB')
assert img.size[1]*self.img_wh[0] == img.size[0]*self.img_wh[1], \
f'''{image_path} has different aspect ratio than img_wh,
please check your data!'''
Expand Down Expand Up @@ -309,10 +309,10 @@ def __getitem__(self, idx):
'c2w': c2w}

if self.split == 'val':
img = Image.open(self.image_path_val)
img = Image.open(self.image_path_val).convert('RGB')
img = img.resize(self.img_wh, Image.LANCZOS)
img = self.transform(img) # (3, h, w)
img = img.view(3, -1).permute(1, 0) # (h*w, 3)
sample['rgbs'] = img

return sample
return sample

0 comments on commit e6110d9

Please sign in to comment.