Single Image Reflection Separation via Dual-Stream Interactive Transformers

Qiming Hu, Hainuo Wang, Xiaojie GuoNeurIPS 2024

Taking a photo through a window often results in a frustrating mix of the scene outside (the transmission) and the ghost-like image of the room behind you (the reflection). In computer vision, this is known as Single Image Reflection Separation (SIRS). It is a classic "ill-posed" problem: you are trying to recover two full images from just one.

Example of complex reflection

At NeurIPS 2024, researchers from Tianjin University presented a new approach called Dual-Stream Interactive Transformers (DSIT) that sets a new bar for how we disentangle these overlapping layers.

TL;DR

DSIT is a novel neural network architecture that uses a hybrid Transformer-CNN design to separate reflections from transmissions. By employing a "dual-stream" attention mechanism, the model explicitly learns how features within a single layer correlate and how the two layers interact, leading to state-of-the-art results on complex, real-world images.

What Problem Does This Paper Address?

The physics of reflection is usually modeled as $I = T + R$, where $I$ is the captured image, $T$ is the transmission, and $R$ is the reflection. In reality, it's more complex due to glass thickness and lighting, often written as $I = T + R + \mathcal{C}(T, R)$.

Previous "dual-stream" methods tried to estimate both $T$ and $R$ simultaneously using two parallel sub-networks. However, these models often struggled when the reflection was "densely entangled" with the transmission—for example, when a bright reflection overlaps with a detailed part of the background. The authors identified two main culprits:

  1. Limited Receptive Fields: Standard convolutional neural networks (CNNs) look at small local patches, making it hard to understand global structures.
  2. Inefficient Interaction: Previous models passed information between the $T$ and $R$ streams blindly, without checking if the information was actually useful for the other side.

Methods

The authors introduced the Dual-Stream Interactive Transformer (DSIT), which features two major innovations to address these shortcomings:

Comparison of interaction behaviors, highlighting the proposed DAI
  1. Dual-Architecture Interactive Encoder (DAIE): This is a hybrid "bridge." It takes a pre-trained Transformer (like Swin Transformer) to extract high-level "global" semantic priors and injects that knowledge into a dual-stream CNN that handles "local" details. This allows the model to understand what it is looking at (e.g., "that's a tree outside" vs. "that's a lamp reflection") while maintaining sharp edges.
  2. Dual-Attention Interaction (DAI): Instead of just adding features together, the model uses two types of attention:
  3. Dual-Stream Self-Attention: Captures correlations within the same layer (intra-layer).
  4. Layer-Aware Cross-Attention: Explicitly calculates how the transmission and reflection layers relate to each other (inter-layer). This helps the model "decide" which pixels belong to which stream.
  5. RefMix Augmentation: To train the model better, they proposed a simple but effective data augmentation called Reflection Mixup, which blends real-world images to create more diverse training pairs.

Datasets

The model was evaluated on several standard SIRS benchmarks, primarily from the SIR$^2$ dataset:

  • Real20: 20 real-world testing images.
  • Objects & Postcard: Datasets containing 200 and 199 images respectively, featuring controlled laboratory settings.
  • Wild: 55 images captured in unconstrained, "in-the-wild" environments.
  • Nature: A dataset specifically used to test the model's ability to generalize to outdoor scenes.

Key Insights and Ideas

  • Attention as a Filter: The most important "aha moment" is using cross-attention for interaction. By calculating similarity scores between the two streams, the model can suppress redundant information. If a feature is already clearly identified as "transmission," the attention mechanism ensures it doesn't muddy the "reflection" stream.
  • Global Priors Matter: Reflection separation isn't just about edges; it's about semantics. Knowing that a "reflection" usually has different statistical properties than a "transmission" (like being blurrier or having different lighting) requires the global context that Transformers provide.
  • Learnable Physics: Rather than assuming a simple linear addition ($T+R$), the model uses a learnable residual term in its loss function to account for the non-linearities of how light actually behaves when hitting glass.

Key Results

DSIT outperformed previous state-of-the-art (SOTA) models across the board.

  • Quantitative: On the "Average" of four real-world datasets, DSIT achieved a PSNR of 26.27 dB, significantly higher than previous leaders like DSRNet (25.40 dB) and YTMT (24.05 dB).
  • Qualitative: Visually, the model is much better at removing "ghosting" artifacts. In complex cases where reflections are bright and sharp, DSIT managed to recover the background texture where other models left blurry smudges or color distortions.
  • Generalization: The model showed impressive robustness on "in-the-wild" cases, such as reflections on water surfaces, which were not even present in the training data.

Limitations and Future Work

Despite the progress, the authors note a few remaining hurdles:

  • Extreme Reflections: When a reflection is so bright that it completely saturates the sensor (pure white), no model can "see through" it to recover what was behind.
  • Defocus Effects: While the model handles many cases, very complex defocus (where the reflection is extremely blurry) still poses a challenge to the "relative smoothness" assumptions often used in these tasks.
  • Future Directions: The authors suggest that even larger vision foundation models could provide even stronger priors, and that the "dual-stream" attention logic could be applied to other tasks like image dehazing or watermark removal.

Summary updated

BibTeX
@inproceedings{hu2024single,
  author = {Qiming Hu and Hainuo Wang and Xiaojie Guo},
  title = {{Single Image Reflection Separation via Dual-Stream Interactive Transformers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=Shwtw8uV8l},
}
Figure