Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support YOLOv8 #13

Open
tucan9389 opened this issue Apr 7, 2023 · 7 comments
Open

Support YOLOv8 #13

tucan9389 opened this issue Apr 7, 2023 · 7 comments

Comments

@tucan9389
Copy link
Owner

tucan9389 commented Apr 7, 2023

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)
@tucan9389
Copy link
Owner Author

image

@JaeungHyun
Copy link

오.. 모바일에서 yolo_v8 성능이 잘 나오나요? v5가 프레임이 더 잘나온다고 하던데..

@tucan9389
Copy link
Owner Author

오.. 이미 실험이 있나보군요. 정확도 대비 프레임이 중요할거같은데 아시는 소스가 있다면 공유 부탁드려도 될까요?

저는 다른모델과 비교를 할만큼 실험은 없어서요..
https://github.com/tucan9389/ObjectDetection-CoreML#infernece-time-ms

@JaeungHyun
Copy link

저도 오픈채팅방에서 지나가면서 본거라... 자료는 찾으면 공유해드리겠습니다

@pseudo-jay
Copy link

Request to add Yolov8 Pose and Segmentation in the demo app

@tucan9389
Copy link
Owner Author

@pseudo-jay
Hi jay, thanks for asking. Here are the related repos you can try:

I didn't implement it for yolov8 yet, but if you can make it, I’ll be appreciated your contribution.

@glenn-jocher
Copy link

glenn-jocher commented Aug 8, 2023

Great news 😃! YOLOv8 now supports Apple's new CoreML *.mlpackage format natively ✅ in PR ultralytics/ultralytics#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 your ultralytics/ directory or run git clone https://github.com/ultralytics/ultralytics again
  • Pip – Update with pip install -U ultralytics
  • Notebooks – Check out the updated notebooks Run on Gradient Open In Colab Open In Kaggle
  • Docker – Run sudo docker pull ultralytics/ultralytics:latest to update your image Docker Pulls

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 🚀!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants