Skip to content
/ EA-Adam Public

[TIP2024] Official implementation of the paper ‘Perception-Distortion Balanced Super-Resolution: A Multi-Objective Optimization Perspective’

Notifications You must be signed in to change notification settings

csslc/EA-Adam

Repository files navigation

Perception-Distortion Balanced Super-Resolution: A Multi-Objective Optimization Perspective

Lingchen Sun1,2 | Jie Liang2 | Shuaizheng Liu1,2 | Hongwei Yong1 | Lei Zhang1,2

1The Hong Kong Polytechnic University, 2OPPO Research Institute

⭐ If EA-Adam is helpful to your images or projects, please help star this repo. Thanks! 🤗

🌟 Overview framework

ea-adam

🌟 Visual Results

SRResNet Backbone (click to expand)

RRDB Backbone (click to expand)

SwinIR Backbone (click to expand)

For more comparisons, please refer to our paper for details.

⚙ Dependencies and Installation

## git clone this repository
git clone https://github.com/csslc/EA-Adam.git
cd EA-Adam

# create an environment
conda create -n EA-Adam python=3.10 -y
conda activate EA-Adam
pip install -r requirements.txt

🍭 Quick Inference

Step 1: Download the pretrained models

Download from GoogleDrive.

Download from BaiduNetdisk (pwd: 0930).

Step 2: Prepare testing data

You can put the testing images in the test_input.

Step 3: Running testing command

python test.py \
--input_image test_input \
--config configs/mulsrresnet_gan.yml \
--test_model_path pretrained_models/EA-Adam-srresnet.pt \
--root_img output

If you want to test RRDB-based and SwinIR-based models, please modify the test_model_path and config accordingly.

🚋 Train

We take the SRResNet backbone as example. Please check and adapt the config files firstly.

  1. EA-Adam stage.

A model pretrained with L1 loss needs to be used for stable training, similar to SRGAN, ESRGAN, and other GAN-based SR models.

python train_EA-Adam_srresnet.py \
--config configs/mulsrresnet_gan.yml \
--resume l1-pretrained/ \
  1. Weight regression network training.

N expert models can be obtained during the EA-Adam stage and should be placed in fusion_experts for training weight regression network. The final discriminator from the EA-Adam stage can serve as a pretrained model to facilitate faster convergence.

python train_fusion_srresnet.py \
--config configs/fusion_srresnet.yml \
--expert_path fusion_experts/ \
--resume_d disc.pt
  1. Model fusion.

The fusion models from weight regression network training stage is placed in fusion_model. The final model is saved in final_model_path.

python train_cal_weight.py \
--config configs/fusion_srresnet.yml \
--test_model_path fusion_model/ \
--expert_path fusion_experts/ \
--final_model_path experiments/EA-Adam-srresnet/ 

License

This project is released under the Apache 2.0 license.

Acknowledgement

This project is built based on the SimpleIR and E-GAN projects. Thanks for their awesome works.

Citations

If our code helps your research or work, please consider citing our paper. The following are BibTeX references:

@article{sun2024eaadam,
  title={Perception-Distortion Balanced Super-Resolution: A Multi-Objective Optimization Perspective},
  author={Sun, Lingchen and Liang, Jie and Liu, Shuaizheng and Yong, Hongwei and Zhang, Lei},
  journal={IEEE Transactions on Image Processing},
  year={2024}
}

Contact

If you have any questions, please feel free to contact: [email protected]

statistics

visitors

About

[TIP2024] Official implementation of the paper ‘Perception-Distortion Balanced Super-Resolution: A Multi-Objective Optimization Perspective’

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages