def arg_params_yolo(): # class YOLO defines the default value, so suppress any default HERE parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS) # Command line options parser.add_argument('-w', '--path_weights', type=str, help='path to model weight file') parser.add_argument('-a', '--path_anchors', type=str, help='path to anchor definitions') parser.add_argument('--model_image_size', type=int, nargs=2, required=False, help='input image size for the model', default=(None, None)) parser.add_argument('-c', '--path_classes', type=str, help='path to class definitions') parser.add_argument('--nb_gpu', type=int, help='Number of GPU to use', default=str(YOLO.get_defaults("nb_gpu"))) parser.add_argument('-o', '--path_output', required=False, type=str, default='.', help='path to the output directory') return parser
# class YOLO defines the default value, so suppress any default here # When detecting in VIDEO # --model_path k_weights/yolov3-tiny.h5 --anchors_path model_data/tiny_yolo_anchors.txt # --input test_data/cold_lake_trafic.mp4 # When detecting only in IMAGE # --model_path k_weights/yolov3-tiny.h5 --anchors_path model_data/tiny_yolo_anchors.txt # --image --input test_data/cold_lake_trafic.mp4 parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS) ''' Command line options ''' parser.add_argument('--model_path', type=str, help='path to model weight file, default ' + YOLO.get_defaults("model_path")) parser.add_argument('--anchors_path', type=str, help='path to anchor definitions, default ' + YOLO.get_defaults("anchors_path")) parser.add_argument('--classes_path', type=str, help='path to class definitions, default ' + YOLO.get_defaults("classes_path")) parser.add_argument('--gpu_num', type=int, help='Number of GPUs to use, default ' + str(YOLO.get_defaults("gpu_num")))