s6.app.cog.yolo¶
YOLOv11 quickstart: image inference or fine‑tuning.
Thin wrapper around ultralytics to either run single‑image
inference or fine‑tune a YOLOv11 model on a custom dataset.
Examples
Run inference and save an annotated image:
>>> python -m s6.app.cog.yolo -m yolov11n.pt -s input.jpg -o output.jpg
Fine‑tune on a dataset config for 50 epochs:
>>> python -m s6.app.cog.yolo -m yolov11n.pt --train -d data.yaml --epochs 50
- s6.app.cog.yolo.parse_args()
Parse CLI arguments for YOLO inference/training.
- Returns:
Parsed arguments including model path and mode flags.
- Return type:
argparse.Namespace
- s6.app.cog.yolo.main()
Load YOLO model and run the selected mode.
Runs inference when
--sourceis provided without--train; otherwise launches fine‑tuning using--dataand training hyperparameters.