pytorch-inpainting-with-partial-conv icon indicating copy to clipboard operation
pytorch-inpainting-with-partial-conv copied to clipboard

test.py uses Places2 Class incorrectly

Open dnns92 opened this issue 4 years ago • 0 comments

Bug:

Places2-Class Signature in places.py

class Places2(torch.utils.data.Dataset):
    def __init__(self, img_root, mask_root, img_transform, mask_transform, split='train'): ....

How Places2 is called in test.py:

dataset_val = Places2(args.root, img_transform, mask_transform, 'val')

This misses the mask_root folder

Suggested Fix: Either use a specific value in the image to create a mask, such as:

mask = np.zeros_like(img)
black_pixels_mask = np.all(img== [0, 0, 0], axis=-1)

or add a mask-root folder to the args

dnns92 avatar Dec 15 '20 07:12 dnns92