Skip to content

ninja-96/ort-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ORT tools

Userful tools for ONNX models

Installation

Install using pip
From source:

pip3 install git+https://github.com/ninja-96/ort-tools

Getting Started

  1. Quantize ONNX mode
python3 -m ort_tools.quant -m <path to onnx model>
  1. Speedtest ONNX model
python3 -m ort_tools.speedtest -m <path to onnx model>

Note

  • Quantization module quantize model using random input data.
  • You must set --shapes argument to run tools:
python3 -m ort_tools.speedtest -m ./model.onnx --shape images:1x3x224x224:fp32

If ONNX model has 2 or more inputs, just enumerate input names separated by commas:

python3 -m ort_tools.speedtest -m ./model.onnx --shape images:1x3x224x224:fp32,gray_images:1x3x224x224:fp32

Built with

  • onnx - Open standard for machine learning interoperability
  • onnxruntime - ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator

Versioning

All versions available, see the tags on this repository.

Authors

  • Oleg Kachalov - Initial work - ninja-96

See also the list of contributors who participated in this project.

License

This project is licensed under the GPL-3.0 license - see the LICENSE.md file for details.