Files
kinect/tracker-native/scripts/fetch_ort.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

23 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Fetch prebuilt ONNX Runtime (linux-x64 for headless validation, win-x64 for
# the shipped build). The official microsoft/onnxruntime GitHub repo was removed
# on 2026-11-17; these are the unchanged 1.20.1 assets from a recovery mirror.
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
V="${ORT_VERSION:-1.20.1}"
B="https://github.com/cga-management/third-party-mirror/releases/download/onnxruntime-${V}"
mkdir -p "${HERE}/third_party"
cd "${HERE}/third_party"
if [ ! -d onnxruntime-linux-x64 ]; then
curl -fsSL -o ort-linux.tgz "${B}/onnxruntime-linux-x64-${V}.tgz"
tar xzf ort-linux.tgz && rm ort-linux.tgz
mv "onnxruntime-linux-x64-${V}" onnxruntime-linux-x64
fi
if [ ! -d onnxruntime-win-x64 ]; then
curl -fsSL -o ort-win.zip "${B}/onnxruntime-win-x64-${V}.zip"
python3 -c "import zipfile; zipfile.ZipFile('ort-win.zip').extractall('.')"
rm ort-win.zip && mv "onnxruntime-win-x64-${V}" onnxruntime-win-x64
fi
echo "ONNX Runtime ${V} ready: $(ls -d onnxruntime-*-x64)"