Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure cloth-mask image has greyscale mode L #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cp_dataset_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __getitem__(self, index):
c_name[key] = self.c_names[key][index]
c[key] = Image.open(osp.join(self.data_path, 'cloth', c_name[key])).convert('RGB')
c[key] = transforms.Resize(self.fine_width, interpolation=2)(c[key])
cm[key] = Image.open(osp.join(self.data_path, 'cloth-mask', c_name[key]))
cm[key] = Image.open(osp.join(self.data_path, 'cloth-mask', c_name[key])).convert('L')
cm[key] = transforms.Resize(self.fine_width, interpolation=0)(cm[key])

c[key] = self.transform(c[key]) # [-1,1]
Expand Down Expand Up @@ -261,4 +261,4 @@ def next_batch(self):
self.data_iter = self.data_loader.__iter__()
batch = self.data_iter.__next__()

return batch
return batch