-
Notifications
You must be signed in to change notification settings - Fork 2
Convert predictions to cliplabels.json using movement #45
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
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
6277b81
Add guess_software and draft predictions to cliplabels.json
sfmig d1d8c06
Transform movement dataset to cliplabels.json
sfmig 86bc663
Add output parent dir
sfmig d8f7090
Add a test
sfmig 2f33813
Factor out conversion
sfmig 2d6349c
Split test
sfmig ecfc521
Fix docstring
sfmig 2a0be33
Pin movement>=0.16.0 and update supported Python versions to 3.12-3.14
niksirbi d68c98e
Rename cliplabels to videolabels in predictions_to_poseinterface
niksirbi 0fd48ca
Merge branch 'main' into predictions-conversion
sfmig 4083cd2
Revert Python version support increase
sfmig a327cd1
`output_json_path`
sfmig 6f1c096
Apply suggestions from code review
sfmig 04b4134
Use sleap-io encode keypoints
sfmig 809eb46
Rename input arguments in `predictions_to_poseinterface` to match `an…
sfmig 2dfaa63
Link to supported formats
sfmig 28b382e
Error handling around reading video
sfmig 66bb6b9
Add tests to cover error handling when loading video
sfmig 281a5ad
Rename and factor out get_mock_video fixture
sfmig b42e0b5
Remove duplicate fixture
sfmig a2a6c35
Fix mismatch after .T
sfmig 8537216
Fix tests
sfmig 20f8a56
Apply review comments re tests
sfmig 567920a
Merge branch 'main' into predictions-conversion
sfmig e434671
Revert "Revert Python version support increase"
sfmig fe63894
Edit docstring
sfmig 0468277
Update test docstring
lochhh 6318521
Simplify `test_convert_movement_ds_to_videolabels`
lochhh ce219f5
Remove wiring checks, keep only one checking for image width and heig…
sfmig d7bf39c
Remove pinned movement
sfmig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ io | |
|
|
||
| annotations_to_poseinterface | ||
| video_to_poseinterface | ||
| predictions_to_poseinterface | ||
|
|
||
| clips | ||
| ----- | ||
|
|
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| from unittest.mock import MagicMock | ||
|
|
||
| import pytest | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def get_mock_video(): | ||
| """Mock a Video object with n frames, matching video_labels fixture. | ||
|
|
||
| The returned image size should not be square (that is, image width should | ||
| not be equal to image height) to correctly check for inadvertent swaps | ||
| between these two values. | ||
| """ | ||
|
|
||
| def _get_mock_video(n_frames): | ||
| # For the fixture to correctly check if image width and height | ||
| # are mistakenly swapped in the code, the following values should | ||
| # not be the same (i.e., the frame should not be square) | ||
| img_height = 480 | ||
| img_width = 640 | ||
|
|
||
| video = MagicMock() | ||
| video.fps = 30 | ||
| video.shape = (n_frames, img_height, img_width, 3) | ||
| return video | ||
|
|
||
| return _get_mock_video |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.