Skip to content

Commit a4e3ca5

Browse files
authored
[Fix] Use underline for required aruments in python files (open-mmlab#822)
1 parent 091348d commit a4e3ca5

7 files changed

+15
-15
lines changed

demo/generation_demo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ def parse_args():
1313
parser = argparse.ArgumentParser(description='Generation demo')
1414
parser.add_argument('config', help='test config file path')
1515
parser.add_argument('checkpoint', help='checkpoint file')
16-
parser.add_argument('img-path', help='path to input image file')
17-
parser.add_argument('save-path', help='path to save generation result')
16+
parser.add_argument('img_path', help='path to input image file')
17+
parser.add_argument('save_path', help='path to save generation result')
1818
parser.add_argument(
1919
'--unpaired-path', default=None, help='path to unpaired image file')
2020
parser.add_argument(

demo/inpainting_demo.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ def parse_args():
1212
parser = argparse.ArgumentParser(description='Inpainting demo')
1313
parser.add_argument('config', help='test config file path')
1414
parser.add_argument('checkpoint', help='checkpoint file')
15-
parser.add_argument('masked-img-path', help='path to input image file')
16-
parser.add_argument('mask-path', help='path to input mask file')
17-
parser.add_argument('save-path', help='path to save inpainting result')
15+
parser.add_argument('masked_img_path', help='path to input image file')
16+
parser.add_argument('mask_path', help='path to input mask file')
17+
parser.add_argument('save_path', help='path to save inpainting result')
1818
parser.add_argument(
1919
'--imshow', action='store_true', help='whether show image with opencv')
2020
parser.add_argument('--device', type=int, default=0, help='CUDA device id')

demo/matting_demo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def parse_args():
1212
parser.add_argument('config', help='test config file path')
1313
parser.add_argument('checkpoint', help='checkpoint file')
1414
parser.add_argument('img_path', help='path to input image file')
15-
parser.add_argument('trimap-path', help='path to input trimap file')
16-
parser.add_argument('save-path', help='path to save alpha matte result')
15+
parser.add_argument('trimap_path', help='path to input trimap file')
16+
parser.add_argument('save_path', help='path to save alpha matte result')
1717
parser.add_argument(
1818
'--imshow', action='store_true', help='whether show image with opencv')
1919
parser.add_argument('--device', type=int, default=0, help='CUDA device id')

demo/restoration_face_demo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def parse_args():
1414
parser = argparse.ArgumentParser(description='Restoration demo')
1515
parser.add_argument('config', help='test config file path')
1616
parser.add_argument('checkpoint', help='checkpoint file')
17-
parser.add_argument('img-path', help='path to input image file')
18-
parser.add_argument('save-path', help='path to save restoration result')
17+
parser.add_argument('img_path', help='path to input image file')
18+
parser.add_argument('save_path', help='path to save restoration result')
1919
parser.add_argument(
2020
'--upscale-factor',
2121
type=int,

demo/restoration_video_demo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def parse_args():
1919
parser = argparse.ArgumentParser(description='Restoration demo')
2020
parser.add_argument('config', help='test config file path')
2121
parser.add_argument('checkpoint', help='checkpoint file')
22-
parser.add_argument('input-dir', help='directory of the input video')
23-
parser.add_argument('output-dir', help='directory of the output video')
22+
parser.add_argument('input_dir', help='directory of the input video')
23+
parser.add_argument('output_dir', help='directory of the output video')
2424
parser.add_argument(
2525
'--start-idx',
2626
type=int,

demo/video_interpolation_demo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def parse_args():
1414
parser = argparse.ArgumentParser(description='Restoration demo')
1515
parser.add_argument('config', help='test config file path')
1616
parser.add_argument('checkpoint', help='checkpoint file')
17-
parser.add_argument('input-dir', help='directory of the input video')
18-
parser.add_argument('output-dir', help='directory of the output video')
17+
parser.add_argument('input_dir', help='directory of the input video')
18+
parser.add_argument('output_dir', help='directory of the output video')
1919
parser.add_argument(
2020
'--fps',
2121
type=float,

tools/evaluate_comp1k.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ def parse_args():
101101
parser = argparse.ArgumentParser(
102102
description='evaluate composition-1k prediction result')
103103
parser.add_argument(
104-
'pred-root', help='Path to the predicted alpha matte folder')
104+
'pred_root', help='Path to the predicted alpha matte folder')
105105
parser.add_argument(
106-
'gt-root', help='Path to the ground truth alpha matte folder')
106+
'gt_root', help='Path to the ground truth alpha matte folder')
107107
parser.add_argument(
108108
'--trimap-root',
109109
help='Path to trimap folder. If not specified, '

0 commit comments

Comments
 (0)