-
Notifications
You must be signed in to change notification settings - Fork 102
✨ Add dict_to_store_semantic_segmentor
#926
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
Conversation
shaneahmed
commented
Apr 25, 2025
- Add a function to convert the output of TIAToolbox segmentation engine to AnnotationStore.
- Add a function to convert the output of TIAToolbox segmentation engine to AnnotationStore.
|
@adamshephard @measty @mbasheer04 I have created this PR separately so we can work towards different scenarios particularly where the annotations have holes. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #926 +/- ##
========================================
Coverage 99.69% 99.69%
========================================
Files 71 71
Lines 8874 8921 +47
Branches 1159 1168 +9
========================================
+ Hits 8847 8894 +47
Misses 23 23
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This still doesn't handle the holes issue. In the last test I have added, you can see that the inner contour/hole is treated the same as the outer contour, resulting in a store of length 2 (i.e. inner and outer). When these contours are drawn, any holes present will be filled in as a result by the hole contour. |
…ImageAnalytics/tiatoolbox into new-dict-to-store-segment
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.
Pull Request Overview
This PR adds a new helper function, dict_to_store_semantic_segmentor, to convert the TIAToolbox SemanticSegmentor engine output into an AnnotationStore while introducing process_contours to handle segmentation contours. The changes include new functions in tiatoolbox/utils/misc.py and several tests to verify behavior for various segmentation outputs and contour‐hole scenarios.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tiatoolbox/utils/misc.py | Added process_contours and dict_to_store_semantic_segmentor functions. |
| tests/test_utils.py | Added multiple tests to verify different segmentation, holes, and save_path scenarios. |