-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Incorporating YOLOv8 Pose ONNX model #13
Conversation
@pbanavara hey there! 👋 Thanks for your effort and interest in integrating the YOLOv8 pose ONNX model with iOS. It's great to see such enthusiasm within our community. For this kind of integration, you'd typically need to ensure that the ONNX model is fully compatible with the iOS platform, which may require using ONNX Runtime or Core ML. A simple outline to get started could be:
Remember, performance and compatibility can vary, so testing is key. For more detailed guidance on working with ONNX models, you might want to check out the Ultralytics Docs. However, since specifics can get quite technical and platform-dependent, I recommend reaching out on specialized forums or platforms for iOS and ONNX integration for more tailored advice. Keep up the great work, and we look forward to seeing what you achieve! 🚀 |
Hi @glenn-jocher This ONNX model is compatible with iOS and I have tested the same. Listing down the instructions for testing. Is there an issue with using the Cocoapods architecture for this app ? I will try to get the CoreML conversion working. As per the ONNX repo, there is no supported tool to convert from ONNX to CoreML, will have to do this directly from Apple CoreMLTools which has support for Pytorch models. So it's back to square one :)
|
Hey @pbanavara! 🌟 Great to hear the ONNX model works well with iOS, and thanks for sharing your testing steps! Regarding the use of Cocoapods, it's generally a sound approach for managing library dependencies in iOS projects. If it suits your project structure and you're comfortable managing dependencies through it, there shouldn't be an issue. For the CoreML conversion, indeed, direct conversion tools from ONNX to CoreML might be limited, but using Apple's CoreMLTools with a PyTorch model as an intermediary step is a smart workaround. It might add an extra step, but if it bridges the compatibility gap, it's worth it. For clarity to anyone following this:
This method gives you the flexibility of PyTorch's extensive model ecosystem and the performance optimizations CoreML offers on iOS devices. Keep pushing forward, and don't hesitate to reach out if you run into any hurdles! Your journey contributes to the broader knowledge base of our community. 🚀 |
@pbanavara closing as we do not have a plan to support ONNX models in the app, we are instead focusing on expanding CoreML support for all tasks including Pose. Thank you for your contributions and effort! |
This is the PR for incorporating the YOLO v8 pose detection model natively using the ONNX model on iOS.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
This PR for the
ultralytics/yolo-ios-app
adds support for ONNX pose detection models and various improvements to the object detection features.📊 Key Changes
iOS Setup:
Podfile
for dependency management with ONNX Runtime and extensions.YOLO-Bridging-Header.h
for integrating ONNX libraries.UI and Config Updates:
Main.storyboard
to remove obsolete settings and controls.New Utilities and Handlers:
Utils.swift
for handling pose detection and visualization.VNOnnxHandler.swift
for processing images and vision requests using the ONNX model.VNOnnxRequest.swift
for managing ONNX model request setup.Enhanced Bounding Box Visualization:
BoundingBoxView.swift
to support pose keypoints visualization.Capture and Model Handling:
VideoCapture.swift
to include front camera support.ViewController.swift
to load and interpret ONNX models, removing Vision-related code.🎯 Purpose & Impact