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

Dataset is empty if configuring img_suffix: .jpg in default.yaml #314

Open
linmingren opened this issue May 7, 2024 · 0 comments
Open

Comments

@linmingren
Copy link

When I place the files "test.jpg" and "test_mask001.jpg" in the "indir" directory and then run "predict.py", no images are generated in the output directory because the dataset is empty.

I found the suffix of mask_filenames in saicinpainting\evaluation\data.py is hard-coded to ".png":
class InpaintingDataset(Dataset): def __init__(self, datadir, img_suffix='.jpg', pad_out_to_modulo=None, scale_factor=None): self.datadir = datadir self.mask_filenames = sorted(list(glob.glob(os.path.join(self.datadir, '**', '*mask*.png'), recursive=True))) self.img_filenames = [fname.rsplit('_mask', 1)[0] + img_suffix for fname in self.mask_filenames] self.pad_out_to_modulo = pad_out_to_modulo self.scale_factor = scale_factor
I think it should be 'mask' + img_suffix instead of 'mask.png'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant