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

pyiqa.archs.pieapp_arch.default_model_urls[source]
class pyiqa.archs.pieapp_arch.CompactLinear[source]

Bases: torch.nn.Module

forward(x)[source]
class pyiqa.archs.pieapp_arch.PieAPP(patch_size=64, stride=27, pretrained=True, pretrained_model_path=None)[source]

Bases: torch.nn.Module

PieAPP 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.

compute_features(input)[source]

Computes the features of the input image.

- preprocess(x)

Preprocesses the input image.

forward(dist, ref)[source]

Computes the PieAPP score between the distorted and reference images.

flatten(matrix)[source]
compute_features(input)[source]
preprocess(x)[source]

Default BGR in [0, 255] in original codes

forward(dist, ref)[source]