ObjectDetection-CoreML
ObjectDetection-CoreML copied to clipboard
Support YOLOv8
yolov8: https://github.com/ultralytics/ultralytics
At this moment(23.04.08), there is error when converting yolov8 models to Core ML. Once https://github.com/ultralytics/ultralytics/pull/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)

오.. 모바일에서 yolo_v8 성능이 잘 나오나요? v5가 프레임이 더 잘나온다고 하던데..
오.. 이미 실험이 있나보군요. 정확도 대비 프레임이 중요할거같은데 아시는 소스가 있다면 공유 부탁드려도 될까요?
저는 다른모델과 비교를 할만큼 실험은 없어서요.. https://github.com/tucan9389/ObjectDetection-CoreML#infernece-time-ms
저도 오픈채팅방에서 지나가면서 본거라... 자료는 찾으면 공유해드리겠습니다
Request to add Yolov8 Pose and Segmentation in the demo app
@pseudo-jay Hi jay, thanks for asking. Here are the related repos you can try:
- https://github.com/tucan9389/PoseEstimation-CoreML
- https://github.com/tucan9389/SemanticSegmentation-CoreML
I didn't implement it for yolov8 yet, but if you can make it, I’ll be appreciated your contribution.
Great news 😃! YOLOv8 now supports Apple's new CoreML *.mlpackage format natively ✅ in PR https://github.com/ultralytics/ultralytics/pull/4043 and published in ultralytics 8.0.150
. Usage remains the same:
yolo export model=yolov8n.pt format=coreml # produces yolov8n.mlpackage
yolo export model=yolov8n.pt format=mlmodel # produces legacy yolov8n.mlmodel
To get this update:
-
Git – Run
git pull
from within yourultralytics/
directory or rungit clone https://github.com/ultralytics/ultralytics
again -
Pip – Update with
pip install -U ultralytics
-
Notebooks – Check out the updated notebooks
-
Docker – Run
sudo docker pull ultralytics/ultralytics:latest
to update your image
Thank you for spotting this issue and letting us know. Please confirm if this update fixes the issue for you, and don't hesitate to report any other issues you find or feature requests you may have. Happy training with YOLOv8 🚀!