Skip to content

Conversation

@deruyter92
Copy link

@deruyter92 deruyter92 commented Jan 9, 2026

Requested to merge with this branch in particular since it is the most up-to-date. This PR addresses the following features:

Dependencies + interoperability with DeepLabCut-live-GUI

  • pyproject.toml is made PEP 517 / 518 / 621–compliant, which makes it easy to inherit dependencies
  • this also allows for using uv (and in general more tool-agnostic).
  • tensorflow installation is restricted to python < 3.12 for windows
  • zero-poses are returned when no detections are made (see Jaap/fix no detections case #140)

Fast-validation + early-failing

  • Typed configurations with validation
  • Ensure that wrong model config raise an interpretable error before actually in inference loop

minor bugfix

  • changed downloading function for the check_install script, (video download failed on some windows machines)

maximpavliv and others added 8 commits January 9, 2026 13:52
Instead using a single_animal parameter for PytorchRunner, which defaults to True, single_animal mode will be inferred from the models metadata configuration.
This is useful for cases when you want to safely leave out the single_animal paramter, e.g. when running a multi-animal model in DeepLabCut-live-GUI, just passing a model configuration suffices.
When the detector does not detect any crops (with a supra-threshold confidence), no pose-detection is applied and  and a zero-vector is returned for the pose-prediction.

This solves DeepLabCut#137 and copies the already existing intended behavior of returning zeros for empty pose-predictions in single animals.
The config is validated immediately upon reading an exported model file. For invalid model configurations / exported model files, the user sees a warning before running pose estimations or model_initialization.
Current standards for python packaging. Allows for modern tools like uv and others (in general more tool-agnostic).

Also makes it more interoperable with DeepLabCut-live-GUI.
re-installation can easily done via pip install -u, uv sync or poetry install as the user prefers. Building and publishing should be reserved for maintainers only.
Added a more robust downloading function in `utils.py` that handles errors more gracefully.
The download is skipped if the file already exists.

In previous implementation, the benchmarking video was downloaded to the home directory,
which in windows could result in permission issues when reading the file. This is now changed to
the check_install directory.

OpenCV was silently failing to read the video file, resulting in a frame count of zero.
Now a ValueError is raised when the video cannot be read.
@deruyter92 deruyter92 marked this pull request as ready for review January 9, 2026 13:22
@deruyter92 deruyter92 marked this pull request as draft January 9, 2026 13:23
@sneakers-the-rat
Copy link
Collaborator

sneakers-the-rat commented Jan 10, 2026

Im in favor of updating the pyproject.toml file, I have since switched from poetry to pdm after some bad experiences with the devs anyway, but can we do it in a separate PR?

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.

3 participants