pyiqa.archs.cnniqa_arch

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

pyiqa.archs.cnniqa_arch.default_model_urls[source]
class pyiqa.archs.cnniqa_arch.CNNIQA(ker_size=7, n_kers=50, n1_nodes=800, n2_nodes=800, pretrained='koniq10k', pretrained_model_path=None)[source]

Bases: torch.nn.Module

CNNIQA model.

Parameters:
  • ker_size (int) – Kernel size.

  • n_kers (int) – Number of kernels.

  • n1_nodes (int) – Number of n1 nodes.

  • n2_nodes (int) – Number of n2 nodes.

  • pretrained (str) – Pretrained model name.

  • pretrained_model_path (str) – Pretrained model path.

forward(x)[source]

Compute IQA using CNNIQA model.

Parameters:

x (torch.Tensor) – An input tensor with (N, C, H, W) shape. RGB channel order for colour images.

Returns:

Value of CNNIQA model.

Return type:

torch.Tensor