Source-linked AI summary

RL-AWB: Deep Reinforcement Learning for Auto White Balance Correction in Low-Light Night-time Scenes

Yuan-Kang Lee, Kuan-Lin Chen, Chia-Che Chang, Yu-Lun Liu

arXiv:2601.05249v4cs.CV

TL;DR

Nighttime white balance is challenged by low-light noise, complex illumination, and unreliable cross-sensor estimates. RL-AWB combines a nighttime statistical estimator with reinforcement learning that adapts its parameters per image, and reports better unseen-sensor generalization than fully supervised methods with only five training images per dataset.

  • Problem

    Nighttime AWB faces unstable illuminant estimates under low light and chromatic noise, while existing deep approaches require labeled nighttime data and can generalize poorly to unseen sensors.

    Source: §1 · p. 2
  • Method

    RL-AWB combines the SGP-LRD nighttime statistical estimator with reinforcement learning for adaptive parameter selection, without requiring ground-truth illuminants at inference.

    Source: §1 · pp. 2–3
  • Results

    With only 5 training images per dataset, RL-AWB generalizes across unseen sensors better than fully supervised state-of-the-art methods.

    Source: §1 · p. 3
  • Takeaways & Limitations

    The authors report competitive performance across nighttime and daytime datasets, cross-sensor robustness, and ground-truth-free inference when generalizing to unseen datasets and cameras.

    Source: §6 · p. 15

    For images with already low initial estimation error, the RL agent may over-correct and slightly degrade the output.

    Source: §6 · p. 15

Abstract

from arXiv · show

Nighttime color constancy still remains a challenging problem in computational photography due to low-light noise and complex illumination conditions. We present RL-AWB, a novel framework combining statistical methods with deep reinforcement learning for nighttime white balance. Our method begins with a statistical algorithm tailored for nighttime scenes, integrating salient gray pixel detection with novel illuminant estimation. Building on this foundation, we develop the first deep reinforcement learning approach for color constancy that leverages the statistical algorithm as its core, mimicking professional AWB tuning experts by dynamically determining image-specific parameters at inference time, without requiring ground-truth illuminants or reference images. To further facilitate cross-sensor evaluation, we introduce the first multi-sensor nighttime dataset. Experiment results demonstrate that our method achieves strong generalization capability across low-light and well-illuminated images. Project page: https://ntuneillee.github.io/research/rl-awb/

1 Introduction

RL-AWB addresses unstable nighttime white-balance estimation with an adaptive reinforcement-learning framework built around a nighttime-specific statistical estimator. The work also introduces a multi-camera nighttime dataset and reports generalization to unseen sensors with very little training data.

1 Introduction

  • Nighttime AWB is unstable under low illumination, high ISO, chromatic noise, and cross-sensor variation, challenging robust deployment.Source: §1 · p. 2
  • Low-light noise undermines conventional statistical assumptions, while deep methods need labeled nighttime data and degrade on unseen sensors.Nighttime parameter sensitivity further means small tuning changes can produce dramatically different illuminant estimates.Source: §1 · p. 2
  • RL-AWB frames nighttime AWB as sequential decisions, learning adaptive parameter choices for a statistical illuminant estimator with minimal training data.The hybrid design is intended to retain statistical methods’ interpretability and sensor-agnostic character while adding adaptive learning.Source: §1 · p. 2
  • The contributions include SGP-LRD, a nighttime color-constancy algorithm, and RL-AWB with Soft Actor-Critic training and two-stage curriculum learning for adaptive per-image parameter optimization.Source: §1 · p. 3
  • LEVI is introduced as a first multi-camera nighttime dataset comprising 700 images for cross-sensor evaluation.Source: §1 · p. 3
  • With only 5 training images per dataset, RL-AWB generalizes across unseen sensors better than fully supervised state-of-the-art methods.Source: §1 · p. 3

2 Related Work

Related work spans statistical and learned color-constancy methods, nighttime imaging, reinforcement learning for image processing, and cross-sensor generalization. The paper positions RL-AWB as a hybrid that uses reinforcement learning to tune interpretable statistical parameters for nighttime conditions.

2 Related Work

  • Classical color-constancy methods use scene statistics, gamut constraints, Bayesian priors, edge cues, and related refinements, but often rely on fixed parameters or heuristics.Source: §2 · pp. 3–4
  • Deep color-constancy work includes CNN, GAN, diffusion, self-supervised, and adaptation methods, while the paper characterizes many approaches as requiring extensive labeled nighttime data.The authors contrast this with sample-efficient RL tuning of interpretable statistical parameters for cross-dataset generalization.Source: §2 · p. 4
  • Nighttime methods address low light, mixed illumination, and chroma noise, but the cited approaches may rely on pseudo-labels with error propagation or fixed parameters.Source: §2 · p. 4
  • Prior RL applications cover several ISP tasks, whereas RL-AWB uses Soft Actor-Critic to control statistical algorithm parameters for nighttime white balance.The cited prior applications focus on daytime settings with camera settings as actions; RL-AWB instead requires noise-aware rewards and robust optimization.Source: §2 · p. 5
  • Cross-sensor methods include fine-tuning, sensor-independent representations, domain-invariant learning, calibration-light strategies, and test-time adaptation; RL-AWB instead combines sensor-agnostic statistics with curriculum exposure to diverse conditions.The authors distinguish their approach from methods requiring test-time multi-image access or camera-specific calibration.Source: §2 · p. 5
  • The paper places its approach within hybrid statistical-learning work, combining statistically grounded illuminant estimation with reinforcement-learning parameter optimization while preserving interpretability.Source: §2 · p. 5
  • The two-stage curriculum first stabilizes a single instance to address cold starts, then uses cyclic multi-instance training to balance exploration and stability.Source: §2 · p. 5

3 Method

RL-AWB builds a nighttime illuminant estimator from salient gray pixels and local reflectance differences, then uses reinforcement learning to adapt its parameters per image. Its framework uses image statistics and recent adjustment history, with a two-stage curriculum for training.

3.1 Nighttime Color Constancy Algorithm

  • Local contrast in log-transformed images identifies gray candidates, which are selected from the top N% of pixels ranked by grayness.The method treats achromatic pixels as having contrast vectors aligned with the gray direction.Source: §3.1 · p. 6
  • Two refinement layers first discard initial gray-pixel candidates with low logarithmic-RGB variance and excessive deviation from the scene’s dominant color cast; remaining pixels form Salient Gray Pixels (SGPs).Confidence weighting selects E=1.0 for sLM > 1.5, E=2.0 for 0.2 < sLM ≤ 1.5, and E=4.0 for sLM ≤ 0.2.Source: §3.1 · p. 6
  • Overlapping windows amplify spatially coherent gray regions and suppress isolated noisy detections, using spatial continuity as a prior for reliable achromatic surfaces.The estimator accumulates weighted salient-gray-pixel intensity relative to weighted normalized local differences.Source: §3.1 · p. 7

3.2 RL-AWB Framework

  • Because optimal gray-pixel percentage N and Minkowski order p vary by scene, the RL agent adapts both using chromatic statistics and recent adjustment history without ground-truth illuminants in its state.Relative continuous actions update N and p jointly.Source: §3.2 · pp. 7–8
  • The reward uses relative angular-error improvement, with an action-cost penalty and termination bonus shaping parameter adjustments.Episodes stop after three steps of estimation stability.Source: §3.2 · p. 8

3.3 Curriculum Learning

  • Training first tunes parameters on one image, then cycles through a five-image pool for multi-image tuning.The multi-image schedule runs five consecutive episodes per image.Source: §3.3 · p. 9

4 LEVI Dataset

The paper introduces LEVI to extend nighttime color-constancy evaluation beyond NCC’s single-camera benchmark. LEVI provides multi-camera RAW images spanning broader lighting conditions and including more low-luminance nighttime images.

4 LEVI Dataset

  • LEVI covers broader lighting conditions and more low-luminance images than NCC, as shown by the illuminant and luminance distributions.Fig. 4 compares the datasets’ illuminant distributions and normalized mean-luminance histograms.Source: Figure 4 · p. 10, §4 · p. 10
  • LEVI adds a 700-image, two-camera nighttime benchmark to NCC, which contains 513 images from one camera.The dataset uses iPhone 16 Pro and Sony ILCE-6400 images.Source: §4 · pp. 9–10
  • Each LEVI scene includes a Macbeth Color Checker with manual annotations, and ground-truth illuminants are computed from median RGB values of non-saturated achromatic patches.Images are black-level corrected and converted to linear RGB.Source: §4 · p. 10

5 Experiments

Experiments compare SGP-LRD and RL-AWB on nighttime benchmarks, cross-dataset transfer, and daytime data, then examine training choices and model components. RL-AWB performs competitively with fully trained baselines using five training images per dataset and shows cross-sensor robustness.

5.1 Implementation Details

  • RL-AWB training uses 15,000 timesteps, and inference averages about 3 iterations and 1.1 seconds per image on an RTX 3080 GPU.The implementation uses 16 parallel environments; each inference call takes approximately 360 ms.Source: §5.1 · p. 10

5.2 Results and Comparisons

  • SGP-LRD achieves the minimum angular errors among statistical baselines on both NCC and LEVI.Table 1 reports angular error in degrees for the two datasets.Source: §5.2 · p. 10, Table 1 · p. 11
  • RL-AWB shows superior robustness across NCC↔LEVI sensor shifts, while existing learning-based baselines degrade substantially in cross-dataset evaluation.The datasets differ in scene content and camera characteristics; Fig. 5 visualizes both transfer directions.Source: §5.2 · p. 11, Figure 5 · p. 13
  • On Gehler–Shi, RL-AWB generalizes beyond its nighttime focus and achieves state-of-the-art generalization capability compared with other baselines.The daytime adaptation removes the local-variance and color-deviation filtering modules before RL-based parameter tuning.Source: §5.2 · p. 11, Table 3 · p. 12
  • With only 5 training images per dataset, RL-AWB further enhances illuminant estimation and remains competitive with fully trained learning-based baselines.Table 2 evaluates learning-based methods across NCC and LEVI; its baselines use full training sets.Source: §5.2 · p. 11, Table 2 · p. 12

5.3 Ablation Studies

  • RL-AWB achieves lower final angular error than one-step MLP and CNN regressors, despite using only five training images.A 440-configuration grid search takes about 94 hours and needs illuminant ground truth at test time; iterative policy updates can revise suboptimal parameter choices.Source: §5.3 · pp. 12–14, Table 4 · p. 14
  • The Stage-2 curriculum pool uses M = 5 as the best trade-off; smaller pools lack diversity, while larger pools reduce per-sample replay visitation.The reported trend is U-shaped under a fixed replay budget.Source: §5.3 · p. 14, Table 5 · p. 14
  • SGP-LRD performs optimally only when both noise and color filtering modules are included; the noise filter is a robustness safeguard, not an accuracy driver.Table 6 reports angular error for the component ablation.Source: §5.3 · p. 14

6 Conclusion

The paper presents SGP-LRD, RL-AWB, and LEVI as contributions to nighttime color constancy. Experiments report competitive performance and cross-sensor robustness, while noting that RL-AWB may over-correct images with already low initial estimation error.

6 Conclusion

  • The paper contributes SGP-LRD for nighttime color constancy, RL-AWB for adaptive parameter optimization, and LEVI as a multi-camera nighttime dataset.It describes the work as the first application of reinforcement learning to color constancy.Source: §6 · p. 14
  • Across nighttime and daytime datasets, the method achieves competitive performance and strong cross-sensor robustness, remaining ground-truth free at inference.The paper also reports generalization to unseen datasets and camera sensors.Source: §6 · p. 15
  • For images with already low initial estimation error, RL-AWB may over-correct and slightly degrade the output.Fig. 7 illustrates cases where parameter adjustments increase angular error from the initial estimate.Source: §6 · p. 15, Figure 7 · p. 15

Supplementary Material

The supplement details the SGP-LRD nighttime color-constancy method and RL-AWB framework, alongside implementation information and additional materials.

A Overview

  • The supplement also provides implementation details, dataset description, additional quantitative results, ablations, visual comparisons, and future research directions.Source: A Overview · p. 24

B Details of SGP-LRD

  • SGP-LRD refines initial gray-pixel candidates by removing low-variance noise and chromatic outliers, yielding Salient Gray Pixels.The two filters target unreliable color signals in dark regions and pixels distant from the scene’s dominant color cast.Source: B Details of SGP-LRD · pp. 24–25
  • Luminance-adaptive confidence weights favor reliable, well-lit pixels, while local reflectance normalization compares non-zero SGP intensity with the local window maximum.The resulting weights are integrated into illuminant estimation so poorly lit or uncertain regions contribute less.Source: B Details of SGP-LRD · pp. 25–26

C Details of RL-AWB

  • RL-AWB uses Soft Actor-Critic to optimize AWB parameters, balancing expected value with policy entropy to retain exploration and stabilize learning.The actor objective favors high-Q actions while penalizing overly deterministic behavior.Source: C Details of RL-AWB · p. 27

D Datasets

LEVI adds multi-camera nighttime images and capture metadata for cross-sensor evaluation. The supplement also distinguishes reproduction angular error from illuminant-recovery error.

D Datasets

  • LEVI contains 700 nighttime images from iPhone 16 Pro and Sony ILCE-6400 cameras, with ISO values spanning approximately 500–16,000.It also records focal length, F-number, exposure time, and ISO for each image.Source: D Datasets · p. 28
  • LEVI addresses the single-camera limitation of the prior NCC nighttime dataset by enabling cross-sensor generalization evaluation.NCC contains 513 nighttime images with ground-truth illuminants.Source: D Datasets · pp. 27–28

E.1 Reproduction Angular Error

  • Reproduction angular error measures the angle between the per-channel predicted-to-ground-truth ratio and ideal white; recovery angular error instead evaluates illuminant-estimation accuracy.Smaller reproduction angles indicate corrected images closer to perceptual white.Source: §E.1 · pp. 28–29

E.2 In-dataset Quantitative Comparison

In-dataset, C5 has the best reproduction angular errors on NCC and LEVI, while RL-AWB ranks third among learning-based methods despite using only five training images.

E.2 In-dataset Quantitative Comparison

  • Learning-based baselines use their official three-fold cross-validation protocols with full training data, whereas RL-AWB uses five images per dataset.Source: §E.2 · p. 29
  • Recovery angular error evaluates illuminant-estimation accuracy, while reproduction angular error evaluates perceptual quality after white-balance correction.Source: §E.2 · p. 29, Table S2 · p. 30
  • C5 achieves the best reproduction angular errors on NCC and LEVI, while RL-AWB ranks third among learning-based methods using only five training images per dataset.Source: §E.2 · p. 29, Table S2 · p. 30

E.3 Cross-dataset Generalization Comparison

Across both cross-dataset directions, RL-AWB reports the lowest errors among competing methods. The authors report strong generalization despite training on one dataset with only five images.

E.3 Cross-dataset Generalization Comparison

  • 5.10 median reproduction angular error for RL-AWB, versus 10.30 (C5) to 22.87 (GCC), when trained on NCC and tested on LEVI.Source: §E.3 · p. 30
  • When trained on LEVI and tested on NCC, RL-AWB again has the lowest errors among competitors, with C5 second.Source: §E.3 · p. 30
  • The authors report that RL-AWB generalizes across sensors and scene distributions after training on one dataset with only five images.Source: §E.3 · p. 30

E.4 Runtime analysis.

Early termination averages three steps per image, while SGP-LRD accounts for most of RL-AWB’s CPU latency.

E.4 Runtime analysis

  • 87% of RL-AWB’s CPU latency comes from SGP-LRD, whose per-pixel and local-statistics operations are described as readily parallelizable for GPU or ISP/ASIC acceleration.The authors leave hardware optimization for future work.Source: §E.4 · p. 31
  • Early termination reduces RL-AWB to an average of three steps per image.Source: §E.4 · p. 31
  • C4, FC4, PCC, C5, and GCC runtimes are 1.06, 1.2, 2.18, 7.41, and 145.3 ms, respectively, with GPU/CUDA acceleration.Source: §E.4 · p. 31

F Additional Ablation Studies

The additional studies report benefits from a dual-branch architecture and SAC, show visual comparisons for cross-sensor nighttime performance, and identify current limitations for future work.

F Additional Ablation Studies

  • The dual-branch variant consistently achieves lower errors than the single-branch design under the same SAC configuration.Separate MLPs process the 10,800-dimensional RGB-uv histogram and 11-dimensional adjustment history before fusing their 64-dimensional embeddings.Source: F Additional Ablation Studies · p. 31
  • SAC consistently outperforms PPO on both datasets under identical settings.The authors attribute this to SAC’s sample-efficient off-policy updates and entropy-regularized exploration, while its replay buffer reuses data across the curriculum pool.Source: F Additional Ablation Studies · p. 31

G Additional Visual Comparisons

H Future Work

  • The current agent controls only two of SGP-LRD’s multiple tunable parameters, may over-correct some challenging scenes, and uses CPU-based RL updates alongside GPU-accelerated simulation.The authors propose structured or hierarchical policies, safety-aware rewards, and a fully GPU-resident training pipeline as future work.Source: H Future Work · p. 32
Loading 2601.05249v4…