Skip to content

Conversation

@shaneahmed
Copy link
Member

  • 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.
@shaneahmed shaneahmed self-assigned this Apr 25, 2025
@shaneahmed shaneahmed added the enhancement New feature or request label Apr 25, 2025
@shaneahmed shaneahmed added this to the Release v1.7.0 milestone Apr 25, 2025
@shaneahmed
Copy link
Member Author

@adamshephard @measty @mbasheer04 I have created this PR separately so we can work towards different scenarios particularly where the annotations have holes.

@codecov
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.69%. Comparing base (3eea490) to head (9ba6908).
⚠️ Report is 15 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

mbasheer04 added a commit to mbasheer04/tiatoolbox that referenced this pull request May 2, 2025
@adamshephard
Copy link
Contributor

adamshephard commented May 8, 2025

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.

@Jiaqi-Lv Jiaqi-Lv requested a review from Copilot May 9, 2025 11:05
Copy link
Contributor

Copilot AI left a 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.

@TissueImageAnalytics TissueImageAnalytics deleted a comment from Copilot AI May 9, 2025
@shaneahmed shaneahmed merged commit d94014f into develop May 14, 2025
25 checks passed
@shaneahmed shaneahmed deleted the new-dict-to-store-segment branch May 14, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants