diff --git a/tools/dataset_converters/df2k_ost/preprocess_df2k_ost_dataset.py b/tools/dataset_converters/df2k_ost/preprocess_df2k_ost_dataset.py index fc6f920b7e..e540ab6f24 100644 --- a/tools/dataset_converters/df2k_ost/preprocess_df2k_ost_dataset.py +++ b/tools/dataset_converters/df2k_ost/preprocess_df2k_ost_dataset.py @@ -307,23 +307,31 @@ def parse_args(): parser.add_argument('--data-root', help='dataset root') parser.add_argument( '--crop-size', + type=int, nargs='?', default=480, help='cropped size for HR images') parser.add_argument( - '--step', nargs='?', default=240, help='step size for HR images') + '--step', + type=int, + nargs='?', + default=240, + help='step size for HR images') parser.add_argument( '--thresh-size', + type=int, nargs='?', default=0, help='threshold size for HR images') parser.add_argument( '--compression-level', + type=int, nargs='?', default=3, help='compression level when save png images') parser.add_argument( '--n-thread', + type=int, nargs='?', default=20, help='thread number when using multiprocessing') diff --git a/tools/dataset_converters/div2k/preprocess_div2k_dataset.py b/tools/dataset_converters/div2k/preprocess_div2k_dataset.py index ad849d08e9..aed02a09c3 100644 --- a/tools/dataset_converters/div2k/preprocess_div2k_dataset.py +++ b/tools/dataset_converters/div2k/preprocess_div2k_dataset.py @@ -373,11 +373,13 @@ def parse_args(): '--thresh-size', nargs='?', default=0, + type=int, help='threshold size for HR images') parser.add_argument( '--compression-level', nargs='?', default=3, + type=int, help='compression level when save png images') parser.add_argument( '--n-thread', diff --git a/tools/dataset_converters/reds/crop_sub_images.py b/tools/dataset_converters/reds/crop_sub_images.py index 82bd908b6f..9cdabcb93c 100644 --- a/tools/dataset_converters/reds/crop_sub_images.py +++ b/tools/dataset_converters/reds/crop_sub_images.py @@ -158,23 +158,31 @@ def parse_args(): '--scales', nargs='*', default=[], help='scale factor list') parser.add_argument( '--crop-size', + type=int, nargs='?', default=480, help='cropped size for HR images') parser.add_argument( - '--step', nargs='?', default=240, help='step size for HR images') + '--step', + type=int, + nargs='?', + default=240, + help='step size for HR images') parser.add_argument( '--thresh-size', + type=int, nargs='?', default=0, help='threshold size for HR images') parser.add_argument( '--compression-level', + type=int, nargs='?', default=3, help='compression level when save png images') parser.add_argument( '--n-thread', + type=int, nargs='?', default=20, help='thread number when using multiprocessing')