You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhanced ONNX model export with metadata and improved model loading with custom metadata handling.
📊 Key Changes
🏷️ Added custom metadata properties (such as 'stride' and 'names') to the ONNX model during export.
📚 ONNX models now store additional information within their metadata properties.
🧠 Updated the model loading code to parse and utilize the new metadata when models are loaded using ONNX runtime.
🎯 Purpose & Impact
🛠️ Purpose: The inclusion of metadata in the ONNX models allows for more information to be packaged with the model itself, improving model portability and ease of use.
🔍 Impact: Users can benefit from the additional model metadata, leading to more informed and potentially optimized model deployment, especially in environments where model parameters like stride are important for integration.
🔄 Users relying on ONNX models from YOLOv5 will notice more robust integration with external tools due to enriched model metadata.
metadata are saved in onnx file. This can be confirmed by using netron.
But, we can not actually retrieve the metadata properties when using: meta = session.get_modelmeta().custom_metadata_map, the value is always empty.
@glenn-jocher, have you checked that we can retrieve the metadata as expected ?
metadata are saved in onnx file. This can be confirmed by using netron. But, we can not actually retrieve the metadata properties when using: meta = session.get_modelmeta().custom_metadata_map, the value is always empty.
@glenn-jocher, have you checked that we can retrieve the metadata as expected ?
@axzakari great to hear! If you have any other questions or issues, feel free to ask. We're here to help!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds stride and names to ONNX export metadata for reading during inference. Resolves #7342, #7351
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhanced ONNX model export with metadata and improved model loading with custom metadata handling.
📊 Key Changes
🎯 Purpose & Impact