XPixelGroup / BasicSR

Open Source Image and Video Restoration Toolbox for Super-resolution, Denoise, Deblurring, etc. Currently, it includes EDSR, RCAN, SRResNet, SRGAN, ESRGAN, EDVR, BasicVSR, SwinIR, ECBSR, etc. Also support StyleGAN2, DFDNet.
https://basicsr.readthedocs.io/en/latest/
Apache License 2.0
6.46k stars 1.14k forks source link

issues in training the ESRGAN code for x2 upscaling #513

Open shashikantdeepak opened 2 years ago

shashikantdeepak commented 2 years ago

i am trying to train the ESRGAN model for x2 upscaling factor but it is given me error. I have installed the Basicsr module using the" Install from a local clone" method. I have followed the steps to create the data set (DIV2K and my own data set) and also verified the sizes of each image (GT and LR). The code works fine for x4 upscaling but when i change the scale to 2. the program shows the following error. "The size of tensor a (256) must match the size of tensor b (128) at non-singleton dimension 3"

I have refered the previous issues of this repo and tried those methods (#174). Like commenting the lines in the RDDBnet. Even after doing these steps the model does not change and has same network structure as x4 model. I have notices that whatever changes i make in the file ( /BasicSR/basicsr/archs/rrdbnet_arch.py) , there is no change when the model is printed. Even if i change the number of RRDB blocks still it prints the same (23) used for x4. Is there something that i am missing? If i want to do any modifications to the network architecture do i have to write a separate code or i can make changes in the existing model. If i can make changes to the model in the same file, why the is no change reflected when the model is printed.

I must be missing something, please suggest. I have few questions,please suggest if i am doing it right.

  1. installing the basicsr using second method i.e Install from a local clone
  2. can i make modifications to the rrdbnet_arch.py file for training x2 and x3 models and will it be updated? as i have noticed any modification to the model is not reflecting. i am not undesrtanding the hack so kindly suggest steps and necessary config modification to train the ESRGAN model for x2 scale train_052_ESRGAN_x4_f64b23_DIV2K_400k_B16G1_051pretrain_wandb_20220228_175022.log
1343464520 commented 1 month ago

请问解决了吗?我也遇到了这个问题。