pyiqa.archs.dmm_arch¶
Debiased Mapping for Full-Reference Image Quality Assessment
- @article{chen2025debiased,
title={Debiased mapping for full-reference image quality assessment}, author={Chen, Baoliang and Zhu, Hanwei and Zhu, Lingyu and Wang, Shanshe and Pan, Jingshan and Wang, Shiqi}, journal={IEEE Transactions on Multimedia}, year={2025}, publisher={IEEE}
}
- Reference:
Arxiv link: https://ieeexplore.ieee.org/abstract/document/10886996
Official Github: https://github.com/Baoliang93/DMM
Module Contents¶
- class pyiqa.archs.dmm_arch.FeaturesExtractor(target_features=('relu3_3', 'relu4_3'), use_input_norm=False, requires_grad=False, replace_pooling=True)[source]¶
Bases:
torch.nn.ModuleVGG16 feature extractor for DMM.
- Parameters:
target_features (tuple[str, ...]) – VGG feature names to collect.
use_input_norm (bool) – Whether to apply ImageNet normalization.
requires_grad (bool) – Whether extracted backbone parameters are trainable.
replace_pooling (bool) – Whether to replace max-pooling with L2 pooling.
- class pyiqa.archs.dmm_arch.L2Pool2d(kernel_size: int = 3, stride: int = 2, padding=1)[source]¶
Bases:
torch.nn.ModuleApplies L2 pooling with Hann window of size 3x3 :param x: Tensor with shape (N, C, H, W)
- class pyiqa.archs.dmm_arch.DMM(reduce_dim=256, kernel_size=5, features_to_compute=('relu3_3', 'relu4_3'), criterion=torch.nn.CosineSimilarity(), use_dropout=True, **kwargs)[source]¶
Bases:
torch.nn.ModuleDMM full-reference IQA model.
- Parameters:
reduce_dim (int) – Reserved compatibility argument.
kernel_size (int) – Reserved compatibility argument.
features_to_compute (tuple[str, ...]) – Feature names used for DMM.
criterion (torch.nn.Module) – Reserved compatibility argument.
use_dropout (bool) – Reserved compatibility argument.
**kwargs – Reserved compatibility arguments.
- forward(Dist, Ref, as_loss=False)[source]¶
Compute DMM score or training loss.
- Parameters:
Dist (torch.Tensor) – Distorted image tensor
(N, 3, H, W).Ref (torch.Tensor) – Reference image tensor
(N, 3, H, W).as_loss (bool) – If
True, return mean score for optimization.
- Returns:
Per-sample scores when
as_loss=False, otherwise a scalar loss tensor.- Return type:
torch.Tensor