Skip to content

👽 scikit-image>0.26.0 uses max_image for remove_small_objects#1048

Merged
shaneahmed merged 2 commits intodevelopfrom
dep-upgrade-scikit-image
Mar 31, 2026
Merged

👽 scikit-image>0.26.0 uses max_image for remove_small_objects#1048
shaneahmed merged 2 commits intodevelopfrom
dep-upgrade-scikit-image

Conversation

@shaneahmed
Copy link
Copy Markdown
Member

@shaneahmed shaneahmed commented Mar 30, 2026

Updates all model components to align with the scikit‑image 0.26.0 API change by replacing deprecated min_size with the new max_size parameter in remove_small_objects. Behaviour is preserved using max_size = min_size - 1.
Also updates requirements.txt to require scikit‑image>=0.26.0.


❓ Why use max_size = min_size - 1?

In the old API, min_size = N removed objects smaller than N pixels.
In scikit‑image ≥ 0.26.0, max_size = N removes objects larger than N pixels, reversing the direction of filtering.
To maintain identical behaviour, we remove all objects with size ≤ N−1, which corresponds exactly to the old “remove objects smaller than N” logic.

Therefore:

max_size = min_size - 1

@shaneahmed shaneahmed self-assigned this Mar 30, 2026
@shaneahmed shaneahmed added this to the Release 2.0.2 milestone Mar 30, 2026
@shaneahmed shaneahmed added the dependencies Pull requests that update a dependency file label Mar 30, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.88%. Comparing base (2da0002) to head (74bf4be).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1048   +/-   ##
========================================
  Coverage    99.88%   99.88%           
========================================
  Files           85       85           
  Lines        11577    11577           
  Branches      1513     1513           
========================================
  Hits         11564    11564           
  Misses           6        6           
  Partials         7        7           

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

@shaneahmed shaneahmed merged commit 44558a8 into develop Mar 31, 2026
26 checks passed
@shaneahmed shaneahmed deleted the dep-upgrade-scikit-image branch March 31, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant