Practical overview
When it fits
Use it when you have an original image and a predicted image and want to calculate one or more of the package's supported evaluation metrics from Python or the command line.
Who it is for
- People evaluating image restoration or super-resolution outputs against reference images
- Python developers adding image-quality metrics to image-processing or evaluation scripts
- Users who want command-line metric results in machine-readable JSON
Documented uses
- Calculate selected similarity or quality metrics between an original image and a prediction
- Request several metrics or all supported metrics from the CLI
- Use the Python evaluation function or import an individual metric
- Redirect CLI JSON output to a file for later analysis
Requirements & limits
The public GitHub repository identifies the project as MIT-licensed. The documented package requires Python 3.10 or later.
- Choose the CLI for path-based comparisons and machine-readable JSON output, or the Python interface to call the evaluation function or an individual metric.
- Evaluation images should be channel-last.
- The optional
pyfftwextra is described as speeding up FSIM evaluation. - The optional
rasterioextra enables TIFF reading with rasterio instead of OpenCV.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Compare two images from the command line
Calculate selected image-similarity metrics and save the JSON output.
Before you start
- Python 3.10 or later
- The image-similarity-measures package installed
- Paths to an original image and a predicted image
- Images should be channel-last
Steps
Install the package with the command below.
pip install image-similarity-measuresRun
image-similarity-measures --org_img_path=a.tif --pred_img_path=b.tifwith paths to the original and predicted images.Add one or more
--metricvalues to select metrics; the documented choices are fsim, issm, psnr, rmse, sam, sre, ssim, uiq and all.Redirect the machine-readable JSON output to a file if you want to retain it.
Expected outcome
The command prints metric results as machine-readable JSON, which can be redirected to a file.
Guide limitations
- Input images should be channel-last.
- The
pyfftwextra is required for the documented faster FSIM evaluation option.
Calculate selected metrics in Python
Call the package's evaluation function with image paths and chosen metrics.
Before you start
- Python 3.10 or later
- The image-similarity-measures package installed
- Paths to an original image and a predicted image
Steps
Install the package with the command below.
pip install image-similarity-measuresImport
evaluationfromimage_similarity_measures.evaluate.Call
evaluationwithorg_img_path,pred_img_pathand ametricslist, as shown in the README.
Expected outcome
The Python example requests RMSE and PSNR for the supplied original and predicted image paths.
Guide limitations
- The README's image-input guidance says evaluation images should be channel-last.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 8 November 2026
- Original website title
- nekhtiari/image-similarity-measures · Official homepage title · retained in its source language

