Jiangang Wang | Qingnan Fan | Qi Zhang | Haigen Liu | Yuhang Yu | Jinwei Chen | Wenqi Ren
Shenzhen Campus of Sun Yat-sen University
vivo Mobile Communication Co. Ltd
⭐ If you find Hero-SR useful for your research or projects, please star this repository to support our work. Thanks! 😊
Owing to the robust priors of diffusion models, recent approaches have shown promise in addressing real-world super-resolution (Real-SR). However, achieving semantic consistency and perceptual naturalness to meet human perception demands remains difficult, especially under conditions of heavy degradation and varied input complexities. To tackle this, we propose Hero-SR, a one-step diffusion-based SR framework explicitly designed with human perception priors. Hero-SR consists of two novel modules: the Dynamic Time-Step Module (DTSM), which adaptively selects optimal diffusion steps for flexibly meeting human perceptual standards, and the Open-World Multi-modality Supervision (OWMS), which integrates guidance from both image and text domains through a multimodal model to improve semantic consistency and perceptual naturalness. Through these modules, Hero-SR generates high-resolution images that not only preserve intricate details but also reflect human perceptual preferences. Extensive experiments validate that Hero-SR achieves state-of-the-art performance in Real-SR.
- 2025/03/19: Released the test code.
Release test code- Release training code
Set up the environment:
conda create -n Hero-SR python=3.10
conda activate Hero-SR
pip install -r requirements.txt
- Hero-SR Model: Google Drive Link
mv hero_sr_model.pkl checkpoint/hero_sr_model.pkl
- Stable Diffusion Turbo: Hugging Face Link
python test.py \
--sd_model_name_or_path sd-turbo \
--pretrained_model_path checkpoint/hero_sr_model.pkl \
--input_dir preset/test_image \
--output_dir result/test_image \
--align_method adain
To reproduce the results, download the following benchmark datasets from StableSR:
DRealSR, RealSR, and DIV2K
python test.py \
--sd_model_name_or_path sd-turbo \
--pretrained_model_path checkpoint/hero_sr_model.pkl \
--input_dir dataset/RealSR_CenterCrop/test_LR \
--output_dir result/RealSR \
--align_method adain \
--upscale_factor 4
To compute evaluation metrics:
CUDA_VISIBLE_DEVICES=0 python metric_img.py \
--hq_folder result/RealSR \
--gt_folder dataset/RealSR_CenterCrop/test_HR \
--metric_path result/result.csv \
--batch_size 1
This project builds upon Diffusers and Img2Img-Turbo. Special thanks to the developers for their fantastic contributions to the open-source community. 🎉
If you have trouble accessing the paper on arXiv, you can download it directly from Google Drive: 📄 Hero-SR PDF
If you find this work helpful, please cite it using the following format:
@article{hero-sr,
title={Hero-SR: One-Step Diffusion for Super-Resolution with Human Perception Priors},
author={Jiangang Wang, Qingnan Fan, Qi Zhang, Haigen Liu, Yuhang Yu, Jinwei Chen, Wenqi Ren},
year={2024}
}
For any questions or collaboration opportunities, feel free to reach out:
📩 Email: wangjg33@mail2.sysu.edu.cn
Alternatively, you can open an issue on GitHub.