ultralytics / hub

Ultralytics HUB tutorials and support
https://hub.ultralytics.com
GNU Affero General Public License v3.0
138 stars 14 forks source link

problem with importing the pose detection model in xcode #895

Open QuenPley opened 1 month ago

QuenPley commented 1 month ago

Search before asking

Question

the 2 of October, we have a yolov8 large pose detection model in coreml and we had succesfully exported it in xcode. Since a few days we have tried with a yolo11 nano and large model and we are not able to do it, xcode throw an error "not able to unserialize the model". Then we have tried with a yolov8 nano and large model and xcode throw the same error, if we take the model made in the 2 of October, this one is still working. What should we do to be able to use a yolo11 model in coreml and xcode ?

Additional

No response

UltralyticsAssistant commented 1 month ago

πŸ‘‹ Hello @QuenPley, thank you for bringing this issue to our attention on the Ultralytics HUB πŸš€!

We understand you're experiencing challenges with importing the YOLO11 nano and large models into Xcode using CoreML. Please visit our HUB Docs for additional insights and guidance:

If this is a πŸ› Bug Report, it would be very helpful if you could provide a minimum reproducible example (MRE) to better diagnose the issue. You can learn how to do this here.

An Ultralytics engineer will look into this soon and will assist further. We aim to respond to all issues as quickly as we can. Thank you for your patience! 😊

QuenPley commented 3 weeks ago

Thank you for your answer. I am working on a Mac book pro M1 with Xcode 16, The 2 of October, I export a yolov8 pose detection model in coreml and imported in Xcode 16 without any problem. since last week I have exported yolov11 pose detection model in core ml and I have an error when I import it in Xcode: There was a problem decoding this Core ML document validation error: unable to deserialize object. I have try to do it with yolov8 pose detection and I have the same error. What should I do to be able to import a yolo pose detection model in Xcode 16? is there is change done after the 2 October?

pderrenger commented 3 weeks ago

@QuenPley hello! 😊

Thank you for providing the details about your setup. It seems like you're encountering issues with importing YOLO models into Xcode 16. Here are a few steps you can try to resolve the issue:

  1. Verify Versions: Ensure you are using the latest versions of the Ultralytics packages and Xcode. Sometimes, updates can resolve compatibility issues.

  2. Re-export the Model: Try re-exporting your model using the latest version of the Ultralytics tools. There might have been updates or fixes since your last export.

  3. Check Model Compatibility: Ensure that the model architecture and export settings are compatible with CoreML. Sometimes, specific layers or configurations might cause issues during serialization.

  4. Debugging: Use Xcode’s debugging tools to get more detailed error messages. This might give you more insight into what’s causing the deserialization issue.

  5. Documentation: Review the Ultralytics HUB Docs for any updates or changes that might have occurred after October 2nd.

If the issue persists, please let us know, and we can further investigate. Your patience and collaboration are greatly appreciated! πŸš€

Feel free to reach out if you have more questions. We're here to help! 😊

QuenPley commented 3 weeks ago

Hello I have check in Xcode and I find this error see Screen shot. Capture%20d%E2%80%99e%CC%81cran%202024-10-27%20a%CC%80%2010 00 04

pderrenger commented 3 weeks ago

Hello! 😊

Thank you for sharing the screenshot. It looks like you're encountering a deserialization issue with your CoreML model in Xcode. Here are a few steps to help troubleshoot and resolve the problem:

  1. Update Packages: Ensure you are using the latest versions of the Ultralytics packages. Sometimes, updates include important fixes.

  2. Re-export the Model: Try exporting the model again using the latest tools. This can sometimes resolve serialization issues.

  3. Model Layers: Check if there are any specific layers or configurations in your model that might not be supported by CoreML. Simplifying the model architecture can sometimes help.

  4. Xcode Debugging: Use Xcode’s debugging tools to get more detailed information about the error. This can provide insights into what might be causing the issue.

  5. Documentation: Review the Ultralytics HUB Docs for any recent updates or changes that might affect model export and import.

If the issue persists, please let us know, and we'll be happy to assist further. Your patience and collaboration are greatly appreciated! πŸš€

Feel free to reach out with any more questions. We're here to help! 😊