§
    ’©ºjLL  ã                   óÖ   — d dl mZ d dlmZmZmZmZ d dlZd dlmZ d dl	m
Z
 d dlmZmZmZ d dlmZ d dlmZ d d	lmZ d d
lmZmZ esddgZ G d„ de¦  «        Z G d„ de¦  «        ZdS )é    )ÚSequence)ÚAnyÚListÚOptionalÚUnionN)ÚTensor)ÚLiteral)Ú_multiscale_ssim_updateÚ_ssim_check_inputsÚ_ssim_update)ÚMetric)Údim_zero_cat)Ú_MATPLOTLIB_AVAILABLE)Ú_AX_TYPEÚ_PLOT_OUT_TYPEz%StructuralSimilarityIndexMeasure.plotz/MultiScaleStructuralSimilarityIndexMeasure.plotc                   óÔ  ‡ — e Zd ZU dZdZeed<   dZeed<   dZeed<   dZ	e
ed<   d	Ze
ed
<   ee         ed<   ee         ed<   	 	 	 	 	 	 	 	 	 d%dedee
ee
         f         deeee         f         ded         deee
ee
e
f         f                  de
de
dedededdfˆ fd„Zdededdfd „Zdeeeeef         f         fd!„Z	 d&d"eeeee         f                  d#ee         defd$„Zˆ xZS )'Ú StructuralSimilarityIndexMeasurea4	  Compute Structural Similarity Index Measure (SSIM_).

    As input to ``forward`` and ``update`` the metric accepts the following input

    - ``preds`` (:class:`~torch.Tensor`): Predictions from model
    - ``target`` (:class:`~torch.Tensor`): Ground truth values

    As output of `forward` and `compute` the metric returns the following output

    - ``ssim`` (:class:`~torch.Tensor`): if ``reduction!='none'`` returns float scalar tensor with average SSIM value
      over sample else returns tensor of shape ``(N,)`` with SSIM values per sample

    Args:
        preds: estimated image
        target: ground truth image
        gaussian_kernel: If ``True`` (default), a gaussian kernel is used, if ``False`` a uniform kernel is used
        sigma: Standard deviation of the gaussian kernel, anisotropic kernels are possible.
            Ignored if a uniform kernel is used
        kernel_size: the size of the uniform kernel, anisotropic kernels are possible.
            Ignored if a Gaussian kernel is used
        reduction: a method to reduce metric score over individual batch scores

            - ``'elementwise_mean'``: takes the mean
            - ``'sum'``: takes the sum
            - ``'none'`` or ``None``: no reduction will be applied

        data_range:
            the range of the data. If None, it is determined from the data (max - min). If a tuple is provided then
            the range is calculated as the difference and input is clamped between the values.
        k1: Parameter of SSIM.
        k2: Parameter of SSIM.
        return_full_image: If true, the full ``ssim`` image is returned as a second argument.
            Mutually exclusive with ``return_contrast_sensitivity``
        return_contrast_sensitivity: If true, the constant term is returned as a second argument.
            The luminance term can be obtained with luminance=ssim/contrast
            Mutually exclusive with ``return_full_image``
        kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.

    Example:
        >>> import torch
        >>> from torchmetrics.image import StructuralSimilarityIndexMeasure
        >>> preds = torch.rand([3, 3, 256, 256])
        >>> target = preds * 0.75
        >>> ssim = StructuralSimilarityIndexMeasure(data_range=1.0)
        >>> ssim(preds, target)
        tensor(0.9219)

    TÚhigher_is_betterÚis_differentiableFÚfull_state_updateç        Úplot_lower_boundç      ð?Úplot_upper_boundÚpredsÚtargetç      ø?é   Úelementwise_meanNç{®Gáz„?ç¸…ëQ¸ž?Úgaussian_kernelÚsigmaÚkernel_sizeÚ	reduction©r   ÚsumÚnoneNÚ
data_rangeÚk1Úk2Úreturn_full_imageÚreturn_contrast_sensitivityÚkwargsÚreturnc
                 ó  •—  t          ¦   «         j        di |
¤Ž d}||vrt          d|› d|› �¦  «        ‚|dv r+|                      dt	          j        d¦  «        d¬¦  «         n|                      dg d ¬¦  «         |                      d	t	          j        d¦  «        d¬¦  «         |	s|r|                      d
g d¬¦  «         || _        || _        || _        || _	        || _
        || _        || _        || _        |	| _        d S )Nr&   ú$Argument `reduction` must be one of ú
, but got ©r   r'   Ú
similarityr   r'   ©ÚdefaultÚdist_reduce_fxÚtotalÚimage_returnÚcat© )ÚsuperÚ__init__Ú
ValueErrorÚ	add_stateÚtorchÚtensorr"   r#   r$   r%   r)   r*   r+   r,   r-   )Úselfr"   r#   r$   r%   r)   r*   r+   r,   r-   r.   Úvalid_reductionÚ	__class__s               €úg/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/torchmetrics/image/ssim.pyr=   z)StructuralSimilarityIndexMeasure.__init__Z   s1  ø€ ð 	�‰ŒÔÐ"Ð"˜6Ð"Ð"Ð"àCˆØ˜OÐ+Ð+ÝÐjÀOÐjÐjÐ_hÐjÐjÑkÔkÐkàÐ3Ð3Ð3Ø�NŠN˜<µ´¸cÑ1BÔ1BÐSXˆNÑYÔYÐYÐYà�NŠN˜<°ÀDˆNÑIÔIÐIà�Š�w­¬°SÑ(9Ô(9È%ˆÑPÔPÐPà&ð 	MÐ*;ð 	MØ�NŠN˜>°2ÀeˆNÑLÔLÐLà.ˆÔØˆŒ
Ø&ˆÔØ"ˆŒØ$ˆŒØˆŒØˆŒØ!2ˆÔØ+FˆÔ(Ð(Ð(ó    c                 óV  — t          ||¦  «        \  }}t          ||| j        | j        | j        | j        | j        | j        | j        | j	        ¦
  «
        }t          |t          ¦  «        r|\  }}n|}| j	        s| j        rCt          | j        t          ¦  «        st          d¦  «        ‚| j                             |¦  «         | j        dv r›t          | j        t$          j        ¦  «        st          d¦  «        ‚| xj        |                     ¦   «         z  c_        t          | j        t$          j        ¦  «        st          d¦  «        ‚| xj        |j        d         z  c_        dS t          | j        t          ¦  «        st          d¦  «        ‚| j                             |¦  «         dS )ú*Update state with predictions and targets.ú@Expected `self.image_return` to be a list when returning images.r3   z9Expected `self.similarity` to be a Tensor for reductions.ú%Expected `self.total` to be a Tensor.r   z>Expected `self.similarity` to be a list when reduction='none'.N)r   r   r"   r#   r$   r)   r*   r+   r,   r-   Ú
isinstanceÚtupler9   ÚlistÚ	TypeErrorÚappendr%   r4   r@   r   r'   r8   Úshape)rB   r   r   Úsimilarity_packr4   Úimages         rE   Úupdatez'StructuralSimilarityIndexMeasure.update�   sš  € å*¨5°&Ñ9Ô9‰ˆˆvÝ&ØØØÔ ØŒJØÔØŒOØŒGØŒGØÔ"ØÔ,ñ
ô 
ˆõ �o¥uÑ-Ô-ð 	)Ø /ÑˆJ˜˜à(ˆJàÔ+ð 	,¨tÔ/Eð 	,Ý˜dÔ/µÑ6Ô6ð dÝÐ bÑcÔcÐcØÔ×$Ò$ UÑ+Ô+Ð+àŒ>Ð8Ð8Ð8Ý˜dœo­u¬|Ñ<Ô<ð ]ÝÐ [Ñ\Ô\Ð\ØˆOŒO˜zŸ~š~Ñ/Ô/Ñ/ˆOŒOÝ˜dœj­%¬,Ñ7Ô7ð IÝÐ GÑHÔHÐHØˆJŒJ˜%œ+ aœ.Ñ(ˆJŒJˆJˆJå˜dœo­tÑ4Ô4ð bÝÐ `ÑaÔaÐaØŒO×"Ò" :Ñ.Ô.Ð.Ð.Ð.rF   c                 óV  — | j         dk    rSt          | j        t          ¦  «        r*t          | j        t          ¦  «        r| j        | j        z  }n‰t          d¦  «        ‚| j         dk    r1t          | j        t          ¦  «        st          d¦  «        ‚| j        }n>t          | j        t          ¦  «        rt          | j        ¦  «        }nt          d¦  «        ‚| j        s| j	        rBt          | j
        t          ¦  «        rt          | j
        ¦  «        }nt          d¦  «        ‚||fS |S )zCompute SSIM over state.r   z_Expected `self.similarity`and `self.total` to be of type Tensor for elementwise_mean reduction.r'   ú<Expected `self.similarity` to be a Tensor for sum reduction.ú=Expected `self.similarity` to be a list for reduction='none'.rI   )r%   rK   r4   r   r8   rN   rM   r   r-   r,   r9   )rB   r4   r9   s      rE   Úcomputez(StructuralSimilarityIndexMeasure.compute§   s*  € àŒ>Ð/Ò/Ð/Ý˜$œ/­6Ñ2Ô2ð µzÀ$Ä*ÍfÑ7UÔ7Uð Ø!œ_¨t¬zÑ9�
�
åØuñô ð ð Œ^˜uÒ$Ð$Ý˜dœo­vÑ6Ô6ð `ÝÐ ^Ñ_Ô_Ð_ØœˆJˆJå˜$œ/­4Ñ0Ô0ð aÝ)¨$¬/Ñ:Ô:�
�
åÐ _Ñ`Ô`Ð`àÔ+ð 	,¨tÔ/Eð 	,Ý˜$Ô+­TÑ2Ô2ð dÝ+¨DÔ,=Ñ>Ô>��åÐ bÑcÔcÐcØ˜|Ð+Ð+àÐrF   ÚvalÚaxc                 ó.   — |                       ||¦  «        S )aò  Plot a single or multiple values from the metric.

        Args:
            val: Either a single result from calling `metric.forward` or `metric.compute` or a list of these results.
                If no value is provided, will automatically call `metric.compute` and plot that result.
            ax: An matplotlib axis object. If provided will add plot to that axis

        Returns:
            Figure and Axes object

        Raises:
            ModuleNotFoundError:
                If `matplotlib` is not installed

        .. plot::
            :scale: 75

            >>> # Example plotting a single value
            >>> import torch
            >>> from torchmetrics.image import StructuralSimilarityIndexMeasure
            >>> preds = torch.rand([3, 3, 256, 256])
            >>> target = preds * 0.75
            >>> metric = StructuralSimilarityIndexMeasure(data_range=1.0)
            >>> metric.update(preds, target)
            >>> fig_, ax_ = metric.plot()

        .. plot::
            :scale: 75

            >>> # Example plotting multiple values
            >>> import torch
            >>> from torchmetrics.image import StructuralSimilarityIndexMeasure
            >>> preds = torch.rand([3, 3, 256, 256])
            >>> target = preds * 0.75
            >>> metric = StructuralSimilarityIndexMeasure(data_range=1.0)
            >>> values = [ ]
            >>> for _ in range(10):
            ...     values.append(metric(preds, target))
            >>> fig_, ax_ = metric.plot(values)

        ©Ú_plot©rB   rX   rY   s      rE   Úplotz%StructuralSimilarityIndexMeasure.plotÃ   ó   € ðX �zŠz˜#˜rÑ"Ô"Ð"rF   )	Tr   r   r   Nr    r!   FF©NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚboolÚ__annotations__r   r   r   Úfloatr   r   r   r   r   Úintr	   r   rL   r   r=   rS   rW   r   r   r^   Ú__classcell__©rD   s   @rE   r   r      sF  ø€ € € € € € ð/ð /ðb "Ð�dÐ!Ð!Ñ!Ø"Ð�tÐ"Ð"Ñ"Ø#Ð�tÐ#Ð#Ñ#Ø!Ð�eÐ!Ð!Ñ!Ø!Ð�eÐ!Ð!Ñ!à�Œ<ÐÐÑØ�ŒLÐÐÑð !%Ø/2Ø13ØFXØBFØØØ"'Ø,1ð%Gð %Gàð%Gð �U˜H UœOÐ+Ô,ð%Gð ˜3 ¨¤Ð-Ô.ð	%Gð
 ÐBÔCð%Gð ˜U 5¨%°°u°Ô*=Ð#=Ô>Ô?ð%Gð ð%Gð ð%Gð  ð%Gð &*ð%Gð ð%Gð 
ð%Gð %Gð %Gð %Gð %Gð %GðN$/˜Fð $/¨Fð $/°tð $/ð $/ð $/ð $/ðL˜˜v u¨V°V¨^Ô'<Ð<Ô=ð ð ð ð ð: _cð,#ð ,#Ø˜E &¨(°6Ô*:Ð":Ô;Ô<ð,#ØIQÐRZÔI[ð,#à	ð,#ð ,#ð ,#ð ,#ð ,#ð ,#ð ,#ð ,#rF   r   c                   óÐ  ‡ — e Zd ZU dZdZeed<   dZeed<   dZeed<   dZ	e
ed<   d	Ze
ed
<   ee         ed<   ee         ed<   	 	 	 	 	 	 	 	 	 d)dedeeee         f         dee
ee
         f         ded         deee
ee
e
f         f                  de
de
dee
df         ded          d!ed"dfˆ fd#„Zdeded"dfd$„Zd"efd%„Z	 d*d&eeeee         f                  d'ee         d"efd(„Zˆ xZS )+Ú*MultiScaleStructuralSimilarityIndexMeasureaF  Compute `MultiScaleSSIM`_, Multi-scale Structural Similarity Index Measure.

    This metric is is a generalization of Structural Similarity Index Measure by incorporating image details at
    different resolution scores.

    As input to ``forward`` and ``update`` the metric accepts the following input

    - ``preds`` (:class:`~torch.Tensor`): Predictions from model
    - ``target`` (:class:`~torch.Tensor`): Ground truth values

    As output of `forward` and `compute` the metric returns the following output

    - ``msssim`` (:class:`~torch.Tensor`): if ``reduction!='none'`` returns float scalar tensor with average MSSSIM
      value over sample else returns tensor of shape ``(N,)`` with SSIM values per sample

    Args:
        gaussian_kernel: If ``True`` (default), a gaussian kernel is used, if false a uniform kernel is used
        kernel_size: size of the gaussian kernel
        sigma: Standard deviation of the gaussian kernel
        reduction: a method to reduce metric score over labels.

            - ``'elementwise_mean'``: takes the mean
            - ``'sum'``: takes the sum
            - ``'none'`` or ``None``: no reduction will be applied

        data_range:
            the range of the data. If None, it is determined from the data (max - min). If a tuple is provided then
            the range is calculated as the difference and input is clamped between the values.
            The ``data_range`` must be given when ``dim`` is not None.
        k1: Parameter of structural similarity index measure.
        k2: Parameter of structural similarity index measure.
        betas: Exponent parameters for individual similarities and contrastive sensitivities returned by different image
            resolutions.
        normalize: When MultiScaleStructuralSimilarityIndexMeasure loss is used for training, it is desirable to use
            normalizes to improve the training stability. This `normalize` argument is out of scope of the original
            implementation [1], and it is adapted from https://github.com/jorge-pessoa/pytorch-msssim instead.
        kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.

    Return:
        Tensor with Multi-Scale SSIM score

    Raises:
        ValueError:
            If ``kernel_size`` is not an int or a Sequence of ints with size 2 or 3.
        ValueError:
            If ``betas`` is not a tuple of floats with length 2.
        ValueError:
            If ``normalize`` is neither `None`, `ReLU` nor `simple`.

    Example:
        >>> from torch import rand
        >>> from torchmetrics.image import MultiScaleStructuralSimilarityIndexMeasure
        >>> preds = torch.rand([3, 3, 256, 256])
        >>> target = preds * 0.75
        >>> ms_ssim = MultiScaleStructuralSimilarityIndexMeasure(data_range=1.0)
        >>> ms_ssim(preds, target)
        tensor(0.9628)

    Tr   r   Fr   r   r   r   r   r   r   r   r   r   Nr    r!   ©gÇº¸�ð¦?g×4ï8EGÒ?g÷äa¡Ö4Ó?g¼?Î?g9EGrùÁ?Úrelur"   r$   r#   r%   r&   r)   r*   r+   Úbetas.Ú	normalize)rn   ÚsimpleNr.   r/   c
                 óº  •—  t          ¦   «         j        di |
¤Ž d}||vrt          d|› d|› �¦  «        ‚|dv r+|                      dt	          j        d¦  «        d¬¦  «         n|                      dg d ¬¦  «         |                      d	t	          j        d¦  «        d¬¦  «         t          |t          t          f¦  «        st          d
|› �¦  «        ‚t          |t          ¦  «        r<t          |¦  «        dvst          d„ |D ¦   «         ¦  «        st          d|› �¦  «        ‚|| _        || _        || _        || _        || _        || _        || _        t          |t$          ¦  «        st          d¦  «        ‚t          |t$          ¦  «        r(t          d„ |D ¦   «         ¦  «        st          d¦  «        ‚|| _        |	r|	dvrt          d¦  «        ‚|	| _        d S )Nr&   r1   r2   r3   r4   r   r'   r5   r8   zRArgument `kernel_size` expected to be an sequence or an int, or a single int. Got )é   é   c              3   ó@   K  — | ]}t          |t          ¦  «        V — Œd S ©N)rK   rh   )Ú.0Úkss     rE   ú	<genexpr>zFMultiScaleStructuralSimilarityIndexMeasure.__init__.<locals>.<genexpr>W  s,   è è € Ð5`Ð5`ÈbµjÀÅSÑ6IÔ6IÐ5`Ð5`Ð5`Ð5`Ð5`Ð5`rF   ztArgument `kernel_size` expected to be an sequence of size 2 or 3 where each element is an int, or a single int. Got z3Argument `betas` is expected to be of a type tuple.c              3   ó@   K  — | ]}t          |t          ¦  «        V — Œd S rv   )rK   rg   )rw   Úbetas     rE   ry   zFMultiScaleStructuralSimilarityIndexMeasure.__init__.<locals>.<genexpr>g  s,   è è € Ð/ZÐ/ZÈDµ
¸4ÅÑ0GÔ0GÐ/ZÐ/ZÐ/ZÐ/ZÐ/ZÐ/ZrF   z5Argument `betas` is expected to be a tuple of floats.)rn   rq   zNArgument `normalize` to be expected either `None` or one of 'relu' or 'simple'r;   )r<   r=   r>   r?   r@   rA   rK   r   rh   ÚlenÚallr"   r#   r$   r%   r)   r*   r+   rL   ro   rp   )rB   r"   r$   r#   r%   r)   r*   r+   ro   rp   r.   rC   rD   s               €rE   r=   z3MultiScaleStructuralSimilarityIndexMeasure.__init__8  s(  ø€ ð 	�‰ŒÔÐ"Ð"˜6Ð"Ð"Ð"àCˆØ˜OÐ+Ð+ÝÐjÀOÐjÐjÐ_hÐjÐjÑkÔkÐkàÐ3Ð3Ð3Ø�NŠN˜<µ´¸cÑ1BÔ1BÐSXˆNÑYÔYÐYÐYà�NŠN˜<°ÀDˆNÑIÔIÐIà�Š�w­¬°SÑ(9Ô(9È%ˆÑPÔPÐPå˜;­µ3¨Ñ8Ô8ð 	ÝØrÐepÐrÐrñô ð õ �k¥8Ñ,Ô,ð 	Ý�ÑÔ FÐ*Ð*µ#Ð5`Ð5`ÐT_Ð5`Ñ5`Ô5`Ñ2`Ô2`Ð*åð6Ø(3ð6ð 6ñô ð ð
  /ˆÔØˆŒ
Ø&ˆÔØ"ˆŒØ$ˆŒØˆŒØˆŒÝ˜%¥Ñ'Ô'ð 	TÝÐRÑSÔSÐSÝ�e�UÑ#Ô#ð 	V­CÐ/ZÐ/ZÐTYÐ/ZÑ/ZÔ/ZÑ,ZÔ,Zð 	VÝÐTÑUÔUÐUØˆŒ
Øð 	o˜Ð*<Ð<Ð<ÝÐmÑnÔnÐnØ"ˆŒˆˆrF   c                 ó¶  — t          ||¦  «        \  }}t          ||| j        | j        | j        | j        | j        | j        | j        | j	        ¦
  «
        }| j
        dv rDt          | j        t          ¦  «        st          d¦  «        ‚| j                             |¦  «         nKt          | j        t           ¦  «        st          d¦  «        ‚| xj        |                     ¦   «         z  c_        t          | j        t           ¦  «        st          d¦  «        ‚| xj        t'          j        |j        d         | j        j        | j        j        ¬¦  «        z  c_        dS )rH   ©r(   NrV   zPExpected `self.similarity` to be a Tensor for elementwise_mean or sum reduction.rJ   r   )ÚdtypeÚdeviceN)r   r
   r"   r#   r$   r)   r*   r+   ro   rp   r%   rK   r4   rM   rN   rO   r   r'   r8   r@   rA   rP   r€   r�   )rB   r   r   r4   s       rE   rS   z1MultiScaleStructuralSimilarityIndexMeasure.updaten  s9  € å*¨5°&Ñ9Ô9‰ˆˆvÝ,ØØØÔ ØŒJØÔØŒOØŒGØŒGØŒJØŒNñ
ô 
ˆ
ð Œ>˜^Ð+Ð+Ý˜dœo­tÑ4Ô4ð aÝÐ _Ñ`Ô`Ð`ØŒO×"Ò" :Ñ.Ô.Ð.Ð.å˜dœo­vÑ6Ô6ð tÝÐ rÑsÔsÐsØˆOŒO˜zŸ~š~Ñ/Ô/Ñ/ˆOŒOå˜$œ*¥fÑ-Ô-ð 	EÝÐCÑDÔDÐDØˆ
Œ
•e”l 5¤;¨q¤>¸¼Ô9IÐRVÔR\ÔRcÐdÑdÔdÑdˆ
Œ
ˆ
ˆ
rF   c                 ó¨  — | j         dv r=t          | j        t          ¦  «        rt	          | j        ¦  «        S t          d¦  «        ‚| j         dk    r0t          | j        t          ¦  «        r| j        S t          d¦  «        ‚t          | j        t          ¦  «        r)t          | j        t          ¦  «        r| j        | j        z  S t          d¦  «        ‚)zCompute MS-SSIM over state.r   rV   r'   rU   zYExpected `self.similarity` and `self.total` to be Tensors for elementwise_mean reduction.)r%   rK   r4   rM   r   rN   r   r8   )rB   s    rE   rW   z2MultiScaleStructuralSimilarityIndexMeasure.compute‹  s¿   € àŒ>˜^Ð+Ð+Ý˜$œ/­4Ñ0Ô0ð 5Ý# D¤OÑ4Ô4Ð4ÝÐ[Ñ\Ô\Ð\ØŒ>˜UÒ"Ð"Ý˜$œ/­6Ñ2Ô2ð 'Ø”Ð&ÝÐZÑ[Ô[Ð[Ý�d”o¥vÑ.Ô.ð 	0µ:¸d¼jÍ&Ñ3QÔ3Qð 	0Ø”? T¤ZÑ/Ð/ÝÐsÑtÔtÐtrF   rX   rY   c                 ó.   — |                       ||¦  «        S )a"  Plot a single or multiple values from the metric.

        Args:
            val: Either a single result from calling `metric.forward` or `metric.compute` or a list of these results.
                If no value is provided, will automatically call `metric.compute` and plot that result.
            ax: An matplotlib axis object. If provided will add plot to that axis

        Returns:
            Figure and Axes object

        Raises:
            ModuleNotFoundError:
                If `matplotlib` is not installed

        .. plot::
            :scale: 75

            >>> # Example plotting a single value
            >>> from torch import rand
            >>> from torchmetrics.image import MultiScaleStructuralSimilarityIndexMeasure
            >>> preds = rand([3, 3, 256, 256])
            >>> target = preds * 0.75
            >>> metric = MultiScaleStructuralSimilarityIndexMeasure(data_range=1.0)
            >>> metric.update(preds, target)
            >>> fig_, ax_ = metric.plot()

        .. plot::
            :scale: 75

            >>> # Example plotting multiple values
            >>> from torch import rand
            >>> from torchmetrics.image import MultiScaleStructuralSimilarityIndexMeasure
            >>> preds = rand([3, 3, 256, 256])
            >>> target = preds * 0.75
            >>> metric = MultiScaleStructuralSimilarityIndexMeasure(data_range=1.0)
            >>> values = [ ]
            >>> for _ in range(10):
            ...     values.append(metric(preds, target))
            >>> fig_, ax_ = metric.plot(values)

        r[   r]   s      rE   r^   z/MultiScaleStructuralSimilarityIndexMeasure.plot™  r_   rF   )	Tr   r   r   Nr    r!   rm   rn   r`   )ra   rb   rc   rd   r   re   rf   r   r   r   rg   r   r   r   r   rh   r   r	   r   rL   r   r=   rS   rW   r   r   r^   ri   rj   s   @rE   rl   rl   ò   s;  ø€ € € € € € ð:ð :ðx "Ð�dÐ!Ð!Ñ!Ø"Ð�tÐ"Ð"Ñ"Ø#Ð�tÐ#Ð#Ñ#Ø!Ð�eÐ!Ð!Ñ!Ø!Ð�eÐ!Ð!Ñ!à�Œ<ÐÐÑØ�ŒLÐÐÑð !%Ø13Ø/2ØFXØBFØØØ#KØ5;ð4#ð 4#àð4#ð ˜3 ¨¤Ð-Ô.ð4#ð �U˜H UœOÐ+Ô,ð	4#ð
 ÐBÔCð4#ð ˜U 5¨%°°u°Ô*=Ð#=Ô>Ô?ð4#ð ð4#ð ð4#ð �U˜C�ZÔ ð4#ð Ð1Ô2ð4#ð ð4#ð 
ð4#ð 4#ð 4#ð 4#ð 4#ð 4#ðle˜Fð e¨Fð e°tð eð eð eð eð:u˜ð uð uð uð uð _cð,#ð ,#Ø˜E &¨(°6Ô*:Ð":Ô;Ô<ð,#ØIQÐRZÔI[ð,#à	ð,#ð ,#ð ,#ð ,#ð ,#ð ,#ð ,#ð ,#rF   rl   )Úcollections.abcr   Útypingr   r   r   r   r@   r   Útyping_extensionsr	   Ú"torchmetrics.functional.image.ssimr
   r   r   Útorchmetrics.metricr   Útorchmetrics.utilities.datar   Útorchmetrics.utilities.importsr   Útorchmetrics.utilities.plotr   r   Ú__doctest_skip__r   rl   r;   rF   rE   ú<module>r�      s\  ðð %Ð $Ð $Ð $Ð $Ð $Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ð -à €€€Ø Ð Ð Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %à hÐ hÐ hÐ hÐ hÐ hÐ hÐ hÐ hÐ hØ &Ð &Ð &Ð &Ð &Ð &Ø 4Ð 4Ð 4Ð 4Ð 4Ð 4Ø @Ð @Ð @Ð @Ð @Ð @Ø @Ð @Ð @Ð @Ð @Ð @Ð @Ð @àð tØ?ÐArÐsÐðP#ð P#ð P#ð P#ð P# vñ P#ô P#ð P#ðfS#ð S#ð S#ð S#ð S#°ñ S#ô S#ð S#ð S#ð S#rF   