ssim
**SSIM** is the **Structural Similarity Index metric that compares luminance, contrast, and structure between two images to estimate perceived similarity** - it is widely used for evaluating restoration and compression quality.
**What Is SSIM?**
- **Definition**: Full-reference image metric designed to correlate better with perception than pixel error alone.
- **Core Components**: Combines local comparisons of brightness, contrast, and structural patterns.
- **Score Range**: Typically reported from 0 to 1 where higher values indicate stronger similarity.
- **Evaluation Scope**: Commonly applied in denoising, super-resolution, compression, and enhancement studies.
**Why SSIM Matters**
- **Perceptual Relevance**: Captures structural distortions that PSNR can miss.
- **Benchmark Adoption**: Standard metric in image-processing papers and production QA pipelines.
- **Model Tuning**: Useful for selecting checkpoints that preserve scene structure.
- **Regression Detection**: Highlights quality drops after codec or model updates.
- **Interpretability**: Component-wise structure view helps diagnose artifact type.
**How It Is Used in Practice**
- **Window Configuration**: Use consistent patch size and boundary handling for fair comparison.
- **Metric Pairing**: Combine SSIM with PSNR and perceptual metrics for balanced evaluation.
- **Dataset Coverage**: Evaluate across textures, edges, and low-light scenes to avoid bias.
SSIM is **a core structural-fidelity metric in image-quality evaluation** - SSIM is most useful when reported with complementary perceptual and distortion measures.