pyiqa.archs.pieapp_arch¶
PieAPP metric, proposed by
Prashnani, Ekta, Hong Cai, Yasamin Mostofi, and Pradeep Sen. “Pieapp: Perceptual image-error assessment through pairwise preference.” In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1808-1817. 2018.
Ref url: https://github.com/prashnani/PerceptualImageError Modified by: Chaofeng Chen (https://github.com/chaofengc)
- !!! Important Note: to keep simple test process and fair comparison with other methods,
we use zero padding and extract subpatches only once rather than from multiple subimages as the original codes.
Module Contents¶
- class pyiqa.archs.pieapp_arch.PieAPP(patch_size=64, stride=27, pretrained=True, pretrained_model_path=None)[source]¶
Bases:
torch.nn.ModulePieAPP model implementation.
- Parameters:
patch_size (-) – Size of the patches to extract from the images.
stride (-) – Stride to use when extracting patches.
pretrained (-) – Whether to use a pretrained model or not.
pretrained_model_path (-) – Path to the pretrained model.
- - flatten(matrix)
Takes NxCxHxW input and outputs NxHWC.
- - preprocess(x)
Preprocesses the input image.