Abstract
White balancing (WB) sRGB images is a non-trivial task because these images have already undergone non-linear processing within a camera's Image Signal Processor (ISP). We propose WBFlow, a novel framework based on Reversible Neural Flows that treats the ISP as an invertible function. By mapping sRGB images back to a linear "pseudo-raw" space, WBFlow performs accurate color correction and generalizes to new camera models through a few-shot adaptation mechanism.
Introduction
Standard white balance algorithms operate on linear RAW data where the relationship between light and pixel value is straightforward. However, standard sRGB images (like JPEGs) are the output of a complex, non-linear ISP pipeline involving gamma correction, tone mapping, and proprietary color enhancements.
Traditional linear corrections applied directly to sRGB data often result in significant color artifacts. While deep learning solutions have been proposed, many rely on "lossy" architectures like U-Nets that discard information during downsampling. Furthermore, these models often fail to generalize across different camera brands due to the unique "signatures" of different manufacturers' ISPs.
Methodology
The WBFlow architecture consists of three primary modules: RNRT for un-rendering sRGB to pseudo-raw, RLCT for linear correction, and CT for camera-specific adaptation. WBFlow: Few-shot White Balance for sRGB Images via Reversible Neural Flows, page 3
WBFlow is designed around the principle of mathematical reversibility, ensuring that no image information is lost during the transformation process. The architecture consists of three main components:
- Reversible Non-linear Rendering Transformation (RNRT): This module uses Normalizing Flows (specifically additive coupling layers) to "un-render" the input sRGB image into a high-dimensional "pseudo-raw" feature space. This process is mathematically lossless.
- Reversible Linear Correction Transformation (RLCT): Once in the linear pseudo-raw space, the model applies reversible $1 \times 1$ convolutions. These operations simulate the linear transformation matrices typically used in RAW processing to correct color casts.
- Camera Transformation (CT): To address hardware-specific variations, a small, tunable CT layer is introduced. This allows the model to adapt to a new, untrained camera using only a few (5–20) example images, bridging the gap between different hardware signatures without requiring full model retraining.
Experimental Results
Qualitative comparison of WBFlow against KNN-WB and Deep WB on both trained (Canon) and untrained (Olympus) cameras. WBFlow consistently achieves lower $\Delta E 2000$ errors and more accurate color histograms. WBFlow: Few-shot White Balance for sRGB Images via Reversible Neural Flows, page 1
WBFlow demonstrates superior performance across multiple benchmarks. On the "Set1" dataset, it achieved a $\Delta E 2000$ color difference score of 3.13, significantly outperforming the previous state-of-the-art method, Deep WB (3.77).
Key findings include:
- Generalization: On untrained cameras, WBFlow reduced mean error by approximately 5.3% to 6.4% compared to existing methods.
- Visual Fidelity: Qualitative results show that WBFlow effectively removes color casts while maintaining the integrity of the color distribution. As seen in the histograms, WBFlow's output almost perfectly matches the ground truth (GT), whereas competing methods often leave noticeable tints or "crush" specific color channels.
- Efficiency: Despite the complexity of neural flows, the model maintains a competitive inference time of approximately 1.09 seconds per image.
Conclusion
By leveraging the inherent reversibility of the ISP process, WBFlow provides a robust and mathematically sound solution for sRGB white balancing. Its ability to map to a linear latent space and adapt to new hardware via few-shot learning marks a significant advancement in computational photography and low-level vision tasks.
Summary updated