Real-ESRGAN icon indicating copy to clipboard operation
Real-ESRGAN copied to clipboard

用微调后的权重,来对图像进行超分辨率重构,出现问题

Open AllenGitHub1 opened this issue 1 year ago • 7 comments

我使用训练得到的net_g_35000.pth文件,并在inference_realesrgan.py中修改了配置

-n net_g_35000 --model_path E:\DeepLearning\Real-ESRGAN-master\Real-ESRGAN-master\experiments\pretrained_models\net_g_35000.pth

结果出现UnboundLocalError: local variable 'netscale' referenced before assignment

如何解决,谢谢

AllenGitHub1 avatar Oct 17 '23 02:10 AllenGitHub1

I have the same problem

pandappp123 avatar Dec 19 '23 03:12 pandappp123

我使用训练得到的net_g_35000.pth文件,并在inference_realesrgan.py中修改了配置

-n net_g_35000 --model_path E:\DeepLearning\Real-ESRGAN-master\Real-ESRGAN-master\experiments\pretrained_models\net_g_35000.pth

结果出现UnboundLocalError: local variable 'netscale' referenced before assignment

如何解决,谢谢

你解决了吗

pandappp123 avatar Dec 19 '23 03:12 pandappp123

你好,请问你进行模型微调的时候数据集是使用的readme里所写的那些还是用自己构造的数据呀,有什么数据集数量上的要求吗,我使用自己的数据进行微调的时候有一个报错: raise ValueError(f'Scale mismatches. GT ({h_gt}, {w_gt}) is not {scale}x ', ValueError: ('Scale mismatches. GT (256, 256) is not 4x ', 'multiplication of LQ (256, 256).')

oz2xx avatar Jan 17 '24 10:01 oz2xx

你好,请问你进行模型微调的时候数据集是使用的readme里所写的那些还是用自己构造的数据呀,有什么数据集数量上的要求吗,我使用自己的数据进行微调的时候有一个报错: raise ValueError(f'Scale mismatches. GT ({h_gt}, {w_gt}) is not {scale}x ', ValueError: ('Scale mismatches. GT (256, 256) is not 4x ', 'multiplication of LQ (256, 256).')

你是用来训练影像瓦片吗?我也遇到这个问题,请问您知道什么原因了吗?

kl402401 avatar Mar 13 '24 07:03 kl402401

你好,请问你进行模型微调的时候数据集是使用的readme里所写的那些还是用自己构造的数据呀,有什么数据集数量上的要求吗,我使用自己的数据进行微调的时候有一个报错: raise ValueError(f'Scale mismatches. GT ({h_gt}, {w_gt}) is not {scale}x ', ValueError: ('Scale mismatches. GT (256, 256) is not 4x ', 'multiplication of LQ (256, 256).')

报错的意思gt不是输入的4倍,config里面的scale设置成1就行

gray2bgr avatar Jul 04 '24 08:07 gray2bgr

这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

kl402401 avatar Jul 04 '24 08:07 kl402401

你好,请问你进行模型微调的时候数据集是使用的readme里所写的那些还是用自己构造的数据呀,有什么数据集数量上的要求吗,我使用自己的数据进行微调的时候有一个报错: raise ValueError(f'Scale mismatches. GT ({h_gt}, {w_gt}) is not {scale}x ', ValueError: ('Scale mismatches. GT (256, 256) is not 4x ', 'multiplication of LQ (256, 256).')

报错的意思gt不是输入的4倍,config里面的scale设置成1就行

貌似不能改config,将LR图片下采样到64

gray2bgr avatar Jul 04 '24 09:07 gray2bgr