grayscale only checks image.mode, misses grey images stored as RGB
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- computer-vision, python
- Domain
- computer-vision, data
Research direction
Find get_image_mode and the grayscale checks used by find_issues(issue_types={"grayscale": {}}). Reproduce the report with RGB PNGs whose three channels are identical, then read the existing channel comparison and related tests. Done when those images are flagged as grayscale while non-gray RGB images are not.
Written by the indexing model from the issue text.
Description
get_image_mode returns image.mode whenever it is set, which PIL always does on load, so the
channel comparison in the else branch never runs for files read from disk. A grey image saved
as RGB (e.g. after a colour-space conversion to sRGB, which most preprocessing pipelines do)
is never flagged.
Reproduction: save 20 single-channel random images via Image.fromarray(g).convert("RGB") as
PNG, run find_issues(issue_types={"grayscale": {}}) -> 0 flagged.
Expected: images with three identical channels flagged as grayscale (the else branch already
does exactly that; it is just unreachable when image.mode is set).
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the 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 cleanlab/cleanvision
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cleanlab/cleanvision#281 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cleanlab/cleanvision#278 ·
-
Broken linkPossibly taken @tdashelby-cmyk claimed this 186 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
cleanlab/cleanvision#274 ·
-
Documentation / UI improvements: sidebar behavior, “edit page” link & accessibility enhancementsOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
cleanlab/cleanvision#260 ·
-
question
Difficulty 4/5 3-5 days Newbie friendliness 25/100
cleanlab/cleanvision#259 · 1 comment ·
All issues in cleanlab/cleanvision
Similar issues
-
area:core-platform effort:S priority:P3 risk:night-safe status:ready type:test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
randomparity/kdive#3620 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FinanceFlash/unvibecode#760 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
google-research/google-research#3470 ·
Maintainers usually reply within 21 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
mrvautin/ha-workouts#11 ·