Effective Video Mirror Detection with Inconsistent Motion Cues

Alex Warren, Ke Xu, Jiaying Lin, Gary K. L. Tam, Rynson W. H. Lau

Abstract

Detecting mirrors in video sequences is a significant challenge in computer vision because mirrors lack a fixed appearance, instead reflecting their surroundings. This paper introduces MG-VMD (Motion-Guided Video Mirror Detection), a novel framework that identifies mirrors by leveraging "motion inconsistency"—the subtle difference in perceived motion between the real world and its reflection. Alongside a new, more diverse benchmark dataset, the Mirror Motion Dataset (MMD), the authors achieve state-of-the-art results by explicitly modeling how motion cues can reveal hidden reflective surfaces.

Introduction

For autonomous systems like robots or self-driving drones, a mirror represents a dangerous "phantom" obstacle. Because mirrors reflect the environment, standard computer vision algorithms often mistake a reflection for a real doorway or a clear path. While image-based mirror detection has seen progress, video-based detection remains underdeveloped. Previous state-of-the-art methods relied on "dual correspondences"—attempting to match points inside the mirror to their counterparts outside. This approach often fails if the mirror reflects objects currently off-screen or if the background has a uniform texture. Furthermore, existing datasets are often biased, featuring mostly small mirrors located in the center of the frame, which does not reflect the complexity of real-world environments.

Motion-Guided Video Mirror Detection (MG-VMD)

The proposed MG-VMD framework shifts the focus from static visual appearance to dynamic motion patterns. The core insight is that motion inside a mirror is often inconsistent with motion outside due to increased depth perception; the reflected object is effectively "further away" in virtual space.

Qualitative comparison showing how motion inconsistency cues help in detecting mirrors compared to standard optical flow and previous methods.

The architecture consists of three primary components:

  1. Optical Flow Coherence Block: This module extrapolates motion vectors across three adjacent frames to ensure temporal consistency and reduce noise from camera movement.
  2. Motion Attention Module (MAM): A transformer-based module that analyzes optical flow fields to locate areas where motion is inconsistent with the rest of the scene.
  3. Motion-Guided Edge Detection Module (MEDM): This module uses cross-attention to combine visual features with motion cues, allowing the network to precisely trace mirror boundaries, which are often marked by sharp breaks in motion.

A final Fusion Refinement Module integrates these predictions with high-level image features to produce the final detection mask.

The Mirror Motion Dataset (MMD)

To address the limitations of existing benchmarks, the authors introduced the Mirror Motion Dataset (MMD). This dataset contains 37 high-definition videos with 9,727 annotated frames, featuring a wide variety of mirror shapes, sizes, and locations.

Comparison of the new MMD dataset against the existing VMD-D dataset, highlighting the reduction in spatial bias and increased diversity in mirror sizes and color contrast.

As shown in the spatial heatmaps, the previous VMD-D dataset is highly biased, with mirrors predominantly appearing in the center of the frame. In contrast, MMD forces models to learn spatial features across the entire frame. Additionally, MMD includes more challenging scenarios, such as mirrors with low color contrast against their surroundings and a wider range of mirror-to-image area ratios.

Experimental Results

MG-VMD sets a new standard for video mirror detection. On the MMD dataset, the model achieved an Accuracy of 0.872 and a Mean Absolute Error (MAE) of 0.127, significantly outperforming the previous state-of-the-art, VMD-Net (0.854 Accuracy / 0.145 MAE). Qualitative analysis shows that the model is particularly robust at detecting large mirrors and those in low-contrast environments where reflections are nearly identical to the surrounding walls. Ablation studies confirmed that both the MAM and MEDM are vital for performance, proving that motion-based localization and edge detection are complementary.

Conclusion

By leveraging motion inconsistency, MG-VMD provides a robust solution for detecting mirrors in dynamic video environments. The introduction of the MMD dataset provides a more rigorous and less biased benchmark for the field. While the "Window Problem"—where semi-transparent surfaces exhibit both reflection and transparency—remains a challenge, this work marks a significant step forward in making autonomous systems safer in reflective environments.

Summary updated

BibTeX
@inproceedings{warren2024effective,
  author = {Alex Warren and Ke Xu and Jiaying Lin and Gary K. L. Tam and Rynson W. H. Lau},
  title = {{Effective Video Mirror Detection with Inconsistent Motion Cues}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  doi = {10.1109/cvpr52733.2024.01632},
}
Figure