Add ctd integration test - #3040
Closed
maximpavliv wants to merge 44 commits into
Closed
Conversation
The frames indexes start at 0 and go up to (n_frames - 1)
Member
|
Let's also address #3001 here. |
Member
|
Can you make the tests pass? |
…im/add_ctd_integration_test
Contributor
Author
Replaced np.max by np.nanmax, to avoid excluding whole pose if some keypoint is Nan
Contributor
Author
@AlexEMG , my latest commit should hopefully solve issue #3001 (it solves a very similar case on my machine, we will need to ask the user to confirm it also solves theirs). [Edit:] the bug raised in #3001 still happens when the |
Contributor
Author
|
This PR no longer has any diffs against main because its commits were included in #3076. Closing as redundant. |
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
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.
This pull request adds a CTD model to the integration-tested models in examples/testscript_pytorch_multi_animal.py .
To pass the test successfully, a few fixes have been done to the CTD pipeline:
FilterLowConfidencePosesPreprocessorstage (introduced in Improve CTD preprocessors pipeline #2984), which was failing when the BU was making no keypoints predictions for a frame.create_video_with_all_detections()method is fixed (previously was assuming that if predictions contained a"bboxes"key they also contained a"bbox_scores"key - this is not the case with CTD models. Similar case fixed in Fixdeeplabcut.analyze_images()with CTD model #2990).PadOutputsPostprocessorstage is made more robust:np.ndarray(previously, inputs that didn't need padding were not converted to np.ndarray)PadOutputsnow takes an additionalexpected_shapesargument at__init__(), which it uses to pad correctly empty input arrays.