Exploiting Semantic Relations for Glass Surface Detection

Jiaying Lin, Yuen Hei Yeung, Rynson W. H. LauNeurIPS 2022

TL;DR

Detecting glass is notoriously difficult for computer vision because it is transparent and lacks a consistent visual signature. This paper introduces GlassSemNet, a model that moves beyond unreliable physical cues—like reflections or boundaries—by leveraging the semantic context of a scene. It reasons that if a curtain or a wall is present, there is a high probability a window or glass door is nearby.

The Challenge of Transparent Surfaces

Glass is everywhere in modern architecture, yet it remains a significant "blind spot" for autonomous systems. Standard object detection models rely on opaque surfaces with distinct textures. Glass, however, is transparent; its appearance is entirely dependent on what is behind it or reflecting off it.

Previous research attempted to solve this by looking for specific physical "priors" like glass boundaries, reflections, or polarization. However, these features are often missing or misleading (e.g., a clean window with no reflection, or a non-glass surface with a straight edge). The authors argue that humans do not just look for reflections; we use our knowledge of the world. We know that windows usually appear next to curtains and glass doors are typically embedded in walls. This paper aims to teach AI that same "semantic reasoning."

Proposed Method: GlassSemNet

The authors propose GlassSemNet, an encoder-decoder architecture that explicitly separates and then integrates spatial and semantic information.

  • Dual Backbones: The model uses two parallel backbones. A SegFormer captures comprehensive spatial context (where things are), while a ResNet50 (pre-trained on semantic segmentation) extracts high-level semantic relationships (what things are).
  • Scene Aware Activation (SAA) Module: This module adaptively filters feature channels. It uses low-level features to distinguish between object characteristics, ensuring the model focuses on the most relevant spatial and semantic cues.
  • Context Correlation Attention (CCA) Module: Inspired by Transformers, this module models the long-range relationships between different categories of objects and their locations. It essentially asks: "Given the objects I see in this room, where is the glass likely to be?"
  • UPerNet Decoder: Finally, these enriched features are fused and processed through a standard decoder to produce the final glass detection map.

The GSD-S Dataset

The researchers found that existing glass datasets only provided binary masks (glass vs. non-glass), which was insufficient to train a model on semantic relationships. To fix this, they introduced GSD-S (Glass Surface Detection - Semantics).

This new large-scale dataset contains 4,519 real-world RGB images. Unlike previous datasets, GSD-S includes detailed annotations for both glass surfaces and the semantic categories of surrounding objects (across 43 total classes). They also tested their model on existing datasets, including GDD (3,900 images) and GSD (4,102 images), to demonstrate generalizability.

Key Insights

  • Semantics as a Safety Net: When physical cues like reflections fail, semantic context provides a reliable fallback. The co-occurrence of a "wall + curtain" is a much stronger indicator of a window than a simple vertical line.
  • Bifurcated Attention: By splitting the attention mechanism into spatial and semantic paths, the model can better handle "hidden dependencies"—for example, recognizing that two glass panels in opposite corners of a large hall are related because they share the same semantic context.
  • Dataset Quality Matters: Previous datasets often mislabeled glass as the object behind it (e.g., a cupboard labeled as "wood" despite having a glass door). The GSD-S dataset "polishes" these labels to provide a cleaner signal for training.

Performance and Results

GlassSemNet sets new state-of-the-art records across all tested datasets. Quantitatively, on the new GSD-S dataset, the model achieved a 42.6% improvement in Mean Absolute Error (MAE) compared to the previous best model (GlassNet).

Qualitative comparison of GlassSemNet against prior state-of-the-art methods.

Qualitatively, the model successfully ignores "glass-like" distractions (like open doorways or specific wall patterns) that frequently trick older models. It also accurately detects glass in dark or low-contrast scenes where reflections are invisible, closely matching the Ground Truth (GT).

Limitations and Future Work

Despite the progress, two main challenges remain:

  1. The Mirror Problem: Mirrors are the "arch-nemesis" of glass detection. Because mirrors reflect the semantic context of the room, the model sometimes misidentifies a mirror as a glass surface.
  2. Small Surfaces: Very small glass objects (like a small glass table in a cluttered room) provide very little "attention real estate," making them easy for the model to overlook.

The authors suggest that future work could involve integrating even more diverse detection strategies to specifically tackle the ambiguity of mirrors and small-scale objects.

Summary updated

BibTeX
@inproceedings{lin2022exploiting,
  author = {Jiaying Lin and Yuen Hei Yeung and Rynson W. H. Lau},
  title = {{Exploiting Semantic Relations for Glass Surface Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=WrIrYMCZgbb},
}
Figure