Evaluation metrics to assess the similarity between two images.
Project description
Image Similarity Measures
Implementation of eight evaluation metrics to access the similarity between two images. The eight metrics are as follows:
- Root mean square error (RMSE),
- Peak signal-to-noise ratio (PSNR),
- Structural Similarity Index (SSIM),
- Feature-based similarity index (FSIM),
- Information theoretic-based Statistic Similarity Measure (ISSM),
- Signal to reconstruction error ratio (SRE),
- Spectral angle mapper (SAM), and
- Universal image quality index (UIQ)
Instructions
The following step-by-step instructions will guide you through installing this package and run evaluation using the command line tool.
Note: Supported python versions are 3.6, 3.7, 3.8, and 3.9.
Install package
pip install image-similarity-measures
Usage
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)
Evaluation
For doing the evaluation, you can easily run the following command:
image-similarity-measures --org_img_path=a.tif --pred_img_path=b.tif
The results are printed in machine-readable JSON, so you can redirect the output of the command into a file.
Note that images that are used for evaluation should be channel last.
Usage in python
import image_similarity_measures
from image_similarity_measures.quality_metrics import rmse, psnr
Install package from source
Clone the repository
git clone https://github.com/up42/image-similarity-measures.git
cd image-similarity-measures
Then navigate to the folder via cd image-similarity-measures
.
Installing the required libraries
First create a new virtual environment called similarity-measures
, for example by using
virtualenvwrapper:
mkvirtualenv --python=$(which python3.7) similarity-measures
Activate the new environment:
workon similarity-measures
Install the necessary Python libraries via:
bash setup.sh
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for image-similarity-measures-0.3.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a67baae91f696027a28f50ea9021ca69c1e1e14b4142c9cad4eb7f47ac8f5b6f |
|
MD5 | 3ddc3d06863a498a0d664fae4ed7261a |
|
BLAKE2b-256 | 155b31b037324f91788e716ca8a2e8ba49f628525a797f1a7da0d83cfb6fe93a |
Hashes for image_similarity_measures-0.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5018fd694049d766bb016ee3e970309394fc9ed162c438872a513c5f385c93b5 |
|
MD5 | 346484f1b93c3499931cc90c721bac1b |
|
BLAKE2b-256 | b9f613429cd80776321dd8241f09ad49e4c58869fa091aa778a0c8b8a2a6c20f |