forked from mrq/DL-Art-School
Fix grayscale
This commit is contained in:
parent
2b03e40f98
commit
1eb9c5a059
|
@ -181,7 +181,7 @@ class LQGTDataset(data.Dataset):
|
||||||
img_LQ = Image.open(corruption_buffer)
|
img_LQ = Image.open(corruption_buffer)
|
||||||
|
|
||||||
if self.opt['grayscale']:
|
if self.opt['grayscale']:
|
||||||
img_LQ = ImageOps.grayscale(img_LQ)
|
img_LQ = ImageOps.grayscale(img_LQ).convert('RGB')
|
||||||
|
|
||||||
img_GT = torch.from_numpy(np.ascontiguousarray(np.transpose(img_GT, (2, 0, 1)))).float()
|
img_GT = torch.from_numpy(np.ascontiguousarray(np.transpose(img_GT, (2, 0, 1)))).float()
|
||||||
img_PIX = torch.from_numpy(np.ascontiguousarray(np.transpose(img_PIX, (2, 0, 1)))).float()
|
img_PIX = torch.from_numpy(np.ascontiguousarray(np.transpose(img_PIX, (2, 0, 1)))).float()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user