MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / make_parser

Function make_parser

deploy/ONNXRuntime/onnx_inference.py:17–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16
17def make_parser():
18 parser = argparse.ArgumentParser("onnxruntime inference sample")
19 parser.add_argument(
20 "-m",
21 "--model",
22 type=str,
23 default="../../bytetrack_s.onnx",
24 help="Input your onnx model.",
25 )
26 parser.add_argument(
27 "-i",
28 "--video_path",
29 type=str,
30 default='../../videos/palace.mp4',
31 help="Path to your input image.",
32 )
33 parser.add_argument(
34 "-o",
35 "--output_dir",
36 type=str,
37 default='demo_output',
38 help="Path to your output directory.",
39 )
40 parser.add_argument(
41 "-s",
42 "--score_thr",
43 type=float,
44 default=0.1,
45 help="Score threshould to filter the result.",
46 )
47 parser.add_argument(
48 "-n",
49 "--nms_thr",
50 type=float,
51 default=0.7,
52 help="NMS threshould.",
53 )
54 parser.add_argument(
55 "--input_shape",
56 type=str,
57 default="608,1088",
58 help="Specify an input shape for inference.",
59 )
60 parser.add_argument(
61 "--with_p6",
62 action="store_true",
63 help="Whether your model uses p6 in FPN/PAN.",
64 )
65 # tracking args
66 parser.add_argument("--track_thresh", type=float, default=0.5, help="tracking confidence threshold")
67 parser.add_argument("--track_buffer", type=int, default=30, help="the frames for keep lost tracks")
68 parser.add_argument("--match_thresh", type=float, default=0.8, help="matching threshold for tracking")
69 parser.add_argument('--min-box-area', type=float, default=10, help='filter out tiny boxes')
70 parser.add_argument("--mot20", dest="mot20", default=False, action="store_true", help="test mot20.")
71 return parser
72
73
74class Predictor(object):

Callers 1

onnx_inference.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected