JingyunLiang / SwinIR

SwinIR: Image Restoration Using Swin Transformer (official repository)

Home Page:https://arxiv.org/abs/2108.10257

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

realSR_BSRGAN_DFO x2 pth model structure

junseokoh1 opened this issue · comments

Hi, thanks for your nice work and nice code.
I have little issue about using pre-trained model. I'm tring to use 003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x2_GAN-with-dict-keys-params-and-params_ema.pth file.

But there is no test code for BSRGAN x2 file in SwinIR and KAIR github. And SwinIR only support x4 for BSRGAN setting.
https://github.com/cszn/KAIR/blob/88164a013c9e393a379744f13a22b90839d1a2ef/models/network_swinir.py#L752

I think using
model = net(upscale=args.scale, in_chans=3, img_size=64, window_size=8,
img_range=1., depths=[6, 6, 6, 6, 6, 6], embed_dim=180, num_heads=[6, 6, 6, 6, 6, 6],
mlp_ratio=2, upsampler='nearest+conv', resi_connection='1conv')
for model define and
removing https://github.com/cszn/KAIR/blob/88164a013c9e393a379744f13a22b90839d1a2ef/models/network_swinir.py#L756 and https://github.com/cszn/KAIR/blob/88164a013c9e393a379744f13a22b90839d1a2ef/models/network_swinir.py#L829 line will work.
Is it right way to use realSR_BSRGAN_DFO x2 pth file?

We haven't updated KAIR yet. Please use the codes here https://github.com/JingyunLiang/SwinIR/blob/main/main_test_swinir.py. We update KAIR later.