+
    úäûjÙZ  ã                  óŠ   € ^ RI Ht ^ RIHtHtHtHt ^ RIt^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt R	.t ! R
 R	]	4      tR# )é    )Úannotations)ÚAnyÚOptionalÚSequenceÚUnionN)ÚMixAugmentationBaseV2)Ú_validate_input_dtype)ÚDataKey)ÚKORNIA_CHECK)Ú_to_device_nonblockingÚRandomTransplantationc                  ó’   a € ] tR t^!tRtRR V 3R llltR R ltR R ltR	 R
 ltR R lt	RR/R R llt
RRRR/R R lltRtV ;t# )r   as#  Paste a labelled region from the previous batch image, applied per sample with probability ``p`` (default 0.5).

``image_out, mask_out = RandomTransplantation(data_keys=["input", "mask"])(input, mask)`` copies the region of
one drawn label, image features and segmentation mask alike, from the previous batch image into each selected
image. Use :class:`RandomTransplantation3D` for volume dispatch in
:class:`~kornia.augmentation.container.AugmentationSequential`.

Args:
    excluded_labels: sequence of labels which should not be transplanted from a donor. This can be useful if only
      parts of the image are annotated and the non-annotated regions (with a specific label index) should be
      excluded from the augmentation. If no label is left in a donor image, that acceptor receives nothing
      while the rest of the batch is transplanted as usual.
    p: probability of applying the transformation to each sample. This parameter controls how many images in a
      batch receive a transplant.
    p_batch: probability for applying an augmentation to a batch. This param controls the augmentation
      probabilities batch-wise.
    data_keys: the input type sequential for applying augmentations. There must be at least one "mask" torch.Tensor.
      If no data keys are given, the first torch.Tensor is assumed to be `DataKey.INPUT` and the second
      torch.Tensor `DataKey.MASK`.
      Accepts "input", "mask".

Note:
    - This augmentation requires that segmentation masks are available for all images in the batch and that at
      least some objects in the image are annotated.
    - When using this class directly (`RandomTransplantation()(...)`), it works for arbitrary spatial dimensions
      including 2D and 3D images. When wrapping in
      :class:`kornia.augmentation.container.AugmentationSequential`, use
      :class:`kornia.augmentation.RandomTransplantation` for 2D and
      :class:`kornia.augmentation.RandomTransplantation3D` for 3D images.

Inputs:
    - Segmentation mask torch.Tensor which is used to determine the objects for transplantation: ``(B, *)``.
    - (optional) Additional image or mask tensors where the features are transplanted based on the first
      segmentation mask: ``(B, C, *)`` (`DataKey.INPUT`) or ``(B, *)`` (`DataKey.MASK`).

Returns:
    torch.Tensor | list[torch.Tensor]:

    torch.Tensor:
        - Augmented mask tensors: ``(B, *)``.
    list[torch.Tensor]:
        - Augmented mask tensors: ``(B, *)``.
        - Additional augmented image or mask tensors: ``(B, C, *)`` (`DataKey.INPUT`) or ``(B, *)``
          (`DataKey.MASK`).

Convention:
    - the transplant is driven by the first ``"mask"`` input. An image is ``(B, C, *spatial)`` and a mask
      ``(B, *spatial)`` for any number of spatial dimensions, including none (a ``(B,)`` mask moves whole
      images). There is no unbatched form, and the inherited ``keepdim`` is inert on a direct call. In
      :class:`~kornia.augmentation.container.AugmentationSequential` a 2D ``(B, H, W)`` mask comes back as
      ``(B, 1, H, W)``, like from any other child, unless the container sets ``keepdim=True``.
    - ``p`` gates samples and ``p_batch`` the whole call. The donor of acceptor ``i`` is image ``(i - 1) mod B``
      of the full batch, with its original content, whether or not it is an acceptor itself; at ``B = 1`` the
      call is an identity.
    - one label is drawn uniformly from the donor's distinct labels minus ``excluded_labels`` (over labels, not
      area), on the global CPU generator whatever the mask's device. An acceptor whose donor has no eligible
      label is dropped from ``acceptor_indices`` and its ``batch_prob`` is cleared.
    - ``selection`` in ``_params`` is what the transform reads: row ``d`` marks the positions moved from
      ``donor_indices[d]`` into ``acceptor_indices[d]``. A ``params`` passed back is used as given and completed
      in place. Labels are drawn only when ``selected_labels`` and ``selection`` are both missing; a missing
      ``selection`` alone is rebuilt from the given labels as they are (by design, ``excluded_labels`` filters
      only drawn labels), and a label list shorter than the acceptors leaves the trailing ones untouched.
    - images are ``float16``, ``bfloat16``, ``float32`` or ``float64``; a mask keeps its own dtype (``bool``,
      integer or floating). Only ``"input"`` / ``"image"`` and ``"mask"`` keys are implemented; any other key
      raises ``NotImplementedError``. A mask is needed only to draw the parameters; a call that draws them
      without one, or whose inputs do not match ``data_keys``, raises a kornia error that names the mask (and
      the key count, on a mismatch) before any input is read. With a complete ``params`` any subset of the
      inputs is accepted, which is how :class:`~kornia.augmentation.container.AugmentationSequential` applies
      the transplant, one input at a time. Outputs come back in input order, a single one as a bare tensor.
    - like every mix augmentation it is not geometric: ``transform_matrix`` and ``inverse()`` both raise
      ``RuntimeError``, and the ``inverse()`` of a :class:`~kornia.augmentation.container.AugmentationSequential`
      holding one raises the same error.
    - a mask with a singleton channel axis, ``(B, 1, *spatial)``, next to an image of the same rank is read as
      the ``(B, *spatial)`` mask: the labels and ``selection`` come from its spatial layout and it comes back in
      its own ``(B, 1, *spatial)`` layout. That is the layout a container hands on once any other augmentation
      has run, so the transplant works at any position in a pipeline, not only as the first step
      (`#4707 <https://github.com/kornia/kornia/issues/4707>`_). A further mask one rank above the driving
      mask is read as ``(B, C, *spatial)``, and every channel moves through the same ``selection``. With no
      image in the call, a mask keeps its own rank and a size-1 first spatial axis is not squeezed.

.. image:: _static/img/RandomTransplantation.png

The augmentation is described in `Semantic segmentation of surgical hyperspectral images under geometric domain
shifts` :cite:`sellner2023semantic`.

See Also:
    - :class:`RandomTransplantation3D`: performs transplantation on 3D volumes and masks.

Examples:
    >>> import torch
    >>> rng = torch.manual_seed(0)
    >>> aug = RandomTransplantation(p=1.)
    >>> image = torch.randn(2, 3, 5, 5)
    >>> mask = torch.randint(0, 3, (2, 5, 5))
    >>> mask
    tensor([[[0, 0, 1, 1, 0],
             [1, 2, 0, 0, 0],
             [1, 2, 1, 1, 0],
             [0, 0, 0, 0, 2],
             [2, 2, 2, 0, 2]],
    <BLANKLINE>
            [[2, 0, 0, 2, 1],
             [2, 1, 0, 2, 1],
             [2, 0, 1, 0, 2],
             [2, 2, 2, 0, 2],
             [2, 1, 0, 0, 0]]])
    >>> image_out, mask_out = aug(image, mask)
    >>> image_out.shape
    torch.Size([2, 3, 5, 5])
    >>> mask_out.shape
    torch.Size([2, 5, 5])
    >>> mask_out
    tensor([[[2, 0, 1, 2, 0],
             [2, 2, 0, 2, 0],
             [2, 2, 1, 1, 2],
             [2, 2, 2, 0, 2],
             [2, 2, 2, 0, 2]],
    <BLANKLINE>
            [[0, 0, 0, 2, 0],
             [2, 1, 0, 0, 0],
             [2, 0, 1, 0, 0],
             [0, 0, 0, 0, 2],
             [2, 1, 0, 0, 0]]])
    >>> aug._params["selected_labels"]  # Image 0 received label 2 from image 1 and image 1 label 0 from image 0
    tensor([2, 0])

You can apply the same augmentation again in which case the same objects get transplanted between the images:

    >>> aug._params["selection"]  # The pixels (objects) which get transplanted
    tensor([[[ True, False, False,  True, False],
             [ True, False, False,  True, False],
             [ True, False, False, False,  True],
             [ True,  True,  True, False,  True],
             [ True, False, False, False, False]],
    <BLANKLINE>
            [[ True,  True, False, False,  True],
             [False, False,  True,  True,  True],
             [False, False, False, False,  True],
             [ True,  True,  True,  True, False],
             [False, False, False,  True, False]]])
    >>> image2 = torch.zeros(2, 3, 5, 5)
    >>> image2[1] = 1
    >>> image2[:, 0]
    tensor([[[0., 0., 0., 0., 0.],
             [0., 0., 0., 0., 0.],
             [0., 0., 0., 0., 0.],
             [0., 0., 0., 0., 0.],
             [0., 0., 0., 0., 0.]],
    <BLANKLINE>
            [[1., 1., 1., 1., 1.],
             [1., 1., 1., 1., 1.],
             [1., 1., 1., 1., 1.],
             [1., 1., 1., 1., 1.],
             [1., 1., 1., 1., 1.]]])
    >>> image_out2, mask_out2 = aug(image2, mask, params=aug._params)
    >>> image_out2[:, 0]
    tensor([[[1., 0., 0., 1., 0.],
             [1., 0., 0., 1., 0.],
             [1., 0., 0., 0., 1.],
             [1., 1., 1., 0., 1.],
             [1., 0., 0., 0., 0.]],
    <BLANKLINE>
            [[0., 0., 1., 1., 0.],
             [1., 1., 0., 0., 0.],
             [1., 1., 1., 1., 0.],
             [0., 0., 0., 0., 1.],
             [1., 1., 1., 0., 1.]]])

Nc          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
é   Úexcluded_labelsz,Optional[Union[Sequence[int], torch.Tensor]]ÚpÚfloatÚp_batchÚ	data_keysú#Optional[list[str | int | DataKey]]ÚreturnÚNone© )Úformats   "ÚgC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\augmentation\_2d\mix\transplantation.pyÚ__annotate__Ú"RandomTransplantation.__annotate__Ì   s<   € ÷ ñ àEðð ðð ð	ð
 7ðð 
ñó    c                	óØ  <€ \         SV `  W#R 7       Vf   . p\        V\        P                  4      '       g   \        P
                  ! V4      pWn        \        V P                  P                  ^8H  RV P                  P                   R24       Vf!   \        P                  \        P                  .pV Uu. uF  p\        P                  ! V4      NK  	  upV n        ^V n        R# u upi ))r   r   Nz:excluded_labels must be a 1-dimensional sequence, but got ú dimensions.)ÚsuperÚ__init__Ú
isinstanceÚtorchÚTensorÚtensorr   r   Úndimr
   ÚINPUTÚMASKÚgetr   Ú_channel_dim)Úselfr   r   r   r   ÚinpÚ	__class__s   &&&&& €r   r"   ÚRandomTransplantation.__init__Ì   sÂ   ø€ ô 	‰Ñ˜1ÐÔ.àÒ"Ø ˆOÜ˜/¬5¯<©<×8Ò8Ü#Ÿlšl¨?Ó;ˆOØ-<ÔÜØ× Ñ ×%Ñ%¨Ñ*ØHÈ×I]ÑI]×IbÑIbÐHcÐcoÐpô	
ð
 ÒÜ Ÿ™¬¯©Ð5ˆIÙ6?Ó@±i¨sœ'Ÿ+š+ cÖ*±iÑ@ˆŒØˆÖùò As   Â7C'c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Úinputútorch.TensorÚparamsúdict[str, torch.Tensor]Úflagsúdict[str, Any]r   r   )r   s   "r   r   r   ä   s,   € ÷ ñ Ø!ðØ+BðØKYðà	ñr   c                	ó   € V# ©Nr   )r,   r1   r3   r5   s   &&&&r   Úapply_non_transform_maskÚ.RandomTransplantation.apply_non_transform_maskä   s	   € ð ˆr   c               ó(   € V ^8„  d   QhRRRRRRRR/# ©r   Úacceptorr2   ÚdonorÚ	selectionr   r   )r   s   "r   r   r   é   s*   € ÷ 7ñ 7¨ð 7¸\ð 7ÐVbð 7Ðgsñ 7r   c                	ó¬   € \        W1P                  4      P                  V P                  R 7      P	                  V4      p\
        P                  ! W2V4      # )©Údim)r   ÚdeviceÚ	unsqueezer+   Ú	expand_asr$   Úwhere©r,   r=   r>   r?   s   &&&&r   Útransform_inputÚ%RandomTransplantation.transform_inputé   sD   € ä*¨9·o±oÓF×PÑPÐUY×UfÑUfÐPÓg×qÑqÐrwÓxˆ	ô �{Š{˜9¨XÓ6Ð6r   c               ó(   € V ^8„  d   QhRRRRRRRR/# r<   r   )r   s   "r   r   r   ð   s0   € ÷ `ñ ` |ð `¸Lð `ÐUað `Ðfrñ `r   c                	óð   € VP                   VP                   ^,           8X  d,   VP                  V P                  R7      P                  V4      p\        P
                  ! \        W1P                  4      W!4      # )é   rA   )r'   rD   r+   rE   r$   rF   r   rC   rG   s   &&&&r   Útransform_maskÚ$RandomTransplantation.transform_maskð   sV   € Ø�=‰=˜IŸN™N¨QÕ.Ô.à!×+Ñ+°×0AÑ0AÐ+ÓB×LÑLÈUÓSˆIä�{Š{Ô1°)¿_¹_ÓMÈuÓ_Ð_r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r1   zSequence[torch.Tensor]r   úlist[DataKey]r   r   r   )r   s   "r   r   r   ÷   s#   € ÷ 
ñ 
Ð'=ð 
È-ð 
Ð\`ñ 
r   c                	ór  € V Uu. uF  q3P                   P                  4       NK  	  pp\        \        V4      \        V4      8H  R \        V4       R\        V4       R\	        V 4      P
                   RV R2	4       \        \        P                  V9   \	        V 4      P
                   RV R24       R# u upi )zLength of keys (z#) does not match number of inputs (z). z… needs a mask to draw its parameters: pass one tensor per data_keys entry, the mask included, or pass complete params. Got data_keys=Ú.z„ needs a mask to draw its parameters: pass one and name it with a 'mask' entry in data_keys, or pass complete params. Got data_keys=N)ÚnameÚlowerr   ÚlenÚtypeÚ__name__r
   r)   )r,   r1   r   ÚkÚnamess   &&&  r   Ú_check_mask_givenÚ'RandomTransplantation._check_mask_given÷   s¶   € á)2Ó3© A—‘—‘–©ˆÐ3ÜÜ�	‹Nœc %›jÑ(Øœs 9›~Ð.Ð.QÔRUÐV[ÓR\ÐQ]Ð]`Ü�D‹z×"Ñ"Ð#ð $IØINÈÈqðRô	
ô 	Ü�L‰L˜IÑ%Ü�D‹z×"Ñ"Ð#ð $JØJOÈÐPQðSö	
ùò 4s   …"B4Ú
extra_argsc          
     ó,   € V ^8„  d   QhRRRRRRRRR	R/# )
r   r1   r2   r   rP   r3   r4   r\   z'Optional[dict[DataKey, dict[str, Any]]]r   r   )r   s   "r   r   r     sC   € ÷ {ñ {àð{ð !ð{ð (ð	{ð
 <ð{ð 
!ñ{r   c               óP  aaa€ V P                  WA4       WAP                  \        P                  4      ,          oSP                  V P
                  8”  d�   SP                  V P
                  ,          ^8X  dn   \        ;QJ d(    V3R l\        WA4       4       F  '       g   K   RM	  RM! V3R l\        WA4       4       4      '       d   SP                  V P
                  4      o\        WA4       Fò  w  rVV\        P                  8X  g   K  \        VP                  SP                  ^,           8H  RSP                   RVP                   R24       \        SP                  4       \        P                  ! \        VP                  4       4       UUu. uF  w  rxWpP
                  8w  g   K  VNK  	  upp4      8H  RVP                  4        RSP                  4        R	24       Kô  	  R
S9  d+   \        P                   ! SR,          R8„  4      ^ ,          SR
&   RS9  d+   SR
,          ^,
          \#        SR,          4      ,          SR&   RS9  Ed°   RS9  Ed¨   V P$                  P&                  SP&                  8w  d+   V P$                  P)                  SP&                  4      V n        . p	. p
\+        \#        SR,          4      4       Fí  pSSR,          V,          ,          pVP-                  4       pV P$                  P/                  4       ^ 8”  dF   WÝP1                  ^R4      V P$                  P1                  R^4      8g  P3                  ^ R7      ,          p\#        V4      ^ 8”  g   K   V	P5                  V\        P6                  ! \#        V4      4      ^ ,          ,          4       V
P5                  V4       Kï  	  \#        V
4      \#        SR,          4      8  dÓ   \        P8                  ! V
\        P:                  SR,          P&                  R7      p\        P<                  ! \#        SR
,          4      \        P>                  VP&                  R7      pRWþ&   SR,          PA                  4       p^ VSR
,          V,          &   VSR&   SR
,          V,          SR
&   SR,          V,          SR&   \#        V	4      ^ 8”  d   \        PB                  ! V	4      M,\        PD                  ! ^ SPF                  SP&                  R7      SR&   RS9  Ed   \        PH                  ! \#        SR
,          4      .SP                  R,          O5\        P>                  SP&                  R7      pSR,          o\        SP                  ^8H  RSP                   R24       \        \#        S4      \#        SR
,          4      8*  VV3R l4       \        \+        \#        SR,          4      4      S4       F9  w  ppSSR,          V,          ,          pVV,          PK                  VV8H  R4       K;  	  VSR&   S# u uppi )a  Compute parameters for the transformation which are based on one or more input tensors.

This function is, for example, called by :class:`kornia.augmentation.container.ops.AugmentationSequentialOps`
before the augmentation is applied on the individual input tensors.

Args:
    *input: All input tensors passed to the augmentation pipeline.
    data_keys: Associated data key for every input torch.Tensor.
    params: Dictionary of parameters computed so far by the augmentation pipeline (e.g. including the
            `batch_prob`).
    extra_args: Optional dictionary of extra arguments with specific options for different input types.

Returns:
     Updated dictionary of parameters with the necessary information to apply the augmentation on all input
     tensors separately.

c              3  ó�   <"  € T F;  w  rV\         P                  8H  ;'       d    VP                  SP                  8H  x € K=  	  R # 5ir8   )r
   r(   r'   )Ú.0Ú_inputÚkeyÚmasks   &  €r   Ú	<genexpr>Ú:RandomTransplantation.params_from_input.<locals>.<genexpr>(  s6   øé € ÐoÑYnÉ+È&�Cœ7Ÿ=™=Ñ(×EÐE¨V¯[©[¸D¿I¹IÑ-EÔEÓYnùs
   ƒ A¤"ATFzeEvery segmentation mask must have one fewer dimension (no channel dimension) than the image, but got z for the segmentation mask and z for the input image.zmThe dimensions of the input image and segmentation mask must match except for the channel dimension, but got z for the input image and z for the segmentation mask.Úacceptor_indicesÚ
batch_probç      à?Údonor_indicesÚselected_labelsr?   rA   )ÚdtyperC   :rL   NNz>selected_labels must be a 1-dimensional torch.tensor, but got r    c                 óH   <€ R \        S4       R\        S R,          4       R2# )z&There cannot be more selected labels (z9) than images where this augmentation should be applied (rf   z).)rU   )r3   rj   s   €€r   Ú<lambda>Ú9RandomTransplantation.params_from_input.<locals>.<lambda>u  s0   ø€ Ø<¼SÀÓ=QÐ<Rð S7Ü7:¸6ÐBTÕ;UÓ7VÐ6WÐWYñ[r   éÿÿÿÿ)&rZ   Úindexr
   r)   r'   r+   ÚshapeÚanyÚzipÚsqueezer(   r   Úsizer$   ÚSizeÚ	enumeraterF   rU   r   rC   ÚtoÚrangeÚuniqueÚnumelÚviewÚallÚappendÚrandpermr&   ÚlongÚonesÚboolÚcloneÚstackÚemptyrk   ÚzerosÚmasked_fill_)r,   r   r3   r\   r1   ra   rb   ÚiÚsÚdonor_labelsÚeligibleÚdÚcurrent_maskÚlabelsÚkeepÚdroppedrg   r?   Úselected_labelrc   rj   s   &$d$*              @@r   Úparams_from_inputÚ'RandomTransplantation.params_from_input  sû  ú€ ð0 	×Ñ˜uÔ0ð #§?¡?´7·<±<Ó#@ÕAˆð
 �I‰I˜×)Ñ)Ô)Ø—
‘
˜4×,Ñ,Õ-°Ô2ß“ÔoÔY\Ð]bÔYnÓo——’ÔoÔY\Ð]bÔYnÓo×oÒoà—<‘< × 1Ñ 1Ó2ˆDÜ˜uÖ0‰KˆFØ”g—m‘mÖ#ÜØ—K‘K 4§9¡9¨q¥=Ñ0ðØ#Ÿy™y˜kÐ)HÈÏÉÈÐUjðlôô
 Ø—I‘I“K¤5§:¢:¼YÀvÇ{Á{Ã}Ô=UÔ.pÑ=U±T°QÐYZ×^oÑ^oÑYo¯q¨qÑ=UÒ.pÓ#qÑqð*Ø*0¯+©+«-¨Ð8QÐRV×R[ÑR[ÓR]ÐQ^ð _ðöñ 1ð  VÔ+Ü).¯ª°V¸LÕ5IÈCÑ5OÓ)PÐQRÕ)SˆFÐ%Ñ&Ø &Ô(Ø'-Ð.@Õ'AÀAÕ'EÌÈVÐT`ÕMaÓIbÕ&bˆF�?Ñ#ð  FÕ*¨{À&Õ/HØ×#Ñ#×*Ñ*¨d¯k©kÔ9Ø'+×';Ñ';×'>Ñ'>¸t¿{¹{Ó'K�Ô$à/1ˆLØ"$ˆHÜœ3˜v oÕ6Ó7Ö8�à# F¨?Õ$;¸AÕ$>Õ?�Ø%×,Ñ,Ó.�ð
 ×'Ñ'×-Ñ-Ó/°!Ô3Ø#§[¡[°°BÓ%7¸4×;OÑ;O×;TÑ;TÐUWÐYZÓ;[Ñ%[×$`Ñ$`ÐefÐ$`Ó$gÕh�Fä�v“; –?Ø ×'Ñ'¨¬u¯~ª~¼cÀ&»kÓ/JÈ1Õ/MÕ(NÔOØ—O‘O AÖ&ñ 9ô �8‹}œs 6¨/Õ#:Ó;Ô;ô —|’| H´E·J±JÀvÈoÕG^×GeÑGeÔf�ÜŸ*š*¤S¨Ð0BÕ)CÓ%DÌEÏJÉJÐ_c×_jÑ_jÔk�Ø %�‘Ø# LÕ1×7Ñ7Ó9�
ØBC�
˜6Ð"4Õ5°gÕ>Ñ?Ø'1��|Ñ$Ø-3Ð4FÕ-GÈÕ-M�Ð)Ñ*Ø*0°Õ*AÀ$Õ*G��Ñ'ô �|Ó$ qÔ(ô —’˜LÔ)ä—[’[ ¨$¯*©*¸T¿[¹[ÔIð Ð$Ñ%ð ˜fÕ$ÜŸšÜ�VÐ.Õ/Ó0ÐB°4·:±:¸bµ>ÑBÌ%Ï*É*Ð]a×]hÑ]hôˆIð -3Ð3DÕ,EˆOÜØ×$Ñ$¨Ñ)ØPÐQ`×QeÑQeÐPfÐfrÐsôô Ü�OÓ$¬¨FÐ3EÕ,FÓ(GÑGõôô &)¬¬s°6¸/Õ3JÓ/KÓ)LÈoÖ%^Ñ!��>Ø# F¨?Õ$;¸AÕ$>Õ?�Ø˜!•×)Ñ)¨,¸.Ñ*HÈ$ÖOñ &_ð #,ˆF�;Ñàˆùó] /qs   ÆX"Æ)X"r3   r   c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r   r1   r2   r3   z!Optional[dict[str, torch.Tensor]]r   r   Úkwargsr6   r   z!torch.Tensor | list[torch.Tensor]r   )r   s   "r   r   r   ƒ  s<   € ÷ 6ñ 6àð6ð 2ð6ð 7ð	6ð
 !ð6ð 
+ñ6r   c          	     	óˆ  a € Vf   S P                   M%V Uu. uF  p\        P                  ! V4      NK  	  uppVfX   S P                  W64       W6P	                  \        P
                  4      ,          pS P                  VP                  4      S n        MVS n        \        ;QJ d    V 3R lR
 4       F  '       g   K   RM	  RM! V 3R lR
 4       4      '       d8   S P                  P                  S P                  ! VRVRS P                  / 4       . p\        Wc4       EF  w  rš\        S P                  R,          V
P                  4      pW«,          P                  4       pV
\        S P                  R,          V
P                  4      ,          pV	\        P                   8X  dÍ   \#        V
\$        P&                  \$        P(                  \$        P*                  \$        P,                  .R	7       S P/                  WÍS P                  R,          4      pS P1                  V
S P                  S P2                  4      pVP5                  V3S P7                  VS P                  S P2                  4      4      pMžV	\        P
                  8X  d„   S P9                  WÍS P                  R,          4      pS P7                  V
S P                  S P2                  4      pVP5                  V3S P7                  VS P                  S P2                  4      4      pM\:        hVP=                  V4       EK  	  \?        V4      ^8X  d
   V^ ,          # V# u upi )Nc              3  ó@   <"  € T F  qSP                   9  x € K  	  R # 5ir8   )Ú_params)r`   rX   r,   s   & €r   rd   Ú0RandomTransplantation.forward.<locals>.<genexpr>”  s   øé € ÐaÑ.`¨˜Ÿ™Ö$Ó.`ùs   ƒrf   ri   r?   TFr   r3   )Úaccepted_dtypes)rf   ri   r?   ) r   r
   r*   rZ   rp   r)   Úforward_parametersrq   r˜   rr   Úupdater’   rs   r   rC   rƒ   r(   r	   r$   Úbfloat16Úfloat16Úfloat32Úfloat64rH   Úapply_non_transformr5   Ú	index_putr9   rM   ÚNotImplementedErrorr~   rU   )r,   r3   r   r1   r•   r-   Úkeysrc   ÚoutputsÚdcatera   rf   r=   r>   ÚappliedÚoutputs   f$$*,           r   ÚforwardÚRandomTransplantation.forwardƒ  sz  ø€ ð "+Ò!2ˆt�~Š~ÑU^Ó8_ÑU^Èc¼¿ºÀSÖ9IÑU^Ñ8_ˆàŠ>Ø×"Ñ" 5Ô/Ø!&§z¡z´'·,±,Ó'?Õ!@ˆDØ×2Ñ2°4·:±:Ó>ˆD�Là!ˆDŒLç‹3ÔaÑ.`Óa�3�3Š3ÔaÑ.`Óa×aÒaØ�L‰L×Ñ × 6Ò 6¸Ð cÈÐ cÐVZ×VbÑVbÑ cÔdà&(ˆÜ  ×-‰MˆEä5°d·l±lÐCUÕ6VÐX^×XeÑXeÓfÐØÕ/×5Ñ5Ó7ˆHØÔ1°$·,±,¸Õ2OÐQW×Q^ÑQ^Ó_Õ`ˆEð œŸ™Ô%Ü%Ø¬U¯^©^¼U¿]¹]ÌEÏMÉMÔ[`×[hÑ[hÐ,iõð ×.Ñ.¨xÀÇÁÈ[Õ@YÓZ�Ø×1Ñ1°&¸$¿,¹,ÈÏ
É
ÓS�Ø×)Ñ)Ø%Ð'Ø×1Ñ1°'¸4¿<¹<ÈÏÉÓTó‘ð œ'Ÿ,™,Ô&Ø×-Ñ-¨h¸t¿|¹|ÈKÕ?XÓY�Ø×6Ñ6°v¸t¿|¹|ÈTÏZÉZÓX�Ø×)Ñ)Ø%Ð'Ø×1Ñ1°'¸4¿<¹<ÈÏÉÓTó‘ô
 *Ð)à�N‰N˜6×"ñ9 .ô< ˆw‹<˜1ÔØ˜1•:Ðàˆùò] 9`s   –L?)r+   r˜   r   r   )Nrh   g      ð?N)rW   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r"   r9   rH   rM   rZ   r’   r©   Ú__static_attributes__Ú__classcell__)r.   s   @r   r   r   !   sZ   ø† ñh÷Tò õ0õ
7õ`õ
ð{ð
 ?C÷{ðz6ð 59ð6ð :>÷	6õ 6r   )Ú
__future__r   Útypingr   r   r   r   r$   Ú kornia.augmentation._2d.mix.baser   Úkornia.augmentation.utilsr	   Úkornia.constantsr
   Úkornia.core.checkr   Úkornia.core.utilsr   Ú__all__r   r   r   r   Ú<module>r¹      s9   ðõ$ #ç 1Ó 1ã å BÝ ;Ý $Ý *Ý 4à"Ð
#€ôXÐ1ö Xr   