GithubHelp home page GithubHelp logo

zerocool909 / image-similarity-measures Goto Github PK

View Code? Open in Web Editor NEW

This project forked from up42/image-similarity-measures

0.0 1.0 0.0 1.03 MB

:chart_with_upwards_trend: Implementation of eight evaluation metrics to access the similarity between two images. The eight metrics are as follows: RMSE, PSNR, SSIM, ISSM, FSIM, SRE, SAM, and UIQ.

License: MIT License

Shell 1.08% Python 98.92%

image-similarity-measures's Introduction

Image Similarity Measures

Implementation of eight evaluation metrics to access the similarity between two images. The eight metrics are as follows:

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

For faster evaluation of the FSIM metric, the pyfftw package is required. You can install it separately, or via the speedups extra:

pip install image-similarity-measures[speedups]

You may also install the rasterio package to allow the CLI tool to use it for reading TIFF images instead of OpenCV. It, too, is available as an extra:

pip install image-similarity-measures[rasterio]

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.

image-similarity-measures's People

Contributors

markusuwe avatar nekhtiari avatar akx avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.