pyiqa.archs.piqe_arch ===================== .. py:module:: pyiqa.archs.piqe_arch .. autoapi-nested-parse:: PIQE metric implementation. Paper: N. Venkatanath, D. Praneeth, Bh. M. Chandrasekhar, S. S. Channappayya, and S. S. Medasani. "Blind Image Quality Evaluation Using Perception Based Features", In Proceedings of the 21st National Conference on Communications (NCC). Piscataway, NJ: IEEE, 2015. .. rubric:: References - Matlab: https://www.mathworks.com/help/images/ref/piqe.html - Python: https://github.com/michael-rutherford/pypiqe This PyTorch implementation by: Chaofeng Chen (https://github.com/chaofengc) Module Contents --------------- .. py:function:: piqe(img: torch.Tensor, block_size: int = 16, activity_threshold: float = 0.1, block_impaired_threshold: float = 0.1, window_size: int = 6) -> torch.Tensor Calculates the Perceptual Image Quality Estimator (PIQE) score for an input image. :param - img: The input image tensor. :type - img: torch.Tensor :param - block_size: The size of the blocks used for processing. Defaults to 16. :type - block_size: int, optional :param - activity_threshold: The threshold for considering a block as active. Defaults to 0.1. :type - activity_threshold: float, optional :param - block_impaired_threshold: The threshold for considering a block as impaired. Defaults to 0.1. :type - block_impaired_threshold: float, optional :param - window_size: The size of the window used for block analysis. Defaults to 6. :type - window_size: int, optional :returns: The PIQE score for the input image. :rtype: - torch.Tensor .. py:function:: noise_criterion(block, block_size, block_var) Function to analyze block for Gaussian noise distortions. .. py:function:: cal_center_sur_dev(block, block_size) Function to compute center surround Deviation of a block. .. py:function:: notice_dist_criterion(blocks, window_size, block_impaired_threshold, N) Analyze blocks for noticeable artifacts and Gaussian noise distortions. :param blocks: Tensor of shape (b, num_blocks, block_size, block_size). :type blocks: torch.Tensor :param window_size: Size of the window for segment analysis. :type window_size: int :param block_impaired_threshold: Threshold for considering a block as impaired. :type block_impaired_threshold: float :param N: Size of the blocks (same as block_size). :type N: int :returns: Tensor indicating impaired blocks. :rtype: torch.Tensor .. py:class:: PIQE Bases: :py:obj:`torch.nn.Module` PIQE module. :param x: Input tensor of shape (B, C, H, W). :type x: torch.Tensor :returns: PIQE score. :rtype: torch.Tensor .. py:method:: get_masks() .. py:method:: forward(x: torch.Tensor) -> torch.Tensor