From b4372d12ea21210b36449c26fc024ca56f2d4236 Mon Sep 17 00:00:00 2001 From: ckkelvinchan Date: Tue, 13 Apr 2021 12:08:20 +0800 Subject: [PATCH 1/9] Add configuration files --- configs/restorers/basicvsr/README.md | 24 +++ configs/restorers/basicvsr/basicvsr_reds4.py | 139 ++++++++++++++++ .../basicvsr/basicvsr_vimeo90k_bd.py | 156 ++++++++++++++++++ .../basicvsr/basicvsr_vimeo90k_bi.py | 156 ++++++++++++++++++ 4 files changed, 475 insertions(+) create mode 100644 configs/restorers/basicvsr/README.md create mode 100644 configs/restorers/basicvsr/basicvsr_reds4.py create mode 100644 configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py create mode 100644 configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py diff --git a/configs/restorers/basicvsr/README.md b/configs/restorers/basicvsr/README.md new file mode 100644 index 0000000000..19b39e7040 --- /dev/null +++ b/configs/restorers/basicvsr/README.md @@ -0,0 +1,24 @@ +# BasicVSR: The Search for Essential Components in Video Super-Resolution and Beyond + +## Introduction + +``` +@article{chan2021basicvsr, + author = {Chan, Kelvin CK and Wang, Xintao and Yu, Ke and Dong, Chao and Loy, Chen Change}, + title = {BasicVSR: The Search for Essential Components in Video Super-Resolution and Beyond}, + journal = {Proceedings of the IEEE conference on computer vision and pattern recognition}, + year = {2021} +} +``` + +## Results and Models + +Evaluated on RGB channels for REDS4 and Y channel for others. +The metrics are `PSNR`/`SSIM`. + +| Method | REDS4 (BIx4) | Vimeo-90K-T (BIx4) | Vid4 (BIx4) | UDM10 (BDx4) | Vimeo-90K-T (BDx4) | Vid4 (BDx4) | Download | +|----------------------|:------------:|:------------------:|:--------------:|:--------------:|:------------------:|:--------------:|:------------:| +| basicvsr_reds4 | | - | - | - | - | - | model \| log | +| basicvsr_vimeo90k_bi | - | 37.2299/0.9447 | 27.2296/0.8227 | - | - | - | model \| log | +| basicvsr_vimeo90k_bd | - | - | - | 39.8802/0.9683 | 37.5730/0.9495 | 27.9278/0.8537 | model \| log | +| spynet | - | - | - | - | - | - | model | diff --git a/configs/restorers/basicvsr/basicvsr_reds4.py b/configs/restorers/basicvsr/basicvsr_reds4.py new file mode 100644 index 0000000000..041f2c4fdf --- /dev/null +++ b/configs/restorers/basicvsr/basicvsr_reds4.py @@ -0,0 +1,139 @@ +exp_name = 'basicvsr_reds4' + +# model settings +model = dict( + type='BasicVSR', + generator=dict( + type='BasicVSRNet', + mid_channels=64, + num_blocks=30, + spynet_pretrained='pretrained_models/SPyNet.pth'), + pixel_loss=dict(type='CharbonnierLoss', loss_weight=1.0, reduction='mean')) +# model training and testing settings +train_cfg = dict(fix_iter=5000) +test_cfg = dict(metrics=['PSNR'], crop_border=0) + +# dataset settings +train_dataset_type = 'SRREDSMultipleGTDataset' +val_dataset_type = 'SRREDSMultipleGTDataset' + +train_pipeline = [ + dict(type='GenerateFrameIndicesForRecurrent', interval_list=[1]), + dict(type='TemporalReverse', keys='lq_path', reverse_ratio=0), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='lq', + channel_order='rgb'), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='gt', + channel_order='rgb'), + dict(type='RescaleToZeroOne', keys=['lq', 'gt']), + dict(type='PairedRandomCrop', gt_patch_size=256), + dict( + type='Flip', keys=['lq', 'gt'], flip_ratio=0.5, + direction='horizontal'), + dict(type='Flip', keys=['lq', 'gt'], flip_ratio=0.5, direction='vertical'), + dict(type='RandomTransposeHW', keys=['lq', 'gt'], transpose_ratio=0.5), + dict(type='FramesToTensor', keys=['lq', 'gt']), + dict(type='Collect', keys=['lq', 'gt'], meta_keys=['lq_path', 'gt_path']) +] + +test_pipeline = [ + dict(type='GenerateFrameIndicesForRecurrent', interval_list=[1]), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='lq', + channel_order='rgb'), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='gt', + channel_order='rgb'), + dict(type='RescaleToZeroOne', keys=['lq', 'gt']), + dict(type='FramesToTensor', keys=['lq', 'gt']), + dict( + type='Collect', + keys=['lq', 'gt'], + meta_keys=['lq_path', 'gt_path', 'key']) +] + +data = dict( + workers_per_gpu=6, + train_dataloader=dict(samples_per_gpu=4, drop_last=True), # 2 gpus + val_dataloader=dict(samples_per_gpu=1), + test_dataloader=dict(samples_per_gpu=1, workers_per_gpu=1), + + # train + train=dict( + type='RepeatDataset', + times=1000, + dataset=dict( + type=train_dataset_type, + lq_folder='data/REDS/train_sharp_bicubic/X4', + gt_folder='data/REDS/train_sharp', + num_input_frames=15, + pipeline=train_pipeline, + scale=4, + val_partition='REDS4', + test_mode=False)), + # val + val=dict( + type=val_dataset_type, + lq_folder='data/REDS/train_sharp_bicubic/X4', + gt_folder='data/REDS/train_sharp', + num_input_frames=100, + pipeline=test_pipeline, + scale=4, + val_partition='REDS4', + test_mode=True), + # test + test=dict( + type=val_dataset_type, + lq_folder='data/REDS/train_sharp_bicubic/X4', + gt_folder='data/REDS/train_sharp', + num_input_frames=100, + pipeline=test_pipeline, + scale=4, + val_partition='REDS4', + test_mode=True), +) + +# optimizer +optimizers = dict( + generator=dict( + type='Adam', + lr=2e-4, + betas=(0.9, 0.99), + paramwise_cfg=dict(custom_keys={'spynet': dict(lr_mult=0.125)}))) + +# learning policy +total_iters = 300000 +lr_config = dict( + policy='CosineRestart', + by_epoch=False, + periods=[300000], + restart_weights=[1], + min_lr=1e-7) + +checkpoint_config = dict(interval=5000, save_optimizer=True, by_epoch=False) +# remove gpu_collect=True in non distributed training +evaluation = dict(interval=5000, save_image=False, gpu_collect=True) +log_config = dict( + interval=100, + hooks=[ + dict(type='TextLoggerHook', by_epoch=False), + dict(type='TensorboardLoggerHook'), + ]) +visual_config = None + +# runtime settings +dist_params = dict(backend='nccl') +log_level = 'INFO' +work_dir = f'./work_dirs/{exp_name}' +load_from = None +resume_from = None +workflow = [('train', 1)] diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py new file mode 100644 index 0000000000..2b37b13964 --- /dev/null +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py @@ -0,0 +1,156 @@ +exp_name = 'basicvsr_vimeo90k_bd' + +# model settings +model = dict( + type='BasicVSR', + generator=dict( + type='BasicVSRNet', + mid_channels=64, + num_blocks=30, + spynet_pretrained='pretrained_models/SPyNet.pth'), + pixel_loss=dict(type='CharbonnierLoss', loss_weight=1.0, reduction='mean')) +# model training and testing settings +train_cfg = dict(fix_iter=5000) +test_cfg = dict(metrics=['PSNR'], crop_border=0, convert_to='y') + +# dataset settings +train_dataset_type = 'SRVimeo90KMultipleGTDataset' +val_dataset_type = 'SRTestMultipleGTDataset' +test_dataset_type = 'SRVimeo90KDataset' + +train_pipeline = [ + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='lq', + channel_order='rgb'), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='gt', + channel_order='rgb'), + dict(type='RescaleToZeroOne', keys=['lq', 'gt']), + dict(type='PairedRandomCrop', gt_patch_size=256), + dict( + type='Flip', keys=['lq', 'gt'], flip_ratio=0.5, + direction='horizontal'), + dict(type='Flip', keys=['lq', 'gt'], flip_ratio=0.5, direction='vertical'), + dict(type='RandomTransposeHW', keys=['lq', 'gt'], transpose_ratio=0.5), + dict(type='MirrorExtend', keys=['lq', 'gt']), + dict(type='FramesToTensor', keys=['lq', 'gt']), + dict(type='Collect', keys=['lq', 'gt'], meta_keys=['lq_path', 'gt_path']) +] + +val_pipeline = [ + dict(type='GenerateFrameIndicesForRecurrent', interval_list=[1]), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='lq', + channel_order='rgb'), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='gt', + channel_order='rgb'), + dict(type='RescaleToZeroOne', keys=['lq', 'gt']), + dict(type='FramesToTensor', keys=['lq', 'gt']), + dict( + type='Collect', + keys=['lq', 'gt'], + meta_keys=['lq_path', 'gt_path', 'key']) +] + +test_pipeline = [ + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='lq', + channel_order='rgb'), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='gt', + channel_order='rgb'), + dict(type='RescaleToZeroOne', keys=['lq', 'gt']), + dict(type='MirrorExtend', keys=['lq']), + dict(type='FramesToTensor', keys=['lq', 'gt']), + dict( + type='Collect', + keys=['lq', 'gt'], + meta_keys=['lq_path', 'gt_path', 'key']) +] + +data = dict( + workers_per_gpu=6, + train_dataloader=dict(samples_per_gpu=4, drop_last=True), # 2 gpus + val_dataloader=dict(samples_per_gpu=1), + test_dataloader=dict(samples_per_gpu=1, workers_per_gpu=1), + + # train + train=dict( + type='RepeatDataset', + times=1000, + dataset=dict( + type=train_dataset_type, + lq_folder='/mnt/lustre/share/kckchan/Datasets/vimeo90k/BDx4', + gt_folder='/mnt/lustre/share/kckchan/Datasets/vimeo90k/GT', + ann_file='data/Vimeo90K/meta_info_Vimeo90K_train_GT.txt', + pipeline=train_pipeline, + scale=4, + test_mode=False)), + # val + val=dict( + type=val_dataset_type, + lq_folder='/mnt/lustre/share/kckchan/Datasets/Vid4/BDx4', + gt_folder='/mnt/lustre/share/kckchan/Datasets/Vid4/GT', + pipeline=val_pipeline, + scale=4, + test_mode=True), + # test + test=dict( + type=test_dataset_type, + lq_folder='/mnt/lustre/share/kckchan/Datasets/vimeo90k/BDx4', + gt_folder='/mnt/lustre/share/kckchan/Datasets/vimeo90k/GT', + ann_file='data/Vimeo90K/meta_info_Vimeo90K_test_GT.txt', + pipeline=test_pipeline, + scale=4, + num_input_frames=7, + test_mode=True), +) + +# optimizer +optimizers = dict( + generator=dict( + type='Adam', + lr=2e-4, + betas=(0.9, 0.99), + paramwise_cfg=dict(custom_keys={'spynet': dict(lr_mult=0.125)}))) + +# learning policy +total_iters = 300000 +lr_config = dict( + policy='CosineRestart', + by_epoch=False, + periods=[300000], + restart_weights=[1], + min_lr=1e-7) + +checkpoint_config = dict(interval=5, save_optimizer=True, by_epoch=False) +# remove gpu_collect=True in non distributed training +evaluation = dict(interval=5000, save_image=False, gpu_collect=True) +log_config = dict( + interval=1, + hooks=[ + dict(type='TextLoggerHook', by_epoch=False), + dict(type='TensorboardLoggerHook'), + ]) +visual_config = None + +# runtime settings +dist_params = dict(backend='nccl', port=29507) +log_level = 'INFO' +work_dir = f'./work_dirs/{exp_name}' +load_from = None +resume_from = './experiments/BasicVSR_Vimeo_BD_test/iter_5.pth' +workflow = [('train', 1)] diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py new file mode 100644 index 0000000000..c2d2d6dd43 --- /dev/null +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py @@ -0,0 +1,156 @@ +exp_name = 'basicvsr_vimeo90k_bi' + +# model settings +model = dict( + type='BasicVSR', + generator=dict( + type='BasicVSRNet', + mid_channels=64, + num_blocks=30, + spynet_pretrained='pretrained_models/SPyNet.pth'), + pixel_loss=dict(type='CharbonnierLoss', loss_weight=1.0, reduction='mean')) +# model training and testing settings +train_cfg = dict(fix_iter=5000) +test_cfg = dict(metrics=['PSNR'], crop_border=0, convert_to='y') + +# dataset settings +train_dataset_type = 'SRVimeo90KMultipleGTDataset' +val_dataset_type = 'SRTestMultipleGTDataset' +test_dataset_type = 'SRVimeo90KDataset' + +train_pipeline = [ + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='lq', + channel_order='rgb'), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='gt', + channel_order='rgb'), + dict(type='RescaleToZeroOne', keys=['lq', 'gt']), + dict(type='PairedRandomCrop', gt_patch_size=256), + dict( + type='Flip', keys=['lq', 'gt'], flip_ratio=0.5, + direction='horizontal'), + dict(type='Flip', keys=['lq', 'gt'], flip_ratio=0.5, direction='vertical'), + dict(type='RandomTransposeHW', keys=['lq', 'gt'], transpose_ratio=0.5), + dict(type='MirrorExtend', keys=['lq', 'gt']), + dict(type='FramesToTensor', keys=['lq', 'gt']), + dict(type='Collect', keys=['lq', 'gt'], meta_keys=['lq_path', 'gt_path']) +] + +val_pipeline = [ + dict(type='GenerateFrameIndicesForRecurrent', interval_list=[1]), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='lq', + channel_order='rgb'), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='gt', + channel_order='rgb'), + dict(type='RescaleToZeroOne', keys=['lq', 'gt']), + dict(type='FramesToTensor', keys=['lq', 'gt']), + dict( + type='Collect', + keys=['lq', 'gt'], + meta_keys=['lq_path', 'gt_path', 'key']) +] + +test_pipeline = [ + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='lq', + channel_order='rgb'), + dict( + type='LoadImageFromFileList', + io_backend='disk', + key='gt', + channel_order='rgb'), + dict(type='RescaleToZeroOne', keys=['lq', 'gt']), + dict(type='MirrorExtend', keys=['lq']), + dict(type='FramesToTensor', keys=['lq', 'gt']), + dict( + type='Collect', + keys=['lq', 'gt'], + meta_keys=['lq_path', 'gt_path', 'key']) +] + +data = dict( + workers_per_gpu=6, + train_dataloader=dict(samples_per_gpu=4, drop_last=True), # 2 gpus + val_dataloader=dict(samples_per_gpu=1), + test_dataloader=dict(samples_per_gpu=1, workers_per_gpu=1), + + # train + train=dict( + type='RepeatDataset', + times=1000, + dataset=dict( + type=train_dataset_type, + lq_folder='data/vimeo90k/BIx4', + gt_folder='data/vimeo90k/GT', + ann_file='data/Vimeo90K/meta_info_Vimeo90K_train_GT.txt', + pipeline=train_pipeline, + scale=4, + test_mode=False)), + # val + val=dict( + type=val_dataset_type, + lq_folder='data/Vid4/BIx4', + gt_folder='data/Vid4/GT', + pipeline=val_pipeline, + scale=4, + test_mode=True), + # test + test=dict( + type=test_dataset_type, + lq_folder='data/vimeo90k/BIx4', + gt_folder='data/vimeo90k/GT', + ann_file='data/Vimeo90K/meta_info_Vimeo90K_test_GT.txt', + pipeline=test_pipeline, + scale=4, + num_input_frames=7, + test_mode=True), +) + +# optimizer +optimizers = dict( + generator=dict( + type='Adam', + lr=2e-4, + betas=(0.9, 0.99), + paramwise_cfg=dict(custom_keys={'spynet': dict(lr_mult=0.125)}))) + +# learning policy +total_iters = 300000 +lr_config = dict( + policy='CosineRestart', + by_epoch=False, + periods=[300000], + restart_weights=[1], + min_lr=1e-7) + +checkpoint_config = dict(interval=5000, save_optimizer=True, by_epoch=False) +# remove gpu_collect=True in non distributed training +evaluation = dict(interval=5000, save_image=False, gpu_collect=True) +log_config = dict( + interval=100, + hooks=[ + dict(type='TextLoggerHook', by_epoch=False), + dict(type='TensorboardLoggerHook'), + ]) +visual_config = None + +# runtime settings +dist_params = dict(backend='nccl', port=29504) +log_level = 'INFO' +work_dir = f'./work_dirs/{exp_name}' +load_from = None +resume_from = './experiments/BasicVSR_Vimeo_BI/iter_185000.pth' +workflow = [('train', 1)] From feb16a4b1a85075c51a5726227fee53744274276 Mon Sep 17 00:00:00 2001 From: ckkelvinchan Date: Tue, 13 Apr 2021 12:13:05 +0800 Subject: [PATCH 2/9] Modify README --- configs/restorers/basicvsr/README.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/configs/restorers/basicvsr/README.md b/configs/restorers/basicvsr/README.md index 19b39e7040..11f94717a7 100644 --- a/configs/restorers/basicvsr/README.md +++ b/configs/restorers/basicvsr/README.md @@ -13,12 +13,17 @@ ## Results and Models -Evaluated on RGB channels for REDS4 and Y channel for others. -The metrics are `PSNR`/`SSIM`. - -| Method | REDS4 (BIx4) | Vimeo-90K-T (BIx4) | Vid4 (BIx4) | UDM10 (BDx4) | Vimeo-90K-T (BDx4) | Vid4 (BDx4) | Download | -|----------------------|:------------:|:------------------:|:--------------:|:--------------:|:------------------:|:--------------:|:------------:| -| basicvsr_reds4 | | - | - | - | - | - | model \| log | -| basicvsr_vimeo90k_bi | - | 37.2299/0.9447 | 27.2296/0.8227 | - | - | - | model \| log | -| basicvsr_vimeo90k_bd | - | - | - | 39.8802/0.9683 | 37.5730/0.9495 | 27.9278/0.8537 | model \| log | -| spynet | - | - | - | - | - | - | model | +Evaluated on RGB channels for REDS4 and Y channel for others. The metrics are `PSNR`/`SSIM`. + +The pretrained weights of SPyNet can be found [here](). + + +| Method | REDS4 (BIx4) | Vimeo-90K-T (BIx4) | Vid4 (BIx4) | Download | +|----------------------|:------------:|:------------------:|:--------------:|:------------:| +| basicvsr_reds4 | | - | - | model \| log | +| basicvsr_vimeo90k_bi | - | 37.2299/0.9447 | 27.2296/0.8227 | model \| log | + + +| Method | UDM10 (BDx4) | Vimeo-90K-T (BDx4) | Vid4 (BDx4) | Download | +|----------------------|:--------------:|:------------------:|:--------------:|:------------:| +| basicvsr_vimeo90k_bd | 39.8802/0.9683 | 37.5730/0.9495 | 27.9278/0.8537 | model \| log | From c4fe7ad2818d94d92ac71c39a92b73b4a06d33a5 Mon Sep 17 00:00:00 2001 From: ckkelvinchan Date: Tue, 13 Apr 2021 19:23:49 +0800 Subject: [PATCH 3/9] update README --- configs/restorers/basicvsr/README.md | 28 +++++++++---------- configs/restorers/basicvsr/basicvsr_reds4.py | 2 +- .../basicvsr/basicvsr_vimeo90k_bi.py | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configs/restorers/basicvsr/README.md b/configs/restorers/basicvsr/README.md index 11f94717a7..64404dd33c 100644 --- a/configs/restorers/basicvsr/README.md +++ b/configs/restorers/basicvsr/README.md @@ -3,11 +3,11 @@ ## Introduction ``` -@article{chan2021basicvsr, - author = {Chan, Kelvin CK and Wang, Xintao and Yu, Ke and Dong, Chao and Loy, Chen Change}, - title = {BasicVSR: The Search for Essential Components in Video Super-Resolution and Beyond}, - journal = {Proceedings of the IEEE conference on computer vision and pattern recognition}, - year = {2021} +@InProceedings{chan2021basicvsr, + author = {Chan, Kelvin CK and Wang, Xintao and Yu, Ke and Dong, Chao and Loy, Chen Change}, + title = {BasicVSR: The Search for Essential Components in Video Super-Resolution and Beyond}, + booktitle = {Proceedings of the IEEE conference on computer vision and pattern recognition}, + year = {2021} } ``` @@ -15,15 +15,15 @@ Evaluated on RGB channels for REDS4 and Y channel for others. The metrics are `PSNR`/`SSIM`. -The pretrained weights of SPyNet can be found [here](). +The pretrained weights of SPyNet can be found [here](https://download.openmmlab.com/mmediting/restorers/basicvsr/spynet_20210409-322d39be.pth) . +| Method | REDS4 (BIx4) | Vimeo-90K-T (BIx4) | Vid4 (BIx4) | Download | +|--------------------------------------------------------------------------------------------------------------------------------|:--------------:|:------------------:|:--------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| [basicvsr_reds4](https://github.com/open-mmlab/mmediting/blob/master/configs/restorers/basicvsr/basicvsr_reds.py) | 31.4170/0.8909 | - | - | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_reds4_20120409-b4b03f4d.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_reds4_20210409_092646.log.json) | +| [basicvsr_vimeo90k_bi](https://github.com/open-mmlab/mmediting/blob/master/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py) | - | 37.2299/0.9447 | 27.2296/0.8227 | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bi_20210409-ef89bf61.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bi_20210409_132702.log.json) | -| Method | REDS4 (BIx4) | Vimeo-90K-T (BIx4) | Vid4 (BIx4) | Download | -|----------------------|:------------:|:------------------:|:--------------:|:------------:| -| basicvsr_reds4 | | - | - | model \| log | -| basicvsr_vimeo90k_bi | - | 37.2299/0.9447 | 27.2296/0.8227 | model \| log | +
- -| Method | UDM10 (BDx4) | Vimeo-90K-T (BDx4) | Vid4 (BDx4) | Download | -|----------------------|:--------------:|:------------------:|:--------------:|:------------:| -| basicvsr_vimeo90k_bd | 39.8802/0.9683 | 37.5730/0.9495 | 27.9278/0.8537 | model \| log | +| Method | UDM10 (BDx4) | Vimeo-90K-T (BDx4) | Vid4 (BDx4) | Download | +|--------------------------------------------------------------------------------------------------------------------------------|:--------------:|:------------------:|:--------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| [basicvsr_vimeo90k_bd](https://github.com/open-mmlab/mmediting/blob/master/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py) | 39.8802/0.9683 | 37.5730/0.9495 | 27.9278/0.8537 | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bd_20210409-b5a982fc.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bd_20210409_132740.log.json) | diff --git a/configs/restorers/basicvsr/basicvsr_reds4.py b/configs/restorers/basicvsr/basicvsr_reds4.py index 041f2c4fdf..46f00e17bc 100644 --- a/configs/restorers/basicvsr/basicvsr_reds4.py +++ b/configs/restorers/basicvsr/basicvsr_reds4.py @@ -7,7 +7,7 @@ type='BasicVSRNet', mid_channels=64, num_blocks=30, - spynet_pretrained='pretrained_models/SPyNet.pth'), + spynet_pretrained='pretrained_models/spynet.pth'), pixel_loss=dict(type='CharbonnierLoss', loss_weight=1.0, reduction='mean')) # model training and testing settings train_cfg = dict(fix_iter=5000) diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py index c2d2d6dd43..c7638c3322 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py @@ -7,7 +7,7 @@ type='BasicVSRNet', mid_channels=64, num_blocks=30, - spynet_pretrained='pretrained_models/SPyNet.pth'), + spynet_pretrained='pretrained_models/spynet.pth'), pixel_loss=dict(type='CharbonnierLoss', loss_weight=1.0, reduction='mean')) # model training and testing settings train_cfg = dict(fix_iter=5000) From bd0c83e1c68b1798732bda9e5389c5bbbd7fe54c Mon Sep 17 00:00:00 2001 From: ckkelvinchan Date: Tue, 13 Apr 2021 19:25:49 +0800 Subject: [PATCH 4/9] update config --- configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py index 2b37b13964..6c25982e51 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py @@ -7,7 +7,7 @@ type='BasicVSRNet', mid_channels=64, num_blocks=30, - spynet_pretrained='pretrained_models/SPyNet.pth'), + spynet_pretrained='pretrained_models/spynet.pth'), pixel_loss=dict(type='CharbonnierLoss', loss_weight=1.0, reduction='mean')) # model training and testing settings train_cfg = dict(fix_iter=5000) From fbc9ba14cdc76e3fbce9fef56d059ab660265906 Mon Sep 17 00:00:00 2001 From: ckkelvinchan Date: Tue, 13 Apr 2021 19:36:01 +0800 Subject: [PATCH 5/9] update config --- configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py | 4 ++-- configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py index 6c25982e51..27b4a1d260 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py @@ -148,9 +148,9 @@ visual_config = None # runtime settings -dist_params = dict(backend='nccl', port=29507) +dist_params = dict(backend='nccl') log_level = 'INFO' work_dir = f'./work_dirs/{exp_name}' load_from = None -resume_from = './experiments/BasicVSR_Vimeo_BD_test/iter_5.pth' +resume_from = None workflow = [('train', 1)] diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py index c7638c3322..218b9bc0ea 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py @@ -148,9 +148,9 @@ visual_config = None # runtime settings -dist_params = dict(backend='nccl', port=29504) +dist_params = dict(backend='nccl') log_level = 'INFO' work_dir = f'./work_dirs/{exp_name}' load_from = None -resume_from = './experiments/BasicVSR_Vimeo_BI/iter_185000.pth' +resume_from = None workflow = [('train', 1)] From ab6ec903b05678fe7c3e128ea8cc3d2cf9e5d8c5 Mon Sep 17 00:00:00 2001 From: ckkelvinchan Date: Tue, 13 Apr 2021 19:37:10 +0800 Subject: [PATCH 6/9] update config --- configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py index 27b4a1d260..da55478f35 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py @@ -140,7 +140,7 @@ # remove gpu_collect=True in non distributed training evaluation = dict(interval=5000, save_image=False, gpu_collect=True) log_config = dict( - interval=1, + interval=100, hooks=[ dict(type='TextLoggerHook', by_epoch=False), dict(type='TensorboardLoggerHook'), From ee04a0d4f333d8540a6181d52994b468c03474ff Mon Sep 17 00:00:00 2001 From: ckkelvinchan Date: Tue, 13 Apr 2021 19:39:45 +0800 Subject: [PATCH 7/9] update config --- .../restorers/basicvsr/basicvsr_vimeo90k_bd.py | 16 ++++++++-------- .../restorers/basicvsr/basicvsr_vimeo90k_bi.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py index da55478f35..933129a126 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py @@ -93,26 +93,26 @@ times=1000, dataset=dict( type=train_dataset_type, - lq_folder='/mnt/lustre/share/kckchan/Datasets/vimeo90k/BDx4', - gt_folder='/mnt/lustre/share/kckchan/Datasets/vimeo90k/GT', - ann_file='data/Vimeo90K/meta_info_Vimeo90K_train_GT.txt', + lq_folder='data/vimeo90k/BDx4', + gt_folder='data/vimeo90k/GT', + ann_file='data/vimeo90k/meta_info_Vimeo90K_train_GT.txt', pipeline=train_pipeline, scale=4, test_mode=False)), # val val=dict( type=val_dataset_type, - lq_folder='/mnt/lustre/share/kckchan/Datasets/Vid4/BDx4', - gt_folder='/mnt/lustre/share/kckchan/Datasets/Vid4/GT', + lq_folder='data/Vid4/BDx4', + gt_folder='data/Vid4/GT', pipeline=val_pipeline, scale=4, test_mode=True), # test test=dict( type=test_dataset_type, - lq_folder='/mnt/lustre/share/kckchan/Datasets/vimeo90k/BDx4', - gt_folder='/mnt/lustre/share/kckchan/Datasets/vimeo90k/GT', - ann_file='data/Vimeo90K/meta_info_Vimeo90K_test_GT.txt', + lq_folder='data/vimeo90k/BDx4', + gt_folder='data/vimeo90k/GT', + ann_file='data/vimeo90k/meta_info_Vimeo90K_test_GT.txt', pipeline=test_pipeline, scale=4, num_input_frames=7, diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py index 218b9bc0ea..49c8ddb972 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py @@ -95,7 +95,7 @@ type=train_dataset_type, lq_folder='data/vimeo90k/BIx4', gt_folder='data/vimeo90k/GT', - ann_file='data/Vimeo90K/meta_info_Vimeo90K_train_GT.txt', + ann_file='data/vimeo90k/meta_info_Vimeo90K_train_GT.txt', pipeline=train_pipeline, scale=4, test_mode=False)), @@ -112,7 +112,7 @@ type=test_dataset_type, lq_folder='data/vimeo90k/BIx4', gt_folder='data/vimeo90k/GT', - ann_file='data/Vimeo90K/meta_info_Vimeo90K_test_GT.txt', + ann_file='data/vimeo90k/meta_info_Vimeo90K_test_GT.txt', pipeline=test_pipeline, scale=4, num_input_frames=7, From 05d6f082e6dabd99ba43e3490b5bac76c6fde8bf Mon Sep 17 00:00:00 2001 From: ckkelvinchan Date: Wed, 14 Apr 2021 11:21:54 +0800 Subject: [PATCH 8/9] fix bug --- configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py | 4 ++-- configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py index 933129a126..720692f7be 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py @@ -36,7 +36,7 @@ direction='horizontal'), dict(type='Flip', keys=['lq', 'gt'], flip_ratio=0.5, direction='vertical'), dict(type='RandomTransposeHW', keys=['lq', 'gt'], transpose_ratio=0.5), - dict(type='MirrorExtend', keys=['lq', 'gt']), + dict(type='MirrorSequence', keys=['lq', 'gt']), dict(type='FramesToTensor', keys=['lq', 'gt']), dict(type='Collect', keys=['lq', 'gt'], meta_keys=['lq_path', 'gt_path']) ] @@ -73,7 +73,7 @@ key='gt', channel_order='rgb'), dict(type='RescaleToZeroOne', keys=['lq', 'gt']), - dict(type='MirrorExtend', keys=['lq']), + dict(type='MirrorSequence', keys=['lq']), dict(type='FramesToTensor', keys=['lq', 'gt']), dict( type='Collect', diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py index 49c8ddb972..182e8dd901 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py @@ -36,7 +36,7 @@ direction='horizontal'), dict(type='Flip', keys=['lq', 'gt'], flip_ratio=0.5, direction='vertical'), dict(type='RandomTransposeHW', keys=['lq', 'gt'], transpose_ratio=0.5), - dict(type='MirrorExtend', keys=['lq', 'gt']), + dict(type='MirrorSequence', keys=['lq', 'gt']), dict(type='FramesToTensor', keys=['lq', 'gt']), dict(type='Collect', keys=['lq', 'gt'], meta_keys=['lq_path', 'gt_path']) ] @@ -73,7 +73,7 @@ key='gt', channel_order='rgb'), dict(type='RescaleToZeroOne', keys=['lq', 'gt']), - dict(type='MirrorExtend', keys=['lq']), + dict(type='MirrorSequence', keys=['lq']), dict(type='FramesToTensor', keys=['lq', 'gt']), dict( type='Collect', From c77867db7d1be7ac316d8d41fd99692b476f06c3 Mon Sep 17 00:00:00 2001 From: ckkelvinchan Date: Wed, 14 Apr 2021 13:49:47 +0800 Subject: [PATCH 9/9] update config and readme --- configs/restorers/basicvsr/README.md | 14 +++++--------- configs/restorers/basicvsr/basicvsr_reds4.py | 2 +- configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py | 2 +- configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/configs/restorers/basicvsr/README.md b/configs/restorers/basicvsr/README.md index 64404dd33c..905b3ddc5f 100644 --- a/configs/restorers/basicvsr/README.md +++ b/configs/restorers/basicvsr/README.md @@ -17,13 +17,9 @@ Evaluated on RGB channels for REDS4 and Y channel for others. The metrics are `P The pretrained weights of SPyNet can be found [here](https://download.openmmlab.com/mmediting/restorers/basicvsr/spynet_20210409-322d39be.pth) . -| Method | REDS4 (BIx4) | Vimeo-90K-T (BIx4) | Vid4 (BIx4) | Download | -|--------------------------------------------------------------------------------------------------------------------------------|:--------------:|:------------------:|:--------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| [basicvsr_reds4](https://github.com/open-mmlab/mmediting/blob/master/configs/restorers/basicvsr/basicvsr_reds.py) | 31.4170/0.8909 | - | - | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_reds4_20120409-b4b03f4d.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_reds4_20210409_092646.log.json) | -| [basicvsr_vimeo90k_bi](https://github.com/open-mmlab/mmediting/blob/master/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py) | - | 37.2299/0.9447 | 27.2296/0.8227 | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bi_20210409-ef89bf61.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bi_20210409_132702.log.json) | -
- -| Method | UDM10 (BDx4) | Vimeo-90K-T (BDx4) | Vid4 (BDx4) | Download | -|--------------------------------------------------------------------------------------------------------------------------------|:--------------:|:------------------:|:--------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| [basicvsr_vimeo90k_bd](https://github.com/open-mmlab/mmediting/blob/master/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py) | 39.8802/0.9683 | 37.5730/0.9495 | 27.9278/0.8537 | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bd_20210409-b5a982fc.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bd_20210409_132740.log.json) | +| Method | REDS4 (BIx4)
PSNR/SSIM (RGB) | Vimeo-90K-T (BIx4)
PSNR/SSIM (Y) | Vid4 (BIx4)
PSNR/SSIM (Y) | UDM10 (BDx4)
PSNR/SSIM (Y) | Vimeo-90K-T (BDx4)
PSNR/SSIM (Y) | Vid4 (BDx4)
PSNR/SSIM (Y) | Download | +|:------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------:|:-----------------------------------:|:----------------------------:|:-----------------------------:|:-----------------------------------:|:----------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| [basicvsr_reds4](https://github.com/open-mmlab/mmediting/blob/master/configs/restorers/basicvsr/basicvsr_reds.py) | **31.4170/0.8909** | 36.2870/0.9388 | 27.2223/0.8298 | 33.4510/0.9297 | 34.5053/0.9280 | 24.4390/0.7441 | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_reds4_20120409-b4b03f4d.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_reds4_20210409_092646.log.json) | +| [basicvsr_vimeo90k_bi](https://github.com/open-mmlab/mmediting/blob/master/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py) | 30.3128/0.8660 | **37.2299/0.9447** | **27.2296/0.8227** | 34.5488/0.9423 | 34.8713/0.9313 | 25.0377/0.7622 | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bi_20210409-ef89bf61.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bi_20210409_132702.log.json) | +| [basicvsr_vimeo90k_bd](https://github.com/open-mmlab/mmediting/blob/master/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py) | 29.0376/0.8481 | 34.7094/0.9332 | 26.2356/0.8000 | **39.8802/0.9683** | **37.5730/0.9495** | **27.9278/0.8537** | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bd_20210409-b5a982fc.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_vimeo90k_bd_20210409_132740.log.json) | diff --git a/configs/restorers/basicvsr/basicvsr_reds4.py b/configs/restorers/basicvsr/basicvsr_reds4.py index 46f00e17bc..86358fae92 100644 --- a/configs/restorers/basicvsr/basicvsr_reds4.py +++ b/configs/restorers/basicvsr/basicvsr_reds4.py @@ -126,7 +126,7 @@ interval=100, hooks=[ dict(type='TextLoggerHook', by_epoch=False), - dict(type='TensorboardLoggerHook'), + # dict(type='TensorboardLoggerHook'), ]) visual_config = None diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py index 720692f7be..5c5f0dd2fa 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bd.py @@ -143,7 +143,7 @@ interval=100, hooks=[ dict(type='TextLoggerHook', by_epoch=False), - dict(type='TensorboardLoggerHook'), + # dict(type='TensorboardLoggerHook'), ]) visual_config = None diff --git a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py index 182e8dd901..688af1448a 100644 --- a/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py +++ b/configs/restorers/basicvsr/basicvsr_vimeo90k_bi.py @@ -143,7 +143,7 @@ interval=100, hooks=[ dict(type='TextLoggerHook', by_epoch=False), - dict(type='TensorboardLoggerHook'), + # dict(type='TensorboardLoggerHook'), ]) visual_config = None