Browse by type
📢 This paper has been accepted to CVPR 2025! 🎉
Main Paper | Supplementary Materials | Poster
All released resources are collected in the following Baidu Pan archives:
Results: Download (extraction code: kn23).
In addition, results of the comparison method BiFormer are available on Baidu Pan (extraction code: ssfh).
Weights: Download (extraction code: 5ady)
Datasets: Download (extraction code: 2x5i)
Quick overview of URWKV's performance across benchmark datasets:
| Metric | LOL-v1 | LOL-v2-real | LOL-v2-sync | SID | SMID | SDSD-indoor | SDSD-outdoor | MIT-Adobe FiveK | LOL-blur |
|---|---|---|---|---|---|---|---|---|---|
| PSNR | 24.27 | 23.11 | 26.36 | 23.11 | 29.44 | 31.24 | 29.99 | 26.08 | 27.27 |
| SSIM | 0.856 | 0.874 | 0.944 | 0.673 | 0.826 | 0.911 | 0.887 | 0.936 | 0.890 |
⚠️ Missing weights: The pretrained weights for SMID and MIT-Adobe FiveK were accidentally overwritten and are currently unavailable. You can retrain these models using the provided configurations. We will update this section if the weights are recovered or retrained.
Existing low-light image enhancement (LLIE) and joint LLIE and deblurring (LLIE-deblur) models have made strides in addressing predefined degradations, yet they are often constrained by dynamically coupled degradations. To address these challenges, we introduce a Unified Receptance Weighted Key Value (URWKV) model with multi-state perspective, enabling flexible and effective degradation restoration for low-light images. Specifically, we customize the core URWKV block to perceive and analyze complex degradations by leveraging multiple intra- and inter-stage states. First, inspired by the pupil mechanism in the human visual system, we propose Luminance-adaptive Normalization (LAN) that adjusts normalization parameters based on rich inter-stage states, allowing for adaptive, scene-aware luminance modulation. Second, we aggregate multiple intra-stage states through exponential moving average approach, effectively capturing subtle variations while mitigating information loss inherent in the single-state mechanism. To reduce the degradation effects commonly associated with conventional skip connections, we propose the State-aware Selective Fusion (SSF) module, which dynamically aligns and integrates multi-state features across encoder stages, selectively fusing contextual information. In comparison to state-of-the-art models, our URWKV model achieves superior performance on various benchmarks, while requiring significantly fewer parameters and computational resources.

Consistent with BiFormer, results are measured using measure_pair.py. It should be noted that all metrics in our method are computed in the sRGB space, and no GT Mean-related techniques are applied.


To ensure fairness, if a comparison method does not provide pretrained weights, we retrain it using the recommended settings provided by the authors. Otherwise, we use the officially released pretrained weights for evaluation. All results are evaluated using a unified script, measure_pair.py. In this paper, the following methods were retrained: SNR-Net, FourLLIE, UHDFour, LLFormer, Retinexformer, BiFormer, RetinexMamba, LEDNet, PDHAT, MIRNet, Restormer, and MambaIR.
conda create --name URWKV python=3.9
conda activate URWKV
Install PyTorch with CUDA 11.3 support:
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
Install cuDNN:
conda install cudnn
pip install pyyaml yacs tqdm colorama pandas natsort
pip install matplotlib tensorboardX
pip install cython thop prefetch_generator
pip install opencv-python scikit-image
pip install timm einops mmcls
pip install pytorch_msssim IQA_pytorch pyiqa lpips
pip install numpy==1.26.4
pip install -U openmim
mim install mmcv==1.7.1
⚠️ Note: If you encounter an error related to Ninja while compiling C++ extensions (e.g., Ninja is required to load C++ extensions), install Ninja with:
sudo apt-get install ninja-build
Training stability: Instability observed in some training runs may be related to the CUDA environment or version compatibility. The cause has not yet been confirmed, and this issue remains under investigation.
Hyperparameter tuning: Since we haven't done extensive hyperparameter tuning, you are encouraged to explore better configurations to potentially improve performance.
If you find this work useful for your research, please cite:
@inproceedings{xu2025urwkv,
title={URWKV: Unified RWKV Model with Multi-state Perspective for Low-light Image Restoration},
author={Xu, Rui and Niu, Yuzhen and Li, Yuezhou and Xu, Huangbiao and Liu, Wenxi and Chen, Yuzhong},
booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
pages={21267--21276},
year={2025}
}
This repository is released under the Apache 2.0 license as found in the LICENSE file.
URWKV is built with reference to the code of the following projects: RWKV, Vision-RWKV, and BiFormer. Thanks for their awesome work!
$ claude mcp add URWKV \
-- python -m otcore.mcp_server <graph>