Color constancy algorithms estimate and remove the effect of the illuminant from a captured image, enabling consistent color perception under varying illumination conditions. Learning-based methods achieve high accuracy but tend to be biased toward the spectral characteristics of training cameras. Traditional algorithms such as white-patch Retinex are computationally efficient and camera-independent, but underperform when scene statistics deviate from their assumptions. Therefore, in this paper, we propose a hybrid approach that combines classical assumptions with learned features. Our model processes images in a block-based manner through two complementary branches. The backbone branch extracts scene features and identify reliable regions for illuminant estimation. Guided by these saliency maps, the statistics branch computes per-block illumination priors using a soft maximum formulation that provides a differentiable approximation to the classical white-patch Retinex. Features from both branches are fused and refined through multi-head self-attention, which enables blocks to exchange information across the image, addressing the aggregation bias common to block-based methods. Experiments on five benchmarks demonstrate that our model achieves state-of-the-art performance with a compact architecture (~1.1 MB, ~2.2 ms per image) that requires no camera-specific calibration or metadata.
The white-patch assumption relies on a single maximum value per channel. This makes it sensitive to noise and specular highlights. Percentile-based alternatives avoid relying on a single pixel, but they depend on fixed thresholds that fail to generalize across scenes. Block-based methods address this by computing statistics locally within regions. Yet, how to combine these local estimates remains an open problem. Directly averaging per-block estimates introduces bias. Scenes containing large uniform regions produce blocks that outnumber those with diverse color content, and this disproportionately affects the final estimate.
We replace the hand-tuned threshold with a saliency-weighted soft-maximum, learned end-to-end. Then, we refine per-block estimates with multi-head self-attention, allowing any block to attend to any other regardless of spatial distance. This allows any unreliable blocks in dark or shadowed regions to benefit from illuminant cues in well-lit, chromatically informative regions elsewhere in the image. This is the first use of self-attention for the block aggregation bias in color constancy.
State-of-the-art performance on benchmarks, improving over the closest prior SOTA by ∼5–8% on average and up to ∼18% on the worst-25% cases. The model is compact at 1.1 MB and runs in ∼2.2 ms per image. It needs no camera-specific calibration, and shows strong cross-camera performance.
The backbone extracts a shared feature map that branches into a saliency head and a feature-processing path in parallel. The statistics branch uses the resulting saliency map to compute block-wise illumination priors. All branches are fused and fed into the illumination estimation module, which refines per-block representations through self-attention and produces the final illuminant estimate via weighted combination.
Reliable regions learned without supervision
A MobileNetV3-Small backbone extracts a feature map from the input image. From this shared feature map, a saliency head predicts per-pixel reliability weights, while a separate feature-processing path pools the same features into block-level representations. Since no explicit saliency supervision is provided, the saliency head learns to emphasize informative regions purely through the illuminant estimation objective.
Learnable image statistics
Within each block b, a temperature-controlled soft maximum, parameterized by a learnable τ, gives a saliency-weighted color descriptor:
where xk is the RGB value of pixel k. As τ→0 the descriptor approaches a hard maximum over the brightest pixels; larger τ distributes the contribution over a broader set of pixels. This can be viewed as a soft, differentiable generalization of the max-RGB assumption, where τ controls how sharply the descriptor focuses on the brightest pixels, while the saliency weights s determine which pixels are considered reliable. Since mb captures chromatic information but not overall brightness, a separate saliency-weighted mean intensity is defined:
Given both descriptors, the block-level illumination prior is obtained by scaling mb by μb:
preserving chromatic direction while weighting magnitude by block brightness.
Refining block representations via cross-block attention
Statistical features and backbone features are combined per block, normalized, and projected into a shared representation. Then, these are refined through scaled dot-product attention, integrated via residual connections and a feed-forward network. With this step, any block can communicate with any other regardless of spatial distance. This process allows unreliable blocks in dark or shadowed regions to benefit from illuminant cues from well-lit, chromatically informative regions elsewhere in the image.
Illumination estimation
An illuminant head and a weight head map each block's refined representation to a per-block illuminant estimate ℓ̂b and a raw weight wb. Weights are normalized via softmax, and the final illuminant is their weighted combination:
T is a learnable temperature. The model is trained end-to-end with a sparsity regularizer that discourages uniform block weighting:
Statistical Results
The model is evaluated using a leave-one-dataset-out strategy, together with a cross-sensor protocol. Training uses Gehler-Shi, NUS-8, Cube+, and INTEL-TAU. TA-AWB is held out entirely and used only to test camera generalization. In every evaluation, there is no camera overlap between the training and test sets.
The model achieves the lowest mean angular error on Gehler-Shi, NUS-8, Cube+, and INTEL-TAU, as well as on the NUS-8 cross-sensor protocol — improving over the closest prior SOTA by 5–8% mean error, and by up to 18% on the worst-25% cases.
On TA-AWB, the competing learning-based methods, except for those marked with an asterisk, are trained on the dataset's own training split. Despite this advantage, HybridCC remains competitive on an unseen smartphone sensor, fundamentally different from the DSLR-dominated training data.
| Method | Mean | Best 25% | Median | Worst 25% |
|---|---|---|---|---|
| SIIE | 2.77 | 0.55 | 1.93 | 6.53 |
| C5 | 2.50 | 0.53 | 1.99 | 5.46 |
| GCC | 2.35 | 0.78 | 2.02 | 4.57 |
| Tra-CC | 2.32 | 0.68 | 1.76 | 4.85 |
| CCMNet | 2.23 | 0.36 | 1.53 | 5.46 |
| HybridCC | 2.11 | 0.53 | 1.60 | 4.65 |
Visual results
If you find this work useful, please consider citing our paper:
@inproceedings{ulucan2026multiblock,
title = {Multi-Block-Attention-based Color Constancy},
author = {Ulucan, Oguzhan and Ulucan, Diclehan and Ebner, Marc},
booktitle = {European Conference on Computer Vision (ECCV)},
year = {2026}
}