Skip to main content

Evaluation metrics to assess the similarity between two images.

Project description

Image Similarity Measures

Python package and commandline tool to evaluate the similarity between two images with eight evaluation metrics:

Installation

Supports Python >=3.8.

pip install image-similarity-measures

Optional: For faster evaluation of the FSIM metric, the pyfftw package is required, install via:

pip install image-similarity-measures[speedups]

Optional: For reading TIFF images with rasterio instead of OpenCV, install:

pip install image-similarity-measures[rasterio]

Usage on commandline

To evaluate the similarity beteween two images, run on the commandline:

image-similarity-measures --org_img_path=a.tif --pred_img_path=b.tif

Note that images that are used for evaluation should be channel last. The results are printed in machine-readable JSON, so you can redirect the output of the command into a file.

Parameters

  --org_img_path FILE   Path to original input image
  --pred_img_path FILE  Path to predicted image
  --metric METRIC       select an evaluation metric (fsim, issm, psnr, rmse,
                        sam, sre, ssim, uiq, all) (can be repeated)

Usage in Python

from image_similarity_measures.evaluate import evaluation

evaluation(org_img_path="example/lafayette_org.tif", 
           pred_img_path="example/lafayette_pred.tif", 
           metrics=["rmse", "psnr"])
from image_similarity_measures.quality_metrics import rmse

rmse(org_img=np.random.rand(3,2,1), pred_img=np.random.rand(3,2,1))

Contribute

Contributions are welcome! Please see README-dev.md for instructions.

Citation

Please use the following for citation purposes of this codebase:

Müller, M. U., Ekhtiari, N., Almeida, R. M., and Rieke, C.: SUPER-RESOLUTION OF MULTISPECTRAL SATELLITE IMAGES USING CONVOLUTIONAL NEURAL NETWORKS, ISPRS Ann. Photogramm. Remote Sens. Spatial Inf. Sci., V-1-2020, 33–40, https://doi.org/10.5194/isprs-annals-V-1-2020-33-2020, 2020.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image_similarity_measures-0.3.6.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file image_similarity_measures-0.3.6.tar.gz.

File metadata

File hashes

Hashes for image_similarity_measures-0.3.6.tar.gz
Algorithm Hash digest
SHA256 786e28fdf46c2772b74de06094eff7471fd10e545e06e92e2b1ad43bf9702705
MD5 bd51864620add13ac49a53a9b5c790f4
BLAKE2b-256 599e3a0f1469f258b75d7743cd344aee1d7f48426720fb654e03cc1c6778ec0b

See more details on using hashes here.

File details

Details for the file image_similarity_measures-0.3.6-py3-none-any.whl.

File metadata

File hashes

Hashes for image_similarity_measures-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 411665f6db9bc3fb1901fc0ac9911095f507926ef065a82ac7f0e181b775e7c6
MD5 148f79b0670f6b04d0df8f621506ab9f
BLAKE2b-256 348164e6660bc37f27de2dae606dac5fb126614cc18e5299b0151832f2e5b64b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page