From b21f971f39b11fb9966c03be7d10c62f44e499c9 Mon Sep 17 00:00:00 2001 From: "yili.li" Date: Wed, 7 Dec 2022 07:35:38 +0000 Subject: [PATCH] fix bug for real_basicvsr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit link #164STQ 执行 bash dist_train.sh configs/real_basicvsr/realbasicvsr_c64b20_1x30x8_lr5e-5_150k_reds.py 8 报错 certificate verify failed: unable to get local issuer certificate (_ssl.c:1091) Signed-off-by: yili.li --- cv/super_resolution/real_basicVSR/pytorch/README.md | 7 ++++++- .../realbasicvsr_c64b20_1x30x8_lr5e-5_150k_reds.py | 7 ++++--- .../realbasicvsr_wogan_c64b20_2x30x8_lr1e-4_300k_reds.py | 2 +- cv/super_resolution/real_basicVSR/pytorch/requirements.txt | 1 - 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cv/super_resolution/real_basicVSR/pytorch/README.md b/cv/super_resolution/real_basicVSR/pytorch/README.md index 0a051f7a4..14d475301 100755 --- a/cv/super_resolution/real_basicVSR/pytorch/README.md +++ b/cv/super_resolution/real_basicVSR/pytorch/README.md @@ -25,6 +25,11 @@ $ python3 crop_sub_images.py # cut REDS images into patches for fas $ cd .. # Homepage of UDM10: https://www.terabox.com/web/share/link?surl=LMuQCVntRegfZSxn7s3hXw&path=%2Fproject%2Fpfnl ``` +## Step 3: Download pretrained weights +$ mkdir pretrained && cd pretrained +$ wget https://download.openmmlab.com/mmediting/restorers/basicvsr/spynet_20210409-c6c1bd09.pth +$ wget https://download.openmmlab.com/mmediting/restorers/real_basicvsr/realbasicvsr_wogan_c64b20_2x30x8_lr1e-4_300k_reds_20211027-0e2ff207.pth +$ wget https://download.pytorch.org/models/vgg19-dcbb9e9d.pth ## Step 3: Training @@ -35,7 +40,7 @@ $ python3 train.py [training args] # config file can be found in ### Mutiple GPUs on one machine ```shell -$ bash train_dist.sh [training args] # config file can be found in the configs directory +$ bash dist_train.sh [training args] # config file can be found in the configs directory ``` ## Reference diff --git a/cv/super_resolution/real_basicVSR/pytorch/configs/real_basicvsr/realbasicvsr_c64b20_1x30x8_lr5e-5_150k_reds.py b/cv/super_resolution/real_basicVSR/pytorch/configs/real_basicvsr/realbasicvsr_c64b20_1x30x8_lr5e-5_150k_reds.py index 7f5354d4b..8d0aaed80 100755 --- a/cv/super_resolution/real_basicVSR/pytorch/configs/real_basicvsr/realbasicvsr_c64b20_1x30x8_lr5e-5_150k_reds.py +++ b/cv/super_resolution/real_basicVSR/pytorch/configs/real_basicvsr/realbasicvsr_c64b20_1x30x8_lr5e-5_150k_reds.py @@ -12,7 +12,7 @@ model = dict( num_propagation_blocks=20, num_cleaning_blocks=20, dynamic_refine_thres=255, # change to 5 for test - spynet_pretrained='https://download.openmmlab.com/mmediting/restorers/basicvsr/spynet_20210409-c6c1bd09.pth', + spynet_pretrained='pretrained/spynet_20210409-c6c1bd09.pth', is_fix_cleaning=False, is_sequential_cleaning=False), discriminator=dict( @@ -34,7 +34,8 @@ model = dict( vgg_type='vgg19', perceptual_weight=1.0, style_weight=0, - norm_img=False), + norm_img=False, + pretrained='pretrained/vgg19-dcbb9e9d.pth'), gan_loss=dict( type='GANLoss', gan_type='vanilla', @@ -334,7 +335,7 @@ custom_hooks = [ dist_params = dict(backend='nccl') log_level = 'INFO' work_dir = f'./experiments/{exp_name}' -load_from = 'https://download.openmmlab.com/mmediting/restorers/real_basicvsr/realbasicvsr_wogan_c64b20_2x30x8_lr1e-4_300k_reds_20211027-0e2ff207.pth' # noqa +load_from = 'pretrained/realbasicvsr_wogan_c64b20_2x30x8_lr1e-4_300k_reds_20211027-0e2ff207.pth' # noqa resume_from = None workflow = [('train', 1)] cudnn_benchmark = True diff --git a/cv/super_resolution/real_basicVSR/pytorch/configs/real_basicvsr/realbasicvsr_wogan_c64b20_2x30x8_lr1e-4_300k_reds.py b/cv/super_resolution/real_basicVSR/pytorch/configs/real_basicvsr/realbasicvsr_wogan_c64b20_2x30x8_lr1e-4_300k_reds.py index f6557e3b2..1558e2761 100755 --- a/cv/super_resolution/real_basicVSR/pytorch/configs/real_basicvsr/realbasicvsr_wogan_c64b20_2x30x8_lr1e-4_300k_reds.py +++ b/cv/super_resolution/real_basicVSR/pytorch/configs/real_basicvsr/realbasicvsr_wogan_c64b20_2x30x8_lr1e-4_300k_reds.py @@ -12,7 +12,7 @@ model = dict( num_propagation_blocks=20, num_cleaning_blocks=20, dynamic_refine_thres=255, # change to 1.5 for test - spynet_pretrained='pretrained-weights/spynet_20210409-c6c1bd09.pth', + spynet_pretrained='pretrained/spynet_20210409-c6c1bd09.pth', is_fix_cleaning=False, is_sequential_cleaning=False), pixel_loss=dict(type='L1Loss', loss_weight=1.0, reduction='mean'), diff --git a/cv/super_resolution/real_basicVSR/pytorch/requirements.txt b/cv/super_resolution/real_basicVSR/pytorch/requirements.txt index db11d307c..ef11313e6 100755 --- a/cv/super_resolution/real_basicVSR/pytorch/requirements.txt +++ b/cv/super_resolution/real_basicVSR/pytorch/requirements.txt @@ -1,4 +1,3 @@ yapf addict -opencv-python<=4.5.4.60 av -- Gitee