TL;DR
Training neural networks for RAW and HDR image restoration in linear color spaces—the current "default" for many researchers—is surprisingly suboptimal. By simply switching the input representation to a perceptually uniform space (like PQ or PU21), models achieve massive performance gains of 2 to 9 dB across denoising, deblurring, and super-resolution tasks.
What Problem Does This Paper Address?
Most standard images (SDR) are stored in display-encoded spaces like sRGB, which are designed to be "perceptually uniform"—meaning a small change in pixel value corresponds to a roughly equal change in how we perceive brightness. In contrast, camera RAW and High Dynamic Range (HDR) images are typically represented in linear color spaces, where values are directly proportional to physical light intensity.
This creates a dilemma for deep learning:
- The Physics Argument: Physical phenomena like lens blur, motion blur, and sensor noise are linear. Therefore, restoration tasks (the inverse of these phenomena) should theoretically be modeled in linear space.
- The Perception Argument: Human vision is non-linear; we are far more sensitive to changes in dark areas than in bright ones. Linear spaces "waste" numerical precision on bright highlights that we can barely distinguish, while starving the shadows where we see every detail.
The authors set out to settle the debate: should we train networks on linear data, or should we encode them first?
Methods
The researchers conducted a comprehensive benchmark, testing eight combinations of pixel encodings and loss functions (summarized in Figure 6) across three major restoration tasks: single-image super-resolution (SISR), deblurring, and denoising.
They compared four main representations:
- Linear: The raw, physical light values.
- $\mu$-law: A logarithmic-like mapping often used in audio.
- PQ (Perceptual Quantizer): The standard for HDR video (BT.2100).
- PU21: A modern, numerically efficient perceptually uniform transform.
As shown in Figure 1, these encoding functions compress the massive dynamic range of light into a 0–1 range that is much better suited for neural network training.
Crucially, they also tested whether simply using a perceptual loss function (like SMAPE or an L1 loss calculated in a perceptual space) while keeping the input linear was enough to bridge the gap.
Datasets
- HDR Dataset: A mix of 106 high-quality images from the HDR Photographic Survey and representative frames from the SJTU HDR Video Sequences.
- RAW Dataset: 231 long-exposure images from the "Learning to See in the Dark" (LTSID) dataset. These were demosaiced to RGB but kept in their original linear sensor space for testing.
Key Insights and Ideas
- Perceptual Encoding is a "One-Liner" Superpower: The most significant finding is that training on display-encoded (perceptually uniform) images consistently and significantly outperforms training on linear images. This is a simple change that requires no architectural modifications.
- Input Representation Trumps Loss Function: Interestingly, just changing the loss function to be perceptually aware while keeping the input data linear (e.g., "Linear-PQ" in their tests) was not as effective as encoding the input itself. The network needs to "see" the data in a perceptually scaled way to learn efficiently.
- Data Efficiency: The authors hypothesize that perceptual transforms act as a form of "data compression" for the network. By representing visually relevant information more efficiently, the network can devote more of its capacity to the actual restoration task rather than learning to compensate for the extreme non-uniformity of linear light.
- Physics vs. Perception: Even though blur and noise are linear, the benefit of matching the network's "attention" to human perception far outweighs the theoretical benefit of maintaining physical linearity.
Key Results
The quantitative improvements were dramatic across the board. Using perceptual encodings (PQ, PU21, or $\mu$-law) resulted in:
- Super-resolution: Gains of 1.5 to 9 dB in PSNR compared to the standard linear-L1 approach. As seen in Figure 3, the perceptual models (left side of the plots) consistently outperformed linear ones.
- Deblurring: An improvement of approximately 3.8 dB. Notably, some models (like GFNNet) failed to even converge when trained on certain linear loss functions but worked perfectly with perceptual encodings.
- Denoising: Perceptual encodings produced the best results, with $\mu$-law and PU21 being particularly robust.
Qualitatively, networks trained on linear data often produced visible color artifacts and softer details, whereas those trained on perceptual representations produced sharper, cleaner images.
Limitations and Future Work
While the results are clear, the authors acknowledge they don't have a "conclusive answer" as to why these transforms help so much, though data efficiency is the leading theory.
The study focused strictly on restoration tasks. It remains to be seen if these findings generalize to high-level vision tasks like object detection or segmentation on HDR/RAW data. Additionally, while PQ and PU21 are psychophysically grounded, they are more computationally expensive than the simpler $\mu$-law, which performed admirably well across most tests. Future work could explore even more efficient "one-liner" transforms tailored specifically for deep learning.
Summary updated