Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

test.py uses Places2 Class incorrectly #50

Open
dnns92 opened this issue Dec 15, 2020 · 0 comments
Open

test.py uses Places2 Class incorrectly #50

dnns92 opened this issue Dec 15, 2020 · 0 comments

Comments

@dnns92
Copy link

dnns92 commented Dec 15, 2020

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

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

No branches or pull requests

1 participant