-
Notifications
You must be signed in to change notification settings - Fork 54
Jaap/refactor dlclive3 #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
deruyter92
wants to merge
9
commits into
DeepLabCut:maxim/dlclive3
Choose a base branch
from
deruyter92:jaap/refactor_dlclive3
base: maxim/dlclive3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Jaap/refactor dlclive3 #143
deruyter92
wants to merge
9
commits into
DeepLabCut:maxim/dlclive3
from
deruyter92:jaap/refactor_dlclive3
+411
−165
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
…bility; e.g. with CI)
Collaborator
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fast-validation + early-failing
minor bugfix