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

Fix coreml issues in macos15 ios restricted #81

Merged
merged 3 commits into from
Feb 1, 2025

Conversation

picsalex
Copy link
Contributor

@picsalex picsalex commented Jan 31, 2025

This fix addresses a bug affecting trained models on macOS 15, which caused incorrect results during the inferences. By disabling experimentalMLE5EngineUsage in MLModelConfiguration, trained models will function normally. Note that this modification is only available for iOS 17 and later versions. The README.md has been updated accordingly.

let config = MLModelConfiguration()

if #available(iOS 17.0, *) {
   config.setValue(1, forKey: "experimentalMLE5EngineUsage")
}

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Updated the YOLO iOS app to clarify model requirements and optimize model performance for iOS 17 devices. 🚀

📊 Key Changes

  • Updated README to specify that trained YOLO models require iOS 17.0 or later for compatibility. 📜
  • Enhanced instructions on exporting YOLO models, providing examples for users with trained models and base models. 🔧
  • Modified ViewController.swift by introducing an experimental E5 ML engine optimization for iOS 17 to improve performance. ✨

🎯 Purpose & Impact

  • Clearer Requirements: Helps users avoid compatibility issues by explicitly stating the iOS version requirement for trained models. ✔️
  • Improved Usability: Added detailed guidance for exporting models makes it easier for users to set up the app with their data. 📂
  • Better Performance: Leveraging iOS 17's experimental ML engine may result in faster model inference and smoother app functionality. ⚡

Overall, this improves both usability and efficiency for developers and end-users of the YOLO iOS app! 🛠👩‍💻

@picsalex picsalex added bug Something isn't working enhancement New feature or request embedded Pertaining to IOT or low-power devices labels Jan 31, 2025
Copy link

github-actions bot commented Jan 31, 2025

All Contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@UltralyticsAssistant UltralyticsAssistant added documentation Improvements or additions to documentation exports Model exports (ONNX, TensorRT, TFLite, etc.) labels Jan 31, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @picsalex, thank you for submitting a PR to ultralytics/yolo-ios-app 🚀! We appreciate your contribution. To help ensure a smooth review process and seamless integration, please take note of the following checklist:

  • Define a Purpose: You've provided an excellent description of the issue and the purpose of this PR, including the fix for macOS 15 CoreML issues. If applicable, link any related issues for clearer context.
  • Synchronize with Source: Confirm your PR is in sync with the main branch. If it's behind, kindly update it using git pull and git merge main, or the 'Update branch' button if available.
  • Ensure CI Checks Pass: Ensure all Ultralytics Continuous Integration (CI) checks are passing. If any fail, please address them directly in your PR.
  • Update Documentation: You've already taken the effort to update the README.md file to reflect iOS 17 compatibility—great job! Please ensure these changes align with the overall structure of the documentation.
  • Add Tests: Where applicable, add or update tests to confirm your changes are working as intended, and that all tests pass successfully.
  • Sign the CLA: If this is your first contribution to Ultralytics, please confirm that you have signed the Contributor License Agreement (CLA) by adding a comment stating: "I have read the CLA Document and I sign the CLA."
  • Minimize Changes: Ensure your changes are limited to what’s necessary for the described bug fix or improvement. Keeping the PR concise helps speed up the review process. As Bruce Lee once said, "Hack away the unessential."

If this PR introduces new functionality or significantly modifies existing behavior, please also confirm you’ve included a minimum reproducible example (MRE) to demonstrate the changes. This is especially critical for testing any CoreML engine or inference modifications in the PR.

For additional guidance on contributing to this repository, please check our Contributing Guide. Don't hesitate to ask any questions or comment if you need further assistance.

🚀 Thank you again for your submission! One of our Ultralytics engineers will review your PR soon. 😊

@picsalex picsalex marked this pull request as ready for review January 31, 2025 17:52
@picsalex
Copy link
Contributor Author

I have read the CLA Document and I sign the CLA

@glenn-jocher
Copy link
Member

@john-rocky let's get this reviewed please! Thank you.

@john-rocky
Copy link
Contributor

@picsalex Great work. This works. Thanks for the comprehensive research including pre-iOS16.

@john-rocky john-rocky merged commit c165fa0 into main Feb 1, 2025
2 checks passed
@john-rocky john-rocky deleted the fix-coreml-issues-in-macos15-ios-restricted branch February 1, 2025 00:18
@UltralyticsAssistant
Copy link
Member

🎉 Big thanks and congratulations on the successful merge of #81, @picsalex, with valuable contributions from @glenn-jocher and @john-rocky! 🚀 Your collaboration and dedication to improving the YOLO iOS app are truly inspiring.

As Henry Ford once said, "Coming together is a beginning, staying together is progress, and working together is success." This PR is a perfect example of brilliant minds coming together to make something even better! 🌟

The clarified model requirements, detailed export instructions, and innovative E5 ML engine optimization are game-changers for both developers and users. Your work helps pave the way for a smoother, faster, and more user-friendly experience.👏 Thank you for your passion, ingenuity, and commitment—you're making a real impact! 💡✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation embedded Pertaining to IOT or low-power devices enhancement New feature or request exports Model exports (ONNX, TensorRT, TFLite, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants