Skip to content

Optional onnxruntime [tracking] extra + dependency cleanup (0.9.0)#980

Merged
mprib merged 5 commits into
mainfrom
chore/dependency-cleanup-and-onnx-extra
May 29, 2026
Merged

Optional onnxruntime [tracking] extra + dependency cleanup (0.9.0)#980
mprib merged 5 commits into
mainfrom
chore/dependency-cleanup-and-onnx-extra

Conversation

@mprib
Copy link
Copy Markdown
Owner

@mprib mprib commented May 29, 2026

Summary

Makes onnxruntime an optional dependency and tidies the dependency surface. A bare pip install caliscope is now a lean, calibration-only install (OpenCV-based charuco/aruco/chessboard calibration + triangulation). ONNX pose tracking moves behind a [tracking] extra, and [gui] pulls it in automatically.

Changes

Dependency cleanup

  • Promote numpy to a direct dependency (imported throughout, previously only transitive).
  • Remove four redundant transitive security floor pins (urllib3, fonttools, pillow, protobuf). Each resolves to a CVE-safe version on its own now that upstream parents have caught up; dependabot remains the backstop.
  • Drop unused dev deps openpyxl and pywinctl (the latter pruned ~180 macOS/Windows binding packages from the universal lockfile).
  • Lift the obsolete av<16.1.0 Linux-wheel cap; bump to av 17.x.

Optional tracking

  • Move onnxruntime from core into a new [tracking] extra; [gui] self-references caliscope[tracking].
  • Lazy-import onnxruntime inside OnnxTracker.__init__. The module stays importable on a lean install (the registry can still scan/list models); only constructing a tracker without the extra raises a ModuleNotFoundError pointing at pip install caliscope[tracking].
  • Gate the ONNX tracker tests with pytest.importorskip.

Docs + version

  • Update README and docs to the three-tier install model; correct the ONNX page that claimed inference needs no extra packages.
  • Bump version to 0.9.0.

Breaking change

A bare pip install caliscope no longer includes ONNX neural pose tracking. Install caliscope[tracking] (or caliscope[gui], which includes it). Minor bump per 0.x convention.

Verification

Built three isolated environments and asserted the contract in each:

  • lean (.): no onnxruntime, no PySide6; core + caliscope.api import; registry import-safe; tracker construction raises the friendly error.
  • tracking (.[tracking]): onnxruntime present, PySide6 absent (independent axes).
  • gui (.[gui]): both present (gui pulls tracking).

Targeted suites pass: 60 video I/O tests against av 17, the ONNX tracker tests under [tracking]. Full functional coverage runs in CI under gui+dev.

mprib added 5 commits May 29, 2026 13:15
- Promote numpy to a direct runtime dependency. It is imported across the
  codebase but was only present transitively via pandas/scipy/opencv, leaving
  the imports unguarded by any version constraint.
- Remove four redundant transitive security floor pins (urllib3, fonttools,
  pillow, protobuf). Each now resolves to a CVE-safe version on its own as the
  upstream parents have caught up; dependabot remains the backstop if a future
  resolution ever regresses.
- Drop unused dev dependencies openpyxl and pywinctl. Removing pywinctl prunes
  ~180 transitive entries (the macOS pyobjc framework tree, Windows pywin32,
  and X11 bindings) from the universal lockfile.
- Lift the obsolete av<16.1.0 cap. Linux wheels now ship for 16.1.0+, so bump
  to av 17.x (resolves 17.0.1); verified against the video I/O test suite.
Neural pose tracking is the only consumer of onnxruntime, imported in a
single file behind the Tracker interface. Calibration and triangulation
never touch it, so a bare install no longer needs to carry onnxruntime
and its protobuf/sympy tail.

- Move onnxruntime out of core dependencies into a new [tracking] extra.
  The [gui] extra self-references caliscope[tracking] so GUI installs
  always include inference.
- Lazy-import onnxruntime inside OnnxTracker.__init__ instead of at module
  top. The tracker module stays importable on a lean install (the registry
  can still scan/list ONNX models); only constructing a tracker without the
  extra raises a ModuleNotFoundError pointing at pip install caliscope[tracking].
- Gate the ONNX tracker tests with pytest.importorskip so they skip cleanly
  when onnxruntime is absent rather than erroring.

A bare pip install caliscope is now a lean, calibration-only install.
The install contract changed: a bare install is now calibration-only and
neural pose tracking requires the tracking extra. Update the user-facing
install instructions to match.

- README, installation, index, scripting: present three tiers (bare
  caliscope for calibration, [tracking] for ONNX pose tracking, [gui] for
  the desktop app which includes tracking).
- onnx_trackers: correct the line that claimed ONNX inference needs no extra
  packages; it now requires caliscope[tracking] (or [gui]).
- installation: add a note that the docs site tracks the development version
  on main and may differ from the latest PyPI release.
Signals the changed install contract: onnxruntime moves to the optional
[tracking] extra, so a bare install is now calibration-only. A minor bump
per 0.x convention for a notable, mildly breaking change to the default
install surface.
Treat the [tracking] extra as an internal seam, not a user-facing install
path. ONNX pose tracking is used through the GUI and there is no documented
headless tracking workflow yet, so the docs offer two paths: the base
calibration library and caliscope[gui] (which includes pose tracking).

The [tracking] extra stays in pyproject so [gui] can depend on it and as
scaffolding for possible future headless tracking, it is simply not
advertised in the docs.
@mprib mprib merged commit 941b50b into main May 29, 2026
3 checks passed
@mprib mprib deleted the chore/dependency-cleanup-and-onnx-extra branch June 2, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant