+
    ýäûjd¦  ã                   óN  € ^ RI t ^ RIHtHt ^ RIHtHtHtHtH	t	H
t
HtHtHtHt ^ RIt^ RIHt ^ RIHt ^ RIHtHt ^ RIHtHt ^ RIHt ^ RIHt ^ R	IHt ^ R
I H!t! ^RI"H#t#H$t$ ]]PJ                  ]	]PJ                  ,          ]]!3,          t&]]	]PJ                  ,          ]	]	]PJ                  ,          ,          ]	],          ]	]!,          3,          t']! R4      t(])! 0 R)m4      t*R R lt+R R lt,R R lt-R R lt. ! R R]](,          ]R7      t/ ! R R4      t0]! R4      t1R R lt2R R lt3 ! R R ]/]PJ                  ,          4      t4 ! R! R"]/]PJ                  ,          4      t5 ! R# R$]/]PJ                  ,          4      t6 ! R% R&]/],          4      t7 ! R' R(]/]!,          4      t8R# )*é    N)ÚABCMetaÚabstractmethod)
ÚAnyÚCallableÚDictÚGenericÚListÚOptionalÚ	ParamSpecÚTypeÚTypeVarÚUnion)Únn)Ú_AugmentationBaseÚ_BasicAugmentationBase)Údeepcopy_dictÚoverride_parameters)ÚDataKey)Úis_exporting)ÚBoxes)Ú	Keypoints)Ú	ParamItemÚPatchParamItemÚTc                óÖ   € V ^8„  d   QhR\         \        \        \        \        3,          \
        \        ,          \
        \        ,          3,          ,          R\        \        ,          /# )é   ÚparamsÚreturn)	r
   r   r   Ústrr   r	   r   r   Úset)Úformats   "Ú]C:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\augmentation\container\ops.pyÚ__annotate__r#   .   sD   € ÷ ñ œH¤U¬4´´S°­>¼4Ä	½?ÌDÔQ_ÕL`Ð+`Õ%aÕbð ÔgjÔknÕgoñ ó    c                 ó  € \        V \        4      '       d   \        V 4      # \        4       pV eR   V  FK  pT\        \        V\        4      '       d   VP
                  P                  MVP                  4      ,          pKM  	  V# ©N)Ú
isinstanceÚdictr    Ú_parameter_keysr   ÚparamÚdata)r   Úkeysr*   s   &  r"   r)   r)   .   sd   € Ü�&œ$×ÒÜ�6‹{ÐÜ“U€DØÒÛˆEØœ/¼jÈÔP^×>_Ò>_¨%¯+©+×*:Ò*:Ðej×eoÑeoÓpÕpŠDñ à€Kr$   c          	      óö   € V ^8„  d   QhR\         P                  R\        \        \        \
        \        3,          \        \        ,          \        \        ,          3,          ,          R\        \
        ,          /# )r   Úmoduler   r   )r   ÚModuler
   r   r   r   r   r	   r   r   r    )r!   s   "r"   r#   r#   8   sO   € ÷ 	ñ 	Ü�I‰Ið	Ü'¬¬d´3¼°8­n¼dÄ9½oÌtÔTbÕOcÐ.cÕ(dÕeð	äŒ…Xñ	r$   c                 óÄ   € R R0\        V4      ,          pV P                  4        F7  p\        V\        4      '       g   K  V\	        VP
                  4      ,          pK9  	  V# )Úsave_kwargsÚ	data_keys)r)   Úmodulesr'   r   r    Úflags)r.   r   r,   Úchilds   &&  r"   Ú_supported_optionsr6   8   sS   € ð ˜;Ð'¬/¸&Ó*AÕA€DØ—‘Ö!ˆô �eÔ3×4Ô4Øœ#˜eŸk™kÓ*Õ*ŠDñ	 "ð
 €Kr$   c          
      óâ   € V ^8„  d   QhR\         P                  R\        \        \        \
        3,          ,          R\        \        \        ,          ,          R\        \        \
        3,          /# )r   r.   Ú
extra_argsr   r   )r   r/   r
   r   r   r   r	   r   )r!   s   "r"   r#   r#   D   sU   € ÷ Qñ QÜ�I‰IðQÜ#+¬D´´c°­NÕ#;ðQÜEMÌdÔS\ÍoÕE^ðQä	Œ#Œsˆ(…^ñQr$   c                 ó|  € V'       g   / # VP                  4       \        8:  d   \        V4      # \        W4      \        ,          pV FA  pWC9  g   K  \        P
                  ! \        V 4      P                   R V R2\        ^R7       KC  	  VP                  4        UUu/ uF  w  rEWC9   g   K  WEbK  	  upp# u uppi )z# got an unknown extra_args option 'ze'; it is ignored. Passing unknown options is deprecated and will raise TypeError in a future release.)Ú
stacklevel)
r,   Ú_ALWAYS_SUPPORTED_OPTIONSr(   r6   ÚwarningsÚwarnÚtypeÚ__name__ÚFutureWarningÚitems)r.   r8   r   Ú	supportedÚkeyÚvalues   &&&   r"   Ú_validate_extra_argsrE   D   s¯   € ÷ Øˆ	ð ‡�ÓÔ5Ô5Ü�JÓÐÜ" 6Ó2Ô5NÕN€IÛˆØÖÜ�MŠMÜ˜“<×(Ñ(Ð)Ð)LÈSÈEð Rfð fäØ÷	ñ ð *4×)9Ñ)9Ô);ÔPÑ);™:˜3¸sÑ?OŒJˆCŠJÑ);ÒPÐPùÓPs   Â
B8Â.B8c          
      ó¶   € V ^8„  d   QhR\         P                  R\        \        \        \
        3,          ,          R\        R\        \        \
        3,          /# )r   r.   r8   r*   r   )r   r/   r
   r   r   r   r   )r!   s   "r"   r#   r#   Y   sM   € ÷ Qñ Q¤"§)¡)ð Q¼Ä$ÄsÌCÀxÅ.Õ9Qð QÔZcð QÔhlÔmpÔruÐmuÕhvñ Qr$   c                 ó¤   € V'       g   / # \        WP                  4      pVP                  4        UUu/ uF  w  rEWC9   g   K  WEbK  	  upp# u uppi r&   )r6   r+   rA   )r.   r8   r*   rB   rC   rD   s   &&&   r"   Ú_filter_child_optionsrH   Y   sH   € ÷ Øˆ	Ü" 6¯:©:Ó6€IØ)3×)9Ñ)9Ô);ÔPÑ);™:˜3¸sÑ?OŒJˆCŠJÑ);ÒPÐPùÓPs   ³
AÁAc                   óÐ   a € ] tR t^bt o Rt]V 3R lR l4       t]RV 3R lR ll4       t]V 3R lR l4       t]]	RV 3R	 lR
 ll4       4       t
]]	RV 3R lR ll4       4       tRtV tR# )ÚSequentialOpsInterfacez>Abstract interface for applying and inversing transformations.c                óP   <€ V ^8„  d   QhRS[ RS[S[S[P                  3,          /# ©r   r*   r   )r   r   r   ÚtorchÚTensor)r!   Ú__classdict__s   "€r"   r#   Ú#SequentialOpsInterface.__annotate__f   s)   ø€ ÷ ñ ©ið ¹DÁÁeÇlÁlÐARÕ<Sñ r$   c                ó¨   € \        V\        4      '       d/   \        VP                  \        4      '       d   VP                  pV# \	        RV R24      h)a  Extract per-module parameter dict from a :class:`ParamItem`.

Args:
    param: Parameter wrapper produced by sequential containers.

Returns:
    Dictionary of tensor parameters for one module call.

Raises:
    TypeError: ``param.data`` is not a dictionary.
z5Expected param (ParamItem.data) be a dictionary. Got Ú.)r'   r   r+   r(   Ú	TypeError©Úclsr*   Ú_paramss   && r"   Úget_instance_module_paramÚ0SequentialOpsInterface.get_instance_module_parame   sK   € ô �eœY×'Ò'¬J°u·z±zÄ4×,HÒ,HØ—j‘jˆGð ˆô ÐSÐTYÐSZÐZ[Ð\Ó]Ð]r$   Nc                ó†   <€ V ^8„  d   QhRS[ P                  RS[RS[RS[S[S[S[3,          ,          RS[P                  /# )r   r.   r*   Úinputr8   r   )	r   r/   r   r   r
   r   r   rM   rN   )r!   rO   s   "€r"   r#   rP   y   sV   ø€ ÷ )añ )aÙ—Y‘Yð)aÙ'0ð)aÙ9<ð)aÙJRÑSWÑX[Ñ]`ÐX`ÕSaÕJbð)aá	�‰ñ)ar$   c                ó  € \        WV4      pV P                  V4      p\        VRR4      p\        4       '       g&   Ve"   V! V4      '       d   \        VRR4      pVe   V# VP	                  R4      pVf   \        R4      h\        V\        4      '       d   V'       d
   V^ ,          MRp\        V\        \        34      '       d   VP                  p\        V\        P                  4      '       d   TMRp	V	e   V	P                  MVP                  p
V	e)   \        P                  ! V	4      '       d   V	P                  M\        P                   p\#        VP%                  4       4      pVP	                  R4      p\        4       '       gš   \        V\        P                  4      '       dz   VP&                  ^ ,          ^ 8”  db   \)        V4      ^8¼  dR   V^ ,          P%                  4       w  rïpp. VRR
 OVR
,          V,
          V,
          NVR,          V,
          V,
          N5p\        P*                  ! RW«R7      P-                  V4      pVf   VP.                  M\1        VP.                  VRR	7      pVP3                  V\5        V4      V4      # )zTGet the matrix recorded by these params, not by the module's most recent image call.Ú_matrix_matches_paramsNÚtransform_matrixÚforward_input_shapezS`forward_input_shape` is required to replay geometric annotations without an image.Úpadding_size©ÚdeviceÚdtypeF)Úin_placeéþÿÿÿéÿÿÿÿ© )rH   rW   Úgetattrr   ÚgetÚ
ValueErrorr'   Úlistr   r   r+   rM   rN   ra   Úis_floating_pointrb   Úfloat32ÚtupleÚtolistÚshapeÚlenÚemptyÚexpandr4   r   Úgenerate_transformation_matrixr   )rU   r.   r*   rZ   r8   r   ÚmatchesÚ	transformr^   Ú	referencera   rb   Úinput_shaper_   ÚleftÚrightÚtopÚbottomÚmatrix_inputr4   s   &&&&&               r"   Úget_transform_matrixÚ+SequentialOpsInterface.get_transform_matrixx   s  € ô
 +¨6¸uÓEˆ
Ø×.Ñ.¨uÓ5ˆô ˜&Ð":¸DÓAˆÜ�~Š~ 'Ò"5¹'À&¿/º/Ü Ð(:¸DÓAˆIØÒ$Ø Ð à$Ÿj™jÐ)>Ó?ÐØÒ&ÜÐrÓsÐsä�eœT×"Ò"ß %�E˜!–H¨4ˆEÜ�eœe¤YÐ/×0Ò0Ø—J‘JˆEÜ'¨¬u¯|©|×<Ò<‘EÀ$ˆ	Ø%.Ò%:�×!Ò!Ð@S×@ZÑ@ZˆØ#,Ò#8¼U×=TÒ=TÐU^×=_Ò=_�	—’Ôej×erÑerˆÜÐ/×6Ñ6Ó8Ó9ˆØ—z‘z .Ó1ˆä—’Ü˜<¬¯©×6Ò6Ø×"Ñ" 1Õ%¨Ô)Ü�KÓ  AÔ%à'3°A¥×'=Ñ'=Ó'?Ñ$ˆD˜˜fØm˜K¨¨Ð,Ðm¨k¸"­oÀÕ.CÀfÕ.LÐmÈkÐZ\ÍoÐ`dÕNdÐglÕNlÑmˆKÜ—{’{ 2¨fÔB×IÑIÈ+ÓVˆð !+Ò 2�—’Ô8KÈFÏLÉLÐZdÐotÔ8uˆØ×4Ñ4°\Ä=ÐQWÓCXÐZ_Ó`Ð`r$   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# rL   )r   r	   )r!   rO   s   "€r"   r#   rP   ¥   s   ø€ ÷ ñ ±	ð ¹dÁ9½oñ r$   c                ó¨   € \        V\        4      '       d/   \        VP                  \        4      '       d   VP                  pV# \	        RV R24      h)a  Extract nested sequential parameters from a :class:`ParamItem`.

Args:
    param: Parameter wrapper produced by sequential containers.

Returns:
    List of :class:`ParamItem` values for nested modules.

Raises:
    TypeError: ``param.data`` is not a list.
z/Expected param (ParamItem.data) be a list. Got rR   )r'   r   r+   rj   rS   rT   s   && r"   Úget_sequential_module_paramÚ2SequentialOpsInterface.get_sequential_module_param¤   sI   € ô �eœY×'Ò'¬J°u·z±zÄ4×,HÒ,HØ—j‘jˆGð ˆô ÐMÈeÈWÐTUÐVÓWÐWr$   c                ór   <€ V ^8„  d   QhRS[ RS[P                  RS[RS[S[S[S[3,          ,          RS[ /# ©r   rZ   r.   r*   r8   r   ©r   r   r/   r   r
   r   r   r   )r!   rO   s   "€r"   r#   rP   ¹   sH   ø€ ÷ 
"ñ 
"™að 
"©¯©ð 
"¹9ð 
"ÑRZÑ[_Ñ`cÑehÐ`hÕ[iÕRjð 
"Ñvwñ 
"r$   c                ó   € \         h)ár  Apply a transformation with respect to the parameters.

Args:
    input: the input torch.Tensor.
    module: any torch nn.Module but only kornia augmentation modules will count
        to apply transformations.
    param: the corresponding parameters to the module.
    extra_args: Optional dictionary of extra arguments with specific options for different input types.
©ÚNotImplementedError©rU   rZ   r.   r*   r8   s   &&&&&r"   ru   Ú SequentialOpsInterface.transform·   ó
   € ô "Ð!r$   c                ór   <€ V ^8„  d   QhRS[ RS[P                  RS[RS[S[S[S[3,          ,          RS[ /# r„   r…   )r!   rO   s   "€r"   r#   rP   Ç   sH   ø€ ÷ 
"ñ 
"™Að 
"¡r§y¡yð 
"¹ð 
"ÑPXÑY]Ñ^aÑcfÐ^fÕYgÕPhð 
"Ñtuñ 
"r$   c                ó   € \         h)át  Inverse a transformation with respect to the parameters.

Args:
    input: the input torch.Tensor.
    module: any torch nn.Module but only kornia augmentation modules will count
        to apply transformations.
    param: the corresponding parameters to the module.
    extra_args: Optional dictionary of extra arguments with specific options for different input types.
rˆ   rŠ   s   &&&&&r"   ÚinverseÚSequentialOpsInterface.inverseÅ   rŒ   r$   rf   r&   )r?   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚclassmethodrW   r}   r�   r   ru   r�   Ú__static_attributes__Ú__classdictcell__©rO   s   @r"   rJ   rJ   b   s�   ø‡ € ÙHà÷ó ðð$ ÷)añ )aó ð)aðV ÷ó ðð$ Ø÷
"ñ 
"ó ó ð
"ð Ø÷
"ñ 
"ó ó ö
"r$   rJ   )Ú	metaclassc                   óÞ   a € ] tR t^Ôt o RtV 3R lR lt]V 3R lR l4       t]P                  V 3R lR l4       tRV 3R	 lR
 llt	V 3R lR lt
RR/V 3R lR lltRR/V 3R lR lltRtV tR# )ÚAugmentationSequentialOpsa  Implement the operational logic for the Augmentation Sequential container.

This class manages how data keys (e.g., IMAGE, MASK, BBOX) are handled
during the execution of an augmentation pipeline.

Args:
    data_keys: A list of :class:`DataKey` defining the types of data to process.
c                óD   <€ V ^8„  d   QhRS[ S[S[,          ,          RR/# ©r   r2   r   N©r
   r	   r   )r!   rO   s   "€r"   r#   Ú&AugmentationSequentialOps.__annotate__Þ   s$   ø€ ÷ $ñ $¡(©4±­=Õ"9ð $¸dñ $r$   c                ó   € Wn         R # r&   ©Ú
_data_keys)Úselfr2   s   &&r"   Ú__init__Ú"AugmentationSequentialOps.__init__Þ   s   € Ø#Žr$   c                ó@   <€ V ^8„  d   QhRS[ S[S[,          ,          /# )r   r   rŸ   )r!   rO   s   "€r"   r#   r    â   s   ø€ ÷ ñ ™8¡D©¥MÕ2ñ r$   c                ó   € V P                   # )z&Return currently configured data keys.r¢   )r¤   s   &r"   r2   Ú#AugmentationSequentialOps.data_keysá   s   € ð �‰Ðr$   c                ó~   <€ V ^8„  d   QhRS[ S[S[S[,          S[S[,          S[S[,          3,          ,          RR/# rž   )r
   r   r	   r   r   Úint)r!   rO   s   "€r"   r#   r    ç   s:   ø€ ÷ #ñ #¡8©E±$±wµ-ÁÁcÅÉDÑQTÍIÐ2UÕ,VÕ#Wð #Ð\`ñ #r$   c                óˆ   € V'       d.   V Uu. uF  p\         P                  ! V4      NK  	  upV n        R # R V n        R # u upi r&   )r   rh   r£   ©r¤   r2   Úinps   && r"   r2   r©   æ   s1   € çÙ;DÓE¹9°CœwŸ{š{¨3Ö/¹9ÑEˆDŽOà"ˆDŽOùò Fs   �?Nc                ó�   <€ V ^8„  d   QhRS[ S[S[S[,          S[S[,          S[S[,          3,          ,          RS[S[,          /# )r   r2   r   )r
   r   r	   r   r«   r   )r!   rO   s   "€r"   r#   r    í   s@   ø€ ÷ 7ñ 7©(±5¹¹c½ÁDÉÅIÉtÑT[Í}Ð9\Õ3]Õ*^ð 7ÑjnÑovÕjwñ 7r$   c                óÎ   € Vf8   \        V P                  \        4      '       d   V P                  # \        R4      hV Uu. uF  p\        P
                  ! V4      NK  	  up# u upi )a0  Normalize user-provided data keys into :class:`DataKey` values.

Args:
    data_keys: Optional keys passed by the caller. If omitted, this method
        uses ``self.data_keys``.

Returns:
    Normalized list of data keys.

Raises:
    ValueError: Neither argument nor instance-level keys are available.
z8nn.Sequential ops needs data keys to be able to process.)r'   r2   rj   ri   r   rh   r­   s   && r"   Úpreproc_datakeysÚ*AugmentationSequentialOps.preproc_datakeysí   sR   € ð ÒÜ˜$Ÿ.™.¬$×/Ò/Ø—~‘~Ð%ÜÐWÓXÐXÙ,5Ó6©I S”—’˜CÖ ©IÑ6Ð6ùÒ6s   Á A"c                óF   <€ V ^8„  d   QhRS[ RS[S[S[,          ,          /# )r   Údata_keyr   )r   r   rJ   r   )r!   rO   s   "€r"   r#   r       s*   ø€ ÷ Mñ M¡ð M©DÑ1GÉÕ1LÕ,Mñ Mr$   c                ó€  € V\         P                  8X  d   \        # V\         P                  8X  d   \        # V\         P
                  \         P                  \         P                  09   d   \        # V\         P                  8X  d   \        # V\         P                  8X  d   \        # \        RVP                   R24      h)z4Return the corresponding operation given a data key.zOperation for `z` is not found.)r   ÚINPUTÚInputSequentialOpsÚMASKÚMaskSequentialOpsÚBBOXÚ	BBOX_XYWHÚ	BBOX_XYXYÚBoxSequentialOpsÚ	KEYPOINTSÚKeypointSequentialOpsÚCLASSÚClassSequentialOpsÚRuntimeErrorÚname)r¤   r´   s   &&r"   Ú_get_opÚ!AugmentationSequentialOps._get_op   s‰   € à”w—}‘}Ô$Ü%Ð%Ø”w—|‘|Ô#Ü$Ð$ØœŸ™¤g×&7Ñ&7¼×9JÑ9JÐKÔKÜ#Ð#Ø”w×(Ñ(Ô(Ü(Ð(Ø”w—}‘}Ô$Ü%Ð%Ü˜_¨X¯]©]¨O¸?ÐKÓLÐLr$   r2   c                óî   <€ V ^8„  d   QhRS[ RS[P                  RS[RS[S[S[S[S[3,          3,          RS[S[	S[
S[,          S[
S[,          S[
S[,          3,          ,          RS[	S[ S[3,          /# ©r   Úargr.   r*   r8   r2   r   ©ÚDataTyper   r/   r   r   r   r   r   r
   r   r	   r«   ÚSequenceDataType)r!   rO   s   "€r"   r#   r      s…   ø€ ÷ =ñ =áð=ñ —	‘	ð=ñ ð	=ñ
 ™¡$¡s©C x¥.Ð0Õ1ð=ñ ™E¡$¡s¥)©T±#­Y¹¹W½Ð"EÕFÕGð=ñ 
‰xÑ)Ð)Õ	*ñ=r$   c               óž  € V P                  V4      p\        V\        P                  4      '       d˜   \	        WV4       FS  w  rxV\
        P                  8X  g   K  \        V\        4      '       g   K4  \        \        V4      P                   R24      h	  \        VP                  VP                  ! VRVRVP                  RV/ R7      p\        \        \!        V4      4      4      p	\        V\        P"                  4      '       dv   \        V\        P$                  4      '       gV   \
        P&                  V9   dA   VP)                  \
        P&                  4      p
V	P+                  ^ V	P-                  V
4      4       \        V4      pV	 FŒ  pW\,          Wl,          r‡V P/                  V4      pVP1                  V/ 4      pVP                  R8X  d2   \        V\        4      '       d   \2        P5                  WqW.R7      W¼&   Kw  VP7                  WqW.R7      W¼&   KŽ  	  \!        V4      ^8X  d&   \        V\        \8        34      '       d
   V^ ,          # V# )aÄ  Apply one module to all inputs according to their data keys.

Args:
    *arg: Inputs to transform (image, mask, boxes, keypoints, ...).
    module: Module to execute.
    param: Parameters associated with ``module``.
    extra_args: Optional runtime overrides keyed by :class:`DataKey`.
    data_keys: Optional key override for this call.

Returns:
    Transformed output(s). A single value is returned for one input,
    otherwise a list is returned.
ú does not support mask lists.r2   r   r8   )rÃ   r+   r¸   ©r*   r8   )r±   r'   ÚKÚRandomTransplantationÚzipr   r¸   rj   r‰   r>   r?   r   rÃ   Úparams_from_inputr+   Úrangerp   ÚRigidAffineAugmentationBase2DÚIntensityAugmentationBase2Dr¶   ÚindexÚinsertÚpoprÄ   rh   r¹   Útransform_listru   rm   )r¤   r.   r*   r8   r2   rÈ   r£   r®   ÚdcateÚorderÚimage_indexÚoutputsrÖ   ÚopÚ	extra_args   &$$$$*         r"   ru   Ú#AugmentationSequentialOps.transform  sÑ  € ð* ×*Ñ*¨9Ó5ˆ
ä�fœa×5Ñ5×6Ò6ä! #Ö2‘
�ØœGŸL™LÖ(¬Z¸¼T×-BÔ-BÜ-´°f³×1FÑ1FÐ0GÐGdÐ.eÓfÐfñ 3ô Ø—Z‘ZØ×-Ò-Øðà(ðð !Ÿ:™:ðð  *ñ	ôˆEô ”Uœ3˜s›8“_Ó%ˆä�vœq×>Ñ>×?Ò?Ü˜v¤q×'DÑ'D×EÒEÜ—‘ Ô+à$×*Ñ*¬7¯=©=Ó9ˆKØ�L‰L˜˜EŸI™I kÓ2Ô3ä�s“)ˆÛˆEØ� ZÕ%6�Ø—‘˜eÓ$ˆBØ"Ÿ™ u¨bÓ1ˆIØ�z‰z˜VÔ#¬
°3¼×(=Ò(=Ü!2×!AÑ!AÀ#ÐUZÐ!AÓ!q�“à!#§¡¨cÀ Ó!]�“ñ ô ˆw‹<˜1Ô¤¨G´d¼E°]×!CÒ!CØ˜1•:ÐØˆr$   c                óî   <€ V ^8„  d   QhRS[ RS[P                  RS[RS[S[S[S[S[3,          3,          RS[S[	S[
S[,          S[
S[,          S[
S[,          3,          ,          RS[	S[ S[3,          /# rÇ   rÉ   )r!   rO   s   "€r"   r#   r    M  s…   ø€ ÷ !ñ !áð!ñ —	‘	ð!ñ ð	!ñ
 ™¡$¡s©C x¥.Ð0Õ1ð!ñ ™E¡$¡s¥)©T±#­Y¹¹W½Ð"EÕFÕGð!ñ 
‰xÑ)Ð)Õ	*ñ!r$   c          
     óæ  € V P                  V4      p. p\        WV4       F™  w  r‰V P                  V	4      p
VP                  V	/ 4      pV	P                  R8X  d?   \        V\        4      '       d)   VP                  \        P                  W�W+R7      4       Kw  VP                  V
P                  W�W+R7      4       K›  	  \        V4      ^8X  d&   \        V\        \        34      '       d
   V^ ,          # V# )a¼  Apply inverse transformation dispatch for one module step.

Args:
    *arg: Inputs to invert.
    module: Module used in the forward pass.
    param: Parameters captured for ``module`` during forward.
    extra_args: Optional runtime overrides keyed by :class:`DataKey`.
    data_keys: Optional key override for this call.

Returns:
    Inverse-transformed output(s). A single value is returned for one
    input, otherwise a list is returned.
r¸   rÎ   )r±   rÑ   rÄ   rh   rÃ   r'   rj   Úappendr¹   Úinverse_listr�   rp   rm   )r¤   r.   r*   r8   r2   rÈ   r£   rÝ   r®   rÚ   rÞ   rß   s   &$$$$*      r"   r�   Ú!AugmentationSequentialOps.inverseM  sÄ   € ð* ×*Ñ*¨9Ó5ˆ
ØˆÜ˜cÖ.‰JˆCØ—‘˜eÓ$ˆBØ"Ÿ™ u¨bÓ1ˆIØ�z‰z˜VÔ#¬
°3¼×(=Ò(=à—‘Ô0×=Ñ=¸cÐQVÐ=ÓmÖnà—‘˜rŸz™z¨#¸U˜zÓYÖZñ /ô ˆw‹<˜1Ô¤¨G´d¼E°]×!CÒ!CØ˜1•:ÐØˆr$   r¢   r&   )r?   r’   r“   r”   r•   r¥   Úpropertyr2   Úsetterr±   rÄ   ru   r�   r—   r˜   r™   s   @r"   rœ   rœ   Ô   sŠ   ø‡ € ñ÷$ð $ð ÷ó ðð ×Ñ÷#ó ð#÷7ò 7÷&Mð Mð=ð KO÷=ò =ð~!ð KO÷!÷ !ð !r$   rœ   ÚPc                ó^   € V ^8„  d   QhRRR\         \        \        P                  3,          /# )r   r.   úK.container.ImageSequentialBaser   )r   rè   rM   rN   )r!   s   "r"   r#   r#   t  s-   € ÷ ñ Ð'Hð ÌXÔVWÔY^×YeÑYeÐVeÕMfñ r$   c                ó   a € R V 3R llpV# )z@Disable all other additional inputs (e.g. ) for ImageSequential.c                óx   € V ^8„  d   QhR\         P                  R\         P                  R\        P                  /# )r   ÚargsÚkwargsr   )rè   rí   rî   rM   rN   )r!   s   "r"   r#   Ú0make_input_only_sequential.<locals>.__annotate__w  s-   € ÷ 'ñ '”—‘ð '¤1§8¡8ð '´·±ñ 'r$   c                  ó   <€ S! V / VB # r&   rf   )rí   rî   r.   s   *,€r"   ÚfÚ%make_input_only_sequential.<locals>.fw  s   ø€ Ù�tÐ&˜vÑ&Ð&r$   rf   )r.   rñ   s   f r"   Úmake_input_only_sequentialró   t  s   ø€ ÷'ð 'ð €Hr$   c                ó`   € V ^8„  d   QhRRR\         \        ,          R\         \        ,          /# )r   r.   rê   r*   r   )r	   r   )r!   s   "r"   r#   r#   }  s.   € ÷ ñ Ð%Fð ÌtÔT]Íð ÔcgÔhqÕcrñ r$   c                óà   € V P                  V4      p. p\        W!4       FK  w  w  rEp\        V\        P                  \        P
                  34      '       g   K:  VP                  V4       KM  	  V# )zReturn geometry param.)Úget_forward_sequencerÑ   r'   rÏ   ÚGeometricAugmentationBase2DÚGeometricAugmentationBase3Drã   )r.   r*   Únamed_modulesÚresÚ_ÚmodÚps   &&     r"   Úget_geometric_only_paramrþ   }  s\   € à×/Ñ/°Ó6€Mà€CÜ˜=Ö0‰‰ˆ�!Ü�cœA×9Ñ9¼1×;XÑ;XÐY×ZÔZØ�J‰J�qŽMñ 1ð €Jr$   c                   ód   a € ] tR tRt o Rt]R	V 3R lR ll4       t]R	V 3R lR ll4       tRtV t	R# )
r·   iˆ  zÐImplement the operations for processing input tensors within a sequential container.

This class provides class methods to apply transformations and manage the
flow of data through the augmentation pipeline.
Nc                óš   <€ V ^8„  d   QhRS[ P                  RS[P                  RS[RS[S[S[S[3,          ,          RS[ P                  /# r„   ©	rM   rN   r   r/   r   r
   r   r   r   )r!   rO   s   "€r"   r#   ÚInputSequentialOps.__annotate__�  sS   ø€ ÷ ñ Ù—L‘LðÙ*,¯)©)ðÙ<EðÙS[Ñ\`ÑadÑfiÐaiÕ\jÕSkðá	�‰ñr$   c                ód  € \        W$V4      p\        V\        \        P                  34      '       d.   V! V3RV P                  V4      R\        P                  ./VB pV# \        V\        P                  P                  34      '       d%   VP                  WP                  V4      VR7      pV# \        V\        P                  P                  P                  34      '       d   V! WP                  V4      R7      pV# VP                  e   \!        RVP"                   RV R24      hV! V4      pV# )a5  Apply one module step to an image tensor.

Args:
    input: Input image tensor.
    module: Module to execute.
    param: Parameters for ``module``.
    extra_args: Optional runtime overrides.

Returns:
    Transformed tensor.

Raises:
    AssertionError: A non-augmentation module receives non-empty params.
r   r2   ©r   r8   ©r   zNon-augmentaion operation z require empty parameters. Got rR   )rH   r'   r   rÏ   ÚMixAugmentationBaseV2rW   r   r¶   Ú	containerÚImageSequentialBaseÚtransform_inputsr�   ÚautoÚ
operationsÚOperationBaser+   ÚAssertionErrorrÃ   rŠ   s   &&&&&r"   ru   ÚInputSequentialOps.transform�  s  € ô$ +¨6¸uÓEˆ
Ü�fÔ0´!×2IÑ2IÐJ×KÒKÙ˜5Ñw¨×)FÑ)FÀuÓ)MÐwÔZa×ZgÑZgÐYhÐwÐlvÑwˆEð ˆô ˜¤§¡×!@Ñ!@Ð B×CÒCØ×+Ñ+¨E×:YÑ:YÐZ_Ó:`ÐmwÐ+ÓxˆEð ˆô ˜¤§¡×!2Ñ!2×!@Ñ!@Ð B×CÒCÙ˜5×)FÑ)FÀuÓ)MÔNˆEð
 ˆð �z‰zÒ%Ü$Ð'AÀ%Ç*Á*ÀÐMlÐmrÐlsÐstÐ%uÓvÐvÙ˜5“MˆEØˆr$   c                óš   <€ V ^8„  d   QhRS[ P                  RS[P                  RS[RS[S[S[S[3,          ,          RS[ P                  /# r„   r  )r!   rO   s   "€r"   r#   r  ¯  sS   ø€ ÷ ñ Ù—L‘LðÙ*,¯)©)ðÙ<EðÙS[Ñ\`ÑadÑfiÐaiÕ\jÕSkðá	�‰ñr$   c                ó®  € \        W$V4      p\        V\        P                  4      '       d'   VP                  ! V3RV P                  V4      /VB pV# \        V\        P                  4      '       d   VP                  ! R/ VB pV# \        V\        P                  34      '       d   \        R4      h\        V\        P                  P                  P                  34      '       d"   \        P	                  WP                  W4R7      # \        V\        P                  P                  4      '       d#   VP!                  WP#                  V4      VR7      pV# )aX  Apply one inverse module step to an image tensor.

Args:
    input: Tensor to invert.
    module: Module used in the forward path.
    param: Forward parameters for ``module``.
    extra_args: Optional runtime overrides.

Returns:
    Inverse-transformed tensor.

Raises:
    NotImplementedError: Inverse for 3D geometric ops is not supported.
r   zfThe support for 3d inverse operations are not yet supported. You are welcome to file a PR in our repo.©r.   r*   r8   r  rf   )rH   r'   rÏ   r÷   r�   rW   r  rø   r‰   r
  r  r  r·   rÞ   r  r  Úinverse_inputsr�   rŠ   s   &&&&&r"   r�   ÚInputSequentialOps.inverse®  s  € ô$ +¨6¸uÓEˆ
Ü�fœa×;Ñ;×<Ò<Ø—N’N 5Ñd°×1NÑ1NÈuÓ1UÐdÐYcÑdˆEð ˆô ˜¤× 7Ñ 7×8Ò8Ø—N’NÑ0 ZÑ0ˆEð ˆô ˜¤×!>Ñ!>Ð @×AÒAÜ%Øxóð ô ˜¤§¡×!2Ñ!2×!@Ñ!@Ð B×CÒCÜ%×-Ñ-¨e¿I¹IÈUÐ-ÓjÐjÜ˜¤§¡× ?Ñ ?×@Ò@Ø×)Ñ)¨%×8WÑ8WÐX]Ó8^ÐkuÐ)ÓvˆEØˆr$   rf   r&   ©
r?   r’   r“   r”   r•   r–   ru   r�   r—   r˜   r™   s   @r"   r·   r·   ˆ  s<   ø‡ € ñð ÷ñ ó ðð< ÷ñ ó ör$   r·   c                   ód   a € ] tR tRt o Rt]R	V 3R lR ll4       t]R	V 3R lR ll4       tRtV t	R# )
rÁ   iÐ  z=Apply and inverse transformations for class labels if needed.Nc                óš   <€ V ^8„  d   QhRS[ P                  RS[P                  RS[RS[S[S[S[3,          ,          RS[ P                  /# r„   r  )r!   rO   s   "€r"   r#   ÚClassSequentialOps.__annotate__Ô  sS   ø€ ÷ ñ Ù—L‘LðÙ*,¯)©)ðÙ<EðÙS[Ñ\`ÑadÑfiÐaiÕ\jÕSkðá	�‰ñr$   c                ó\   € \        V\        P                  4      '       d   \        R4      hV# )aQ  Apply class-label handling for one module step.

Args:
    input: Class-label tensor.
    module: Module to execute.
    param: Parameters for ``module``.
    extra_args: Optional runtime overrides.

Returns:
    Class labels after transformation handling.

Raises:
    NotImplementedError: Label-changing mix ops are not supported yet.
zdThe support for class labels for mix augmentations that change the class label is not yet supported.)r'   rÏ   r  r‰   rŠ   s   &&&&&r"   ru   ÚClassSequentialOps.transformÓ  s.   € ô$ �fœa×5Ñ5×6Ò6Ü%Øvóð ð ˆr$   c                óš   <€ V ^8„  d   QhRS[ P                  RS[P                  RS[RS[S[S[S[3,          ,          RS[ P                  /# r„   r  )r!   rO   s   "€r"   r#   r  ì  sS   ø€ ÷ ñ Ù—L‘LðÙ*,¯)©)ðÙ<EðÙS[Ñ\`ÑadÑfiÐaiÕ\jÕSkðá	�‰ñr$   c                ó   € V# )aX  Return class labels unchanged during inverse dispatch.

Note:
    Class labels do not have a geometric inverse in this pipeline.

Args:
    input: Class-label tensor.
    module: Module used in forward (unused).
    param: Forward parameters (unused).
    extra_args: Optional runtime overrides (unused).

Returns:
    Unmodified class labels.
rf   rŠ   s   &&&&&r"   r�   ÚClassSequentialOps.inverseë  s	   € ð$ ˆr$   rf   r&   r  r™   s   @r"   rÁ   rÁ   Ð  s8   ø‡ € ÙGà÷ñ ó ðð. ÷ñ ó ör$   rÁ   c                   óÜ   a € ] tR tRt o Rt]V 3R lR l4       t]RV 3R lR ll4       t]V 3R lR	 l4       t	]RV 3R
 lR ll4       t
]RV 3R lR ll4       t]RV 3R lR ll4       tRtV tR# )r¹   i   z3Apply and inverse transformations for mask tensors.c                óh   <€ V ^8„  d   QhRS[ RS[S[S[S[ 3,          ,          RS[S[S[ 3,          /# )r   r.   r8   r   )r   r
   r   r   )r!   rO   s   "€r"   r#   ÚMaskSequentialOps.__annotate__  s:   ø€ ÷ ñ ¡ð ±(¹4ÁÁSÀ½>Õ2Jð ÉtÑTWÑY\ÐT\Í~ñ r$   c           	     óö  € Vf   / MTpV P                   P                  R4      pVe:   \        V\        \        34      '       g   \        V4      pVP                  RR4       V P                   P                  R4      p\        V\        P                  4      '       d^   VP                  4       ^8”  dI   \        V4      pVP                  R\        P                  ! RVP                  VP                  R7      4       V# )NÚfillg        Ú
fill_valuer`   rf   )r4   rh   r'   r«   Úfloatr(   Ú
setdefaultrM   rN   ÚnumelÚzerosra   rb   )r.   r8   r!  r"  s   &&  r"   Ú_mask_extra_argsÚ"MaskSequentialOps._mask_extra_args  sÅ   € à%Ò-‘R°:ˆ
ð �|‰|×Ñ Ó'ˆØÒ¤J¨t´c¼5°\×$BÒ$BÜ˜jÓ)ˆJØ×!Ñ! &¨#Ô.ð —\‘\×%Ñ% lÓ3ˆ
Ü�j¤%§,¡,×/Ò/°J×4DÑ4DÓ4FÈÔ4JÜ˜jÓ)ˆJØ×!Ñ! ,´·²¸BÀz×GXÑGXÐ`j×`pÑ`pÔ0qÔrØÐr$   Nc                óš   <€ V ^8„  d   QhRS[ P                  RS[P                  RS[RS[S[S[S[3,          ,          RS[ P                  /# r„   r  )r!   rO   s   "€r"   r#   r    sS   ø€ ÷ 5ñ 5Ù—L‘Lð5Ù*,¯)©)ð5Ù<Eð5ÙS[Ñ\`ÑadÑfiÐaiÕ\jÕSkð5á	�‰ñ5r$   c                ó  € \        W$V4      p\        V\        P                  4      '       dv   \        V\        P                  4      '       gV   V P                  W$4      pVP                  ! V3RV P                  V4      RVP                  RV P                  W#V4      /VB pV# \        V\        P                  34      '       d   \        R4      h\        V\        P                  4      '       df   V! V3RV P                  V4      R\        P                  ./VB pVP                  ^8X  d&   VP                   '       g   VP#                  ^4      pV# TpV# \        V\        P$                  4      '       d.   VP'                  WP                  V4      VP                  4      pV# \        V\(        4      '       d3   VP                  ! V3RV P                  V4      RVP                  /VB pV# \        V\        P*                  P,                  4      '       d%   VP                  WP/                  V4      VR7      pV# \        V\        P0                  P2                  P4                  34      '       d"   \6        P9                  WP:                  W4R7      pV# )r‡   r   r4   ru   úcThe support for 3d mask operations are not yet supported. You are welcome to file a PR in our repo.r2   r  r  )rH   r'   rÏ   rÔ   rÕ   r'  Útransform_masksrW   r4   r}   rø   r‰   rÐ   r   r¸   ÚndimÚkeepdimÚ	unsqueezer  Útransform_maskr   r  r  r�   r
  r  r  r¹   ru   rÞ   )rU   rZ   r.   r*   r8   Úoutputs   &&&&& r"   ru   ÚMaskSequentialOps.transform  sf  € ô +¨6¸uÓEˆ
ä�fœa×=Ñ=×>Ò>ÄzØ”A×1Ñ1÷H
ò H
ð ×-Ñ-¨fÓAˆJØ×*Ò*Øñà×4Ñ4°UÓ;ðð —l‘lðð ×2Ñ2°6À%ÓHð	ð
 ñˆEðF ˆô7 ˜¤×!>Ñ!>Ð @×AÒAÜ%Øuóð ô ˜¤× 7Ñ 7×8Ò8Ù˜EÑw¨#×*GÑ*GÈÓ*NÐwÔ[b×[gÑ[gÐZhÐwÐlvÑwˆFà+1¯;©;¸!Ô+;ÀFÇNÇNÀN�F×$Ñ$ QÓ'ˆEð& ˆð' Y_ˆEð& ˆô# ˜¤× 7Ñ 7×8Ò8ð ×)Ñ)¨%×1NÑ1NÈuÓ1UÐW]×WcÑWcÓdˆEð ˆô ˜Ô!2×4Ò4Ø×*Ò*ØñØ!×;Ñ;¸EÓBðØJPÏ,É,ðØZdñˆEð ˆô ˜¤§¡× ?Ñ ?×@Ò@Ø×*Ñ*¨5×9XÑ9XÐY^Ó9_ÐlvÐ*ÓwˆEð
 ˆô ˜¤§¡×!2Ñ!2×!@Ñ!@Ð B×CÒCÜ%×/Ñ/°¿i¹iÈuÐ/ÓlˆEàˆr$   c                ó€   <€ V ^8„  d   QhRS[ S[S[P                  3,          RS[RS[ S[S[P                  3,          /# )r   r   rÖ   r   )r   r   rM   rN   r«   )r!   rO   s   "€r"   r#   r  O  sA   ø€ ÷ ñ ™t¡C©¯©Ð$5Õ6ð ¹sð ÁtÉCÑQV×Q]ÑQ]ÐL]ÕG^ñ r$   c                ó  € V R,          P                  4       p/ pV P                  4        FZ  w  rEVR8X  d   VP                  4       p^V^ &   M4VP                  ^ 8”  d$   VP                  ^ ,          V8X  d   WQV^,            pWSV&   K\  	  V# )zOSelect one sample's gate and tensor parameters without mutating the saved draw.Ú
batch_probr^   )r%  rA   Úcloner-  ro   )r   rÖ   ÚbatchÚselectedrÃ   rD   s   &&    r"   Ú_sample_paramsÚ MaskSequentialOps._sample_paramsN  s�   € ð �|Õ$×*Ñ*Ó,ˆØˆØ!Ÿ<™<ž>‰KˆDØÐ,Ô,ØŸ™›�Ø��a’Ø—‘˜a” E§K¡K°¥N°eÔ$;Ø e¨a¥iÐ0�Ø"�T‹Nñ *ð ˆr$   c                óº   <€ V ^8„  d   QhRS[ S[P                  ,          RS[P                  RS[RS[S[S[S[	3,          ,          RS[ S[P                  ,          /# r„   ©
r	   rM   rN   r   r/   r   r
   r   r   r   )r!   rO   s   "€r"   r#   r  ]  s]   ø€ ÷ 2ñ 2Ù™Ÿ™Õ&ð2Ù02·	±	ð2ÙBKð2ÙYaÑbfÑgjÑloÐgoÕbpÕYqð2á	‰e�l‰lÕ	ñ2r$   c                óJ  € \        W$V4      p\        V\        P                  4      '       d   \	        R4      h\        V\        P
                  \        P                  34      '       d"   \	        \        V4      P                   R24      h\        V\        P                  4      '       d4   V P                  V4      pV Uu. uF  qbP                  WeVR7      NK  	  up# \        V\        P                  P                  4      '       dF   V P                  V4       F.  pV P                  WP                  VP                   4      Wt4      pK0  	  V# \        V\        P"                  P$                  P&                  4      '       d   V P                  WP(                  W44      # \        V\*        4      '       dè   V P-                  V4      pRp	\        V\        P.                  4      '       dD   \        V\        P0                  4      '       g$   V P3                  W$4      pV P5                  W#V4      p	\7        V4       U
Uu. uFF  w  r¦VP                  ! V3RV P9                  WŠ4      RVP:                  RV	e   WšV
^,            MR/VB NKH  	  pp
pVP=                  VR7       V# V# u upi u upp
i )	at  Transform one mask per image sample, allowing different channel counts.

Args:
    input: Per-sample mask tensors in image order.
    module: Augmentation or nested image sequence to apply.
    param: The full image batch's saved parameters.
    extra_args: Mask interpolation and other runtime overrides.

Returns:
    One transformed mask per sample, in the same order.
ú 3D mask lists are not supported.rÍ   r  Nr   r4   ru   r  )rH   r'   rÏ   rø   r‰   ÚVideoSequentialr  r>   r?   ÚPatchSequentialr�   r,  r  r  rÙ   Úget_submodulerÃ   r
  r  r  rÞ   r   rW   rÔ   rÕ   r'  r}   Ú	enumerater9  r4   Ú_commit_state)rU   rZ   r.   r*   r8   Ú
seq_paramsr®   Úchild_paramr   ru   Úir1  s   &&&&&       r"   rÙ   Ú MaskSequentialOps.transform_list\  s[  € ô +¨6¸uÓEˆ
Ü�fœa×;Ñ;×<Ò<Ü%Ð&HÓIÐIÜ�fœq×0Ñ0´!×2IÑ2IÐJ×KÒKÜ%¬¨f«×)>Ñ)>Ð(?Ð?\Ð&]Ó^Ð^Ü�fœa×/Ñ/×0Ò0à×8Ñ8¸Ó?ˆJÙejÓkÑejÐ^a×*Ñ*¨3ÈjÐ*ÖYÑejÑkÐkÜ�fœaŸk™k×=Ñ=×>Ò>Ø"×>Ñ>¸uÖE�Ø×*Ñ*¨5×2FÑ2FÀ{×GWÑGWÓ2XÐZeÓr’ñ  FàˆLÜ�fœaŸf™f×/Ñ/×=Ñ=×>Ò>Ø×%Ñ% e¯Y©Y¸ÓJÐJÜ�fÔ/×0Ò0Ø×2Ñ2°5Ó9ˆFØˆIÜ˜&¤!×"AÑ"A×BÒBÌ:Øœ×5Ñ5÷Lò Lð !×1Ñ1°&ÓE�
Ø×4Ñ4°VÀEÓJ�	ô (¨Ô.ô	ñ /‘F�Að ×&Ò&Øñà×-Ñ-¨fÓ8ðð !Ÿ,™,ðð 7@Ò6K˜i¨A°­EÑ2ÐQUð	ð
 !ôñ /ð ñ 	ð × Ñ ¨Ð Ô/ØˆMØˆùò9 lùó	s   Â>JÈ5AJc                óš   <€ V ^8„  d   QhRS[ P                  RS[P                  RS[RS[S[S[S[3,          ,          RS[ P                  /# r„   r  )r!   rO   s   "€r"   r#   r  ’  sS   ø€ ÷ $ñ $Ù—L‘Lð$Ù*,¯)©)ð$Ù<Eð$ÙS[Ñ\`ÑadÑfiÐaiÕ\jÕSkð$á	�‰ñ$r$   c           	     óÌ  € \        W$V4      p\        V\        P                  34      '       dg   V P	                  W$4      pVP                  V P                  W#V4      4      pVP                  ! V3RV P                  V4      RVP                  RV/VB pV# \        V\        P                  34      '       d   \        R4      h\        V\        P                  P                  4      '       d%   VP                  WP                  V4      VR7      pV# \        V\        P                  P                   P"                  34      '       d"   \$        P'                  WP(                  W4R7      pV# )r�   r   r4   ru   r+  r  r  )rH   r'   rÏ   r÷   r'  Úcompute_inverse_transformationr}   Úinverse_masksrW   r4   rø   r‰   r  r  r�   r
  r  r  r¹   r�   rÞ   )rU   rZ   r.   r*   r8   ru   s   &&&&& r"   r�   ÚMaskSequentialOps.inverse‘  sN  € ô +¨6¸uÓEˆ
ä�fœq×<Ñ<Ð>×?Ò?Ø×-Ñ-¨fÓAˆJØ×=Ñ=¸c×>VÑ>VÐW]ÐfkÓ>lÓmˆIØ×(Ò(Øñà×4Ñ4°UÓ;ðð —l‘lðð $ð	ð
 ñˆEð& ˆô ˜¤×!>Ñ!>Ð @×AÒAÜ%Øuóð ô ˜¤§¡× ?Ñ ?×@Ò@Ø×(Ñ(¨×7VÑ7VÐW\Ó7]ÐjtÐ(ÓuˆEð
 ˆô ˜¤§¡×!2Ñ!2×!@Ñ!@Ð B×CÒCÜ%×-Ñ-¨e¿I¹IÈUÐ-ÓjˆEàˆr$   c                óº   <€ V ^8„  d   QhRS[ S[P                  ,          RS[P                  RS[RS[S[S[S[	3,          ,          RS[ S[P                  ,          /# r„   r<  )r!   rO   s   "€r"   r#   r  ¹  s]   ø€ ÷ ,ñ ,Ù™Ÿ™Õ&ð,Ù02·	±	ð,ÙBKð,ÙYaÑbfÑgjÑloÐgoÕbpÕYqð,á	‰e�l‰lÕ	ñ,r$   c                óþ  € \        W$V4      p\        V\        P                  4      '       d¯   V P	                  W$4      pVP                  V P                  W#V4      4      pV P                  V4      p\        V4       UUu. uF@  w  rxVP                  ! V3RV P                  Wg4      RVP                  RWWV^,            /VB NKB  	  p	ppVP                  VR7       V	# \        V\        P                  4      '       d   \        R4      h\        V\        P                  \        P                   34      '       d"   \        \#        V4      P$                   R24      h\        V\        P&                  4      '       d4   V P)                  V4      p
V Uu. uF  q‚P                  WŠVR7      NK  	  up# \        V\        P*                  P,                  4      '       dO   \/        V P)                  V4      4       F.  pV P1                  WP3                  VP4                  4      W´4      pK0  	  V# \        V\        P6                  P8                  P:                  4      '       d   V P1                  WP<                  W44      # V# u uppi u upi )aŠ  Invert each sample's mask with its own forward parameters and matrix.

Args:
    input: Per-sample masks returned by the forward pass.
    module: Augmentation or nested image sequence to invert.
    param: The full image batch's saved forward parameters.
    extra_args: Mask interpolation and other runtime overrides.

Returns:
    One inverse-transformed mask per sample, in the same order.
r   r4   ru   r  r>  rÍ   r  )rH   r'   rÏ   r÷   r'  rJ  r}   rW   rB  rK  r9  r4   rC  rø   r‰   r?  r  r>   r?   r@  r�   r  r  Úreversedrä   rA  rÃ   r
  r  r  rÞ   )rU   rZ   r.   r*   r8   ru   r   rF  r®   r1  rD  rE  s   &&&&&       r"   rä   ÚMaskSequentialOps.inverse_list¸  s6  € ô +¨6¸uÓEˆ
Ü�fœa×;Ñ;×<Ò<Ø×-Ñ-¨fÓAˆJØ×=Ñ=¸c×>VÑ>VÐW]ÐfkÓ>lÓmˆIØ×2Ñ2°5Ó9ˆFô (¨Ô.ô	ñ /‘F�Að ×$Ò$Øñà×-Ñ-¨fÓ8ðð !Ÿ,™,ðð (¨A°­EÐ2ð	ð
 !ôñ /ð ñ 	ð × Ñ ¨Ð Ô/ØˆMÜ�fœa×;Ñ;×<Ò<Ü%Ð&HÓIÐIÜ�fœq×0Ñ0´!×2IÑ2IÐJ×KÒKÜ%¬¨f«×)>Ñ)>Ð(?Ð?\Ð&]Ó^Ð^Ü�fœa×/Ñ/×0Ò0Ø×8Ñ8¸Ó?ˆJÙchÓiÑchÐ\_×(Ñ(¨ÈJÐ(ÖWÑchÑiÐiÜ�fœaŸk™k×=Ñ=×>Ò>Ü'¨×(GÑ(GÈÓ(NÖO�Ø×(Ñ(¨×0DÑ0DÀ[×EUÑEUÓ0VÐXcÓp’ñ  PàˆLÜ�fœaŸf™f×/Ñ/×=Ñ=×>Ò>Ø×#Ñ# E¯9©9°eÓHÐHØˆùó3	ùò$ js   Á>AI4ÆI:rf   r&   )r?   r’   r“   r”   r•   Ústaticmethodr'  r–   ru   r9  rÙ   r�   rä   r—   r˜   r™   s   @r"   r¹   r¹      s•   ø‡ € Ù=à÷ó ðð$ ÷5ñ 5ó ð5ðn ÷ó ðð ÷2ñ 2ó ð2ðh ÷$ñ $ó ð$ðL ÷,ñ ,ó ö,r$   r¹   c                   ód   a € ] tR tRt o Rt]R	V 3R lR ll4       t]R	V 3R lR ll4       tRtV t	R# )
r½   iè  zuApply and inverse transformations for bounding box tensors.

This is for transform boxes in the format (B, N, 4, 2).
Nc                ór   <€ V ^8„  d   QhRS[ RS[P                  RS[RS[S[S[S[3,          ,          RS[ /# r„   ©r   r   r/   r   r
   r   r   r   )r!   rO   s   "€r"   r#   ÚBoxSequentialOps.__annotate__ï  sK   ø€ ÷ 0ñ 0Ùð0Ù#%§9¡9ð0Ù5>ð0ÙLTÑUYÑZ]Ñ_bÐZbÕUcÕLdð0á	ñ0r$   c           	     ó  € \        W$V4      pVP                  4       p\        V\        P                  4      '       dc   \        V\        P
                  4      '       gC   VP                  ! VV P                  V4      VP                  3RV P                  W#V4      /VB pV# \        V\        P                  34      '       d   \        R4      h\        V\        P                  4      '       d.   VP                  WPP                  V4      VP                  4      pV# \        V\        P
                  4      '       d0   VP                  ! WPP                  V4      VP                  3/ VB pV# \        V\        P                  P                  4      '       d%   VP                  WPP                  V4      VR7      pV# \        V\        P                   P"                  P$                  34      '       d"   \&        P)                  WP*                  W4R7      # V# )á�  Apply a transformation with respect to the parameters.

Args:
    input: the input torch.Tensor, (B, N, 4, 2) or (B, 4, 2).
    module: any torch nn.Module but only kornia augmentation modules will count
        to apply transformations.
    param: the corresponding parameters to the module.
    extra_args: Optional dictionary of extra arguments with specific options for different input types.
ru   úbThe support for 3d box operations are not yet supported. You are welcome to file a PR in our repo.r  r  )rH   r6  r'   rÏ   rÔ   rÕ   Útransform_boxesrW   r4   r}   rø   r‰   r  r  r  r�   r
  r  r  r½   ru   rÞ   )rU   rZ   r.   r*   r8   Ú_inputs   &&&&& r"   ru   ÚBoxSequentialOps.transformî  sÒ  € ô +¨6¸uÓEˆ
Ø—‘“ˆä�fœa×=Ñ=×>Ò>ÄzØ”A×1Ñ1÷H
ò H
ð ×+Ò+ØØ×-Ñ-¨eÓ4Ø—‘ñð ×2Ñ2°6À&ÓIð	ð
 ñˆFð< ˆô- ˜¤×!>Ñ!>Ð @×AÒAÜ%Øtóð ô ˜¤× 7Ñ 7×8Ò8ð ×+Ñ+¨F×4QÑ4QÐRWÓ4XÐZ`×ZfÑZfÓgˆFð ˆô ˜¤× =Ñ =×>Ò>Ø×+Ò+¨F×4QÑ4QÐRWÓ4XÐZ`×ZfÑZfÑuÐjtÑuˆFð ˆô ˜¤§¡× ?Ñ ?×@Ò@Ø×+Ñ+Ø×>Ñ>¸uÓEÐR\ð ,ó ˆFð ˆô ˜¤§¡×!2Ñ!2×!@Ñ!@Ð B×CÒCÜ#×-Ñ-¨e¿I¹IÈUÐ-ÓjÐjàˆr$   c                ór   <€ V ^8„  d   QhRS[ RS[P                  RS[RS[S[S[S[3,          ,          RS[ /# r„   rT  )r!   rO   s   "€r"   r#   rU  "  sK   ø€ ÷ #ñ #Ùð#Ù#%§9¡9ð#Ù5>ð#ÙLTÑUYÑZ]Ñ_bÐZbÕUcÕLdð#á	ñ#r$   c                ó¼  € \        W$V4      pVP                  4       p\        V\        P                  34      '       dO   VP                  V P                  W#V4      4      pVP                  ! VVP                  VP                  3RV/VB pV# \        V\        P                  34      '       d   \        R4      h\        V\        P                  P                  4      '       d%   VP                  WPP                  V4      VR7      pV# \        V\        P                  P                   P"                  34      '       d"   \$        P'                  WP(                  W4R7      # V# )r�   ru   rX  r  r  )rH   r6  r'   rÏ   r÷   rJ  r}   Úinverse_boxesr+   r4   rø   r‰   r  r  r�   r
  r  r  r½   r�   rÞ   ©rU   rZ   r.   r*   r8   rZ  ru   s   &&&&&  r"   r�   ÚBoxSequentialOps.inverse!  s7  € ô +¨6¸uÓEˆ
Ø—‘“ˆä�fœq×<Ñ<Ð>×?Ò?Ø×=Ñ=¸c×>VÑ>VÐW]ÐflÓ>mÓnˆIØ×)Ò)ØØ—
‘
Ø—‘ñð $ð	ð
 ñˆFð$ ˆô ˜¤×!>Ñ!>Ð @×AÒAÜ%Øtóð ô ˜¤§¡× ?Ñ ?×@Ò@Ø×)Ñ)¨&×9XÑ9XÐY^Ó9_ÐlvÐ)ÓwˆFð ˆô ˜¤§¡×!2Ñ!2×!@Ñ!@Ð B×CÒCÜ#×+Ñ+¨E¿)¹)È5Ð+ÓhÐhØˆr$   rf   r&   r  r™   s   @r"   r½   r½   è  s=   ø‡ € ñð
 ÷0ñ 0ó ð0ðd ÷#ñ #ó ö#r$   r½   c                   ód   a € ] tR tRt o Rt]R	V 3R lR ll4       t]R	V 3R lR ll4       tRtV t	R# )
r¿   iH  zsApply and inverse transformations for keypoints tensors.

This is for transform keypoints in the format (B, N, 2).
Nc                ór   <€ V ^8„  d   QhRS[ RS[P                  RS[RS[S[S[S[3,          ,          RS[ /# r„   ©r   r   r/   r   r
   r   r   r   )r!   rO   s   "€r"   r#   Ú"KeypointSequentialOps.__annotate__O  sK   ø€ ÷ 4ñ 4Ùð4Ù')§y¡yð4Ù9Bð4ÙPXÑY]Ñ^aÑcfÐ^fÕYgÕPhð4á	ñ4r$   c           	     óJ  € \        W$V4      pVP                  4       p\        V\        P                  4      '       dc   \        V\        P
                  4      '       gC   VP                  ! VV P                  V4      VP                  3RV P                  W#V4      /VB pV# \        V\        P                  34      '       d   \        R4      h\        V\        P                  4      '       dF   VP                  VP                  V P                  V4      VP                  4      p\        VRR7      pV# \        V\        P
                  4      '       d0   VP                  ! WPP                  V4      VP                  3/ VB pV# \        V\        P                   P"                  4      '       d%   VP                  WPP%                  V4      VR7      pV# \        V\        P&                  P(                  P*                  34      '       d"   \,        P/                  WP0                  W4R7      # V# )rW  ru   úgThe support for 3d keypoint operations are not yet supported. You are welcome to file a PR in our repo.F)Úraise_if_not_floating_pointr  r  )rH   r6  r'   rÏ   rÔ   rÕ   Útransform_keypointsrW   r4   r}   rø   r‰   r  Útransform_keypointr+   r   r  r  r�   r
  r  r  r¿   ru   rÞ   )rU   rZ   r.   r*   r8   rZ  Úouts   &&&&&  r"   ru   ÚKeypointSequentialOps.transformN  sé  € ô +¨6¸uÓEˆ
Ø—‘“ˆä�fœa×=Ñ=×>Ò>ÄzØ”A×1Ñ1÷H
ò H
ð ×/Ò/ØØ×-Ñ-¨eÓ4Ø—‘ñð ×2Ñ2°6À&ÓIð	ð
 ñˆFðD ˆô5 ˜¤×!>Ñ!>Ð @×AÒAÜ%ð<óð ô
 ˜¤× 7Ñ 7×8Ò8ð ×+Ñ+¨F¯K©K¸×9VÑ9VÐW\Ó9]Ð_e×_kÑ_kÓlˆCÜ˜sÀÔFˆFð ˆô ˜¤× =Ñ =×>Ò>Ø×/Ò/Ø×5Ñ5°eÓ<¸f¿l¹lñØNXñˆFð ˆô ˜¤§¡× ?Ñ ?×@Ò@Ø×/Ñ/Ø×>Ñ>¸uÓEÐR\ð 0ó ˆFð ˆô ˜¤§¡×!2Ñ!2×!@Ñ!@Ð B×CÒCÜ(×2Ñ2°5ÇÁÐRWÐ2ÓoÐoàˆr$   c                ór   <€ V ^8„  d   QhRS[ RS[P                  RS[RS[S[S[S[3,          ,          RS[ /# r„   rc  )r!   rO   s   "€r"   r#   rd  †  sK   ø€ ÷ 'ñ 'Ùð'Ù')§y¡yð'Ù9Bð'ÙPXÑY]Ñ^aÑcfÐ^fÕYgÕPhð'á	ñ'r$   c                óÄ  € \        W$V4      pVP                  4       p\        V\        P                  34      '       dS   VP                  V P                  W#V4      4      pVP                  ! WPP                  V4      VP                  3RV/VB pV# \        V\        P                  34      '       d   \        R4      h\        V\        P                  P                  4      '       d%   VP                  WPP                  V4      VR7      pV# \        V\        P                  P                   P"                  34      '       d"   \$        P'                  WP(                  W4R7      # V# )a  Inverse a transformation with respect to the parameters.

Args:
    input: Input keypoints. Coordinates are conceptually stored as
        ``(B, N, 2)``, where the last dimension stores ``(x, y)``.
    module: any torch nn.Module but only kornia augmentation modules will count
        to apply transformations.
    param: the corresponding parameters to the module.
    extra_args: Optional dictionary of extra arguments with specific options for different input types.

Returns:
    Keypoints after inverse transformation.
ru   rf  r  r  )rH   r6  r'   rÏ   r÷   rJ  r}   Úinverse_keypointsrW   r4   rø   r‰   r  r  r�   r
  r  r  r¿   r�   rÞ   r_  s   &&&&&  r"   r�   ÚKeypointSequentialOps.inverse…  s=  € ô" +¨6¸uÓEˆ
Ø—‘“ˆä�fœq×<Ñ<Ð>×?Ò?Ø×=Ñ=¸c×>VÑ>VÐW]ÐflÓ>mÓnˆIØ×-Ò-Ø×5Ñ5°eÓ<¸f¿l¹lñØV_ðØcmñˆFð$ ˆô ˜¤×!>Ñ!>Ð @×AÒAÜ%ð<óð ô
 ˜¤§¡× ?Ñ ?×@Ò@Ø×-Ñ-Ø×>Ñ>¸uÓEÐR\ð .ó ˆFð ˆô ˜¤§¡×!2Ñ!2×!@Ñ!@Ð B×CÒCÜ(×0Ñ0°¿y¹yÐPUÐ0ÓmÐmàˆr$   rf   r&   r  r™   s   @r"   r¿   r¿   H  s=   ø‡ € ñð
 ÷4ñ 4ó ð4ðl ÷'ñ 'ó ö'r$   r¿   >   ÚresampleÚ	antialiasÚalign_corners)9r<   Úabcr   r   Útypingr   r   r   r   r	   r
   r   r   r   r   rM   r   Úkornia.augmentationÚaugmentationrÏ   Úkornia.augmentation.baser   r   Ú!kornia.augmentation.utils.helpersr   r   Úkornia.constantsr   Úkornia.core.utilsr   Úkornia.geometry.boxesr   Úkornia.geometry.keypointsr   r   r   r   rN   rÊ   rË   r   Ú	frozensetr;   r)   r6   rE   rH   rJ   rœ   rè   ró   rþ   r·   rÁ   r¹   r½   r¿   rf   r$   r"   Ú<module>r~     sb  ðó$ ß 'ß `× `× `ã Ý å ß Nß PÝ $Ý *Ý 'Ý /ç -à�—‘˜t E§L¡LÕ1°5¸)ÐCÕD€ð ˜˜eŸl™lÕ+¨T°$°u·|±|Õ2DÕ-EÀtÈEÅ{ÐTXÐYbÕTcÐcÕdÐ áˆCƒL€ñ &Ò&PÓQÐ õõ	õQõ*Qôo"˜W Q�Z°7õ o"÷dZñ Zñz ˆcƒN€õõôEÐ/°·±Õ=ô EôP-Ð/°·±Õ=ô -ô`eÐ.¨u¯|©|Õ<ô eôP]Ð-¨eÕ4ô ]ô@eÐ2°9Õ=ö er$   