Skip to content

Metrics

Dheshan Mohandass edited this page Nov 23, 2020 · 3 revisions

This page deals with computing relevant metrics for the source and processed images.

Files discussed on this page

  1. metrics.py
  2. 04_Metrics.ipynb
  3. b04_metrics.bat

Metrics Used

Some of the metrics defined in metrics.py are as follows.

Speckle Suppression Index (SSI)

Speckle Suppression index measures the strength of speckle-noise within the image and is defined as the coefficient of variation of the filtered image which is normalized by the coefficient of variation of the noisy image. It is given by the following equation.

SSI Formula

SSI Formula Explanation

Equivalent Number of Looks (ENL)

The equivalent number of looks is calculated from the square of the ratio of the mean of the image to the variance of the image. A higher value of ENL indicates better performance of filters. It should be as high as possible. It is given by the following equation.

ENLFormula

Speckle Suppression and Mean Preservation Index (SMPI)

SSI and ENL are not useful quality metrics if the filter overestimates the mean value. Speckle suppression and Mean Preservation Index was proposed to overcome this limitation. It is given by the following equation.

SMPI Formula

SMPI Formula Explanation

metrics.py

This file computes and displays various metrics between the filtered and the original image.

  • noisy_dir: Path to the directory with noisy images (unprocessed, original) (Default Value: 'output/noisy')
  • filtered_dir: Path to where the processed images are located. (Default Value: 'output/denoised')
  • ext: The extension of the image to be considered (Default Value: 'png')

Currently supports

  1. SSI (Speckle Suppression Index)
  2. ENL (Equivalent Number of Looks)
  3. SMPI (Speckle Suppression and Mean Preservation Index)
  4. SSIM (Structural Similarity Index Measure)
  5. PSNR (Peak Signal-to-Noise Ratio)

The metrics computed are directly outputted to the console.

Scripts

This batch file calls the 'metrics.py' file with the parameters ' --noisy-dir="%cd%\output\noisy" --filtered-dir="%cd%\output\denoised" --img-ext="png"'

Note: To ensure the proper working of scripts and batch files, ensure that the project structure is maintained, as the scripts and batch files make a lot of assumptions on where the required files are located and tend to use the 'default' values. In this case, it is assumed that the noisy Images and the filtered images have the 'png' extension, and are located at 'output\noisy' and 'output\denoised' respectively.