Replies: 2 comments 1 reply
-
👋 Hello @dboylx, thank you for sharing your experience with Ultralytics 🚀! We recommend checking out the Docs for guidance on deploying YOLO11 models, as well as specific Python and CLI usage examples. Many common deployment and conversion questions are addressed there. Since you are reporting a 🐛 bug or issue during TFLite conversion and metadata population, please provide a minimum reproducible example. This will help the engineering team better understand and debug the problem. If your question is related to custom training or model export, please include all relevant information such as your export commands, logs, and any model or dataset details. You’re also invited to connect with the Ultralytics community:
UpgradeBefore proceeding, please ensure you’re using the latest pip install -U ultralytics EnvironmentsYOLO can be run in any of the following up-to-date verified environments (with dependencies like CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all Ultralytics CI tests are passing. CI tests verify correct operation of all YOLO Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit. This is an automated response to help guide your request. An Ultralytics engineer will review your discussion and assist you soon! 😊 |
Beta Was this translation helpful? Give feedback.
-
If you export with Ultralytics, the metadata is already included. You need to read the TFLite model as zip file to see the metadata file inside |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The error occurs while loading the segment tflite model: "Failed to extract metadata: This model does not contain model metadata."
I use this to add metadata to the segmentation model:
https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/models/convert/metadata_writer_tutorial.ipynb
But there is error on Image segmenters Step3, here is the error:
ValueError Traceback (most recent call last)
in <cell line: 0>()
21
22 # Populate the metadata into the model.
---> 23 writer_utils.save_file(writer.populate(), _SAVE_TO_PATH)
2 frames
/usr/local/lib/python3.11/dist-packages/tensorflow_lite_support/metadata/python/metadata.py in _validate_metadata(self, metadata_buf)
637 print(model_meta.SubgraphMetadata(0))
638 num_output_meta = model_meta.SubgraphMetadata(
--> 639 0).OutputTensorMetadataLength()
640 if num_output_tensors != num_output_meta:
641 raise ValueError(
ValueError: The number of output tensors (2) should match the number of output tensor metadata (1)
Has anyone encountered a similar issue? I’ve searched for a long time but couldn't find any related cases.
Beta Was this translation helpful? Give feedback.
All reactions