Image quality evaluation indicators metrics: PSNR, SSIM, LPIPS

1. PSNR (Peak Signal-to-Noise Ratio)

1. Definition

It is based on the error between corresponding pixels, that is, image quality evaluation based on error sensitivity, because it does not take into account the visual characteristics of the human eye (the human eye is more sensitive to contrast differences with low spatial frequencies, and the human eye is sensitive to brightness contrast differences The sensitivity of the human eye is higher than that of the chromaticity, and the human eye's perception of an area will be affected by its surrounding adjacent areas, etc.), so the evaluation results are often inconsistent with people's subjective feelings . The size of the two images must be exactly the same.

2. Official

The size of the two images must be exactly the same during calculation!

For monochrome images, given a clean image I and noisy image K of size m×n, the mean square error (MSE) is defined as:

Then PSNR(dB) is defined as:

Among them , MAXI is the maximum value representing the color of the image point. If each sampling point is represented by 8 bits, then it is 255. If each sampling point is represented by n-bit binary, then MAXI =2^n-1.

3. Results

Therefore, the smaller the MSE, the larger the PSNR, and the better the image quality.

A PSNR above 40dB indicates excellent image quality (i.e. very close to the original image)

30-40dB usually indicates that the image quality is good (that is, the distortion is noticeable but acceptable)

20-30dB indicates poor image quality

PSNR below 20dB image is unacceptable

2. SSIM (Structural Similarity)

1. Definition

It can measure the degree of distortion of the picture, and can also measure the similarity of two pictures. Unlike MSE and PSNR, which measure absolute error, SSIM is a perceptual model, which is more in line with the intuitive feeling of the human eye .

2. Official 

SSIM considers three key characteristics of an image:

Luminance ( Luminance ) : Luminance is measured in average grayscale, obtained by averaging the values ​​of all pixels

Contrast : Contrast is measured by the standard deviation of grayscale. Unbiased estimate of standard deviation:

 

Structure ( Structure ):

α β γ respectively represent the proportion of different features in SSIM measurement. In actual calculation, α = β = γ = 1, and c 3 = c 2 / 2 are generally set, so the formula can be simplified as:

 

For each calculation, an N×N window is taken from the picture, and then the window is continuously slid for calculation, and finally the average value is taken as the global SSIM.

3. Results

  1. SSIM has symmetry, that is, SSIM(x,y)=SSIM(y,x)
  2. SSIM is a number between 0 and 1. The larger the value, the smaller the gap between the output image and the undistorted image, that is, the better the image quality . When the two images are exactly the same, SSIM=1;

3. LPIPS (Perceptual Loss)

1. Definition

The learning-based perceptual similarity measure LPIPS is more in line with human perception than traditional methods (such as L2/PSNR, SSIM, FSIM). From the paper "The Unreasonable Effectiveness of Deep Features as a Perceptual Metric"

2. Official

(14 messages) LPIPS Image Similarity Metric: The Unreasonable Effectiveness of Deep Features as a Perceptual Metric_Alocus_'s Blog-CSDN Blog_lpips

3. Results

The lower the value of LPIPS, the more similar the two images are, and vice versa, the greater the difference

Guess you like

Origin blog.csdn.net/m0_67357141/article/details/128104020