forked from qoherent/modrec-workflow
23 lines
564 B
Python
23 lines
564 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)
|