-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathparser_v7.py
executable file
·46 lines (32 loc) · 1.92 KB
/
parser_v7.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import argparse
def parser_arguments():
'''
Manage the input from the terminal.
:return: parser
'''
parser = argparse.ArgumentParser(description='DeGirum Open Image Dataset Downloader')
parser.add_argument('--dataset', required=False, default="open-images-v7",
help='public datasets')
parser.add_argument('--dataset-dir', required=False, default="./datasets/OIDv7",
help='path to the downloaded datasets')
parser.add_argument('--export-dir', required=False, default="exported_dataset",
help='where to copy the exported dataset dir')
parser.add_argument('--export-name', required=False, default=None,
help='where to copy the exported dataset name')
parser.add_argument('--label-types', required=False, nargs='+', default=['detections'],
help="list of label types: 'detections' or 'classifications' or ...")
parser.add_argument('--classes', required=True, nargs='+',
metavar="list of classes",
help="Sequence of 'strings' of the wanted classes")
parser.add_argument('--splits', required=True, nargs='+',
metavar="'train' or 'validation' or 'test'")
parser.add_argument('--dataset-format', required=False, default='yolov5', choices=['yolov5', 'coco'],
help='dataset export format')
parser.add_argument('--remove-nonoverlap', required=False, action='store_true',
help="example: eye and face")
parser.add_argument('--max-samples', required=False, type=int, nargs='+', default=[None]*3,
metavar="integer number",
help='Optional limit on number of images to download')
parser.add_argument('--seed', required=False, type=int, default=None,
metavar="integer number")
return parser.parse_args()