LLFormer V2: Illumination-Aware Transformer with Semantic Fusion for UHD Low-Light Image Enhancement and Beyond
Abstract: With the proliferation of ultra-high-definition (UHD) imaging devices, low-light image enhancement (LLIE) faces new challenges in both visual fidelity and computational efficiency. In this work, we introduce a large-scale UHD-LLIE benchmark, UHD-LOL, containing paired 4K and 8K low-light and reference images, and systematically evaluate existing LLIE algorithms under UHD settings. Building upon this benchmark, we propose LLFormer V2, a physically guided Transformer architecture that incorporates Illumination Prior Regularization (IPR) to explicitly embed multi-scale illumination cues into both the self-attention and feed-forward pathways. This physically informed design allows the model to disentangle illumination from reflectance, resulting in natural brightness recovery, robust color constancy, and improved perceptual consistency. To further enhance efficiency and representational power, we redesign the Axis-based Transformer Block into ATB V2, which employs a clustering–dispatching mechanism to adaptively fuse local and global features while maintaining computational tractability. Furthermore, we extend the framework to LLFormer V2-T, integrating high-level semantic priors from a frozen pre-trained Large Language Model into the bottleneck to facilitate global contextual reasoning. Experimental results across diverse benchmarks demonstrate that the LLFormer V2 series achieve state-of-the-art performance in multiple tasks, such as UHD low-light image enhancement, UHD image deblurring, and UHD image deraining.
- Dec 11, 2025: Pre-trained models are released!
- Dec 11, 2025: Codes is released!
We create a new large-scale UHD-LLIE dataset called UHDLOL to benchmark the performance of existing LLIE methods and explore the UHD-LLIE problem. It consists of two subsets: UHD-LOL4K and UHD-LOL8K. The UHD-LOL4K subset contains 8, 099 pairs of 4K low-light/normal-light images. Among them, 5, 999 pairs of images are used for training and 2, 100 for testing. The UHD-LOL8K subset includes 2, 966 pairs of 8K low-light/normal-light images, which are split into 2, 029 pairs for training and 937 for testing.
We propose LLFormer V2, an advanced Transformer-based framework for Ultra-High-Definition Low-Light Image Enhancement. At its core, the model employs a Axis-based Transformer Block V2, which enhances the original axis-based multi-head self-attention mechanism with a novel clustering-dispatching strategy to efficiently fuse local and global features while maintaining computational tractability. The framework also incorporates Illumination Prior Regularization, a physically-guided module that explicitly embeds multi-scale illumination cues into both the self-attention and feed-forward pathways, enabling more natural illumination recovery and robust color consistency. Furthermore, an extended version named LLFormer V2-T integrates a frozen pre-trained Large Language Model (LLM) into the bottleneck stage, injecting high-level semantic priors to enhance global contextual reasoning without additional training overhead.
- Clone Repo
git clone https://github.com/TaoWangzj/LLFormerV2.git
cd LLFormerv2- Create Conda Environment
conda create -n LLFormerv2 python=3.8
conda activate LLFormerv2
pip install -r requirements.txtYou can use the following links to download the datasets
- UHD-LOL4K [OneDrive | Baidu drive]
- UHD-LOL8K [OneDrive | Baidu drive]
- LOL [Link]
- MIT-Adobe FiveK [Google drive | Baidu drive]
- UHDBlur [Link]
- 4K-Rain13k [Link]
We provide the pre-trained models under different datasets:
-
LLFormerv2 [Baidu drive].
-
LLFormerV2-T [Baidu drive].
We provide the compared visual results. You can download from [Baidu drive].
You can directly test the pre-trained model as follows
- Modify the
--optionintest.shtooptions/test/LLFormerv2.ymlif you want to test LLFormerv2, or tooptions/test/LLFormerv2+.ymlif you want to test LLFormerV2-T. - Specify the data path
dataroot_gt,dataroot_lq, and model pathpretrain_network_gin corresponding config files. Then run
sh test.shTo calculate metrics for the test results
- Modify the data path
inputandgtinmeasure.pyto the path of the test results and ground truth images, respectively. Then run
# test on rgb channel
python measure.py
# test on y channel
python measure.py --y-
To download training and testing datasets
-
Train the model for non-UHD datasets (LOL and MIT-Adobe FiveK)
- Modify the
--optionintrain.shtooptions/train/LLFormerv2.ymloroptions/train/LLFormerv2+.yml, depending on the model you want to train. - Change
--nproc_per_nodeintrain.shto the number of GPUs you want to use (default is 1). - Specify the data path in the corresponding config files. Then run
sh train.sh- Train the model for UHD dataset (UHD-LOL4K, UHD-LOL8K, UHDBlur, 4K-Rain13k)
- Modify the
--optionintrain.shtooptions/train/LLFormerv2_UHD.ymloroptions/train/LLFormerv2+_UHD.yml, depending on the model you want to train. - Change
--nproc_per_nodeintrain.shto the number of GPUs you want to use (default is 2). - Specify the data path in the corresponding config files. Then run
sh train.shIf UHDLOL benchmark and LLFormer V2 help your research or work, please consider citing:
@inproceedings{wang2023ultra,
title={Ultra-high-definition low-light image enhancement: A benchmark and transformer-based method},
author={Wang, Tao and Zhang, Kaihao and Shen, Tianrun and Luo, Wenhan and Stenger, Bjorn and Lu, Tong},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={37},
number={3},
pages={2654--2662},
year={2023}
}
@inproceedings{zhang2021benchmarking,
title={Benchmarking ultra-high-definition image super-resolution},
author={Zhang, Kaihao and Li, Dongxu and Luo, Wenhan and Ren, Wenqi and Stenger, Bjorn and Liu, Wei and Li, Hongdong and Yang, Ming-Hsuan},
booktitle={ICCV},
pages={14769--14778},
year={2021}
}
If you have any questions, please contact taowangzj@gmail.com
- Ultra-High-Definition Low-Light Image Enhancement: A Benchmark and Transformer-Based Method, AAAI 2023. Paper | Code
- Benchmarking Ultra-High-Definition Image Super-resolution, ICCV 2021. Paper | Code
- MC-Blur: A Comprehensive Benchmark for Image Deblurring, arXiv 2022. Paper | Code
This implementation is based on / inspired by:
- HWMNet: https://github.com/FanChiMao/HWMNet
- Restormer: https://github.com/swz30/Restormer
- LLFlow: https://github.com/wyf0912/LLFlow
- BasicSR: https://github.com/XPixelGroup/BasicSR





