-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[Fix] Fix module PascalContextDataset #3235
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
Conversation
mmseg/datasets/pascal_context.py
Outdated
img_suffix='.jpg', | ||
seg_map_suffix='.png', | ||
reduce_zero_label=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't set reduce_zero_label
to True
here.
https://mmsegmentation.readthedocs.io/en/latest/notes/faq.html#functionality-of-reduce-zero-label
mmseg/datasets/pascal_context.py
Outdated
img_suffix='.jpg', | ||
seg_map_suffix='.png', | ||
reduce_zero_label=True, | ||
reduce_zero_label=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here it should be True
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your correction. I think I was confused because when I created the annotation maps, I had set the background to 255, and the category labels are 0-59, which caused me to set recude_zero_label to False in class ''PascalContextDataset59''. I've restored the settings for reduce_zero_label.
## Motivation - 'PascalContextDataset' object has no attribute 'file_client', it will cause an error. - The attribute ‘ann_file’ is not allowed to be empty, otherwise, an error will be reported. ## Modification - Replace file_client with fileio
## Motivation - 'PascalContextDataset' object has no attribute 'file_client', it will cause an error. - The attribute ‘ann_file’ is not allowed to be empty, otherwise, an error will be reported. ## Modification - Replace file_client with fileio
## Motivation - 'PascalContextDataset' object has no attribute 'file_client', it will cause an error. - The attribute ‘ann_file’ is not allowed to be empty, otherwise, an error will be reported. ## Modification - Replace file_client with fileio
Motivation
Modification