Skip to content

Implementation of Geometric Subsegmentation into Feature Detection#556

Draft
fsenf wants to merge 6 commits intoRC_v1.6.xfrom
dev_subsegmentation_feature_detect
Draft

Implementation of Geometric Subsegmentation into Feature Detection#556
fsenf wants to merge 6 commits intoRC_v1.6.xfrom
dev_subsegmentation_feature_detect

Conversation

@fsenf
Copy link
Member

@fsenf fsenf commented Jan 30, 2026

This has been on my list for years now. I am really interested to get your feedback on any aspect.

Content:
Geometric subsegmentation is an iterative method that works with a single threshold and breaks down the field into smaller parts. Its implementation is scale invariant, i.e. feature that appear similar are treated the same way independent of their size (and of course discretization effects destroy this property for very small objects). The method has been applied for analyzing tropical anvil clouds here:

Senf, F., D. Klocke, and M. Brueck, 2018: Size-Resolved Evaluation of Simulated Deep Tropical Convection. Mon. Wea. Rev., 146, 2161–2182, https://doi.org/10.1175/MWR-D-17-0378.1.

Implementation:

  • I made a new submodule, here tobac/segmentation/geometric_subsegmentation.py and just copied over my still existing functions. Likely, there is functionality the is duplicate to existing one --> How to deal with this?
  • I am a big fan of curvature flow filters. I kept this in here and this adds a dependency to https://simpleitk.org/about.html

Testing:

  • unit tests are missing still
  • an example notebook shows the principle. This case is indeed not to different to multi-threshold feature detection. Maybe I need to think about a show case that makes the added values more clear ...
  • If you like to run it for your one, please care that your env includes simpleitk, e.g. via mamba install simpleitk

This is really an early drafting stage - also about the question how different feature detection pathways might look like. Please be critical and actively discuss.

@fsenf fsenf added the enhancement Addition of new features, or improved functionality of existing features label Jan 30, 2026
@fsenf
Copy link
Member Author

fsenf commented Jan 30, 2026

@freemansw1 , @w-k-jones , @JuliaKukulies , @kelcyno : ping for you in case you are interested.

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

Linting results by Pylint:

Your code has been rated at 8.36/10 (previous run: 8.37/10, -0.01)
The linting score is an indicator that reflects how well your code version follows Pylint’s coding standards and quality metrics with respect to the RC_v1.6.x branch.
A decrease usually indicates your new code does not fully meet style guidelines or has potential errors.

@fsenf
Copy link
Member Author

fsenf commented Feb 23, 2026

@freemansw1 , @w-k-jones , @JuliaKukulies , @kelcyno : ping you again. Do you really have no opinion on this development idea?

@w-k-jones
Copy link
Member

@freemansw1 , @w-k-jones , @JuliaKukulies , @kelcyno : ping you again. Do you really have no opinion on this development idea?

I've only had time to have a brief look at this, but it appears very nice! I think it is very complementary to Sean's family detection in #551 , it might be a nice addition to add a keyword to allow preserving the original feature labels as families after subsegmentation. Let me know if you would like a more in depth review on this as it is currently, and I can put some time aside for it later this week :)

@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

❌ Patch coverage is 14.08935% with 250 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.49%. Comparing base (8639ece) to head (0d5138a).

Files with missing lines Patch % Lines
tobac/segmentation/geometric_subsegmentation.py 11.24% 229 Missing ⚠️
tobac/feature_detection.py 30.00% 14 Missing ⚠️
tobac/utils/general.py 41.66% 7 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           RC_v1.6.x     #556      +/-   ##
=============================================
- Coverage      64.86%   61.49%   -3.37%     
=============================================
  Files             27       28       +1     
  Lines           4047     4332     +285     
=============================================
+ Hits            2625     2664      +39     
- Misses          1422     1668     +246     
Flag Coverage Δ
unittests 61.49% <14.08%> (-3.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@fsenf fsenf linked an issue Mar 2, 2026 that may be closed by this pull request
4 tasks
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

Successfully merging this pull request may close these issues.

Bug in Segmentation Testing

2 participants