IceClear / StableSR

[IJCV2024] Exploiting Diffusion Prior for Real-World Image Super-Resolution
https://iceclear.github.io/projects/stablesr/
Other
2.1k stars 137 forks source link

About training on different dataset #55

Open CanberkSaglam opened 1 year ago

CanberkSaglam commented 1 year ago

Hello, thanks for great work! I want to train StableSR on my own dataset which contains ground truth and corresponding low quality image pairs. I used the dataloader named paired_image_dataset.py that you shared in data folder. However it seems like the get_input function of LatentDiffusionSRTextWT class in ddpm.py is only written according to degradation pipeline of Real-ESRGAN. So when i start the training using a modified .yaml file (where the model gets the data using paired_image_dataset.py) does not work since there are no kernels defined as in realsrgan_dataset.py. Only solution that i can think of is changing the get_input function in ddpm.py. Is there another solution that you can suggest?

Is it possible to finetune only the CFW module? If i start a training with the command given in readme file for CFW training using my own dataset and stablesr_000117.ckpt as checkpoint will this work?

Lastly i am little confused about training pipeline. So you create a synthetic dataset following Real-ESRGAN pipeline on DIV8K dataset where you obtain LR images from few HR ground truths and use these pairs to train SFT layers. Later you create a different synthetic dataset with same method but on DIV2K dataset and use this dataset to train CFW module. So from what i understand you have two different datasets that you use in your training pipeline. Do I understand correctly? Thanks for your time in advance.

IceClear commented 1 year ago
  1. No other solutions. Sry.
  2. We actually finetune CFW individually, very similar to your description but first directly generating training data instead of loading stablesr_000117,ckpt to avoid unnecessary memory cost. So yes.
  3. Yes. We additionally generating data for training CFW.
11whitewater commented 2 weeks ago

Hello, thanks for great work! I want to train StableSR on my own dataset which contains ground truth and corresponding low quality image pairs. I used the dataloader named paired_image_dataset.py that you shared in data folder. However it seems like the get_input function of LatentDiffusionSRTextWT class in ddpm.py is only written according to degradation pipeline of Real-ESRGAN. So when i start the training using a modified .yaml file (where the model gets the data using paired_image_dataset.py) does not work since there are no kernels defined as in realsrgan_dataset.py. Only solution that i can think of is changing the get_input function in ddpm.py. Is there another solution that you can suggest?

Is it possible to finetune only the CFW module? If i start a training with the command given in readme file for CFW training using my own dataset and stablesr_000117.ckpt as checkpoint will this work?

Lastly i am little confused about training pipeline. So you create a synthetic dataset following Real-ESRGAN pipeline on DIV8K dataset where you obtain LR images from few HR ground truths and use these pairs to train SFT layers. Later you create a different synthetic dataset with same method but on DIV2K dataset and use this dataset to train CFW module. So from what i understand you have two different datasets that you use in your training pipeline. Do I understand correctly? Thanks for your time in advance.

That was a great question! I also plan to use my own dataset for stablesr training, have you solved the first question so far? Do you have any process recommendations for training with paired_image_dataset?❣

xiaoyaolovlife commented 1 week ago

Same Question