pyiqa.archs.gmsd_arch ===================== .. py:module:: pyiqa.archs.gmsd_arch .. autoapi-nested-parse:: GMSD Metric @article{xue2013gmsd, title={Gradient magnitude similarity deviation: A highly efficient perceptual image quality index}, author={Xue, Wufeng and Zhang, Lei and Mou, Xuanqin and Bovik, Alan C}, journal={IEEE transactions on image processing}, volume={23}, number={2}, pages={684--695}, year={2013}, publisher={IEEE} } Created by: https://github.com/dingkeyan93/IQA-optimization/blob/master/IQA_pytorch/GMSD.py Modified by: Jiadi Mo (https://github.com/JiadiMo) Refer to: Matlab code from https://www4.comp.polyu.edu.hk/~cslzhang/IQA/GMSD/GMSD.m; Module Contents --------------- .. py:function:: gmsd(x: torch.Tensor, y: torch.Tensor, T: int = 170, channels: int = 3, test_y_channel: bool = True) -> torch.Tensor GMSD metric. :param - x: A distortion tensor. Shape :math:`(N, C, H, W)`. :param - y: A reference tensor. Shape :math:`(N, C, H, W)`. :param - T: A positive constant that supplies numerical stability. :param - channels: Number of channels. :param - test_y_channel: bool, whether to use y channel on ycbcr. .. py:class:: GMSD(channels: int = 3, test_y_channel: bool = True) Bases: :py:obj:`torch.nn.Module` Gradient Magnitude Similarity Deviation Metric. :param - channels: Number of channels. :param - test_y_channel: bool, whether to use y channel on ycbcr. Reference: Xue, Wufeng, Lei Zhang, Xuanqin Mou, and Alan C. Bovik. "Gradient magnitude similarity deviation: A highly efficient perceptual image quality index." IEEE Transactions on Image Processing 23, no. 2 (2013): 684-695. .. py:method:: forward(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor Args: x: A distortion tensor. Shape :math:`(N, C, H, W)`. y: A reference tensor. Shape :math:`(N, C, H, W)`. Order of input is important.