diff --git a/configs/inpainting/deepfillv1/deepfillv1_256x256_4x4_celeba.py b/configs/inpainting/deepfillv1/deepfillv1_256x256_4x4_celeba.py index ba20476325..121ab31373 100644 --- a/configs/inpainting/deepfillv1/deepfillv1_256x256_4x4_celeba.py +++ b/configs/inpainting/deepfillv1/deepfillv1_256x256_4x4_celeba.py @@ -123,7 +123,7 @@ test_pipeline = train_pipeline -data_root = './data/CelebA-HQ/' +data_root = 'data/CelebA-HQ' data = dict( workers_per_gpu=8, train_dataloader=dict(samples_per_gpu=4, drop_last=True), @@ -134,19 +134,19 @@ times=1000, dataset=dict( type=dataset_type, - ann_file=(data_root + 'train_celeba_img_list.txt'), + ann_file=(f'{data_root}/train_celeba_img_list.txt'), data_prefix=data_root, pipeline=train_pipeline, test_mode=False)), val=dict( type=dataset_type, - ann_file=(data_root + 'val_celeba_img_list.txt'), + ann_file=(f'{data_root}/val_celeba_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True), test=dict( type=dataset_type, - ann_file=(data_root + 'val_celeba_img_list.txt'), + ann_file=(f'{data_root}/val_celeba_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/inpainting/deepfillv1/deepfillv1_256x256_8x2_places.py b/configs/inpainting/deepfillv1/deepfillv1_256x256_8x2_places.py index 373828c3e6..59dbfdd5c7 100644 --- a/configs/inpainting/deepfillv1/deepfillv1_256x256_8x2_places.py +++ b/configs/inpainting/deepfillv1/deepfillv1_256x256_8x2_places.py @@ -122,7 +122,7 @@ ] test_pipeline = train_pipeline -data_root = './data/places365/' +data_root = 'data/places365' data = dict( workers_per_gpu=8, @@ -131,19 +131,19 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'train_places_img_list_total.txt', + ann_file=f'{data_root}/train_places_img_list_total.txt', data_prefix=data_root, pipeline=train_pipeline, test_mode=False), val=dict( type=dataset_type, - ann_file=data_root + 'val_places_img_list.txt', + ann_file=f'{data_root}/val_places_img_list.txt', data_prefix=data_root, pipeline=test_pipeline, test_mode=True), test=dict( type=dataset_type, - ann_file=(data_root + 'val_places_img_list.txt'), + ann_file=(f'{data_root}/val_places_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/inpainting/deepfillv2/deepfillv2_256x256_8x2_celeba.py b/configs/inpainting/deepfillv2/deepfillv2_256x256_8x2_celeba.py index 313f64a78e..ae22f74d23 100644 --- a/configs/inpainting/deepfillv2/deepfillv2_256x256_8x2_celeba.py +++ b/configs/inpainting/deepfillv2/deepfillv2_256x256_8x2_celeba.py @@ -127,7 +127,7 @@ ] test_pipeline = train_pipeline -data_root = './data/CelebA-HQ/' +data_root = 'data/CelebA-HQ' data = dict( workers_per_gpu=4, @@ -139,19 +139,19 @@ times=1000, dataset=dict( type=dataset_type, - ann_file=(data_root + 'train_celeba_img_list.txt'), + ann_file=(f'{data_root}/train_celeba_img_list.txt'), data_prefix=data_root, pipeline=train_pipeline, test_mode=False)), val=dict( type=dataset_type, - ann_file=(data_root + 'val_celeba_img_list.txt'), + ann_file=(f'{data_root}/val_celeba_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True), test=dict( type=dataset_type, - ann_file=(data_root + 'val_celeba_img_list.txt'), + ann_file=(f'{data_root}/val_celeba_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/inpainting/deepfillv2/deepfillv2_256x256_8x2_places.py b/configs/inpainting/deepfillv2/deepfillv2_256x256_8x2_places.py index 7b2fc1f897..8d6d1a0748 100644 --- a/configs/inpainting/deepfillv2/deepfillv2_256x256_8x2_places.py +++ b/configs/inpainting/deepfillv2/deepfillv2_256x256_8x2_places.py @@ -128,7 +128,7 @@ test_pipeline = train_pipeline -data_root = './data/places365/' +data_root = 'data/places365' data = dict( workers_per_gpu=4, @@ -137,19 +137,19 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'train_places_img_list_total.txt', + ann_file=f'{data_root}/train_places_img_list_total.txt', data_prefix=data_root, pipeline=train_pipeline, test_mode=False), val=dict( type=dataset_type, - ann_file=data_root + 'val_places_img_list.txt', + ann_file=f'{data_root}/val_places_img_list.txt', data_prefix=data_root, pipeline=test_pipeline, test_mode=True), test=dict( type=dataset_type, - ann_file=(data_root + 'val_places_img_list.txt'), + ann_file=(f'{data_root}/val_places_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/inpainting/global_local/gl_256x256_8x12_celeba.py b/configs/inpainting/global_local/gl_256x256_8x12_celeba.py index 1352e5f068..49fa5e10cd 100644 --- a/configs/inpainting/global_local/gl_256x256_8x12_celeba.py +++ b/configs/inpainting/global_local/gl_256x256_8x12_celeba.py @@ -86,7 +86,7 @@ test_pipeline = train_pipeline -data_root = './data/CelebA-HQ/' +data_root = 'data/CelebA-HQ' data = dict( workers_per_gpu=4, @@ -95,19 +95,19 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=(data_root + 'train_celeba_img_list.txt'), + ann_file=(f'{data_root}/train_celeba_img_list.txt'), data_prefix=data_root, pipeline=train_pipeline, test_mode=False), val=dict( type=dataset_type, - ann_file=(data_root + 'val_celeba_img_list.txt'), + ann_file=(f'{data_root}/val_celeba_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True), test=dict( type=dataset_type, - ann_file=(data_root + 'val_celeba_img_list.txt'), + ann_file=(f'{data_root}/val_celeba_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/inpainting/global_local/gl_256x256_8x12_places.py b/configs/inpainting/global_local/gl_256x256_8x12_places.py index 3dca7ee56a..c1adb58611 100644 --- a/configs/inpainting/global_local/gl_256x256_8x12_places.py +++ b/configs/inpainting/global_local/gl_256x256_8x12_places.py @@ -86,7 +86,7 @@ test_pipeline = train_pipeline -data_root = './data/places365/' +data_root = 'data/places365' data = dict( workers_per_gpu=4, @@ -95,13 +95,13 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'train_places_img_list_total.txt', + ann_file=f'{data_root}/train_places_img_list_total.txt', data_prefix=data_root, pipeline=train_pipeline, test_mode=False), val=dict( type=dataset_type, - ann_file=data_root + 'val_places_img_list.txt', + ann_file=f'{data_root}/val_places_img_list.txt', data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/inpainting/partial_conv/pconv_256x256_stage1_8x1_celeba.py b/configs/inpainting/partial_conv/pconv_256x256_stage1_8x1_celeba.py index 7072f3cf49..6c20e36fbb 100644 --- a/configs/inpainting/partial_conv/pconv_256x256_stage1_8x1_celeba.py +++ b/configs/inpainting/partial_conv/pconv_256x256_stage1_8x1_celeba.py @@ -80,7 +80,7 @@ test_pipeline = train_pipeline -data_root = './data/CelebA-HQ/' +data_root = 'data/CelebA-HQ' data = dict( workers_per_gpu=4, @@ -89,19 +89,19 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=(data_root + 'train_places_img_list_total.txt'), + ann_file=(f'{data_root}/train_places_img_list_total.txt'), data_prefix=data_root, pipeline=train_pipeline, test_mode=False), val=dict( type=dataset_type, - ann_file=(data_root + 'val_places_img_list.txt'), + ann_file=(f'{data_root}/val_places_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True), test=dict( type=dataset_type, - ann_file=(data_root + 'val_places_img_list.txt'), + ann_file=(f'{data_root}/val_places_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/inpainting/partial_conv/pconv_256x256_stage1_8x1_places.py b/configs/inpainting/partial_conv/pconv_256x256_stage1_8x1_places.py index 7bc0c70a73..9d2cf03103 100644 --- a/configs/inpainting/partial_conv/pconv_256x256_stage1_8x1_places.py +++ b/configs/inpainting/partial_conv/pconv_256x256_stage1_8x1_places.py @@ -79,7 +79,7 @@ ] test_pipeline = train_pipeline -data_root = './data/places365/' +data_root = 'data/places365' data = dict( workers_per_gpu=4, @@ -88,19 +88,19 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'train_places_img_list_total.txt', + ann_file=f'{data_root}/train_places_img_list_total.txt', data_prefix=data_root, pipeline=train_pipeline, test_mode=False), val=dict( type=dataset_type, - ann_file=data_root + 'val_places_img_list.txt', + ann_file=f'{data_root}/val_places_img_list.txt', data_prefix=data_root, pipeline=test_pipeline, test_mode=True), test=dict( type=dataset_type, - ann_file=(data_root + 'val_places_img_list.txt'), + ann_file=(f'{data_root}/val_places_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/inpainting/partial_conv/pconv_256x256_stage2_4x2_celeba.py b/configs/inpainting/partial_conv/pconv_256x256_stage2_4x2_celeba.py index e6510c28b6..a3c00e1156 100644 --- a/configs/inpainting/partial_conv/pconv_256x256_stage2_4x2_celeba.py +++ b/configs/inpainting/partial_conv/pconv_256x256_stage2_4x2_celeba.py @@ -80,7 +80,7 @@ test_pipeline = train_pipeline -data_root = './data/CelebA-HQ/' +data_root = 'data/CelebA-HQ' data = dict( workers_per_gpu=8, @@ -89,19 +89,19 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=(data_root + 'train_places_img_list_total.txt'), + ann_file=(f'{data_root}/train_places_img_list_total.txt'), data_prefix=data_root, pipeline=train_pipeline, test_mode=False), val=dict( type=dataset_type, - ann_file=(data_root + 'val_places_img_list.txt'), + ann_file=(f'{data_root}/val_places_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True), test=dict( type=dataset_type, - ann_file=(data_root + 'val_places_img_list.txt'), + ann_file=(f'{data_root}/val_places_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/inpainting/partial_conv/pconv_256x256_stage2_4x2_places.py b/configs/inpainting/partial_conv/pconv_256x256_stage2_4x2_places.py index a554a88cd7..9553ea2a44 100644 --- a/configs/inpainting/partial_conv/pconv_256x256_stage2_4x2_places.py +++ b/configs/inpainting/partial_conv/pconv_256x256_stage2_4x2_places.py @@ -79,7 +79,7 @@ ] test_pipeline = train_pipeline -data_root = './data/places365/' +data_root = 'data/places365' data = dict( workers_per_gpu=8, @@ -88,19 +88,19 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'train_places_img_list_total.txt', + ann_file=f'{data_root}/train_places_img_list_total.txt', data_prefix=data_root, pipeline=train_pipeline, test_mode=False), val=dict( type=dataset_type, - ann_file=data_root + 'val_places_img_list.txt', + ann_file=f'{data_root}/val_places_img_list.txt', data_prefix=data_root, pipeline=test_pipeline, test_mode=True), test=dict( type=dataset_type, - ann_file=(data_root + 'val_places_img_list.txt'), + ann_file=(f'{data_root}/val_places_img_list.txt'), data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/configs/mattors/dim/dim_stage1_v16_1x1_1000k_comp1k.py b/configs/mattors/dim/dim_stage1_v16_1x1_1000k_comp1k.py index 39a3c54967..660065f4f1 100644 --- a/configs/mattors/dim/dim_stage1_v16_1x1_1000k_comp1k.py +++ b/configs/mattors/dim/dim_stage1_v16_1x1_1000k_comp1k.py @@ -13,7 +13,7 @@ # dataset settings dataset_type = 'AdobeComp1kDataset' -data_root = './data/adobe_composition-1k/' +data_root = 'data/adobe_composition-1k' img_norm_cfg = dict( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], to_rgb=True) train_pipeline = [ @@ -72,17 +72,17 @@ workers_per_gpu=4, train=dict( type=dataset_type, - ann_file=data_root + 'training_list.json', + ann_file=f'{data_root}/training_list.json', data_prefix=data_root, pipeline=train_pipeline), val=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), test=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) diff --git a/configs/mattors/dim/dim_stage2_v16_pln_1x1_1000k_comp1k.py b/configs/mattors/dim/dim_stage2_v16_pln_1x1_1000k_comp1k.py index 8124f27a90..c1067a52d7 100644 --- a/configs/mattors/dim/dim_stage2_v16_pln_1x1_1000k_comp1k.py +++ b/configs/mattors/dim/dim_stage2_v16_pln_1x1_1000k_comp1k.py @@ -13,7 +13,7 @@ # dataset settings dataset_type = 'AdobeComp1kDataset' -data_root = './data/adobe_composition-1k/' +data_root = 'data/adobe_composition-1k' img_norm_cfg = dict( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], to_rgb=True) train_pipeline = [ @@ -72,17 +72,17 @@ workers_per_gpu=4, train=dict( type=dataset_type, - ann_file=data_root + 'training_list.json', + ann_file=f'{data_root}/training_list.json', data_prefix=data_root, pipeline=train_pipeline), val=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), test=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) diff --git a/configs/mattors/dim/dim_stage3_v16_pln_1x1_1000k_comp1k.py b/configs/mattors/dim/dim_stage3_v16_pln_1x1_1000k_comp1k.py index da453075db..7a7fca40cf 100644 --- a/configs/mattors/dim/dim_stage3_v16_pln_1x1_1000k_comp1k.py +++ b/configs/mattors/dim/dim_stage3_v16_pln_1x1_1000k_comp1k.py @@ -15,7 +15,7 @@ # dataset settings dataset_type = 'AdobeComp1kDataset' -data_root = './data/adobe_composition-1k/' +data_root = 'data/adobe_composition-1k' img_norm_cfg = dict( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], to_rgb=True) train_pipeline = [ @@ -74,17 +74,17 @@ workers_per_gpu=4, train=dict( type=dataset_type, - ann_file=data_root + 'training_list.json', + ann_file=f'{data_root}/training_list.json', data_prefix=data_root, pipeline=train_pipeline), val=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), test=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) diff --git a/configs/mattors/gca/baseline_dimaug_r34_4x10_200k_comp1k.py b/configs/mattors/gca/baseline_dimaug_r34_4x10_200k_comp1k.py index b82a1382e9..fc27a60528 100644 --- a/configs/mattors/gca/baseline_dimaug_r34_4x10_200k_comp1k.py +++ b/configs/mattors/gca/baseline_dimaug_r34_4x10_200k_comp1k.py @@ -21,7 +21,7 @@ # dataset settings dataset_type = 'AdobeComp1kDataset' -data_root = './data/adobe_composition-1k/' +data_root = 'data/adobe_composition-1k' bg_dir = './data/coco/train2017' img_norm_cfg = dict( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], to_rgb=True) @@ -76,17 +76,17 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'training_list.json', + ann_file=f'{data_root}/training_list.json', data_prefix=data_root, pipeline=train_pipeline), val=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), test=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) diff --git a/configs/mattors/gca/baseline_r34_4x10_200k_comp1k.py b/configs/mattors/gca/baseline_r34_4x10_200k_comp1k.py index 606038a56a..cf09dd7542 100644 --- a/configs/mattors/gca/baseline_r34_4x10_200k_comp1k.py +++ b/configs/mattors/gca/baseline_r34_4x10_200k_comp1k.py @@ -21,7 +21,7 @@ # dataset settings dataset_type = 'AdobeComp1kDataset' -data_root = './data/adobe_composition-1k/' +data_root = 'data/adobe_composition-1k' bg_dir = './data/coco/train2017' img_norm_cfg = dict( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], to_rgb=True) @@ -32,12 +32,12 @@ dict( type='CompositeFg', fg_dirs=[ - data_root + 'Training_set/Adobe-licensed images/fg', - data_root + 'Training_set/Other/fg' + f'{data_root}/Training_set/Adobe-licensed images/fg', + f'{data_root}/Training_set/Other/fg' ], alpha_dirs=[ - data_root + 'Training_set/Adobe-licensed images/alpha', - data_root + 'Training_set/Other/alpha' + f'{data_root}/Training_set/Adobe-licensed images/alpha', + f'{data_root}/Training_set/Other/alpha' ]), dict( type='RandomAffine', @@ -87,17 +87,17 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'training_list.json', + ann_file=f'{data_root}/training_list.json', data_prefix=data_root, pipeline=train_pipeline), val=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), test=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) diff --git a/configs/mattors/gca/gca_dimaug_r34_4x10_200k_comp1k.py b/configs/mattors/gca/gca_dimaug_r34_4x10_200k_comp1k.py index 53e50d4481..34e906bc15 100644 --- a/configs/mattors/gca/gca_dimaug_r34_4x10_200k_comp1k.py +++ b/configs/mattors/gca/gca_dimaug_r34_4x10_200k_comp1k.py @@ -21,7 +21,7 @@ # dataset settings dataset_type = 'AdobeComp1kDataset' -data_root = './data/adobe_composition-1k/' +data_root = 'data/adobe_composition-1k' bg_dir = './data/coco/train2017' img_norm_cfg = dict( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], to_rgb=True) @@ -76,17 +76,17 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'training_list.json', + ann_file=f'{data_root}/training_list.json', data_prefix=data_root, pipeline=train_pipeline), val=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), test=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) diff --git a/configs/mattors/gca/gca_r34_4x10_200k_comp1k.py b/configs/mattors/gca/gca_r34_4x10_200k_comp1k.py index 1ecc90ef03..3875120c2a 100644 --- a/configs/mattors/gca/gca_r34_4x10_200k_comp1k.py +++ b/configs/mattors/gca/gca_r34_4x10_200k_comp1k.py @@ -21,7 +21,7 @@ # dataset settings dataset_type = 'AdobeComp1kDataset' -data_root = './data/adobe_composition-1k/' +data_root = 'data/adobe_composition-1k' bg_dir = './data/coco/train2017' img_norm_cfg = dict( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], to_rgb=True) @@ -32,12 +32,12 @@ dict( type='CompositeFg', fg_dirs=[ - data_root + 'Training_set/Adobe-licensed images/fg', - data_root + 'Training_set/Other/fg' + f'{data_root}/Training_set/Adobe-licensed images/fg', + f'{data_root}/Training_set/Other/fg' ], alpha_dirs=[ - data_root + 'Training_set/Adobe-licensed images/alpha', - data_root + 'Training_set/Other/alpha' + f'{data_root}/Training_set/Adobe-licensed images/alpha', + f'{data_root}/Training_set/Other/alpha' ]), dict( type='RandomAffine', @@ -87,17 +87,17 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'training_list.json', + ann_file=f'{data_root}/training_list.json', data_prefix=data_root, pipeline=train_pipeline), val=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), test=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) diff --git a/configs/mattors/indexnet/indexnet_dimaug_mobv2_1x16_78k_comp1k.py b/configs/mattors/indexnet/indexnet_dimaug_mobv2_1x16_78k_comp1k.py index 570ed71f09..7549373eb8 100644 --- a/configs/mattors/indexnet/indexnet_dimaug_mobv2_1x16_78k_comp1k.py +++ b/configs/mattors/indexnet/indexnet_dimaug_mobv2_1x16_78k_comp1k.py @@ -15,7 +15,7 @@ # dataset settings dataset_type = 'AdobeComp1kDataset' -data_root = './data/adobe_composition-1k/' +data_root = 'data/adobe_composition-1k' img_norm_cfg = dict( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], to_rgb=True) train_pipeline = [ @@ -76,17 +76,17 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'training_list.json', + ann_file=f'{data_root}/training_list.json', data_prefix=data_root, pipeline=train_pipeline), val=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), test=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) diff --git a/configs/mattors/indexnet/indexnet_mobv2_1x16_78k_comp1k.py b/configs/mattors/indexnet/indexnet_mobv2_1x16_78k_comp1k.py index 750c726e0b..3ce91b9746 100644 --- a/configs/mattors/indexnet/indexnet_mobv2_1x16_78k_comp1k.py +++ b/configs/mattors/indexnet/indexnet_mobv2_1x16_78k_comp1k.py @@ -15,7 +15,7 @@ # dataset settings dataset_type = 'AdobeComp1kDataset' -data_root = './data/adobe_composition-1k/' +data_root = 'data/adobe_composition-1k' img_norm_cfg = dict( mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225], to_rgb=True) train_pipeline = [ @@ -98,17 +98,17 @@ test_dataloader=dict(samples_per_gpu=1), train=dict( type=dataset_type, - ann_file=data_root + 'training_list.json', + ann_file=f'{data_root}/training_list.json', data_prefix=data_root, pipeline=train_pipeline), val=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), test=dict( type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) diff --git a/configs/restorers/edsr/edsr_x2c64b16_g1_300k_div2k.py b/configs/restorers/edsr/edsr_x2c64b16_g1_300k_div2k.py index 3f37428eb0..e2793b7d6f 100644 --- a/configs/restorers/edsr/edsr_x2c64b16_g1_300k_div2k.py +++ b/configs/restorers/edsr/edsr_x2c64b16_g1_300k_div2k.py @@ -88,15 +88,15 @@ scale=scale)), val=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx2', - gt_folder='./data/val_set5/Set5_mod12', + lq_folder='data/val_set5/Set5_bicLRx2', + gt_folder='data/val_set5/Set5_mod12', pipeline=test_pipeline, scale=scale, filename_tmpl='{}'), test=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx2', - gt_folder='./data/val_set5/Set5_mod12', + lq_folder='data/val_set5/Set5_bicLRx2', + gt_folder='data/val_set5/Set5_mod12', pipeline=test_pipeline, scale=scale, filename_tmpl='{}')) diff --git a/configs/restorers/edsr/edsr_x3c64b16_g1_300k_div2k.py b/configs/restorers/edsr/edsr_x3c64b16_g1_300k_div2k.py index c47151d47c..aef426db1f 100644 --- a/configs/restorers/edsr/edsr_x3c64b16_g1_300k_div2k.py +++ b/configs/restorers/edsr/edsr_x3c64b16_g1_300k_div2k.py @@ -88,15 +88,15 @@ scale=scale)), val=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx3', - gt_folder='./data/val_set5/Set5_mod12', + lq_folder='data/val_set5/Set5_bicLRx3', + gt_folder='data/val_set5/Set5_mod12', pipeline=test_pipeline, scale=scale, filename_tmpl='{}'), test=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx3', - gt_folder='./data/val_set5/Set5_mod12', + lq_folder='data/val_set5/Set5_bicLRx3', + gt_folder='data/val_set5/Set5_mod12', pipeline=test_pipeline, scale=scale, filename_tmpl='{}')) diff --git a/configs/restorers/edsr/edsr_x4c64b16_g1_300k_div2k.py b/configs/restorers/edsr/edsr_x4c64b16_g1_300k_div2k.py index ef6827b0c4..37723040e2 100644 --- a/configs/restorers/edsr/edsr_x4c64b16_g1_300k_div2k.py +++ b/configs/restorers/edsr/edsr_x4c64b16_g1_300k_div2k.py @@ -88,15 +88,15 @@ scale=scale)), val=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx4', - gt_folder='./data/val_set5/Set5', + lq_folder='data/val_set5/Set5_bicLRx4', + gt_folder='data/val_set5/Set5', pipeline=test_pipeline, scale=scale, filename_tmpl='{}'), test=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx4', - gt_folder='./data/val_set5/Set5', + lq_folder='data/val_set5/Set5_bicLRx4', + gt_folder='data/val_set5/Set5', pipeline=test_pipeline, scale=scale, filename_tmpl='{}')) diff --git a/configs/restorers/edvr/edvrm_wotsa_x4_g8_600k_reds.py b/configs/restorers/edvr/edvrm_wotsa_x4_g8_600k_reds.py index efa2cadcad..b32a7b72a2 100644 --- a/configs/restorers/edvr/edvrm_wotsa_x4_g8_600k_reds.py +++ b/configs/restorers/edvr/edvrm_wotsa_x4_g8_600k_reds.py @@ -88,8 +88,8 @@ times=1000, dataset=dict( type=train_dataset_type, - lq_folder='./data/REDS/train_sharp_bicubic/X4', - gt_folder='./data/REDS/train_sharp', + lq_folder='data/REDS/train_sharp_bicubic/X4', + gt_folder='data/REDS/train_sharp', ann_file='data/REDS/meta_info_REDS_GT.txt', num_input_frames=5, pipeline=train_pipeline, @@ -98,8 +98,8 @@ test_mode=False)), val=dict( type=val_dataset_type, - lq_folder='./data/REDS/train_sharp_bicubic/X4', - gt_folder='./data/REDS/train_sharp', + lq_folder='data/REDS/train_sharp_bicubic/X4', + gt_folder='data/REDS/train_sharp', ann_file='data/REDS/meta_info_REDS_GT.txt', num_input_frames=5, pipeline=test_pipeline, @@ -108,8 +108,8 @@ test_mode=True), test=dict( type=val_dataset_type, - lq_folder='./data/REDS/train_sharp_bicubic/X4', - gt_folder='./data/REDS/train_sharp', + lq_folder='data/REDS/train_sharp_bicubic/X4', + gt_folder='data/REDS/train_sharp', ann_file='data/REDS/meta_info_REDS_GT.txt', num_input_frames=5, pipeline=test_pipeline, diff --git a/configs/restorers/edvr/edvrm_x4_g8_600k_reds.py b/configs/restorers/edvr/edvrm_x4_g8_600k_reds.py index 155eef6ad2..e4502ee0ec 100644 --- a/configs/restorers/edvr/edvrm_x4_g8_600k_reds.py +++ b/configs/restorers/edvr/edvrm_x4_g8_600k_reds.py @@ -88,8 +88,8 @@ times=1000, dataset=dict( type=train_dataset_type, - lq_folder='./data/REDS/train_sharp_bicubic/X4', - gt_folder='./data/REDS/train_sharp', + lq_folder='data/REDS/train_sharp_bicubic/X4', + gt_folder='data/REDS/train_sharp', ann_file='data/REDS/meta_info_REDS_GT.txt', num_input_frames=5, pipeline=train_pipeline, @@ -98,8 +98,8 @@ test_mode=False)), val=dict( type=val_dataset_type, - lq_folder='./data/REDS/train_sharp_bicubic/X4', - gt_folder='./data/REDS/train_sharp', + lq_folder='data/REDS/train_sharp_bicubic/X4', + gt_folder='data/REDS/train_sharp', ann_file='data/REDS/meta_info_REDS_GT.txt', num_input_frames=5, pipeline=test_pipeline, @@ -108,8 +108,8 @@ test_mode=True), test=dict( type=val_dataset_type, - lq_folder='./data/REDS/train_sharp_bicubic/X4', - gt_folder='./data/REDS/train_sharp', + lq_folder='data/REDS/train_sharp_bicubic/X4', + gt_folder='data/REDS/train_sharp', ann_file='data/REDS/meta_info_REDS_GT.txt', num_input_frames=5, pipeline=test_pipeline, diff --git a/configs/restorers/esrgan/esrgan_psnr_x4c64b23g32_g1_1000k_div2k.py b/configs/restorers/esrgan/esrgan_psnr_x4c64b23g32_g1_1000k_div2k.py index c5f165e1f5..75726271b3 100644 --- a/configs/restorers/esrgan/esrgan_psnr_x4c64b23g32_g1_1000k_div2k.py +++ b/configs/restorers/esrgan/esrgan_psnr_x4c64b23g32_g1_1000k_div2k.py @@ -85,15 +85,15 @@ scale=scale)), val=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx4', - gt_folder='./data/val_set5/Set5', + lq_folder='data/val_set5/Set5_bicLRx4', + gt_folder='data/val_set5/Set5', pipeline=test_pipeline, scale=scale, filename_tmpl='{}'), test=dict( type=val_dataset_type, - lq_folder='./data/val_set14/Set14_bicLRx4', - gt_folder='./data/val_set14/Set14', + lq_folder='data/val_set14/Set14_bicLRx4', + gt_folder='data/val_set14/Set14', pipeline=test_pipeline, scale=scale, filename_tmpl='{}')) diff --git a/configs/restorers/esrgan/esrgan_x4c64b23g32_g1_400k_div2k.py b/configs/restorers/esrgan/esrgan_x4c64b23g32_g1_400k_div2k.py index 73a198ecfb..11e9c9d076 100644 --- a/configs/restorers/esrgan/esrgan_x4c64b23g32_g1_400k_div2k.py +++ b/configs/restorers/esrgan/esrgan_x4c64b23g32_g1_400k_div2k.py @@ -102,15 +102,15 @@ scale=scale)), val=dict( type=val_dataset_type, - lq_folder='./data/val_set14/Set14_bicLRx4', - gt_folder='./data/val_set14/Set14', + lq_folder='data/val_set14/Set14_bicLRx4', + gt_folder='data/val_set14/Set14', pipeline=test_pipeline, scale=scale, filename_tmpl='{}'), test=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx4', - gt_folder='./data/val_set5/Set5', + lq_folder='data/val_set5/Set5_bicLRx4', + gt_folder='data/val_set5/Set5', pipeline=test_pipeline, scale=scale, filename_tmpl='{}')) diff --git a/configs/restorers/srcnn/srcnn_x4k915_g1_1000k_div2k.py b/configs/restorers/srcnn/srcnn_x4k915_g1_1000k_div2k.py index b6728ec00b..d8f16e16a8 100644 --- a/configs/restorers/srcnn/srcnn_x4k915_g1_1000k_div2k.py +++ b/configs/restorers/srcnn/srcnn_x4k915_g1_1000k_div2k.py @@ -83,15 +83,15 @@ scale=scale)), val=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx4', - gt_folder='./data/val_set5/Set5', + lq_folder='data/val_set5/Set5_bicLRx4', + gt_folder='data/val_set5/Set5', pipeline=test_pipeline, scale=scale, filename_tmpl='{}'), test=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx4', - gt_folder='./data/val_set5/Set5', + lq_folder='data/val_set5/Set5_bicLRx4', + gt_folder='data/val_set5/Set5', pipeline=test_pipeline, scale=scale, filename_tmpl='{}')) diff --git a/configs/restorers/srresnet_srgan/msrresnet_x4c64b16_g1_1000k_div2k.py b/configs/restorers/srresnet_srgan/msrresnet_x4c64b16_g1_1000k_div2k.py index 4b1221ece4..8fe2c2eeb1 100644 --- a/configs/restorers/srresnet_srgan/msrresnet_x4c64b16_g1_1000k_div2k.py +++ b/configs/restorers/srresnet_srgan/msrresnet_x4c64b16_g1_1000k_div2k.py @@ -85,15 +85,15 @@ scale=scale)), val=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx4', - gt_folder='./data/val_set5/Set5', + lq_folder='data/val_set5/Set5_bicLRx4', + gt_folder='data/val_set5/Set5', pipeline=test_pipeline, scale=scale, filename_tmpl='{}'), test=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx4', - gt_folder='./data/val_set5/Set5', + lq_folder='data/val_set5/Set5_bicLRx4', + gt_folder='data/val_set5/Set5', pipeline=test_pipeline, scale=scale, filename_tmpl='{}')) diff --git a/configs/restorers/srresnet_srgan/srgan_x4c64b16_g1_1000k_div2k.py b/configs/restorers/srresnet_srgan/srgan_x4c64b16_g1_1000k_div2k.py index bf4c00b21d..f1985e6512 100644 --- a/configs/restorers/srresnet_srgan/srgan_x4c64b16_g1_1000k_div2k.py +++ b/configs/restorers/srresnet_srgan/srgan_x4c64b16_g1_1000k_div2k.py @@ -102,15 +102,15 @@ scale=scale)), val=dict( type=val_dataset_type, - lq_folder='./data/val_set14/Set14_bicLRx4', - gt_folder='./data/val_set14/Set14', + lq_folder='data/val_set14/Set14_bicLRx4', + gt_folder='data/val_set14/Set14', pipeline=test_pipeline, scale=scale, filename_tmpl='{}'), test=dict( type=val_dataset_type, - lq_folder='./data/val_set14/Set14_bicLRx4', - gt_folder='./data/val_set14/Set14', + lq_folder='data/val_set14/Set14_bicLRx4', + gt_folder='data/val_set14/Set14', pipeline=test_pipeline, scale=scale, filename_tmpl='{}')) diff --git a/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_246200_summer2winter.py b/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_246200_summer2winter.py index a769564c4a..239ed8a56d 100644 --- a/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_246200_summer2winter.py +++ b/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_246200_summer2winter.py @@ -85,7 +85,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/unpaired/summer2winter_yosemite' +data_root = 'data/unpaired/summer2winter_yosemite' data = dict( samples_per_gpu=1, workers_per_gpu=4, diff --git a/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_266800_horse2zebra.py b/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_266800_horse2zebra.py index 1ca06b5a1f..ca4c538600 100644 --- a/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_266800_horse2zebra.py +++ b/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_266800_horse2zebra.py @@ -85,7 +85,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/unpaired/horse2zebra' +data_root = 'data/unpaired/horse2zebra' data = dict( samples_per_gpu=1, workers_per_gpu=4, diff --git a/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_80k_facades.py b/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_80k_facades.py index ccffcf45f1..b81c354c10 100644 --- a/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_80k_facades.py +++ b/configs/synthesizers/cyclegan/cyclegan_lsgan_id0_resnet_in_1x1_80k_facades.py @@ -85,7 +85,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/unpaired/facades' +data_root = 'data/unpaired/facades' data = dict( samples_per_gpu=1, workers_per_gpu=4, diff --git a/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_246200_summer2winter.py b/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_246200_summer2winter.py index 56671f983b..05b100e43c 100644 --- a/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_246200_summer2winter.py +++ b/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_246200_summer2winter.py @@ -85,7 +85,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/unpaired/summer2winter_yosemite' +data_root = 'data/unpaired/summer2winter_yosemite' data = dict( samples_per_gpu=1, workers_per_gpu=4, diff --git a/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_266800_horse2zebra.py b/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_266800_horse2zebra.py index 942a3538b7..7f8e7d3272 100644 --- a/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_266800_horse2zebra.py +++ b/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_266800_horse2zebra.py @@ -85,7 +85,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/unpaired/horse2zebra' +data_root = 'data/unpaired/horse2zebra' data = dict( samples_per_gpu=1, workers_per_gpu=4, diff --git a/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_80k_facades.py b/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_80k_facades.py index e646df8451..a25db2c0ed 100644 --- a/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_80k_facades.py +++ b/configs/synthesizers/cyclegan/cyclegan_lsgan_resnet_in_1x1_80k_facades.py @@ -85,7 +85,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/unpaired/facades' +data_root = 'data/unpaired/facades' data = dict( samples_per_gpu=1, workers_per_gpu=4, diff --git a/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_1x1_80k_facades.py b/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_1x1_80k_facades.py index 3846d305de..19037ed396 100644 --- a/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_1x1_80k_facades.py +++ b/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_1x1_80k_facades.py @@ -76,7 +76,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/paired/facades' +data_root = 'data/paired/facades' data = dict( samples_per_gpu=1, workers_per_gpu=4, diff --git a/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_a2b_1x1_219200_maps.py b/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_a2b_1x1_219200_maps.py index a286d4c6ac..d61faeb550 100644 --- a/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_a2b_1x1_219200_maps.py +++ b/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_a2b_1x1_219200_maps.py @@ -76,7 +76,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/paired/maps' +data_root = 'data/paired/maps' data = dict( samples_per_gpu=1, workers_per_gpu=4, diff --git a/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_b2a_1x1_219200_maps.py b/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_b2a_1x1_219200_maps.py index 5db8715d9d..d2076eb49e 100644 --- a/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_b2a_1x1_219200_maps.py +++ b/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_b2a_1x1_219200_maps.py @@ -76,7 +76,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/paired/maps' +data_root = 'data/paired/maps' data = dict( samples_per_gpu=1, workers_per_gpu=4, diff --git a/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_wo_jitter_flip_1x4_186840_edges2shoes.py b/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_wo_jitter_flip_1x4_186840_edges2shoes.py index d09fe879ea..e9fe4f21f0 100644 --- a/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_wo_jitter_flip_1x4_186840_edges2shoes.py +++ b/configs/synthesizers/pix2pix/pix2pix_vanilla_unet_bn_wo_jitter_flip_1x4_186840_edges2shoes.py @@ -76,7 +76,7 @@ keys=['img_a', 'img_b'], meta_keys=['img_a_path', 'img_b_path']) ] -data_root = './data/paired/edges2shoes' +data_root = 'data/paired/edges2shoes' data = dict( train_dataloader=dict( samples_per_gpu=4, workers_per_gpu=4, drop_last=True), diff --git a/docs/config_generation.md b/docs/config_generation.md index 1a8076baf7..296ea699d6 100644 --- a/docs/config_generation.md +++ b/docs/config_generation.md @@ -107,7 +107,7 @@ test_pipeline = [ keys=['img_a', 'img_b'], # The keys of images meta_keys=['img_a_path', 'img_b_path']) # The meta keys of images ] -data_root = './data/pix2pix/facades' # The root path of data +data_root = 'data/pix2pix/facades' # The root path of data data = dict( samples_per_gpu=1, # Batch size of a single GPU workers_per_gpu=4, # Worker to pre-fetch data for each single GPU diff --git a/docs/config_inpainting.md b/docs/config_inpainting.md index b4e9b1c366..58b7805a0c 100644 --- a/docs/config_inpainting.md +++ b/docs/config_inpainting.md @@ -97,7 +97,7 @@ train_pipeline = [ test_pipeline = train_pipeline # Constructing testing/validation pipeline -data_root = './data/places365/' # Set data root +data_root = 'data/places365' # Set data root data = dict( samples_per_gpu=12, # Batch size of a single GPU @@ -107,13 +107,13 @@ data = dict( drop_last=True, # Whether to drop out the last batch of data train=dict( # Train dataset config type=dataset_type, - ann_file=data_root + 'train_places_img_list_total.txt', + ann_file=f'{data_root}/train_places_img_list_total.txt', data_prefix=data_root, pipeline=train_pipeline, test_mode=False), val=dict( # Validation dataset config type=dataset_type, - ann_file=data_root + 'val_places_img_list.txt', + ann_file=f'{data_root}/val_places_img_list.txt', data_prefix=data_root, pipeline=test_pipeline, test_mode=True)) diff --git a/docs/config_matting.md b/docs/config_matting.md index 4123e3495f..364e664db7 100644 --- a/docs/config_matting.md +++ b/docs/config_matting.md @@ -32,7 +32,7 @@ test_cfg = dict( # Config of testing DIM model. # data settings dataset_type = 'AdobeComp1kDataset' # Dataset type, this will be used to define the dataset. -data_root = './data/adobe_composition-1k/' # Root path of data. +data_root = 'data/adobe_composition-1k' # Root path of data. img_norm_cfg = dict( # Image normalization config to normalize the input images. mean=[0.485, 0.456, 0.406], # Mean values used to pre-training the pre-trained backbone models. std=[0.229, 0.224, 0.225], # Standard variance used to pre-training the pre-trained backbone models. @@ -123,17 +123,17 @@ data = dict( drop_last=True, # Use drop_last in data_loader. train=dict( # Train dataset config. type=dataset_type, # Type of dataset. - ann_file=data_root + 'training_list.json', # Path of annotation file + ann_file=f'{data_root}/training_list.json', # Path of annotation file data_prefix=data_root, # Prefix of image path. pipeline=train_pipeline), # See above for train_pipeline val=dict( # Validation dataset config. type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline), # See above for test_pipeline test=dict( # Test dataset config. type=dataset_type, - ann_file=data_root + 'test_list.json', + ann_file=f'{data_root}/test_list.json', data_prefix=data_root, pipeline=test_pipeline)) # See above for test_pipeline diff --git a/docs/config_restoration.md b/docs/config_restoration.md index d8d6941a2c..258aba8ec9 100644 --- a/docs/config_restoration.md +++ b/docs/config_restoration.md @@ -110,16 +110,16 @@ data = dict( val_workers_per_gpu=1, # Worker to pre-fetch data for each single GPU for validation val=dict( type=val_dataset_type, # Type of dataset - lq_folder='./data/val_set5/Set5_bicLRx2', # Path for lq folder - gt_folder='./data/val_set5/Set5_mod12', # Path for gt folder + lq_folder='data/val_set5/Set5_bicLRx2', # Path for lq folder + gt_folder='data/val_set5/Set5_mod12', # Path for gt folder pipeline=test_pipeline, # See above for test_pipeline scale=scale, # Scale factor for upsampling filename_tmpl='{}'), # filename template # test test=dict( type=val_dataset_type, # Type of dataset - lq_folder='./data/val_set5/Set5_bicLRx2', # Path for lq folder - gt_folder='./data/val_set5/Set5_mod12', # Path for gt folder + lq_folder='data/val_set5/Set5_bicLRx2', # Path for lq folder + gt_folder='data/val_set5/Set5_mod12', # Path for gt folder pipeline=test_pipeline, # See above for test_pipeline scale=scale, # Scale factor for upsampling filename_tmpl='{}')) # filename template diff --git a/docs/faq.md b/docs/faq.md index 705b15a2a7..59a7bc1cf9 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -50,8 +50,8 @@ data = dict( val_dataloader = dict(samples_per_gpu=1, workers_per_gpu=1), val=dict( type=val_dataset_type, - lq_folder='./data/val_set5/Set5_bicLRx2', - gt_folder='./data/val_set5/Set5_mod12', + lq_folder='data/val_set5/Set5_bicLRx2', + gt_folder='data/val_set5/Set5_mod12', pipeline=test_pipeline, scale=scale, filename_tmpl='{}'), diff --git a/tests/test_datasets.py b/tests/test_datasets.py index 8e2b43fb1e..01e9791fb5 100644 --- a/tests/test_datasets.py +++ b/tests/test_datasets.py @@ -35,7 +35,7 @@ class TestMattingDatasets(object): @classmethod def setup_class(cls): - # creat para for creating a dataset. + # create para for creating a dataset. cls.data_prefix = Path(__file__).parent / 'data' cls.ann_file = osp.join(cls.data_prefix, 'test_list.json') cls.pipeline = [