39 lines
1005 B
Python
39 lines
1005 B
Python
#!/usr/bin/env python3
|
|
"""Launch the private Sensor Bench operator workflow UI.
|
|
|
|
Usage (from the repository root or this folder):
|
|
python internal/run_operator.py
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
os.environ.setdefault("OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS", "0")
|
|
|
|
INTERNAL = Path(__file__).resolve().parent
|
|
REPO = INTERNAL.parent
|
|
PUBLIC_SRC = REPO / "src"
|
|
OPERATOR_SRC = INTERNAL / "src"
|
|
|
|
for path in (OPERATOR_SRC, PUBLIC_SRC):
|
|
if str(path) not in sys.path:
|
|
sys.path.insert(0, str(path))
|
|
|
|
# Prefer sibling orisys-sdk checkout for Sensor-owned preview.
|
|
ORISYS_SRC = REPO.parent / "orisys-sdk" / "src"
|
|
if ORISYS_SRC.is_dir() and str(ORISYS_SRC) not in sys.path:
|
|
sys.path.insert(0, str(ORISYS_SRC))
|
|
|
|
from sensor_bench.paths import prefer_local_sensor_bundles # noqa: E402
|
|
|
|
prefer_local_sensor_bundles(REPO)
|
|
|
|
from sensor_bench_operator.__main__ import main # noqa: E402
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|