Files
kinect/tracker-native/scripts/setup_models.sh
T
kinect-bot 5879422ab9
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python root tests (pytest, no tracker deps) (push) Canceled after 0s
ci / Python tracker (pytest, tracker/.venv) (push) Canceled after 0s
feat(tracker-native): ONNX Runtime C++ inference foundation + setup
Scaffold the zero-Python native tracker. Convert the real MediaPipe BlazePose
landmark weights (from pose_landmarker_full.task) to ONNX and prove the ONNX
Runtime C++ API runs them bit-identically to Python (ort_smoke vs
ort_smoke_ref.py; landmarks match to 6dp, mask <=1.2% prob vs TFLite).
Reproducible setup scripts (setup_models.sh, fetch_ort.sh) and a Linux build.
No binaries committed (ORT + onnx/tflite are fetched/generated).
2026-11-25 18:29:48 -05:00

18 lines
683 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
TASK="${1:-${HERE}/../tracker/models/pose_landmarker_full.task}"
PY="${PY:-${HERE}/../tracker/.venv/bin/python}"
mkdir -p "${HERE}/models"
"${PY}" -c "import zipfile; zipfile.ZipFile('${TASK}').extractall('${HERE}/models')"
for m in pose_detector pose_landmarks_detector; do
if [ -f "${HERE}/models/${m}.onnx" ]; then continue; fi
if ! "${PY}" -m tf2onnx.convert --tflite "${HERE}/models/${m}.tflite" \
--output "${HERE}/models/${m}.onnx" --opset 17; then
echo "note: ${m} tflite->onnx conversion not supported by tf2onnx; skipping" >&2
fi
done
ls -la "${HERE}/models"