Glass Surface Detection: Leveraging Reflection Dynamics in Flash/No-flash Imagery

Tao Yan, Hao Huang, Yiwei Lu, Zeyu Wang, Ke Xu, Yinghui Wang, Xiaojun Chang, Rynson W. H. LauarXiv 2025 · DOI

Abstract

Detecting transparent glass surfaces is a significant challenge in computer vision due to their lack of intrinsic color and texture. This paper introduces NFGlassNet, a novel deep learning framework that identifies glass by analyzing "reflection dynamics"—the predictable changes in reflection patterns between standard and flash-illuminated image pairs. Utilizing a newly curated dataset of 3,312 flash/no-flash pairs (NFGD), the authors demonstrate that NFGlassNet achieves state-of-the-art performance, significantly outperforming existing single-modality and multi-modal methods in glass surface segmentation.

Introduction

Glass is a ubiquitous material in modern environments, yet it remains largely "invisible" to standard computer vision algorithms. Because glass is transparent and colorless, AI models typically rely on indirect cues such as boundary frames or ghosting reflections. However, these cues are often unreliable; a frameless window may disappear entirely from an algorithm's view, while a simple rectangular opening might be misidentified as a window.

Existing methods fail to exploit the intrinsic physical properties of glass. This research addresses this gap by proposing the use of a camera flash as an active probe. By comparing a standard photo with one taken with a flash, the system can observe how reflections appear, disappear, or shift—a phenomenon termed "reflection dynamics"—to accurately locate glass surfaces.

Methodology: NFGlassNet

The authors propose NFGlassNet, a dual-branch architecture designed to process flash/no-flash image pairs. The network incorporates two primary modules to extract and refine glass-related features:

  1. Reflection Contrast Mining Module (RCMM): This module isolates reflection dynamics by analyzing the differences between the two input images. While the background remains static, reflections on the glass surface change significantly under flash illumination. RCMM uses dilated convolutions to capture these dynamic reflections across various scales.
  2. Reflection Guided Attention Module (RGAM): This module employs a dual cross-attention mechanism to refine the detected regions. It cross-references suspected glass surfaces with isolated reflection features to filter out noise and focus on actual glass panes.

To facilitate training, the authors utilized an existing reflection-removal model (LANet) to generate pseudo-ground truth labels for the reflection layers within their dataset.

The No-flash and Flash Glass Dataset (NFGD)

To support this research, the authors introduced the No-flash and Flash Glass Dataset (NFGD). It contains 3,312 pairs of images captured with a Canon 80D DSLR in diverse real-world settings, including malls, hospitals, and bathrooms. The dataset covers a wide range of lighting conditions and flash intensities, providing a robust benchmark for multi-modal glass detection.

Results and Discussion

NFGlassNet demonstrates superior performance over 17 state-of-the-art methods. On the NFGD dataset, it achieved an Intersection over Union (IoU) of 86.17%, surpassing the best previous multi-modal method (RGB-T) by 2.24%. It also achieved the lowest Balanced Error Rate (BER) of 0.053.

Qualitative comparison of NFGlassNet against state-of-the-art methods. The proposed model (Ours) closely matches the Ground Truth (GT) even in challenging frameless scenarios.

Qualitatively, NFGlassNet excels in "frameless" situations where traditional models like GSDNet often fail. The model effectively leverages the physical "flip" of reflections: when a flash illuminates a dark room behind glass, reflections often diminish as transmitted light increases; conversely, in dark environments, the flash creates new reflections.

Limitations

A primary limitation of the current approach is the "Tile Problem." Highly polished surfaces, such as marble or ceramic tiles, can exhibit reflection dynamics similar to glass, leading to occasional over-detection. Future work may involve incorporating polarimetric sensors or temporal data from video to distinguish these surfaces through motion parallax.

Conclusion

By treating the camera flash as an active probe rather than just an illumination tool, NFGlassNet successfully "sees" the invisible. This approach marks a significant step forward in robust glass detection, with potential applications in robotics, autonomous navigation, and augmented reality.

Summary updated

Abstract

Glass surfaces are ubiquitous in daily life, typically appearing colorless, transparent, and lacking distinctive features. These characteristics make glass surface detection a challenging computer vision task. Existing glass surface detection methods always rely on boundary cues (\textit{e.g.}, window and door frames) or reflection cues to locate glass surfaces, but they fail to fully exploit the intrinsic properties of the glass itself for accurate localization. We observed that in most real-world scenes, the illumination intensity in front of the glass surface differs from that behind it, which results in variations in the reflections visible on the glass surface. Specifically, when standing on the brighter side of the glass and applying a flash towards the darker side, existing reflections on the glass surface tend to disappear. Conversely, while standing on the darker side and applying a flash towards the brighter side, distinct reflections will appear on the glass surface. Based on this phenomenon, we propose \textit{NFGlassNet}, a novel method for glass surface detection that leverages the reflection dynamics present in flash/no-flash imagery. Specifically, we propose a Reflection Contrast Mining Module (RCMM) for extracting reflections, and a Reflection Guided Attention Module (RGAM) for fusing features from reflection and glass surface for accurate glass surface detection. For learning our network, we also construct a dataset consisting of $\sim$3.3$K$ no-flash and flash image pairs captured from various scenes with corresponding ground truth annotations. Extensive experiments demonstrate that our method outperforms the state-of-the-art methods. Our code, model, and dataset will be available upon acceptance of the manuscript.
BibTeX
@misc{yan2025glass,
  author = {Tao Yan and Hao Huang and Yiwei Lu and Zeyu Wang and Ke Xu and Yinghui Wang and Xiaojun Chang and Rynson W. H. Lau},
  title = {{Glass Surface Detection: Leveraging Reflection Dynamics in Flash/No-flash Imagery}},
  year = {2025},
  eprint = {2511.16887},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.16887},
}
Figure