Structural Similarity Index Measure (SSIM)¶
Module Interface¶
- torchmetrics.StructuralSimilarityIndexMeasure[source]
alias of
torchmetrics.image._deprecated._StructuralSimilarityIndexMeasure
Functional Interface¶
- torchmetrics.functional.structural_similarity_index_measure(preds, target, gaussian_kernel=True, sigma=1.5, kernel_size=11, reduction='elementwise_mean', data_range=None, k1=0.01, k2=0.03, return_full_image=False, return_contrast_sensitivity=False)[source]
Wrapper for deprecated import.
>>> import torch >>> preds = torch.rand([3, 3, 256, 256]) >>> target = preds * 0.75 >>> _structural_similarity_index_measure(preds, target) tensor(0.9219)