This repository is an official implementation of the paper "Uncertainty-guided Perturbation for Image Super-Resolution Diffusion Model", CVPR, 2025.
By Leheng Zhang, Weiyi You, Kexuan Shi, and Shuhang Gu.
Abstract: Diffusion-based image super-resolution methods have demonstrated significant advantages over GAN-based approaches, particularly in terms of perceptual quality. Building upon a lengthy Markov chain, diffusion-based methods possess remarkable modeling capacity, enabling them to achieve outstanding performance in real-world scenarios. Unlike previous methods that focus on modifying the noise schedule or sampling process to enhance performance, our approach emphasizes the improved utilization of LR information. We find that different regions of the LR image can be viewed as corresponding to different timesteps in a diffusion process, where flat areas are closer to the target HR distribution but edge and texture regions are farther away. In these flat areas, applying a slight noise is more advantageous for the reconstruction. We associate this characteristic with uncertainty and propose to apply uncertainty estimate to guide region-specific noise level control, a technique we refer to as Uncertainty-guided Noise Weighting. Pixels with lower uncertainty (i.e., flat regions) receive reduced noise to preserve more LR information, therefore improving performance. Furthermore, we modify the network architecture of previous methods to develop our Uncertainty-guided Perturbation Super-Resolution (UPSR) model. Extensive experimental results demonstrate that, despite reduced model size and training overhead, the proposed UPSR method outperforms current state-of-the-art methods across various datasets, both quantitatively and qualitatively.
- Python 3.10
- PyTorch 2.4.1
git clone https://github.com/LabShuHangGU/UPSR.git
conda create -n UPSR python=3.10
conda activate UPSR
pip install -r requirements.txt
python setup.py develop- Download the training dataset ImageNet and put them in the folder
./datasets.
- Refer to the training configuration files in
./options/trainfolder for detailed settings.
# batch size = 2 (GPUs) × 16 (per GPU)
CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --use-env --nproc_per_node=2 --master_port=1145 train.py -opt options/000_UPSR_RealSR_x4.yml --launcher pytorch- Download and generate the testing data (ImageNet-Test + RealSR + RealSet65) and put them in the folder
./datasets.
- Download the pretrained models and put them in the folder
./experiments/pretrained_models.
- Refer to the testing configuration files in
./options/testfolder for detailed settings.
CUDA_VISIBLE_DEVICES=0 python test.py -opt options/001_UPSR_RealSR_x4.yml@article{zhang2025uncertainty,
title={Uncertainty-guided Perturbation for Image Super-Resolution Diffusion Model},
author={Zhang, Leheng and You, Weiyi and Shi, Kexuan and Gu, Shuhang},
journal={arXiv preprint arXiv:2503.18512},
year={2025}
}
