Removing Reflections from RAW Photos

Eric Kee, Adam Pikielny, Kevin Blackburn-Matzen, Marc Levoy

Abstract

Reflection removal is a fundamental problem in image restoration. While most existing methods operate on non-linear 8-bit images (e.g., JPEGs), this paper demonstrates that processing linear RAW data is the key to superior performance. By utilizing the additive nature of light in RAW space and incorporating a contextual "selfie" photo, the proposed system effectively separates transmission and reflection layers. The approach produces high-fidelity 4K outputs in seconds, outperforming previous state-of-the-art models.

Introduction

Taking a photo through a window often results in unwanted reflections. Mathematically, the captured image $I$ is a linear combination of the transmitted scene $T$ and the reflected scene $R$ ($I = T + R$). However, standard 8-bit images like JPEGs have undergone non-linear transformations—tone mapping, gamma correction, and white balancing—that "bake in" reflections, breaking this simple additive relationship. This makes accurate layer separation extremely difficult for neural networks.

Methodology

RAW-to-RAW Processing

The core innovation is operating entirely within a linear, scene-referred color space (XYZ). By processing RAW data before the camera's ISP (Image Signal Processor) applies non-linearities, the model can leverage the physical additive nature of light to "un-mix" layers more effectively.

Physically Accurate Synthesis

Due to the scarcity of real-world ground truth pairs, the authors developed a sophisticated synthesis engine. It combines separate RAW images by simulating Fresnel attenuation, depth-of-field blur, and double reflections. Crucially, images are mixed before white balancing, allowing the model to learn natural color priors (e.g., warm indoor reflections on cool outdoor windows).

Two-Stage Architecture

To achieve high-resolution output without excessive memory costs, the system employs a two-stage pipeline. A "Base Model" operates at low resolution (256x256) to identify components, followed by a novel "Upsampler." Instead of hallucinating pixels, the upsampler predicts masks to "copy" sharp features from the original high-resolution mixture.

The proposed two-stage architecture processes RAW data through a base model and subsequent upsamplers to generate high-resolution results.

Contextual Disambiguation

The system can optionally utilize a "context photo" from the device's front-facing camera. This provides a direct observation of the scene behind the photographer, significantly reducing ambiguity during the separation process.

Results and Evaluation

The model was trained on over one million synthetic pairs and evaluated on standard benchmarks and "in-the-wild" smartphone captures. It achieves a significant jump in SSIM and PSNR over prior state-of-the-art methods like DSRNet and Zhang et al.

Qualitative comparison showing the effectiveness of the RAW-based approach and contextual input in separating complex reflections.

Key findings include:

  • Data Priority: Training standard models on RAW data yields more improvement than complex architectures on 8-bit data.
  • Efficiency: The system generates 1K previews in 4.5–6.5 seconds on mobile hardware and supports 4K+ resolution.
  • Fidelity: Unlike 8-bit methods, the RAW approach avoids "color leaks" and preserves sensor-level detail.

Limitations and Future Work

While highly effective, the system faces challenges with saturated reflections where information is physically lost. Additionally, occlusions (e.g., the photographer's face in the context photo) or rapid motion in the reflection can degrade performance. Future research may extend this RAW-centric approach to other tasks like shadow or lens flare removal.

Summary updated

BibTeX
@inproceedings{kee2025removing,
  author = {Eric Kee and Adam Pikielny and Kevin Blackburn-Matzen and Marc Levoy},
  title = {{Removing Reflections from RAW Photos}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00024},
}
Figure