Skip to content

yangxy/synthesizing_realistic_training_pairs

Repository files navigation

Synthesizing Realistic Image Restoration Training Pairs: A Diffusion Approach

Paper

Tao Yang1, Peiran Ren1, Xuansong Xie1, Lei Zhang2
1DAMO Academy, Alibaba Group, Hangzhou, China
2Department of Computing, The Hong Kong Polytechnic University, Hong Kong, China

Real-ISR

News

(2023-09-13) Upload pre-trained models.

(2023-09-07) Upload source codes.

Usage

  • Clone this repository:
git clone https://github.com/yangxy/synthesizing_realistic_training_pairs.git
cd synthesizing_realistic_training_pairs
  • Prepare LQ/HQ datasets, e.g., DID_natural/DF2K_OST, and put them into datasets/. Please send me email for DID_face dataset.

  • Train a DDPM that generates realistic LQ images.

bash ./train_ddpm.sh

Download our pre-trained model ddpm_did_256 trained with a resolution of 256x256.

  • (Optional) Extrat HQ images to subimages in order to match your train size.
python scripts/extract_subimages.py # change the values of opt, especially opt['input_folder']/opt['save_folder'] accordingly
  • Synthesize realistic LQ images with the help of the pre-trained DDPM.
python test_ddpm_img2img.py --max_strength 0.2
  • Train your own SR models using the synthesized HQ-LQ pairs

  • Test your SR model.

You can download our pre-trained models RRDB+.

We re-train our models due to the whole project is re-builed on diffusers. The outputs may differ from the results presented in the paper. We are still working on it and the released models woule be updated at any time.

Citation

If our work is useful for your research, please consider citing:

@inproceedings{yang2023syn,
    title={Synthesizing Realistic Image Restoration Training Pairs: A Diffusion Approach},
    author={Tao Yang, Peiran Ren, Xuansong Xie, and Lei Zhang},
    booktitle={Arxiv},
    year={2023}
}

License

© Alibaba, 2023. For academic and non-commercial use only.

Acknowledgments

Our project is based on diffusers

Contact

If you have any questions or suggestions about this paper, feel free to reach me at [email protected].

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published