Skip to content

Commit 3d54044

Browse files
committed
Add docstrings
1 parent a9a2716 commit 3d54044

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

classify/predict.py

+2
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def run(
204204

205205

206206
def parse_opt():
207+
"""Parses command line arguments for YOLOv5 inference settings including model, source, device, and image size."""
207208
parser = argparse.ArgumentParser()
208209
parser.add_argument("--weights", nargs="+", type=str, default=ROOT / "yolov5s-cls.pt", help="model path(s)")
209210
parser.add_argument("--source", type=str, default=ROOT / "data/images", help="file/dir/URL/glob/screen/0(webcam)")
@@ -229,6 +230,7 @@ def parse_opt():
229230

230231

231232
def main(opt):
233+
"""Executes YOLOv5 model inference with options for ONNX DNN and video frame-rate stride adjustments."""
232234
check_requirements(ROOT / "requirements.txt", exclude=("tensorboard", "thop"))
233235
run(**vars(opt))
234236

0 commit comments

Comments
 (0)