From 64f787d064692efb4ab0352cc6f6f34aa468ac45 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 14 Feb 2024 16:14:07 +0100 Subject: [PATCH] Update README.md code example (#6) * Update README.md code example * Auto-format by https://ultralytics.com/actions * Update README.md --------- Co-authored-by: UltralyticsAssistant --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7662932..092011c 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,12 @@ Ensure you have the following before you start: # Loop through all YOLOv8 model sizes for size in ("n", "s", "m", "l", "x"): - # Export YOLOv8 PyTorch models to CoreML INT8 format with NMS layers - YOLO(f"yolov8{size}.pt").export(format="coreml", int8=True, nms=True, imgsz=[640, 384]) + + # Load a YOLOv8 PyTorch model + model = YOLO(f"yolov8{size}.pt") + + # Export the PyTorch model to CoreML INT8 format with NMS layers + model.export(format="coreml", int8=True, nms=True, imgsz=[640, 384]) ``` 4. **Run the Ultralytics YOLO iOS App:**