When is reducezerolabel correct in segmentation, and when does it delete a real class?
Computer VisionLevel: IntermediateIgnore labels and class-ID remapping
When is reduce_zero_label correct in segmentation, and when does it delete a real class?
Hints
- What does zero mean in this dataset: background or unknown?
- Trace a few label IDs through the remapping operation.
Answer
It maps label zero to an ignored value and shifts remaining class IDs. Use it only when zero means an unlabelled or excluded region under the dataset's encoding. If zero is a real background class that should be predicted and scored, ignoring it changes the task. Verify mask values, ignore_index and class mappings before training, especially for binary labels.
Source and licence: OpenMMLab — MMSegmentation FAQ · Apache-2.0 · answer: Quantoros editorial