SAFE: Scene-Aware Feature Modulation for Color Constancy with Learned Color Sapce in Pure-Color Scenes

arXiv 2026
Yuan-Kang Lee1, Kuan-Lin Chen2, Chih-Heng Chang2, Jian-Jiun Ding2
1MediaTek Inc., 2National Taiwan University
SAFE: Scene-Aware Feature Modulation for Color Constancy with Learned Color Sapce in Pure-Color Scenes
We present SAFE, a color constancy framework for pure-color scenes that couples two complementary innovations: SAFE, a scene-aware feature modulation network whose scene complexity modulation selectively reweights a structured four-token illumination representation, and the Learned Color Space (LCS), a scene-dependent chromaticity normalization that directly counters the chromaticity collapse to which standard normalizations succumb on pure-color scenes.

Abstract

Figure

Overview of the proposed color constancy framework. Training proceeds in four phases: (1) pre-train the SAFE backbone $\phi$ alongside a coarse global $w$-module under the angular loss; (2) freeze $\phi^{(1)}$ and search for a scene-dependent color axis that minimizes the teacher’s angular error; (3) supervise the LCS predictor $\psi$ on the oracle in logit space; (4) jointly fine-tune $\phi$ and $\psi$ end-to-end. At inference, the LCS predictor $\psi$ outputs a per-image color axis $\mathbf{w}(\mathbf{I})$ that re-parameterizes the chromaticity normalization for calculating the four-token illumination feature $\mathbf{f}_w$; the SAFE backbone then modulates $\mathbf{f}_w$ via a scene descriptor to predict the illuminant estimate $\hat{\mathbf{y}}$.

Contributions

  • A four-token illumination feature designthat combines physics-derived cues (specular log-chromaticity, dichromatic principal direction) with chromaticity statistics from original and edge images into a structured 24D representation with clear semantic roles.
  • The Scene-Aware Feature Modulation(SAFE) network that adaptively reweights illumination tokens based on scene characteristics, enabling robust and stable behavior across diverse imaging conditions.
  • The Learned Color Space(LCS): a scene-dependent chromaticity normalization predicted by a lightweight model from the image and scene complexity features, designed to counter chromaticity collapse on pure-color scenes.
  • Experiment results on the public benchmark demonstrate that SAFE consistently improves performance in pure-color scenes. Compared to the best-performing baseline in each metric, it reduces the mean angular error by 10%, the best-25% error by 20%, and the worst-25% error by 5.8%.

Results

Table 1: Evaluation results on the PolyUv2 pure color dataset. We report the mean angular error (in degrees) based on 3-fold cross-validation. SAFE outperforms existing methods, yielding the lowest mean, median, tri-mean, best-25%, and worst-25% angular errors, underscoring its superior stability.

Cells highlighted as 1st / 2nd / 3rd per column.

Method MeanMed.Tri.B-25%W-25%
WP [27]5.994.374.720.8914.08
GW [7]6.785.535.691.7314.08
GE [47]4.733.383.801.1110.52
SoG [15]5.554.504.741.0511.84
LSRS [16]6.005.025.101.4612.52
GP [51]4.563.513.840.8210.01
GI [36]4.092.813.170.679.65
FC4 [20]2.481.792.050.555.57
C4 [52]2.231.491.750.515.05
C5 [1]2.181.551.780.524.95
PCC [53]2.391.601.760.515.47
ePCC [31]2.161.391.610.455.08
SAFE w/o LCS 2.121.441.560.435.01
SAFE w/ LCS (P1) 2.031.381.500.394.80
SAFE w/ LCS (P4) 1.941.271.390.364.66

Table 2: Evaluation results on the Gehler-Shi dataset. We report the mean angular error (in degrees) based on 3-fold cross-validation. The results prove that SAFE is not limited to pure-color scenes, but achieves comparable performance on general scenes.

Cells highlighted as 1st / 2nd / 3rd per column.

Method MeanMed.Tri.B-25%W-25%
WP [27]7.555.686.351.4516.12
GW [7]6.366.286.282.3310.58
SoG [15]4.934.014.231.1410.20
PCA-CC [10]3.522.142.470.508.74
Woo et al. [50]4.302.863.310.7110.14
GI [36]3.071.872.160.437.62
C4 [52] 1.350.880.990.283.21
CLCC [32] 1.440.921.040.273.48
GCC [8] 1.911.801.840.603.46
PCC [53]2.641.611.830.456.62
ePCC [31]2.451.591.780.445.87
SAFE w/o LCS2.351.691.780.475.57
SAFE w/ LCS (P1)2.331.661.750.475.43
SAFE w/ LCS (P4) 2.231.561.690.415.24
**Qualitative comparison on images from the PolyU Pure Color dataset V2.** Images are gamma-corrected for visualization. The angular error (in degree) is reported in the bottom-right corner of each image.

Qualitative comparison on images from the PolyU Pure Color dataset V2. Images are gamma-corrected for visualization. The angular error (in degree) is reported in the bottom-right corner of each image.

**Scene-dependent LCS deviation versus scene entropy.** (Left figure) The LOWESS smoother with $95\%$ bootstrap confidence band. {(Right figure)} Hexbin density of the same data with the LOWESS smoother overlaid in red. Quantitatively, the lowest-entropy quintile ($n{=}255$) attains $\bar{\Delta}_w = 0.0547$ versus $0.0462$ for the highest-entropy quintile ($18\%$ relative increase on pure-color scenes) and the Pearson correlation $r(H,\Delta_w) = -0.149$ is highly significant ($p < 10^{-7}$, $N{=}1271$). The analysis validates that the LCS design further improves the accuracy of illumination estimation in pure-color scenes.

Scene-dependent LCS deviation versus scene entropy. (Left figure) The LOWESS smoother with $95%$ bootstrap confidence band. {(Right figure)} Hexbin density of the same data with the LOWESS smoother overlaid in red. Quantitatively, the lowest-entropy quintile ($n{=}255$) attains $\bar{\Delta}_w = 0.0547$ versus $0.0462$ for the highest-entropy quintile ($18%$ relative increase on pure-color scenes) and the Pearson correlation $r(H,\Delta_w) = -0.149$ is highly significant ($p < 10^{-7}$, $N{=}1271$). The analysis validates that the LCS design further improves the accuracy of illumination estimation in pure-color scenes.

**Introspection on the SAFE backbone.** The modulation attention $\alpha(\mathbf{g})$ quantifies how strongly the modulation network preserves each feature dimension; the input projection weight $\lVert W_0[:,j]\rVert_2$ quantifies how much linear weight the backbone allocates to each dimension; and the intrinsic effective contribution quantifies how important each token is to the illumination estimation.

Introspection on the SAFE backbone. The modulation attention $\alpha(\mathbf{g})$ quantifies how strongly the modulation network preserves each feature dimension; the input projection weight $\lVert W_0[:,j]\rVert_2$ quantifies how much linear weight the backbone allocates to each dimension; and the intrinsic effective contribution quantifies how important each token is to the illumination estimation.

BibTeX

@article{lee2026safe,
  title={SAFE: Scene-Aware Feature Modulation for Color Constancy with Learned Color Sapce in Pure-Color Scenes},
  author={Lee, Yuan-Kang and Chen, Kuan-Lin and Chang, Chih-Heng and Ding, Jian-Jiun},
  journal={arXiv preprint arXiv:2601.05249},
  year={2026}
}