Transform Your Smartphone into a DSLR Camera: Learning the ISP in the Wild

Ardhendu Shekhar Tripathi, Martin Danelljan, Samarth Shukla, Radu Timofte, Luc Van Gool

Abstract

Modern smartphone photography is limited by small sensors and hand-designed Image Signal Processing (ISP) pipelines. While deep learning models can learn to map RAW smartphone data to DSLR-quality sRGB images, training "in the wild" is hindered by spatial and color misalignments. This paper presents a novel color-conditional ISP framework featuring a Global Context Transformer (GCT) and a masked aligned loss. Our approach effectively handles weakly paired data, achieving state-of-the-art performance on the ZRR and a new ISPW dataset, producing sharp, color-accurate images that rival DSLR outputs.

Introduction

The conversion of RAW sensor data into viewable sRGB images, known as the ISP pipeline, is a critical component of mobile photography. Traditional pipelines often struggle with the noise and limited dynamic range of small mobile sensors. Deep learning-based ISPs offer a promising alternative by learning the mapping from RAW to DSLR-quality sRGB.

However, obtaining perfectly aligned training pairs in real-world scenarios is nearly impossible due to parallax and motion. This "weakly paired" data often leads to blurry results or inconsistent color reproduction in learned models, as the network attempts to minimize loss across spatially misaligned pixels.

Typical blurry results produced by existing methods when trained on weakly aligned "in the wild" data.

Methodology

We propose a color-conditional framework that decouples color prediction from image restoration to address these challenges.

Global Context Transformer (GCT)

To ensure consistent global tone mapping, we introduce the GCT. Unlike standard Transformers with quadratic complexity, the GCT utilizes cross-attention to aggregate global information into a small, fixed-size latent array. This maintains linear complexity and allows the model to scale to high resolutions without excessive memory usage, providing the global context necessary for accurate color prediction.

Parametric Color Mapping and Masked Aligned Loss

The framework uses a parametric color mapping to align RAW input colors to the DSLR target during training. To mitigate spatial misalignment, we employ a "Masked Aligned Loss." By using forward-backward consistency in optical flow, we generate a mask that directs the loss function to ignore regions where alignment is likely inaccurate (e.g., near edges or occlusions). This prevents the model from learning artificial blur caused by misaligned ground truth.

Datasets

The framework was evaluated on the Zurich RAW-to-RGB (ZRR) benchmark and our newly introduced ISP in the Wild (ISPW) dataset. ISPW consists of 197 high-resolution pairs from a Huawei Mate 30 Pro and a Canon 5D Mark IV, including rich metadata such as ISO and exposure settings to facilitate parameter-aware learning.

Results and Discussion

Our method establishes a new state-of-the-art on both benchmarks. On the ZRR dataset, we achieved a PSNR of 25.24 dB, a 1.43 dB improvement over previous methods. On the ISPW dataset, we reached 25.05 dB, outperforming the runner-up by 1.54 dB.

Qualitative results on the ISPW dataset showing the full restored scene and detailed crops of complex structures like window blinds and playground equipment.

Qualitatively, the model produces significantly sharper details and more natural colors compared to previous wavelet-based or U-Net approaches. We also introduced OursFast, a lightweight variant that is 20.2% faster than LiteISPNet while maintaining superior image quality.

Conclusion

By addressing the fundamental challenges of spatial and color misalignment in weakly paired data, our framework enables the training of high-performance learned ISPs "in the wild." While the full model requires high-end GPU resources for optimal speed, the results demonstrate a significant step toward DSLR-quality mobile photography. Future work will focus on further optimizing inference for real-time mobile deployment and leveraging sensor metadata for more controllable processing.

Summary updated

BibTeX
@inproceedings{tripathi2022transform,
  author = {Ardhendu Shekhar Tripathi and Martin Danelljan and Samarth Shukla and Radu Timofte and Luc Van Gool},
  title = {{Transform Your Smartphone into a DSLR Camera: Learning the ISP in the Wild}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20068-7\_36},
}
Figure