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 YOLOv5 #6

Closed
tucan9389 opened this issue Sep 2, 2022 · 2 comments
Closed

Support YOLOv5 #6

tucan9389 opened this issue Sep 2, 2022 · 2 comments

Comments

@tucan9389
Copy link
Owner

No description provided.

@tucan9389
Copy link
Owner Author

tucan9389 commented Sep 2, 2022

Convert pre-trained YOLOv5 pt to Core ML

Clone and install pre-requirements

Note that you should clone mshamash/yolov5 repo and checkout fix/coreml_export_nms_layer branch, instead of the original repo (ultralytics/yolov5) because the PR wasn't merged.

git clone https://github.com/mshamash/yolov5
cd yolov5
git checkout fix/coreml_export_nms_layer
pip install -qr requirements.txt  # install

Export to Core ML model

python export.py --weights yolov5n.pt --include coreml
python export.py --weights yolov5s.pt --include coreml
python export.py --weights yolov5m.pt --include coreml
python export.py --weights yolov5l.pt --include coreml
python export.py --weights yolov5x.pt --include coreml

python export.py --weights yolov5n6.pt --include coreml
python export.py --weights yolov5s6.pt --include coreml
python export.py --weights yolov5m6.pt --include coreml
python export.py --weights yolov5l6.pt --include coreml
python export.py --weights yolov5x6.pt --include coreml

Check the model input/output with https://netron.app

yolov5s.mlmodel example

image

Check the model with Xcode

image

Related Issue and PR

@tucan9389
Copy link
Owner Author

Class names of YOLOv5's pre-trained with COCO dataset

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

1 participant