-
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
Add a ValidBboxesDataset class #201
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #201 +/- ##
==========================================
+ Coverage 99.68% 99.70% +0.01%
==========================================
Files 12 12
Lines 643 678 +35
==========================================
+ Hits 641 676 +35
Misses 2 2 ☔ View full report in Codecov by Sentry. |
6852bcb
to
6939bdb
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.
I like this implementation @sfmig !
I left some nitpicky comments which should be easy to fix.
Regarding your questions, in the order they were posed:
- yes, that is a good idea.
- I think you made the right call here, but this touches on a fundamental issue we three (@sfmig @lochhh) should sit down and discuss when you are back. I attempted to summarise this fundamental issue here: Need to re-design dataset validators? #210
c7ad82e
to
f029e7b
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 for implementing all the suggestion @sfmig, I only have very few remaining comments, and after that it's good to go.
|
Description
What is this PR
Why is this PR needed?
We want to be able to load bounding boxes tracks (see #167).
What does this PR do??
This PR defines a
ValidBboxesDataset
class, that followsValidPosesDataset
.A bounding boxes dataset is made up of 4 data arrays:
position
: (required) holds thex, y
coordinates of the bounding box centroid.(n_frames, n_individuals, n_spatial_coords)
, but we only enforce the last dimension (spatial) to have 2 coordinates.shape
: (required) holds thewidth
andheight
of the bounding box.confidence
: (optional) holds the confidence score for the bounding box. If None is passed, it is filled in with nans.n
dimensions have the same number of coordinates as the firstn
dimensions of theposition
array.individual_names
: (optional) a list of bounding boxes IDs. If None is passed, we assign 1-based IDs that are unique per frame. The 1-based convention for the IDs follows MOT challenge.We are assuming 2D bounding boxes only for now (through the validation of the
position
and theshape
arrays).Questions
pose
dataset, we enforce theposition
array to have a fixed number of dimensions, which I am not doing in thebboxes
dataset. This is inconsistent atm, but my understanding from chats with @niksirbi, from this PR Accessorcompute_
to only validate requiredposition
data variable #206 and from this related issue is that we would like to remove that restriction. Do correct me if I am wrong!References
Issue #167.
This work is derived from splitting #186 into smaller PRs.
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?
It will require an update once the bounding boxes functionality is complete.
Checklist: