matplotlib / matplotlib/pytest-mpl
Perceptual Image Hash
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 272
- フォーク
- 53
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Thanks and congrats on pytest-mpl. It's really lovely 👍
Over on SciTools/iris we've been using a very similar framework to perform graphical testing, but rather than using RMS or SHA-256 hashes we've opted to use perceptual image hashes.
Historically, we found using RMS/SHA-256 quite fragile and too sensitive to change, and that sometimes involved quite an overhead on devs to manually understand whether graphical test failures were significant or not; typically, it really depended on the nature of the image change involved, and that generally took time and effort to figure out.
However, for the last few years now we've adopted perceptual image hashing as a more robust and stable approach to graphical image testing, and we'd love to be able to use pytest-mpl as a general framework (rather than reinvent the wheel) as we're keen to use perceptual image hashing elsewhere in other packages other than iris.
If you want to know more about perceptual image hashing:
- here's a gist notebook detailing outcomes from our initial investigation of perceptual image hashing as an option for
SciTools/iris - here's a scientific paper (of which there are many) performing an analysis of perceptual image hashing algorithms
In the end, we opted to leverage the https://github.com/JohannesBuchner/imagehash package, which is available on both conda-forge and pypi, to perform the actual perceptual image hashing.
At this point, I guess my question to the pytest-mpl core developers are:
- Have you considered using perceptual image hashing as an approach and decided not to use it? If so, why? That would be really great to know.
- If you're not against the concept, would you be open to us making an additive change to
pytest-mplwhere the user can choose to opt-in to an alternative hashing algorithm, that they configure, to perform their graphical testing?
I think that option [2] would be possible and a valuable feature for the pytest-mpl community.
However, you guys have the vision of where you want pytest-mpl go and the use cases that you want to address. It would be really great to know whether you're open to offering configurable hashing kernels as a feature. If you are, then we'd be more than willing to do the work and contribute to pytest-mpl under your guidance and advice.
Thanks 😃
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、pytest-mpl に既存のグラフィカル画像比較とハッシュ処理の挙動を確認し、次に imagehash パッケージで opt-in の代替手段をサポートできるかを検討します。完了条件は、プロジェクトとしての方針を決定し、採用する場合は、画像比較の挙動をカバーする設定可能な知覚ハッシュ機能を定義することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- testing-qa
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100