Where Is My Mirror?

Xin Yang, Haiyang Mei, Ke Xu, Xiaopeng Wei, Baocai Yin, Rynson W. H. Lau · DOI

Introduction

Mirrors are ubiquitous in human environments, yet they represent a significant "blind spot" for modern computer vision. Existing systems often treat reflections as real objects, leading to critical errors in scene understanding. MirrorNet is the first computational framework specifically designed to segment mirrors in images, addressing a task that frequently baffles state-of-the-art models. By introducing a large-scale Mirror Segmentation Dataset (MSD) and a novel network focusing on contextual contrasts, this research enables AI to distinguish between the physical world and its reflection.

The Challenge of Mirror Detection

Standard computer vision tasks fail significantly when mirrors are present. These failures manifest in two primary ways:

  1. Depth Hallucinations: Depth sensors and monocular depth estimation models often "see through" mirrors, predicting the depth of the reflected scene rather than the mirror surface itself.
  2. False Detections: Object detectors (e.g., Mask R-CNN) frequently identify reflected objects as distinct, real instances, leading to incorrect counts and spatial layouts.

The core difficulty lies in the fact that mirrors lack a unique visual signature; they inherit the appearance of their surroundings. Consequently, segmentation methods relying on object appearance or saliency typically fail because mirrors are designed to blend into their environment.

Existing vision tasks often fail when mirrors are present, producing incorrect depth maps or false object detections compared to MirrorNet's accurate segmentation.

MirrorNet Architecture

The proposed MirrorNet architecture identifies mirrors by detecting discontinuities at their boundaries rather than relying on interior appearance.

Contextual Contrasted Feature Extraction (CCFE)

The CCFE module is the core of MirrorNet. It explicitly models the contrast between a local region and its surrounding context using a series of dilated convolutions. This allows the model to capture contrast at multiple scales, identifying mirror edges regardless of their size.

Coarse-to-Fine Refinement

MirrorNet extracts features across multiple levels. Deep semantic layers identify candidate mirror regions, which then serve as attention maps to guide higher-resolution layers. This process progressively refines mirror boundaries.

Optimization and Post-processing

The network utilizes the Lovász-hinge loss, a surrogate for the Intersection over Union (IoU) metric. This makes the model more robust to mirrors of varying sizes compared to standard cross-entropy loss. Finally, a fully connected Conditional Random Field (CRF) ensures segmentation masks align precisely with visual boundaries.

Mirror Segmentation Dataset (MSD)

To facilitate this research, the authors introduced the Mirror Segmentation Dataset (MSD), the first large-scale benchmark for this task. It contains 4,018 images with manually annotated mirror masks across diverse daily life scenes, including bedrooms, bathrooms, and offices.

Examples of mirror masks from the Mirror Segmentation Dataset (MSD), illustrating the diversity of mirror shapes and environments.

Experimental Results

MirrorNet significantly outperforms state-of-the-art models in semantic segmentation, instance segmentation, and saliency detection. On the MSD test set, MirrorNet achieved an IoU of 78.95% and a Balance Error Rate (BER) of 6.39, representing a substantial improvement over baselines like PSPNet (IoU 63.21%) and Mask R-CNN (IoU 63.18%). Qualitative analysis confirms that MirrorNet successfully delineates sharp boundaries even when reflections are highly similar to the background.

Conclusion

MirrorNet shifts the focus from object appearance to boundary-based contextual contrast, providing a robust solution for mirror segmentation. While challenges remain in low-contrast scenarios and outdoor environments, this work provides a critical foundation for improving the reliability of computer vision in real-world, mirror-rich environments.

Summary updated

BibTeX
@inproceedings{yang2019where,
  author = {Xin Yang and Haiyang Mei and Ke Xu and Xiaopeng Wei and Baocai Yin and Rynson W. H. Lau},
  title = {{Where Is My Mirror?}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  doi = {10.1109/iccv.2019.00890},
}
Figure