- SSIM (Structural Similarity Index)
- PSNR (Peak Signal-to-Noise Ratio)
pip install opencv-python scikit-image torch torchmetrics
python SSIM.py --input pred.png --gt gt.png
python PSNR.py --input pred.png --gt gt.png
python Metric.py --input pred_dir --gt gt_dir
| Argument | Description |
|---|---|
| --input | Input image or folder |
| --gt | Ground Truth image or folder |
| --gray | Convert to grayscale |
| --resize | Resize input to GT size |
| --csv | Export results to CSV |
[1] Z. Wang and A. C. Bovik, Mean squared error: Love it or leave it? A new look at signal fidelity measures, IEEE Signal Processing Magazine, 2009.
[2] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, Image quality assessment: From error visibility to structural similarity, IEEE Transactions on Image Processing, 2004.