Skip to content

faster regionprops annotator#257

Open
TeunHuijben wants to merge 1 commit into
mainfrom
bypass-rp-for-only-position
Open

faster regionprops annotator#257
TeunHuijben wants to merge 1 commit into
mainfrom
bypass-rp-for-only-position

Conversation

@TeunHuijben

Copy link
Copy Markdown
Collaborator

In the majority of cases where the RegionpropsAnnotator is called, it is only to retrieve the position key (mainly in SolutionTracks.init, where the pos key is recomputed). It is overkill to use regionprops for this on every single mask.

This PR implements a faster method to find the position from mask+bbox without having to go through the expensive regionprops.

This path is not part of the current benchmark, but in my hands, it's >3x faster.

@TeunHuijben TeunHuijben requested a review from cmalinmayor as a code owner July 2, 2026 21:03
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.72%. Comparing base (6baed08) to head (1b213ca).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #257      +/-   ##
==========================================
- Coverage   93.78%   93.72%   -0.07%     
==========================================
  Files          59       59              
  Lines        3284     3297      +13     
==========================================
+ Hits         3080     3090      +10     
- Misses        204      207       +3     

☔ View full report in Codecov by Harness.
📢 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.

@TeunHuijben TeunHuijben added the ready for final review PR ready for final approval label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for final review PR ready for final approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant