Abstract
We present HAQAGen, a unified generative model for resolution-invariant NIR-to-RGB colorization that balances chromatic realism with structural fidelity. The proposed model introduces (i) a combined loss term aligning the global color statistics through differentiable histogram matching, perceptual image quality measure, and feature based similarity to preserve texture information, (ii) local hue-saturation priors injected via Spatially Adaptive Denormalization (SPADE) to stabilize chromatic reconstruction, and (iii) texture-aware supervision within a Mamba backbone to preserve fine details. We introduce an adaptive-resolution inference engine that further enables high-resolution translation without sacrificing quality. Our proposed NIR-to-RGB translation model simultaneously enforces global color statistics and local chromatic consistency, while scaling to native resolutions without compromising texture fidelity or generalization. Extensive evaluations on FANVID, OMSIV, VCIP2020, and RGB2NIR using different evaluation metrics demonstrate consistent improvements over state-of-the-art baseline methods. HAQAGen produces images with sharper textures, natural colors, attaining significant gains as per perceptual metrics.
Introduction
Near-Infrared (NIR) imaging is a critical technology for surveillance, autonomous driving, and medical imaging due to its ability to penetrate environmental obstructions like fog, smoke, and darkness. However, raw NIR data is monochromatic and difficult for human interpretation. Translating NIR to RGB (colorization) is a challenging task characterized by spectral disparity, where different visible colors may share identical NIR intensities, and the tendency of deep learning models to produce over-smoothed textures. Furthermore, existing models often struggle with resolution constraints, leading to artifacts when processing high-definition imagery.
To address these challenges, we introduce HAQAGen (Histogram Assisted Quality Aware Generative Model). HAQAGen is a generative framework that transforms NIR images into realistic, high-resolution RGB photos by combining a Mamba-based architecture with differentiable histogram matching and a resolution-invariant inference engine.
Methodology
The HAQAGen architecture is designed to balance global color statistics with local structural fidelity.
Mamba Backbone
Building upon the ColorMamba framework, the model utilizes a State Space Model (SSM) backbone. Mamba excels at capturing long-range dependencies more efficiently than traditional Transformers, providing a high receptive field necessary for understanding global image context without prohibitive computational costs.
Dual-Branch Generation and SPADE
The model employs a dual-branch approach. While the primary branch reconstructs the RGB image, an auxiliary branch predicts HSV (Hue, Saturation, Value) priors. These chromatic "hints" are injected into the main reconstruction network via Spatially Adaptive Denormalization (SPADE). This mechanism ensures that color assignments are locally consistent and contextually appropriate.
Differentiable Histogram and Texture-Aware Loss
To ensure natural global color distributions, we implement a differentiable histogram matching loss. This allows the model to align its generated color palette with ground truth statistics during training. Additionally, texture-aware supervision is provided by a frozen, pre-trained autoencoder, focusing the model on preserving high-frequency details that are often lost in standard pixel-wise optimization.
Adaptive-Resolution Inference
To overcome fixed-size training constraints, HAQAGen utilizes a sliding-window inference approach with feather blending (Hanning mask). This allows the model to process images of arbitrary size at their native resolution, avoiding the blurring associated with resizing or the seam artifacts common in standard patching methods.
Experimental Setup
The model was evaluated across four diverse benchmarks to ensure robust generalization:
- FANVID: 5,144 pairs focusing on facial and urban scenes.
- OMSIV: 532 pairs of outdoor environments.
- VCIP2020: 400 pairs of mixed indoor and outdoor scenes.
- RGB2NIR: 477 pairs covering nine categories, including forests, water, and buildings.
Results
HAQAGen demonstrates superior performance compared to twelve state-of-the-art methods across multiple quantitative metrics.
As shown in the table above, HAQAGen achieves the highest PSNR (24.96 dB) and the lowest LPIPS (0.18) on the VCIP2020 dataset. Notably, it reduced Angular Error (AE)—a critical measure of hue distortion—by over 23% compared to previous leading models. These results indicate that HAQAGen not only produces more accurate colors but also maintains higher perceptual quality and structural detail.
Conclusion
HAQAGen represents a significant advancement in NIR-to-RGB translation, offering a scalable solution that preserves texture fidelity while ensuring chromatic realism. By integrating global histogram matching with local HSV priors in a Mamba-based framework, the model achieves state-of-the-art performance across diverse datasets. Future work will explore self-supervised color priors to reduce reliance on paired data and investigate model distillation for deployment on resource-constrained edge devices.
Summary updated