-
Notifications
You must be signed in to change notification settings - Fork 27
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
Load bboxes dataset from VIA tracks file (3/4) #229
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
+ Coverage 99.74% 99.76% +0.02%
==========================================
Files 13 14 +1
Lines 771 854 +83
==========================================
+ Hits 769 852 +83
Misses 2 2 ☔ View full report in Codecov by Sentry. |
511b3de
to
161bf67
Compare
111e599
to
2cf6c80
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @sfmig and well done on closely following the code architecture for loading poses. This makes me hopeful that we will be able to refactor them in future, such that we abstract away there common bits (to reduce repetition in validators and tests between poses and bboxes). But this shouldn't worry us right now.
I have two substantial comments apart form the cosmetic/trivial issues I've highlighted in specific comments.
- I don't fully understand what
frame_array
is needed for and how it is handled. See my specific comment about this. Perhaps we can discuss it in person together? - The documentaiton pages for
input_output.md
andmovement_dataset.md
need to be updated. Specifically:- the new format has to be aded in the "Supported formats" section of Input/Output.
- A new "Loading tracks of bounding boxes" section has to be added to Input/Output.
- The "Movement Dataset" page has to also include information about the bboxes dataset format, especially where it differs from the poses format
I'm happy for you to leave the documentation changes for a future PR (just open an issue in that case).
EDIT
Another thought that just came to mind: have you tested whether the existing filtering and kinematics functions work on the new bboxes datasets?
You could define a valid_bboxes_dataset
pytest fixture (similar to valid_poses_dataset
) and add it to all relevant tests in:
test_integration/test_filtering.py
test_unit/test_filtering.py
test_unit/test_kinematics.py
test_unit/test_move_accessor.py
It's crucial to determine if our existing features work on the new type of dataset.
From chats with @niksirbi: |
089a7d1
to
2d9b330
Compare
ec714db
to
3f7aadf
Compare
Thanks @niksirbi for the feedback! I think I addressed all the comments, let me know if something is missing.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sfmig, I'm happy with how you've handled things, and the updated docstrings make it super clear what happens to time and frames.
I've only left very few suggestions re docstrings, feel free to adopt or not.
I've never done this as well. Maybe we should consult with Alessandro or Joe who have more experience with complex merges. |
d0f2326
to
d9cf96b
Compare
Co-authored-by: Niko Sirmpilatze <[email protected]>
…via_tracks_df` and `_extract_confidence_from_via_tracks_df` to return one-dimensional arrays instead of forcing always two-dimensional
…file or VIA tracks file
d9cf96b
to
6e5420d
Compare
|
Rebase after #234
Description
What is this PR
Why is this PR needed?
To be able to load a VIA tracks file with bounding boxes into a movement dataset.
What does this PR do?
movement.io.load_bboxes
module, which follows the equivalent poses one as much as possible.tests_load_bboxes
.Question: how to make
mypy
aware of the type transformations that take place in__attrs_post_init__
?For example, the confidence array passed to
ValidBboxesDataset
can beNone
, andmypy
flags that a.shape
attribute is used later whichNone
doesn't have. Butmypy
seems to be missing that the confidence array is populated with nans in__attrs_post_init__
ifNone
is passed as input. Is there a nice way to fix this?References
This PR would close #167
How has this PR been tested?
Tests pass locally and on CI.
Is this a breaking change?
No.
Does this PR require an update to the documentation?
I updated
api_index.rst
.Checklist: