Open
Description
yolov8: https://github.com/ultralytics/ultralytics
At this moment(23.04.08), there is error when converting yolov8 models to Core ML. Once ultralytics/ultralytics#1791 is merged, you can use the following steps. (Or you can use this PR alternatively.)
Pre-requirements
pip install ultralytics
pip install coremltools
Option 1) With shell
yolo export model=yolov8n.pt format=coreml nms
Option 2) With python script
# mian.py
from ultralytics import YOLO
if __name__ == '__main__':
model = YOLO("yolov8n.pt", task='detect') # load a pretrained model
model.overrides['nms'] = True
success = model.export(format="coreml") # export the model to CoreML format
# in terminal
python main.py
# then you can see the `.mlpackage` or `.mlmodel` file in your current directory
# (btw you can check your current directory with `pwd` command)
Metadata
Metadata
Assignees
Labels
No labels