-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathargument_parser.py
More file actions
31 lines (23 loc) · 1.1 KB
/
argument_parser.py
File metadata and controls
31 lines (23 loc) · 1.1 KB
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
import argparse
INFO = 'Preprocessing CNN'
def parse_args():
"""
Argument parser
:return: args: All arguments are parsed to the args.
"""
parser = argparse.ArgumentParser(description=INFO,
formatter_class=argparse.RawDescriptionHelpFormatter)
# ------------------------------------------Main information-------------------------------------------------------
parser.add_argument("--path_target",
type=str,
required=True,
default=r"/home/silvie/Pictures/Tuberculose_images_divided",
help="This is the root for the filetree of the processed images.")
parser.add_argument("--path_source",
type=str,
required=True,
default=r"/home/silvie/Pictures/ChinaSet_AllFiles/CXR_png",
help="This path is command line input from the user. This is where the downloaded raw images should be stored")
# parse all arguments
args = parser.parse_args()
return args