-
Notifications
You must be signed in to change notification settings - Fork 54
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
Feature: Identify object "families" using segmentation data #398
base: RC_v1.5.x
Are you sure you want to change the base?
Conversation
# Conflicts: # tobac/utils/general.py # tobac/utils/internal.py
Linting results by Pylint:Your code has been rated at 8.72/10 (previous run: 8.72/10, +0.00) |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## RC_v1.5.x #398 +/- ##
=============================================
+ Coverage 56.91% 57.18% +0.26%
=============================================
Files 20 20
Lines 3440 3466 +26
=============================================
+ Hits 1958 1982 +24
- Misses 1482 1484 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Thanks for adding this feature! I've added some suggestions in the review. Further thoughts:
- this acts similar to a merge method, does it fit better in the merge/split module?
- Can we add a complimentary feature to merge tracks where the segmented features are merged together?
- Could we add an option to erode labels or require a minimum number of adjacent pixels to merge features? This may break the current approach using regionprops
] | ||
seg_family_dict[seg_area.label] = seg_family | ||
|
||
out_families[time_index] = segmented_arr |
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.
out_families[time_index] = segmented_arr | |
out_families[time_index] = family_labeled_data |
Currently output grid is all ones for segmented area.
family_labeled_data = skimage.measure.label( | ||
segmented_arr, | ||
) |
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.
We should offset the value of these labels by the previous highest feature family so that the families are unique over time
Naming suggestion: "cluster" for a collection of features at one time step |
This is a long-promised feature to identify object families/systems by identifying where segmented objects touch.
I think this could probably use some more documentation beyond the docstring, but I wanted to get the feature in PR form first.