👽 scikit-image>0.26.0 uses max_image for remove_small_objects#1048
Merged
shaneahmed merged 2 commits intodevelopfrom Mar 31, 2026
Merged
👽 scikit-image>0.26.0 uses max_image for remove_small_objects#1048shaneahmed merged 2 commits intodevelopfrom
scikit-image>0.26.0 uses max_image for remove_small_objects#1048shaneahmed merged 2 commits intodevelopfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates all model components to align with the scikit‑image 0.26.0 API change by replacing deprecated
min_sizewith the newmax_sizeparameter inremove_small_objects. Behaviour is preserved usingmax_size = min_size - 1.Also updates
requirements.txtto requirescikit‑image>=0.26.0.❓ Why use
max_size = min_size - 1?In the old API,
min_size = Nremoved objects smaller than N pixels.In
scikit‑image ≥ 0.26.0,max_size = Nremoves 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: