StructuralSimilarity<T>

Models & Types · AiDotNet.Metrics

Structural Similarity Index Measure (SSIM) for image quality assessment.

How It Works

SSIM measures structural similarity between two images, considering luminance, contrast, and structure. SSIM values range from -1 to 1, where 1 indicates perfect similarity.

Formula: SSIM(x,y) = [l(x,y)]^α · [c(x,y)]^β · [s(x,y)]^γ where l = luminance, c = contrast, s = structure comparisons.

Usage in 3D AI:

  • NeRF novel view synthesis evaluation
  • Better perceptual quality metric than PSNR
  • Captures structural distortions

Constructors

Constructor Summary
StructuralSimilarity(T? maxValue, double k1, double k2, int windowSize, double gaussianSigma) Initializes a new instance of the SSIM metric.

Methods

Method Summary
T Compute(Tensor<T> predicted, Tensor<T> groundTruth) Computes SSIM between predicted and ground truth images.