modrec-workflow/scripts/ort/convert_to_ort.py
Liyu Xiao ea6beda81b
All checks were successful
RIA Hub Workflow Demo / ria-demo (push) Successful in 2m45s
added updates to confusion matrix/riahub secrets
2025-06-30 10:50:34 -04:00

26 lines
576 B
Python

import subprocess
from helpers.app_settings import get_app_settings
settings = get_app_settings()
input_path = "onnx_files/inference_recognition_model.onnx"
optimization_style = settings.app.optimization_style
target_platform = settings.app.target_platform
# Build the command
command = [
"python",
"-m",
"onnxruntime.tools.convert_onnx_models_to_ort",
input_path,
"--output_dir",
"ort_files",
"--optimization_style",
optimization_style,
"--target_platform",
target_platform,
]
# Run the command
subprocess.run(command, check=True)