pytorch-inpainting-with-partial-conv
pytorch-inpainting-with-partial-conv copied to clipboard
test.py uses Places2 Class incorrectly
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