Introduction
Semantic segmentation, the process of assigning a category to every pixel in an image, is a fundamental task in computer vision that requires vast amounts of annotated data. While numerous high-quality datasets like Cityscapes, Mapillary, and BDD100K are available, combining them to train a single robust model is challenging due to Label Shift. Label shift occurs when different datasets use inconsistent or conflicting taxonomies. For instance, one dataset might use a broad "rider" category, while another distinguishes between "bicyclist" and "motorcyclist."
When a model is trained on these datasets simultaneously using standard methods, it faces gradient conflicts. A "motorcyclist" in one dataset is technically a "non-rider" in another's limited vocabulary, leading to contradictory signals that degrade generalization. Previous efforts to resolve this required manual re-annotation to unify taxonomies, which is labor-intensive and difficult to scale.
Methodology: The UniSeg Framework
To address these challenges, we introduce UniSeg, a framework designed to learn from multiple datasets with conflicting labels without manual intervention. UniSeg relies on two core technical innovations.
Null Binary Cross-Entropy (Null BCE) Loss
Traditional segmentation models utilize a Softmax function with Cross-Entropy loss, which forces classes into a zero-sum competition. In UniSeg, we transition to a Binary Cross-Entropy (BCE) approach, treating each class as an independent binary task. We implement a "Null" strategy: if an image originates from a dataset that does not include a specific category (e.g., "motorcyclist"), the model ignores that class during loss calculation for that specific image. This prevents the model from being penalized for not predicting a label that was never provided.
Class-Relational BCE Loss
Beyond simply ignoring missing labels, UniSeg automatically discovers semantic relationships between classes. Using a Cosine Classifier, the model calculates feature similarity across datasets. If the system identifies that "motorcyclist" is highly similar to "rider," it generates multi-labels. Consequently, a pixel labeled as a motorcyclist provides positive supervision for both the specific "motorcyclist" channel and the broader "rider" channel. This allows the model to learn hierarchical subset/superset relationships implicitly.
Datasets and Experimental Setup
UniSeg was evaluated by training on a massive combined dataset of road scenes:
- Training Data: Cityscapes (19 classes), BDD100K (19 classes), IDD (26 classes), and Mapillary Vistas (65 classes), resulting in a unified label space of 70 distinct categories.
- Evaluation: To test generalization, the model was evaluated on unseen datasets including KITTI, CamVid, WildDash, and WildDash2.
Results and Discussion
UniSeg demonstrates significant improvements in cross-dataset generalization. On the KITTI dataset, the framework achieved an 8.2% mIoU increase over standard multi-dataset baselines using the HRNet-W48 architecture. Furthermore, UniSeg reached 4th place on the public WildDash2 benchmark, notably outperforming models that were specifically trained on WildDash data.
Key insights from the experiments include:
- Independence as a Strength: The move to independent BCE channels allows for "selective ignorance," preventing the gradient confusion inherent in Softmax-based joint training.
- Automatic Taxonomy Discovery: The model learns associations (e.g., "bike lane" as a sub-type of "road") through feature similarity, eliminating the need for manual relabeling.
- Implicit Knowledge Transfer: UniSeg can predict fine-grained objects (like "trash cans") in datasets where they weren't originally labeled, leveraging knowledge gained from more detailed datasets like Mapillary.
Limitations and Future Work
While UniSeg is highly effective, there is a trade-off when mixing extremely fine-grained labels with coarse ones; the model may slightly underperform on specific fine-grained classes compared to a model trained exclusively on that specialized data. Currently, the framework is optimized for autonomous driving road scenes. Future research will explore extending these techniques to more diverse domains, such as indoor environments or medical imaging.
Summary updated