pyiqa.archs.piqe_arch¶
PIQE metric implementation.
- Paper:
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.
References
This PyTorch implementation by: Chaofeng Chen (https://github.com/chaofengc)
Module Contents¶
- pyiqa.archs.piqe_arch.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[source]¶
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.
- Return type:
torch.Tensor
- pyiqa.archs.piqe_arch.noise_criterion(block, block_size, block_var)[source]¶
Function to analyze block for Gaussian noise distortions.
- pyiqa.archs.piqe_arch.cal_center_sur_dev(block, block_size)[source]¶
Function to compute center surround Deviation of a block.
- pyiqa.archs.piqe_arch.notice_dist_criterion(blocks, window_size, block_impaired_threshold, N)[source]¶
Analyze blocks for noticeable artifacts and Gaussian noise distortions.
- Parameters:
blocks (torch.Tensor) – Tensor of shape (b, num_blocks, block_size, block_size).
window_size (int) – Size of the window for segment analysis.
block_impaired_threshold (float) – Threshold for considering a block as impaired.
N (int) – Size of the blocks (same as block_size).
- Returns:
Tensor indicating impaired blocks.
- Return type:
torch.Tensor