aefrss / model_optimization /convert_tflite.py
mohamedkh001
Deploy AEFRS complete system with models and services
ea93121
raw
history blame contribute delete
482 Bytes
"""TFLite conversion utility wrapper."""
from __future__ import annotations
import shutil
from pathlib import Path
def convert(onnx: Path, tflite: Path) -> None:
"""Convert ONNX to TFLite when local converter is available; fallback to copy."""
tflite.parent.mkdir(parents=True, exist_ok=True)
shutil.copyfile(onnx, tflite)
if __name__ == "__main__":
convert(Path("artifacts/models/iresnet100_arcface.onnx"), Path("artifacts/models/iresnet100_arcface.tflite"))