This repository contains a collection of several IQA metrics in Python (SSIM, PSNR, MS-SSIM, VIF, DISTS, HaarPSI, LPIPS, PaQ2PiQ) and Matlab (SSIM, PSNR, MS-SSIM, IW-SSIM, DISTS, DSS, FSIM, GMSD, HaarPSI, MDSI, NIQE, VSI, BRISQUE) used in the paper A study on the adequacy of common IQA measures for medical images for several datasets.
First, store the dataset in the dataset folder, with subfolders for each dataset, e.g. "./datasets/DATASETNAME/". Each dataset subfolder has to contain for each dataset entry a .mat file which contains the variables:
- "name": char, The name of this dataset entry, e.g. the filename
- "ref_img": NxM double, 2D Array containing a grayscale reference image, rescaled to 0-1
- "deg_img": NxM double, 2D Array containing a grayscale degraded image, rescaled to 0-1
If several annotations for a dataset are available, they have to be saved as separate .csv files in "./annotations/DATASETNAME/", e.g. as "./annotations/DATASETNAME/ANNOTATIONS1.csv" and "./annotations/DATASETNAME/ANNOTATIONS2.csv". The .csv files must contain a column called "filename", which entries is equal to the name provided in the .mat dataset files and a column "overall_quality", which contains the rating.
Then, to run the metrics, execute "./IQA metrics python/runpythonmetrics.py" and "./IQA metrics matlab/runmatlabmetrics.m". For the python metrics, it is necessary to create a virtual environment for each metric in "./IQA metrics python/METRICNAME/venv/" and for the file "./IQA metrics python/runpythonmetrics.py" in "./IQA metrics python/venv/". The necessary requirements.txt files are provided in each folder.
Finally, execute the file "./compute correlation/compute_correlation.ipynb" using the provided environment file "./compute correlation/requirements.txt" to compute the correlation of the computed IQA metrics and the annotations.
In this repository, we provide annotations for the datasets:
- LIVE Image Quality Assessment Database Release 2, converted to grayscale with the in-built MATLAB function mat2gray
- LIVE Multiply Distorted Image Quality Database, converted to grayscale with the in-built MATLAB function mat2gray