Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

image-similarity-measures

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-similarity-measures

Evaluation metrics to assess the similarity between two images.

  • 0.3.6
  • PyPI
  • Socket score

Maintainers
1

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc