Convert Yolov8 to CoreML and use it on iPhone

1 min readJun 6, 2023


Use object detection AI on your smartphone

Yolov8 is a popular object detection model.
In this article, we will make Yolov8 available for iOS.


Install Yolov8 and download model checkpoint.
(A list of model checkpoints can be found in the ultralytics repository above.)

pip install ultralytics

If you get the following error, change the following line in yolo/engine/ of the ultralytics library (line 390).

# f = self.file.with_suffix(‘.mlmodel’)
# ↓↓↓
f = self.file.with_suffix(‘.mlpackage’)

A .mlpackage file (CoreML) is saved in the same directory as the pt file.

The sample to run with the camera of iOS is as follows.


I’m a freelance engineer.
Work consultation
Please feel free to contact us with a brief development description.

I am creating applications using machine learning and AR technology.

I send machine learning / AR related information.