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

Can't export tensorflow lite #751

Closed
1 task done
togro opened this issue Jul 1, 2024 · 13 comments
Closed
1 task done

Can't export tensorflow lite #751

togro opened this issue Jul 1, 2024 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@togro
Copy link

togro commented Jul 1, 2024

Search before asking

  • I have searched the HUB issues and found no similar bug report.

HUB Component

Export

Bug

Can't export to Tensorflow Lite, alway fail with retry/failed

image

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

@togro togro added the bug Something isn't working label Jul 1, 2024
@ultralytics ultralytics deleted a comment from pderrenger Jul 1, 2024
@sergiuwaxmann sergiuwaxmann self-assigned this Jul 1, 2024
@sergiuwaxmann
Copy link
Member

@togro Hello!
I verified and everything works correctly. Do you still have this issue?
SCR-20240701-fgp

@togro
Copy link
Author

togro commented Jul 1, 2024 via email

@pderrenger
Copy link
Member

Hello @togro,

Thank you for reaching out and for your patience. I'm sorry to hear that you're experiencing issues with exporting to TensorFlow Lite.

To help us diagnose the problem more effectively, could you please provide a minimal reproducible example? This will allow us to better understand the context and specifics of the issue you're encountering. You can find guidance on creating a minimal reproducible example here: Minimum Reproducible Example.

Additionally, please ensure that you are using the latest versions of all relevant packages. Sometimes, issues can be resolved by simply updating to the most recent release.

Looking forward to your response so we can assist you further!

@togro
Copy link
Author

togro commented Jul 1, 2024 via email

@pderrenger
Copy link
Member

Hello @togro,

Thank you for providing additional details and for your patience. I understand the frustration when things don't work as expected, especially when other export formats are functioning correctly.

Given that the issue seems specific to TensorFlow Lite and other formats like EdgeTPU and ONNX are working fine, it might be an isolated problem. Here are a few steps we can take to troubleshoot this further:

  1. Verify Latest Versions: Ensure that you are using the latest version of the Ultralytics HUB and all relevant packages. Sometimes, updates include fixes for issues like these.

  2. Model Review: Since you mentioned the model URL (https://hub.ultralytics.com/models/yGfk3twdeVSxv7OV34Ac), our team can take a closer look at it. We'll review the logs and configurations on our end to identify any potential issues.

  3. Logs and Error Messages: If possible, could you provide any logs or error messages that appear during the export process? Even minimal information can be very helpful in diagnosing the problem.

  4. Alternative Approach: As a temporary workaround, you might consider exporting the model to ONNX and then converting it to TensorFlow Lite using ONNX-TensorFlow converters. This isn't ideal but could serve as a stopgap solution.

We appreciate your understanding and cooperation. Our team is committed to resolving this issue for you. Please rest assured that we are looking into it and will get back to you with any findings or further steps.

@togro
Copy link
Author

togro commented Jul 2, 2024 via email

@sergiuwaxmann
Copy link
Member

@togro Hmm... This is strange - can you share your model ID with me so I can investigate this further? Also, do you have this issue with all your models?

@togro
Copy link
Author

togro commented Jul 2, 2024 via email

@sergiuwaxmann
Copy link
Member

@togro I am glad you found a way to get the export working!
We will continue to improve Ultralytics HUB. Thank you for understanding!

@togro
Copy link
Author

togro commented Jul 8, 2024

Is the size :

image
image

But with 640x640 wors fine

image
image

may be some constraint about size o time ...

@pderrenger
Copy link
Member

Hello @togro,

Thank you for sharing the additional details and screenshots! It’s great to see the thoroughness of your testing.

It does seem like the issue might be related to the input size of 1280x1280. TensorFlow Lite can sometimes have constraints or limitations when handling larger input sizes, which might be causing the export to fail.

To further investigate, could you please ensure that you are using the latest version of the Ultralytics HUB and all relevant packages? Sometimes, updates include fixes for issues like these, and it's always good to rule out any version-related problems.

In the meantime, you might consider trying a slightly smaller input size, such as 960x960, to see if that resolves the issue. Here’s a quick example of how you might adjust the input size:

# Example of adjusting input size
model = torch.hub.load('ultralytics/yolov5', 'yolov5m', pretrained=True)
model.conf = 0.25  # confidence threshold (0-1)
model.iou = 0.45  # NMS IoU threshold (0-1)
model.imgsz = 960  # set the input size to 960x960

If the issue persists, please let us know, and we will continue to look into it. Your feedback is invaluable, and we are committed to making the Ultralytics HUB as robust and user-friendly as possible.

Thank you for your understanding and patience. 😊

@togro
Copy link
Author

togro commented Jul 8, 2024

Hello

I already solved this by setting up a virtual machine and generating the conversion in 1080.

I think that if your hub does not support those dimensions, it should not leave the option to generate conversion.

Or maybe the hub has some error, regarding what I was doing I already converted the model by hand.

Which is not the idea since you in the hub supposedly provide that functionality.

Greetings

@togro togro closed this as completed Jul 8, 2024
@pderrenger
Copy link
Member

Hello @togro,

Thank you for sharing your solution and feedback! 😊

I'm glad to hear that you managed to convert the model by setting up a virtual machine. Your point about the HUB potentially having limitations with certain dimensions is well taken. We strive to make the platform as user-friendly and robust as possible, and your insights are invaluable in helping us achieve that.

To ensure that this issue is addressed, could you please verify that you are using the latest version of the Ultralytics HUB and all relevant packages? Sometimes, updates include fixes for issues like these, and it's always good to rule out any version-related problems.

We appreciate your understanding that while the HUB aims to provide a seamless experience, there can occasionally be edge cases that require manual intervention. Your feedback helps us improve and refine the platform to better meet user needs.

If you encounter any further issues or have additional suggestions, please feel free to share them here. We're here to help and continuously improve the Ultralytics HUB experience for everyone.

Thank you again for your patience and cooperation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants