pyiqa.archs.cnniqa_arch ======================= .. py:module:: pyiqa.archs.cnniqa_arch .. autoapi-nested-parse:: CNNIQA Model. 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/lidq92/CNNIQA Re-implemented by: Chaofeng Chen (https://github.com/chaofengc) with modification: - We use 3 channel RGB input. Module Contents --------------- .. py:data:: default_model_urls .. py:class:: CNNIQA(ker_size=7, n_kers=50, n1_nodes=800, n2_nodes=800, pretrained='koniq10k', pretrained_model_path=None) Bases: :py:obj:`torch.nn.Module` CNNIQA no-reference image quality model. :param ker_size: Kernel size. :type ker_size: int :param n_kers: Number of kernels. :type n_kers: int :param n1_nodes: Number of n1 nodes. :type n1_nodes: int :param n2_nodes: Number of n2 nodes. :type n2_nodes: int :param pretrained: Pretrained model key. :type pretrained: str | None :param pretrained_model_path: Optional local checkpoint path. :type pretrained_model_path: str | None .. py:method:: forward(x) Predict quality score with CNNIQA. :param x: Input tensor with shape ``(N, 3, H, W)``. :type x: torch.Tensor :returns: Predicted score tensor with shape ``(N, 1)``. :rtype: torch.Tensor