pyiqa.archs.ckdn_arch ===================== .. py:module:: pyiqa.archs.ckdn_arch .. autoapi-nested-parse:: CKDN model introduced by Zheng, Heliang, Huan Yang, Jianlong Fu, Zheng-Jun Zha, and Jiebo Luo. "Learning conditional knowledge distillation for degraded-reference image quality assessment." In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 10242-10251. 2021. Ref url: https://github.com/researchmm/CKDN. Re-implemented by: Chaofeng Chen (https://github.com/chaofengc) Module Contents --------------- .. py:data:: default_model_urls .. py:data:: model_urls .. py:function:: conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1) 3x3 convolution with padding .. py:function:: conv1x1(in_planes, out_planes, stride=1) 1x1 convolution .. py:class:: BasicBlock(inplanes, planes, stride=1, downsample=None, groups=1, base_width=64, dilation=1, norm_layer=None) Bases: :py:obj:`torch.nn.Module` .. py:method:: forward(x) .. py:class:: Bottleneck(inplanes, planes, stride=1, downsample=None, groups=1, base_width=64, dilation=1, norm_layer=None) Bases: :py:obj:`torch.nn.Module` .. py:method:: forward(x) .. py:class:: ResNet(block, layers, num_classes=1000, zero_init_residual=False, groups=1, width_per_group=64, replace_stride_with_dilation=None, norm_layer=None) Bases: :py:obj:`torch.nn.Module` .. py:method:: forward(x, y) Forward pass for the ResNet model. :param x: Input tensor with shape (N, C, H, W). :type x: torch.Tensor :param y: Reference tensor with shape (N, C, H, W). :type y: torch.Tensor :returns: Output tensor after processing through the network. :rtype: torch.Tensor .. py:class:: CKDN(pretrained=True, pretrained_model_path=None, use_default_preprocess=True, default_mean=(0.485, 0.456, 0.406), default_std=(0.229, 0.224, 0.225), **kwargs) Bases: :py:obj:`torch.nn.Module` CKDN metric. :param pretrained_model_path: The model path. :type pretrained_model_path: str :param use_default_preprocess: Whether to use default preprocess, default: True. :type use_default_preprocess: bool :param default_mean: The mean value. :type default_mean: tuple :param default_std: The std value. :type default_std: tuple Reference: Zheng, Heliang, Huan Yang, Jianlong Fu, Zheng-Jun Zha, and Jiebo Luo. "Learning conditional knowledge distillation for degraded-reference image quality assessment." In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 10242-10251. 2021. .. py:method:: forward(x, y) Compute IQA using CKDN model. :param x: Input tensor with shape (N, C, H, W). RGB channel order for colour images. :type x: torch.Tensor :param y: Reference tensor with shape (N, C, H, W). RGB channel order for colour images. :type y: torch.Tensor :returns: Value of CKDN model. :rtype: torch.Tensor