Abstract
Computational color constancy is a fundamental task in digital photography, enabling cameras to estimate scene illumination and apply accurate white balancing. While traditional methods rely on a single "shot" frame, modern mobile devices capture a continuous stream of viewfinder frames prior to the final image. This paper introduces the first large-scale, high-resolution benchmark for Temporal Color Constancy (TCC), comprising 600 sequences captured with a consumer smartphone. Alongside this dataset, we propose TCC-Net, a novel architecture combining SqueezeNet with 2D-LSTMs to leverage spatio-temporal context. TCC-Net achieves state-of-the-art results, reducing mean angular error by over 35% compared to previous temporal methods while maintaining a memory footprint suitable for mobile integration.
Introduction
The human visual system possesses the remarkable ability to maintain "color constancy," perceiving the true color of objects regardless of the light source. Digital cameras attempt to mimic this through white balance algorithms. Historically, these algorithms have been limited to analyzing the final captured image. However, the "viewfinder" phase of modern photography provides a temporal sequence of frames that contains rich information about the scene's lighting environment. Utilizing these preceding frames—Temporal Color Constancy—offers a significant advantage, particularly in challenging scenarios where the final shot lacks sufficient color diversity. Despite its potential, research has been hindered by the lack of realistic, high-resolution datasets.
The TCC Benchmark
To address the data scarcity, we present the TCC Benchmark, the first large-scale dataset specifically designed for temporal color constancy in a mobile context. The dataset consists of 600 high-resolution sequences captured using a Huawei Mate 20 Pro. Each sequence includes a variable number of raw viewfinder frames (3 to 17) followed by the final shot.
Ground truth illumination was established by placing a SpyderCube calibration target into the scene immediately after the final shot was taken. This methodology ensures accurate labels without providing the model with visual cues during the estimation phase. The dataset spans a wide variety of indoor and outdoor environments under diverse weather conditions.
Dataset Characteristics
Analysis of the TCC Benchmark confirms that it represents a realistic distribution of lighting conditions, comparable to established single-frame datasets like Gehler-Shi and NUS 8-camera.
The sequences vary in length, reflecting real-world user behavior where the time spent framing a shot fluctuates. This variability necessitates models capable of handling arbitrary input lengths.
Methodology: TCC-Net
We propose TCC-Net, an end-to-end deep learning model designed for efficient temporal illumination estimation. TCC-Net features several key innovations:
- SqueezeNet Backbone: We utilize SqueezeNet for feature extraction, providing a superior balance between accuracy and computational efficiency compared to heavier architectures like AlexNet.
- 2D-LSTMs: Unlike standard 1D-LSTMs that flatten spatial information, our model employs 2D-LSTMs. By using convolutional structures in state transitions, 2D-LSTMs preserve the spatial layout of illumination features, which is critical for tracking lighting changes across the frame.
- Temporal Integration: The model processes the sequence of viewfinder frames alongside a "pseudo zoom-out" of the final shot, effectively combining wide-context temporal data with high-resolution spatial data.
Experimental Results
TCC-Net sets a new state-of-the-art for temporal color constancy. On the TCC Benchmark, it achieves a mean angular error of 1.99° and a median of 1.21°, representing a 35% improvement over the previous leading method, RCC-Net.
The model's performance on the legacy SFU Gray Ball dataset further validates its robustness, reducing mean error from 4.0° to 2.8°. Ablation studies highlight the importance of the 2D-LSTM; preserving spatial structure yields a significant accuracy boost over 1D variants.
From an implementation standpoint, TCC-Net is highly efficient. It processes frames in approximately 6 ms on a desktop GPU. While the 2D-LSTM variant requires 68.8 MB of memory, a lighter 1D-LSTM version uses only 6.6 MB while still outperforming previous baselines, demonstrating clear potential for deployment on mobile Image Signal Processors (ISPs).
Conclusion
The introduction of the TCC Benchmark and TCC-Net marks a significant step toward more robust white balancing in consumer photography. By leveraging the temporal dimension of the viewfinder stream, we can overcome the inherent ambiguities of single-frame color constancy. We are open-sourcing both the dataset and the code to encourage further innovation in this field.
Summary updated