Mirror detection (MD) is a fundamental task for autonomous systems, enabling them to distinguish between real-world objects and their reflections. However, mirrors are notoriously difficult to segment due to their varying scales, irregular shapes, and the fact that their content often blends seamlessly with the background. Traditionally, state-of-the-art MD models have relied on fully supervised learning, which requires labor-intensive, pixel-accurate ground truth masks.
This paper introduces a novel weakly-supervised framework that replaces these expensive masks with simple, rapid scribble annotations, significantly reducing the cost of data preparation while maintaining high performance.
Methodology: Learning from Sparse Signals
The proposed framework is designed to extract maximum information from sparse scribble data through a multi-stage architecture:
- Local-Global Feature Enhancement (LGFE): To address extreme scale variations, this module utilizes a DenseASPP (Atrous Spatial Pyramid Pooling) structure. It captures multi-scale local details while employing spatial and channel attention mechanisms to preserve global context.
- Foreground-Aware Mask Attention (FAMA): Because scribbles do not define boundaries, FAMA integrates edge detection as an auxiliary task. By fusing semantic features with edge maps via cross-attention, the network can better "fill in" mirror regions and suppress background noise.
- Prototype Contrast Loss (PCL): This strategy implements contrastive learning by calculating "prototypes"—representative feature vectors—for foreground and background regions across the dataset. This encourages the network to cluster similar foreground features and distinguish them from the background in a high-dimensional space.
- Backbone: The system leverages a Pyramid Vision Transformer (PVT) to extract multi-scale features with long-range dependencies.
The S-Mirror Dataset
To support this research, the authors introduced S-Mirror, the first scribble-based mirror dataset. By relabeling 10,158 images from existing MD and RGB-D datasets, they demonstrated the efficiency of this approach: labeling an image takes approximately 8 seconds, compared to several minutes for full pixel-level annotation.
As shown in the histogram, the percentage of labeled pixels is typically under 0.01, highlighting the "weakness" of the supervision and the robustness required of the model.
Performance and Qualitative Results
The proposed method approaches the performance of fully supervised models and significantly outperforms existing weakly supervised saliency detection methods. On the MSD dataset, it achieved an IoU of 0.750 and an $S_m$ score of 0.828.
Qualitatively, the model excels at distinguishing real entities from reflections, even in complex scenes with low contrast or heavy occlusion. By leveraging edge information and cross-image consistency, the framework effectively propagates sparse scribble signals to produce dense, accurate segmentation masks.
Conclusion
This work proves that scribble annotations provide sufficient structural and locational information for high-quality mirror detection. By reducing labeling time by orders of magnitude, this framework paves the way for scaling mirror detection to larger, more diverse datasets. Future work will explore even sparser supervision, such as point-level annotations, to further lower the barrier for training robust computer vision systems.
Summary updated