Abstract
Deep learning models frequently exhibit overconfidence, which can be problematic in safety-critical applications. This paper presents a robust framework for estimating epistemic uncertainty in instance segmentation by modifying the Mask R-CNN architecture with Monte-Carlo (MC)-Dropout. By utilizing Bayesian Gaussian Mixture (BGM) models to cluster repeated stochastic predictions, the framework quantifies uncertainty for bounding boxes, object classes, and pixel-level masks.
Introduction
In domains such as autonomous driving and medical imaging, it is insufficient for a model to merely provide a label; it must also communicate its level of certainty. This work focuses on epistemic uncertainty—uncertainty stemming from limited data or architectural constraints. While MC-Dropout is a common technique for estimating this by performing multiple "noisy" inference passes, applying it to instance segmentation is challenging due to the resulting hundreds of overlapping predictions. The core contribution is an efficient method for clustering these samples to calculate meaningful statistics for each object.
Methods
The proposed framework extends the standard Mask R-CNN to enable sampling-based uncertainty estimation.
Architectural Modifications
The researchers integrated dropout layers into the Region Proposal Network (RPN), the classification head, and the mask head. By maintaining dropout during inference and performing 100 forward passes, the model generates a distribution of possible predictions for every input image.
Uncertainty Estimation Pipeline
The overall pipeline involves generating repetitions, clustering them, and then calculating uncertainty metrics.
- Bayesian Gaussian Mixture (BGM) Clustering: To handle the variable number of objects in a scene, BGM is used to automatically infer the number of clusters ($k$) based on bounding box coordinates.
- Model Calibration: Temperature Scaling was implemented to ensure that the model's confidence scores accurately reflect the probability of correctness.
- Focal Loss: This was incorporated to address class imbalance and improve training on "hard" examples.
Datasets and Evaluation
The framework was evaluated using the COCO (Common Objects in Context) dataset. Training was conducted on the standard COCO train split, while a sub-split of approximately 4,000 images was reserved for temperature scaling calibration. Performance was measured using Mean Average Precision (mAP) on the COCO validation set.
Key Insights and Results
- The "Zero Mask" Phenomenon: High dropout rates (e.g., 0.5) were found to occasionally suppress neurons to the point where the model predicts a bounding box but fails to generate a mask. A lower rate of 0.2 or a mixed approach proved more stable.
- Clustering Efficiency: Bounding box spatial properties were identified as the most reliable features for clustering. Interestingly, including mask data in the clustering process degraded performance due to noise in "bad" mask predictions.
- Calibration Impact: Temperature scaling was more effective than Focal Loss in improving model reliability. The Maximum Calibration Error (MCE) was reduced from 0.176 to 0.109.
- Performance: The optimized model achieved a Bounding Box mAP of 49.5% and a Mask mAP of 47.6%.
- BGM Superiority: BGM consistently outperformed Agglomerative Hierarchical Clustering (AGG), offering greater flexibility in scenes with varying object counts.
Limitations and Future Work
The primary limitation is the computational overhead of running 100 forward passes, which currently precludes real-time application. Additionally, BGM can struggle in extremely crowded scenes, potentially merging distinct objects into single high-uncertainty clusters. Future research will focus on architectural optimizations for speed and improving mask-box consistency during sampling.
Summary updated