Abstract
Machine learning techniques work best when the data used for training resembles the data used for evaluation. This holds true for learned single-image denoising algorithms, which are applied to real raw camera sensor readings but, due to practical constraints, are often trained on synthetic image data. Though it is understood that generalizing from synthetic to real data requires careful consideration of the noise properties of image sensors, the other aspects of a camera's image processing pipeline (gain, color correction, tone mapping, etc) are often overlooked, despite their significant effect on how raw measurements are transformed into finished images. To address this, we present a technique to "unprocess" images by inverting each step of an image processing pipeline, thereby allowing us to synthesize realistic raw sensor measurements from commonly available internet photos. We additionally model the relevant components of an image processing pipeline when evaluating our loss function, which allows training to be aware of all relevant photometric processing that will occur after denoising. By processing and unprocessing model outputs and training data in this way, we are able to train a simple convolutional neural network that has 14%-38% lower error rates and is 9x-18x faster than the previous state of the art on the Darmstadt Noise Dataset, and generalizes to sensors outside of that dataset as well.
Introduction
Deep learning has revolutionized image denoising, but these models are highly dependent on the quality and realism of their training data. Ideally, models would be trained on pairs of "noisy" and "clean" raw sensor images. However, collecting such data is logistically difficult, requiring perfectly aligned long-exposure and short-exposure shots of static scenes.
To circumvent this, researchers often use synthetic data by adding simple Gaussian noise to clean sRGB images. The problem is that real camera noise is far more complex, and the Image Processing Pipeline (ISP)—the sequence of steps a camera takes to convert raw sensor readings into a finished sRGB image (e.g., white balance, color correction, tone mapping)—drastically alters the statistical properties of that noise. A model trained on "fake" noise in sRGB space often fails when applied to real raw sensor data. This paper introduces a technique to "unprocess" standard internet photos, reversing the effects of an ISP to create realistic synthetic raw data for training.
Methodology: The Unprocessing Pipeline
The core contribution is a systematic method to reverse the camera's internal software pipeline. Instead of modeling noise in a finished JPEG, the authors invert the ISP to estimate the original raw sensor data from finished sRGB images.
The "Unprocessing" sequence involves several key steps:
- Inverting Tone Mapping: Reversing the non-linear S-shaped curve used for contrast.
- Gamma Decompression: Moving from non-linear sRGB space back to linear light intensities.
- Inverting Color Correction: Converting from standard sRGB back to the camera's specific "device RGB."
- Inverting White Balance and Gain: Reversing the per-channel scaling used to balance colors and brighten the image.
- Mosaicing: Converting the full-color image back into a single-channel Bayer mosaic.
Once a "synthetic raw" image is generated, a realistic shot and read noise model is applied. The authors then train a standard U-Net architecture to denoise this data. Crucially, the loss function is evaluated after passing the denoised output back through a simplified ISP, making the network aware of how denoising affects the final viewed image.
Experimental Results
The model was trained on 1 million images from the MIR Flickr dataset and evaluated on the Darmstadt Noise Dataset (DND), a benchmark of 50 real high-resolution noisy/clean pairs from four different consumer cameras.
Performance and Efficiency
The proposed approach achieved state-of-the-art results on the DND benchmark, with 14%-38% lower error rates (measured in PSNR and SSIM) than previous leading models. Because the architecture is a simple and efficient U-Net, it is also 9x to 18x faster than competing models like N3Net or CBDNet, processing a 512x512 image in just 22ms on a standard GPU.
Generalization
Beyond the DND, the model demonstrated strong generalization on the HDR+ dataset, performing well on sensors it was not explicitly modeled for. This suggests that the unprocessing technique captures fundamental aspects of camera physics that apply across different hardware.
Discussion and Key Insights
This research highlights that the ISP is the "missing link" in learned denoising. Ignoring the transformations an image undergoes (like gamma and tone mapping) is as detrimental as using an inaccurate noise model. By including the ISP steps in the training loop, the network learns that errors in certain areas (like dark regions brightened by tone mapping) are more visually significant, leading to superior results.
Limitations and Future Work
The authors utilize a simplified, generic inverted ISP. Real-world camera ISPs are often proprietary and highly complex, which this model does not fully capture. Additionally, the current noise model focuses on shot and read noise, omitting artifacts like fixed pattern noise. Future work could explore how this unprocessing technique interacts with more sophisticated, non-linear demosaicing algorithms.
Summary updated