-
Notifications
You must be signed in to change notification settings - Fork 128
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
YOLOv8 tensorflow>=2.14.0
ImportError: generic_type: cannot initialize type "StatusCode": an object with that name is already defined
#954
Comments
May you try screening if StatusCode is used in any of your code and if you can use a different namespace for it? |
@lu-wang-g the But this seems unrelated to |
@lu-wang-g I think this is due to the usage of the The pybind side of issue that may be related is pybind/pybind11#439. I am not entirely sure how to address this as I am less experience with C++.. |
@lu-wang-g @ethanluoyc I just realized this error is very easily reproducible directly in Google Colab just by installing and attempting to import the package. If this package is not even usable in Google Colab this must raise some pretty serious red flags here no? Are there any plans to resolve this and update the package? Reproduce!pip install tflite_support
import tflite_support Result---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
[<ipython-input-2-10ee15e7e9a8>](https://localhost:8080/#) in <cell line: 1>()
----> 1 import tflite_support
4 frames
[/usr/local/lib/python3.10/dist-packages/tensorflow_lite_support/python/task/vision/core/tensor_image.py](https://localhost:8080/#) in <module>
17
18 from tensorflow_lite_support.python.task.vision.core import color_space_type
---> 19 from tensorflow_lite_support.python.task.vision.core.pybinds import image_utils
20
21
ImportError: generic_type: cannot initialize type "StatusCode": an object with that name is already defined |
A temporary workaround could be to skip the import statement that causing the issue, and import the metadata_writer that you're using directly. We're looking into fixing the root cause.
|
@khanhlvg we've implemented your solution, it works, and we have now successfully updated to the latest version of TF 2.16 for Ultralytics exports in ultralytics/ultralytics#13176 Thank you for the help! |
YOLOv8 TFLite export is failing with the latest release of
tensorflow==2.14.0
but works withtensorflow==2.13.1
, the prior release.The error originates from the
tflite_support
package.Reproduce
Run in Google Colab:
https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb
Additional
Tracked in ultralytics/ultralytics#5161
The text was updated successfully, but these errors were encountered: