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 label stitching functionality #106

Merged
merged 10 commits into from
Dec 30, 2024

Conversation

anwai98
Copy link
Contributor

@anwai98 anwai98 commented Nov 19, 2024

This PR adds a functionality to stitch labels to merge instance segmentations.

@constantinpape: Should we add tests for this?

@constantinpape
Copy link
Owner

@constantinpape: Should we add tests for this?

Yeah, it would be good to add a small test. You can do something quite simple: create a segmenation, e.g. via applying connected components to skimage.data.binary_blobs. Then add artificial tiling by adding id offsets to four tiles in the image. Then apply the stitching function and check that the result is the same as the initial segmentation.

@anwai98
Copy link
Contributor Author

anwai98 commented Nov 20, 2024

I added a simple test as discussed, and I think I can reproduce some issues I spotted (which is good to see already). I kept the test checks limited to avoid the obvious directions where the tests would fail (eg. matching the true number of instances with the merged instances)

Copy link
Owner

@constantinpape constantinpape left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests looks good. We can discuss the issues.

test/segmentation/test_stitching.py Show resolved Hide resolved
@constantinpape constantinpape marked this pull request as ready for review December 29, 2024 21:53
@constantinpape
Copy link
Owner

The tests fail because test data from EMBL owncloud currently is not available. The other tests pass now, so I will merge it.

@constantinpape constantinpape merged commit b29b464 into constantinpape:master Dec 30, 2024
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants