Skip to content
/ Hero-SR Public

Official implementation of the paper "Hero-SR: One-Step Diffusion for Super-Resolution with Human Perception Priors".

License

Notifications You must be signed in to change notification settings

W-JG/Hero-SR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hero-SR: One-Step Diffusion for Super-Resolution with Human Perception Priors

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


arXiv Visitors

⭐ If you find Hero-SR useful for your research or projects, please star this repository to support our work. Thanks! 😊


📜 Abstract

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.


📢 Updates

  • 2025/03/19: Released the test code.

📝 To-Do List

  • Release test code
  • Release training code

📸 Visual Comparison

Performance and Visual Comparison Performance and Visual Comparison

Click on any image to view the interactive comparison:



📦 Requirements

Set up the environment:

conda create -n Hero-SR python=3.10
conda activate Hero-SR
pip install -r requirements.txt

🚀 Quick Inference

1️⃣ Download Pretrained Models

2️⃣ Run Inference

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

📊 Reproducing Paper Results

1️⃣ Download Benchmark Datasets

To reproduce the results, download the following benchmark datasets from StableSR:
DRealSR, RealSR, and DIV2K

2️⃣ Test on Benchmark Datasets

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

3️⃣ Evaluate Performance

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

🙌 Acknowledgements

This project builds upon Diffusers and Img2Img-Turbo. Special thanks to the developers for their fantastic contributions to the open-source community. 🎉


📄 Paper Access

If you have trouble accessing the paper on arXiv, you can download it directly from Google Drive: 📄 Hero-SR PDF


📖 Citation

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}
}

📧 Contact

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.


About

Official implementation of the paper "Hero-SR: One-Step Diffusion for Super-Resolution with Human Perception Priors".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published