Release Note
This release introduces multiple improvements, including enhanced ONNX metadata handling, support for dynamic axes in ONNX models, better formatting consistency, and test suite enhancements.
ONNX Metadata Improvements
- Replaced
get_onnx_metadata
withparse_metadata_from_onnx
, ensuring consistent metadata parsing. - Updated
write_metadata_into_onnx
to always serialize metadata as JSON. - Refactored metadata formatting in
ONNXEngine
andONNXEngineIOBinding
.
Support for Dynamic Axes in ONNX Models
- Introduced
make_onnx_dynamic_axes
, which enables dynamic axes in ONNX models while ensuring compatibility withonnxsim
. - Added corresponding test cases to validate the functionality.
Code Cleanup and Formatting Standardization
- Switched all string literals to double quotes for consistency.
- Removed redundant blank lines and reformatted multi-line function calls for better readability.
- Improved dictionary formatting and standardized function parameter naming conventions.
Download Function Enhancement
- Integrated
tqdm
intodownload_from_google
, providing a progress bar for file downloads.
Testing and Resource Updates
- Added new test cases for ONNX tools, including
test_make_onnx_dynamic_axes
. - Replaced the outdated
model.onnx
test model withmodel_dynamic-axes.onnx
andmodel_shape=224x224.onnx
. - Introduced
make_onnx.py
to generate ONNX models for testing, supporting both fixed and dynamic axes.
This release enhances ONNX model flexibility, improves metadata handling, and streamlines testing and formatting. If you encounter any issues or have suggestions, feel free to report them. Thanks for your support!
What's Changed
- [C] update metadata functions by @kunkunlin1221 in #23
Full Changelog: 0.8.1...0.8.2