pyiqa.archs.paq2piq_arch ======================== .. py:module:: pyiqa.archs.paq2piq_arch .. autoapi-nested-parse:: Paq2piq metric, proposed by Ying, Zhenqiang, Haoran Niu, Praful Gupta, Dhruv Mahajan, Deepti Ghadiyaram, and Alan Bovik. "From patches to pictures (PaQ-2-PiQ): Mapping the perceptual space of picture quality." In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3575-3585. 2020. Ref url: https://github.com/baidut/paq2piq/blob/master/paq2piq/model.py Modified by: Chaofeng Chen (https://github.com/chaofengc) Module Contents --------------- .. py:data:: default_model_urls .. py:class:: AdaptiveConcatPool2d(sz=None) Bases: :py:obj:`torch.nn.Module` Concatenate adaptive max and average pooling outputs. .. py:method:: forward(x) .. py:class:: PAQ2PIQ(backbone='resnet18', pretrained=True, pretrained_model_path=None) Bases: :py:obj:`torch.nn.Module` PaQ-2-PiQ no-reference image quality predictor. :param backbone: Backbone name. Currently ``'resnet18'`` is supported. :type backbone: str :param pretrained: Whether to load pretrained PaQ-2-PiQ weights. :type pretrained: bool :param pretrained_model_path: Optional local checkpoint path. :type pretrained_model_path: str | None .. py:method:: forward(x) Predict quality score from image tensor. :param x: Input tensor with shape ``(N, 3, H, W)``. :type x: torch.Tensor :returns: Predicted scores with shape ``(N, 1)``. :rtype: torch.Tensor