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

cannot find 'yolov8m #9

Open
pascal-maker opened this issue Mar 7, 2024 · 3 comments
Open

cannot find 'yolov8m #9

pascal-maker opened this issue Mar 7, 2024 · 3 comments

Comments

@pascal-maker
Copy link

Tried running the project after adding the models to the project and received these errors :
/Volumes/Extreme SSD/yolo-ios-app/YOLO/ViewController.swift:20:20: error: cannot find 'yolov8m' in scope
var mlModel = try! yolov8m(configuration: .init()).model
^~~~~~~
/Volumes/Extreme SSD/yolo-ios-app/YOLO/ViewController.swift:20:44: error: cannot infer contextual base in reference to member 'init'
var mlModel = try! yolov8m(configuration: .init()).model. Any possibility to also run this on the iOS simulator?

@glenn-jocher
Copy link
Member

@pascal-maker hello! It looks like you're encountering an issue with integrating a YOLOv8 model into an iOS project. Here are a few steps to troubleshoot and potentially resolve your issue:

  1. Check Model Availability: Ensure that the yolov8m model is correctly added to your project. It should be in a format that is compatible with iOS (usually CoreML for Apple devices).

  2. Model Conversion: If you have the model in a different format, you might need to convert it to CoreML. You can find guidance on model conversion in the Ultralytics Docs.

  3. Update Project Settings: Make sure that the model file is included in your Xcode project's target membership so that it's bundled with your app.

  4. Code Syntax: Double-check the syntax for initializing the model in Swift. It's possible there might be a typo or an issue with how the model is being instantiated.

  5. Simulator Limitations: Running ML models on the iOS simulator can sometimes be problematic due to hardware acceleration limitations. If possible, try running your app on a physical device to see if the issue persists.

  6. Documentation and Examples: For more detailed guidance and examples on integrating YOLO models with iOS, please refer to the Ultralytics Docs. While we don't have specific iOS integration examples, the general principles of working with YOLO models apply.

If you continue to face issues, please provide more details about the steps you've taken and any specific error messages you're seeing. The more information you provide, the better we can assist you. 😊

Remember, the YOLO community and the Ultralytics team are here to help. Good luck with your project!

@tonychanchen
Copy link

The mlprogram model format, deployable to iOS15, macOS12, watchOS8, tvOS15, and newer versions

@glenn-jocher
Copy link
Member

glenn-jocher commented Mar 14, 2024

@tonychanchen YOLO on CoreML uses *.mlpackage models by default, though you might be able to experiment with other types:

Screenshot 2024-03-14 at 14 04 49

Remember, integrating advanced ML models into mobile and other platforms can be complex, and issues like these are not uncommon. Your persistence is key, and the community is here to support you. Keep experimenting, and don't hesitate to reach out with more details or questions. Good luck! 🚀

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

3 participants