Guard clean_bw against the scikit-image remove_small_objects change before lifting the <0.25 pin
@riyagoyal01 is already working on this.
Since Nov 23, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- computer-vision
Research direction
Start with the morphology.remove_small_objects call in process.py:112 and inspect the surrounding clean_bw implementation. Add a regression test using objects of 11, 12, and 13 pixels, then replace the version-sensitive removal call with an explicit area filter that keeps objects with area greater than or equal to minimum_area.
Written by the indexing model from the issue text.
Description
pyopia.process.clean_bw removes small objects with
morphology.remove_small_objects(imbw > 0, min_size=minimum_area) (process.py:112).
On the pinned scikit-image 0.24 this keeps objects of at least minimum_area pixels. With
minimum_area=12, objects of 11, 12 and 13 pixels leave the 12 and 13 pixel objects.
Reported on scikit-image 0.26.0 (not reproduced here): min_size is deprecated in favour of
max_size, which removes objects smaller than or equal to the given size. On the same max-map image and
threshold, 0.24.0 gives 116 particles and 0.26.0 gives 110; min_size=11 on 0.26.0 gives 116.
The pin (scikit-image>=0.24.0,<0.25) means we are unaffected today, but particle counts would change
silently when it is lifted.
Suggested:
- add a regression test that pins the keep-at-least-
minimum_areabehaviour (an image with 11, 12 and 13
pixel objects, expect the 12 and 13 pixel objects to remain) - replace the call with an explicit area filter (label the image and keep objects with area >= minimum_area),
so the result does not depend on the scikit-image version
- Dominant language
- Jupyter Notebook
- Stars
- 19
- Forks
- 7
- Avg merge
- 10d 11h
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SINTEF/pyopia
-
Use explicit, per-instrument-configurable timestamp format when parsing filenames (SilCam/Holo/UVP)Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
-
patch / enhancement priority-medium
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Document running Python directly in the Docker image, and which functions are publicPossibly taken @emlynjdavies claimed this 17 days ago. Opendocumentation question
-
patch / enhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
liberation-data/fornax4j#302 ·
Maintainers usually reply within 1 day
-
documentation enhancement lane:infra size:S status:ready
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
kornia/kornia-rs#1563 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
RapidAI/RapidOCRLite#3 ·