Introduction
Standard semantic segmentation models typically operate under a "closed-set" assumption: they expect every object encountered during inference to belong to a predefined set of classes seen during training. In safety-critical domains like autonomous driving, this assumption is dangerous. When a vehicle encounters an out-of-distribution (OOD) object—such as a stray animal or an unusual road hazard—a closed-set model will confidently misclassify it as a known category like "road" or "building."
Furthermore, updating these static models is traditionally cumbersome, requiring massive data collection and full retraining to avoid "catastrophic forgetting." This paper proposes a dynamic system that addresses both challenges: it flags unknown pixels and incrementally incorporates them into its knowledge base using only a few labeled examples.
The Open World Framework
The proposed system replaces the standard classification layer of a CNN with a Deep Metric Learning Network (DMLNet). Instead of outputting class probabilities, the network maps pixels into a high-dimensional metric space. Classification is then performed based on the Euclidean distance between pixel features and fixed class "prototypes."
As shown in the pipeline above, the system operates in a continuous loop:
- Detection: DMLNet identifies known objects while flagging unknown anomalies.
- Labelling: A human provides a few annotations (1–5 shots) for the new class.
- Incremental Learning: The model updates its knowledge base without retraining the entire backbone.
- Deployment: The model now operates in an enlarged domain, recognizing the new class alongside the original ones.
Methods and Key Insights
Open-Set Semantic Segmentation
The network is trained using a hybrid loss (Discriminative Cross Entropy and Variance Loss) that forces known classes to cluster tightly around their prototypes. This contrastive clustering naturally leaves the "center" of the metric space empty. When an OOD object appears, its features naturally fall into this central basin, far from any specific known prototype.
To detect these anomalies, the authors introduce the Euclidean Distance Sum (EDS) metric. This metric relies on a clever geometric observation: an in-distribution pixel is very close to its own prototype but far from all others. Conversely, an OOD pixel in the center of the space is moderately far from all prototypes.
As illustrated in the distance sum distribution, the total sum of distances to all prototypes is actually smaller for OOD objects than for known classes. This allows for effective anomaly thresholding in a single, lightweight inference pass.
Incremental Few-Shot Learning
Once an anomaly is identified and labeled, the system uses one of two methods to learn the new class:
- Pseudo Label Method (PLM): The backbone is frozen, and a new classification head is trained using the new annotations combined with "pseudo-labels" generated by the old model to preserve existing knowledge.
- Novel Prototype Method (NPM): A training-free approach that calculates a new prototype by averaging the feature vectors of the novel class. This method completely bypasses catastrophic forgetting by simply adding a new reference point to the existing metric space.
Experimental Results
The DMLNet achieves state-of-the-art results in anomaly detection while maintaining high performance on known classes:
- Anomaly Detection: On the StreetHazards dataset, the model achieved an AUROC of 93.7 and an FPR95 of 17.3, outperforming complex GAN-based architectures while remaining significantly more efficient.
- Close-Set Performance: The model maintained a 53.9 mIoU on known classes, proving that open-set capabilities do not have to come at the cost of standard accuracy.
- Few-Shot Learning: In incremental tests on Cityscapes, the NPM approach achieved a 67.4 mIoU when adding new classes like "truck" or "bus" with only 5 examples, successfully balancing new acquisition with old knowledge retention.
Conclusion and Future Work
By leveraging the geometric properties of deep metric learning, this research provides a robust path toward "open world" perception. While a performance gap still exists between few-shot incremental learning and full retraining, the ability to detect and learn from anomalies in real-time is a critical step for the deployment of safe autonomous systems. Future work will focus on refining loss functions to further close the gap with fully supervised models.
Summary updated