ultralytics / yolo-ios-app

Ultralytics YOLO iOS App source code for running YOLOv8 in your own iOS apps 🌟

Home Page:https://ultralytics.com/yolo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot find 'yolov8m

pascal-maker opened this issue · comments

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?

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

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

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