pyiqa.archs.vif_arch ==================== .. py:module:: pyiqa.archs.vif_arch .. autoapi-nested-parse:: VIF Metric @article{sheikh2006vif, title={Image information and visual quality}, author={Sheikh, Hamid R and Bovik, Alan C}, journal={IEEE Transactions on image processing}, volume={15}, number={2}, pages={430--444}, year={2006}, publisher={IEEE} } Created by: https://github.com/dingkeyan93/IQA-optimization/blob/master/IQA_pytorch/VIF.py Modified by: Jiadi Mo (https://github.com/JiadiMo) Refer to: Matlab code from http://live.ece.utexas.edu/research/Quality/vifvec_release.zip; Module Contents --------------- .. py:function:: sp5_filters() Define spatial filters. .. py:function:: corrDn(image, filt, step=1, channels=1) Compute correlation of image with FILT, followed by downsampling. :param image: A tensor. Shape :math:`(N, C, H, W)`. :param filt: A filter. :param step: Downsampling factors. :param channels: Number of channels. .. py:function:: SteerablePyramidSpace(image, height=4, order=5, channels=1) Construct a steerable pyramid on image. :param image: A tensor. Shape :math:`(N, C, H, W)`. :param height: Number of pyramid levels to build. :type height: int :param order: Number of orientations. :type order: int :param channels: Number of channels. :type channels: int .. py:class:: VIF(channels=1, level=4, ori=6) Bases: :py:obj:`torch.nn.Module` Image Information and Visual Quality metric :param channels: Number of channels. :type channels: int :param level: Number of levels to build. :type level: int :param ori: Number of orientations. :type ori: int Reference: Sheikh, Hamid R., and Alan C. Bovik. "Image information and visual quality." IEEE Transactions on image processing 15, no. 2 (2006): 430-444. .. py:method:: corrDn_win(image, filt, step=1, channels=1, start=[0, 0], end=[0, 0]) Compute correlation of image with FILT using window, followed by downsampling. :param image: A tensor. Shape :math:`(N, C, H, W)`. :param filt: A filter. :param step: Downsampling factors. :type step: int :param channels: Number of channels. :type channels: int :param start: The window over which the convolution occurs. :type start: list :param end: The window over which the convolution occurs. :type end: list .. py:method:: vifsub_est_M(org, dist) Calculate the parameters of the distortion channel. :param org: A reference tensor. Shape :math:`(N, C, H, W)`. :param dist: A distortion tensor. Shape :math:`(N, C, H, W)`. .. py:method:: refparams_vecgsm(org) Calculate the parameters of the reference image. :param org: A reference tensor. Shape :math:`(N, C, H, W)`. .. py:method:: vif(x, y) VIF metric. Order of input is important. :param x: A distortion tensor. Shape :math:`(N, C, H, W)`. :param y: A reference tensor. Shape :math:`(N, C, H, W)`. .. py:method:: forward(X, Y) 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.