-
Notifications
You must be signed in to change notification settings - Fork 10
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
Small edits to ValidBboxesDataset (1/4) #230
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #230 +/- ##
=======================================
Coverage 99.71% 99.71%
=======================================
Files 13 13
Lines 702 714 +12
=======================================
+ Hits 700 712 +12
Misses 2 2 ☔ View full report in Codecov by Sentry. |
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.
I have my reservations/questions about the use of frames_array
here, but I will raise them in PR #229, because they have to be interpreted in conjunction with how the frame_array
information is used during data loading.
But in case we keep the frame_array
as is, should we also accept shape of (1, n_frames)
and (n_frames,
)? It's easy for users to make errors in the shape of 1D vectors and it's trivial to add a converter in the validator that will reshape it to the correct format. But this is very likely to be an overkill, so feel free to ignore.
Other than that, this PR looks good.
Some thoughts on refactoring dataset validators, to be considered for a potential future issue/PR: I think there should be a way of defining a |
7e30d27
to
94910e4
Compare
I opened an issue #241 |
94910e4
to
4669f4a
Compare
@niksirbi I liked this converter idea, and had a go here. But I think it's best to not define a converter for the
I reverted the commit for now, but let me know if you want to discuss |
This reverts commit 3a99c1a.
c125828
to
7b79d17
Compare
Quality Gate passedIssues Measures |
Description
What is this PR
Why is this PR needed?
Two small edits are needed in
ValidBboxesDataset
to continue with the bboxes work:Adding
frame_array
toValidBboxesDataset
.Usually running inference on a video using a detection model will output a file (often a csv) that links each detection (aka bounding box) to a frame in the video. As a result, specific frame numbers appear in the output file (see here for a few examples). We would like to be able to pass these specific frame numbers to the bounding boxes dataset if they are defined.
Setting default track IDs to 1-based integers.
This follows from the discussion at Change default names for individuals if none are passed to pose dataset #217.
What does this PR do?
Adds
frame_array
as an optional attribute to theValidBboxesDataset
.frame_numbers
value is a column vector (a numpy array of size (n,1) with n being the number of frames).Sets the default IDs for the
individual_names
to start with 0 ('id_0', 'id_1',...).This PR also includes:
poses
--->ds
.test_sample_data
module to adapt to the new metadata.yaml file (which includes bbox data) that is now in the GIN repo. One fix is temporary (noted with a comment) to ensure the tests pass in this PR.Question: We do not check that the frames are monotonically increasing (i.e. sorted) or that there are no gaps - should we? I think we shouldn't, but let me know thoughts.
References
\
How has this PR been tested?
Tests pass locally and in CI.
Is this a breaking change?
No.
Does this PR require an update to the documentation?
No.
Checklist: