Add keypoints dimension to bboxes dataset #435
+56
−13
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.
Description
What is this PR
Why is this PR needed?
I noticed we sometimes develop features thinking mostly on the pose datasets, and plan to expand things to bboxes datasets next. A good example is the
napari
plugin.If our bboxes and poses datasets were more consistent (or eventually, only one dataset), we would save quite a bit of almost-duplicate work and also potentially reduce cognitive load when planning new features (we wouldn't have to think how things would behave in two different scenarios).
Some options:
1 - One option towards having a unique
movement
dataset could be to add a "keypoints" dimension to the bounding boxes dataset, that is always set to "centroid". This is what is proposed in this PR (but I have no particular preference, I just wanted to gauge how painful it would be to implement).2- Another option could be to not impose strict constraints on what dimensions are required to define a
movement
dataset. We have discussed this before (do we have an issue? I couldn't find it), and allowed this to accommodate the views arraysMaybe option 1 could be a first step towards unifying the datasets, and then we reduce the constraints on what dimensions are required?
Relatedly, do we see a
movement
dataset hold both keypoint and bboxes data? For example, with aposition_keypoints
, aposition_bboxes_centroids
and aposition_bboxes_shapes
array. So thinking of bbox data as a set of additional arrays, maybe like we were envisioning for the segmentation masks.What does this PR do?
Adds a "keypoints" dimension to the bboxes dataset.
References
How has this PR been tested?
Tests pass locally and in CI.
Is this a breaking change?
Yes, the bboxes example in particular would need to be reviewed. I will wait until we decide what to do before addressing this.
Does this PR require an update to the documentation?
Yes - the documentation re movement datasets would need to be updated. I will wait until we decide what to do though.
Checklist: