Skip to content

Fix mask generation in base_loader when reading an image#135

Open
rod409 wants to merge 1 commit intoNVIDIA:mainfrom
rod409:main
Open

Fix mask generation in base_loader when reading an image#135
rod409 wants to merge 1 commit intoNVIDIA:mainfrom
rod409:main

Conversation

@rod409
Copy link

@rod409 rod409 commented Mar 23, 2021

This pull request proposes a bug fix. In base_loader.py, the read_images function generates a mask without checking keys in an original copy. This causes problems on some datasets where mask values are incorrectly replaced. The change would make the mask generation in the base_loader.py match the method used in uniform.py.

mask = mask.copy()
for k, v in self.id_to_trainid.items():
binary_mask = (mask == k) #+ (gtCoarse == k)
mask_copy = mask.copy()
if id2trainid:
for k, v in id2trainid.items():
binary_mask = (mask_copy == k)

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

Successfully merging this pull request may close these issues.

1 participant