Skip to content
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 overlap tracking #262

Open
freemansw1 opened this issue Apr 19, 2023 · 3 comments
Open

Add overlap tracking #262

freemansw1 opened this issue Apr 19, 2023 · 3 comments
Assignees
Labels
enhancement Addition of new features, or improved functionality of existing features
Milestone

Comments

@freemansw1
Copy link
Member

After discussion at the workshop, I think we should go ahead and add overlap tracking using the segmentation output. We should probably do this post-xarray switchover, but I wanted to add it to our issues list so that we can plan around it.

@freemansw1 freemansw1 added the enhancement Addition of new features, or improved functionality of existing features label Apr 19, 2023
@JuliaKukulies
Copy link
Member

Would the easiest way to implement this be to specify a structure with scipy.ndimage.label that connects segmented features that are continuous over the time dimension or would you rather write our own method (e.g. by checking if segmented features within the predicted search radius share a certain area between two time steps)? What other methods exist already in python that define the intersection/overlap between two objects?

@w-k-jones
Copy link
Member

I've looked into using scipy.ndimage.label for this before, and although I don't think we can use it directly (as it would overwrite the segmentation step), we can use a similar approach.

I have some code that already implements this in tobac-flow, that could be be simplified for a more general case (see below). We could add more options for minimum/maximum overlap and predictive tracking in the find_neighbour_labels function fairly easily. It also currently combines all merging/splitting features, but this could also be changed to only accept the largest overlap

https://github.com/w-k-jones/tobac-flow/blob/7fab315573279cb95a40632ef7034eb8c568aa40/src/tobac_flow/label.py#L233-L394

@w-k-jones w-k-jones added this to the Version 1.5.x milestone Oct 8, 2023
@w-k-jones w-k-jones self-assigned this Oct 8, 2023
@w-k-jones
Copy link
Member

I've started work on adding overlap tracking in https://github.com/w-k-jones/tobac/tree/overlap_tracking, with a basic working version. There are still a number of features that need adding/improving, but I'll open a draft pull request before it gets to a point where it's too complicated to review

@freemansw1 freemansw1 modified the milestones: Version 1.5.x, Version 1.6 Dec 8, 2023
@fsenf fsenf modified the milestones: Version 1.6, Beyond v1.6 May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Addition of new features, or improved functionality of existing features
Projects
None yet
Development

No branches or pull requests

4 participants