grayscale only checks image.mode, misses grey images stored as RGB

オープン 初心者向け
#282 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
computer-vision, python

調査の方向性

get_image_modeと、find_issues(issue_types={"grayscale": {}})で使われているグレースケールのチェックを見つけてください。3つのチャンネルが同一のRGB PNGで報告を再現し、その後、既存のチャンネル比較と関連テストを読んでください。これらの画像がグレースケールとして検出され、グレースケールではないRGB画像が検出されなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
1.2k
フォーク
87
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cleanlab/cleanvision のほかの issue

cleanlab/cleanvision の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。