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 no-reference image quality 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 | None) – Pretrained model key.

  • pretrained_model_path (str | None) – Optional local checkpoint path.

forward(x)[source]

Predict quality score with CNNIQA.

Parameters:

x (torch.Tensor) – Input tensor with shape (N, 3, H, W).

Returns:

Predicted score tensor with shape (N, 1).

Return type:

torch.Tensor