parameters: ()
return_statement: return args
docstring: Parse input options of the script.
docstring_summary: Parse input options of the script.
docstring_tokens: Parse input options of the script .
function: def parse_arguments():
  	"""
  	Parse input options of the script.
  	"""
  	parser = argparse.ArgumentParser(description='Plot the precision/recall curve.')
  	parser.add_argument('path_detections', metavar='path_detections', type=str,
  						help='Path to the BB3TXT file with detections to be shown')
  	parser.add_argument('detections_mapping', metavar='detections_mapping', type=str,
  						help='Label mapping of the detections BB3TXT file. One of ' \
  						+ str(LMM.available_mappings()))
  	parser.add_argument('--path_gt', type=str, default=None,
  						help='Path to the BB3TXT ground truth file (also --gt_mapping is required)')
  	parser.add_argument('--gt_mapping', type=str, default=None,
  						help='Label mapping of the ground truth BB3TXT file. One of ' \
  						+ str(LMM.available_mappings()))
  	parser.add_argument('--confidence', type=float, default=0.5,
  						help='Minimum confidence of shown bounding boxes')
  	parser.add_argument('--path_datasets', type=str, default=None,
  						help='Path to the "datasets" folder on this machine - will be used to ' \
  						'replace the path from the test and gt BB3TXT files so we could show the ' \
  						'images even if the test was carried out on a different PC')
  	parser.add_argument('--path_pgp', type=str, default=None,
  						help='Path to the PGP file with image projection matrices and ground ' \
  						'plane equations. This allows showing the whole 3D bounding box with ' \
  						'projection to the xz plane')
  
  	args = parser.parse_args()
  
  	if not check_path(args.path_detections) or \
  			(args.path_gt is not None and not check_path(args.path_gt)) or \
  			(args.path_datasets is not None and not check_path(args.path_datasets, True)) or \
  			(args.path_pgp is not None and not check_path(args.path_pgp)):
  		parser.print_help()
  		exit(1)
  
  	if args.path_gt is not None and args.gt_mapping is None:
  		print('ERROR: Label mapping for ground truth must be provided if ground truth is provided!')
  		exit(1)
  
  	return args
function_tokens: def parse_arguments ( ) : parser = argparse . ArgumentParser ( description = 'Plot the precision/recall curve.' ) parser . add_argument ( 'path_detections' , metavar = 'path_detections' , type = str , help = 'Path to the BB3TXT file with detections to be shown' ) parser . add_argument ( 'detections_mapping' , metavar = 'detections_mapping' , type = str , help = 'Label mapping of the detections BB3TXT file. One of ' + str ( LMM . available_mappings ( ) ) ) parser . add_argument ( '--path_gt' , type = str , default = None , help = 'Path to the BB3TXT ground truth file (also --gt_mapping is required)' ) parser . add_argument ( '--gt_mapping' , type = str , default = None , help = 'Label mapping of the ground truth BB3TXT file. One of ' + str ( LMM . available_mappings ( ) ) ) parser . add_argument ( '--confidence' , type = float , default = 0.5 , help = 'Minimum confidence of shown bounding boxes' ) parser . add_argument ( '--path_datasets' , type = str , default = None , help = 'Path to the "datasets" folder on this machine - will be used to ' 'replace the path from the test and gt BB3TXT files so we could show the ' 'images even if the test was carried out on a different PC' ) parser . add_argument ( '--path_pgp' , type = str , default = None , help = 'Path to the PGP file with image projection matrices and ground ' 'plane equations. This allows showing the whole 3D bounding box with ' 'projection to the xz plane' ) args = parser . parse_args ( ) if not check_path ( args . path_detections ) or ( args . path_gt is not None and not check_path ( args . path_gt ) ) or ( args . path_datasets is not None and not check_path ( args . path_datasets , True ) ) or ( args . path_pgp is not None and not check_path ( args . path_pgp ) ) : parser . print_help ( ) exit ( 1 ) if args . path_gt is not None and args . gt_mapping is None : print ( 'ERROR: Label mapping for ground truth must be provided if ground truth is provided!' ) exit ( 1 ) return args