Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Feb 25, 2024
1 parent a9a2716 commit 3d54044
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions classify/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def run(


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


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

Expand Down

0 comments on commit 3d54044

Please sign in to comment.