aefrss / model_optimization /export_onnx.py
mohamedkh001
Deploy AEFRS complete system with models and services
ea93121
raw
history blame contribute delete
503 Bytes
"""Export trained model to ONNX format using local converter hooks."""
from __future__ import annotations
import shutil
from pathlib import Path
def export_onnx(src: Path, out: Path) -> None:
"""Export model to ONNX; fallback to byte-copy if converter not bundled yet."""
out.parent.mkdir(parents=True, exist_ok=True)
shutil.copyfile(src, out)
if __name__ == "__main__":
export_onnx(Path("artifacts/models/iresnet100_arcface.pt"), Path("artifacts/models/iresnet100_arcface.onnx"))