+
    åûjº  ã                   óN   € ^ RI t ^ RIHtHt ^ RItRR.tR R lt ! R R4      tR# )é    N)ÚListÚTupleÚPriorBoxÚdecodec                óš   € V ^8„  d   QhR\         P                  R\         P                  R\        \        ,          R\         P                  /# )é   ÚlocÚpriorsÚ	variancesÚreturn)ÚtorchÚTensorr   Úfloat)Úformats   "ÚZC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\models\yunet\processors.pyÚ__annotate__r      s>   € ÷ Gñ G”—‘ð G¤e§l¡lð G¼tÄE½{ð GÌuÏ|É|ñ Gó    c                ó’  € \         P                  ! VR,          V R,          V^ ,          ,          VR,          ,          ,           VR,          \         P                  ! V R,          V^,          ,          4      ,          VR,          V R,          V^ ,          ,          VR,          ,          ,           VR,          V R,          V^ ,          ,          VR,          ,          ,           VR,          V R,          V^ ,          ,          VR,          ,          ,           VR,          V R,          V^ ,          ,          VR,          ,          ,           VR,          V R,          V^ ,          ,          VR,          ,          ,           3^4      pVR,          VR,          ^,          ,
          p\         P                  ! WCR,          V,           VR	,          3R
R7      # )a"  Decode locations from predictions using priors to undo the encoding for offset regression at train time.

Args:
    loc: location predictions for loc layers: the box offsets and five landmark offsets.
        Shape: [num_priors,14].
    priors: Prior boxes in center-offset form. Shape: [num_priors,4].
    variances: (list[float]) Variances of priorboxes.

Return:
    torch.Tensor containing the decoded box ``xmin, ymin, xmax, ymax`` and the five ``(x, y)`` landmarks, in the
    normalized coordinates of the priors. Shape: [num_priors,14].

)Údim)ºNNN:r   r   N)r   :r   é   N)r   :r   é   N)r   :r   é   N)r   :r   é
   N)r   :r   é   N)r   :r   é   N)r   :r   NNéÿÿÿÿ)r   ÚcatÚexp)r	   r
   r   ÚboxesÚtmps   &&&  r   r   r      sF  € ô �IŠIà�6�N˜S �[¨9°Q­<Õ7¸&À½.ÕHÕHØ�6�NœUŸYšY s¨6¥{°Y¸qµ\Õ'AÓBÕBØ�6�N˜S �[¨9°Q­<Õ7¸&À½.ÕHÕHØ�6�N˜S �[¨9°Q­<Õ7¸&À½.ÕHÕHØ�6�N˜S �\¨I°a­LÕ8¸6À&½>ÕIÕIØ�6�N˜S �]¨Y°q­\Õ9¸FÀ6½NÕJÕJØ�6�N˜S �]¨Y°q­\Õ9¸FÀ6½NÕJÕJð	
ð 	
ó€Eð ��-˜% �-¨!Õ+Õ
+€CÜ�9Š9�c �=¨3Õ.°°eµÐ=À2ÔFÐFr   c                   óZ   a € ] tR t^:t o RtV 3R lR ltV 3R lR ltV 3R lR ltRtV t	R	# )
r   z4Generate prior boxes for YuNet face detection model.c          
      ó|   <€ V ^8„  d   QhRS[ S[ S[,          ,          RS[ S[,          RS[RS[S[S[3,          RR/# )r   Ú	min_sizesÚstepsÚclipÚ
image_sizer   N)r   ÚintÚboolr   )r   Ú__classdict__s   "€r   r   ÚPriorBox.__annotate__=   sQ   ø€ ÷ uñ u¡$¡t©C¥y¥/ð u¹$¹s½)ð uÉ4ð uÑ]bÑcfÑhkÐckÕ]lð uÐquñ ur   c                óè  € Wn         W n        W0n        W@n        \        P
                  ! R 4      V n        \        P                  V n        \        ^4       FB  pV P                  V,          \        P                  ! ^V^,           4      8w  g   K9  \        R4      h	  \        \        V P                  ^ ,          ^,           ^,          4      ^,          4      \        \        V P                  ^,          ^,           ^,          4      ^,          4      .V n        \        V P                  ^ ,          ^,          4      \        V P                  ^,          ^,          4      .V n        \        V P                  ^ ,          ^,          4      \        V P                  ^,          ^,          4      .V n        \        V P                  ^ ,          ^,          4      \        V P                  ^,          ^,          4      .V n        \        V P                   ^ ,          ^,          4      \        V P                   ^,          ^,          4      .V n        V P                  V P                  V P                   V P"                  .V n        R# )Úcpuzsteps must be [8,16,32,64]N)r$   r%   r&   r'   r   ÚdeviceÚfloat32ÚdtypeÚrangeÚmathÚpowÚ
ValueErrorr(   Úfeature_map_2thÚfeature_map_3thÚfeature_map_4thÚfeature_map_5thÚfeature_map_6thÚfeature_maps)Úselfr$   r%   r&   r'   Úis   &&&&& r   Ú__init__ÚPriorBox.__init__=   sÓ  € Ø"ŒØŒ
ØŒ	Ø$Œä$)§L¢L°Ó$7ˆŒÜ"'§-¡-ˆŒ
ä�q–ˆAØ�z‰z˜!�}¤§¢¨¨Q°­UÓ 4Ö4Ü Ð!=Ó>Ð>ñ ô !$¤C¨¯©¸Õ);¸aÕ)?À1Õ(DÓ$EÈÕ$IÓ JÌCÔPSÐUY×UdÑUdÐefÕUgÐjkÕUkÐopÕTpÓPqÐtuÕPuÓLvÐwˆÔÜ # D×$8Ñ$8¸Õ$;¸aÕ$?Ó @Ä#Àd×FZÑFZÐ[\ÕF]Ð`aÕFaÓBbÐcˆÔÜ # D×$8Ñ$8¸Õ$;¸aÕ$?Ó @Ä#Àd×FZÑFZÐ[\ÕF]Ð`aÕFaÓBbÐcˆÔÜ # D×$8Ñ$8¸Õ$;¸aÕ$?Ó @Ä#Àd×FZÑFZÐ[\ÕF]Ð`aÕFaÓBbÐcˆÔÜ # D×$8Ñ$8¸Õ$;¸aÕ$?Ó @Ä#Àd×FZÑFZÐ[\ÕF]Ð`aÕFaÓBbÐcˆÔà!×1Ñ1°4×3GÑ3GÈ×I]ÑI]Ð_c×_sÑ_sÐtˆÖr   c                óR   <€ V ^8„  d   QhRS[ P                  RS[ P                  RR/# )r   r.   r0   r   r   )r   r.   r0   )r   r*   s   "€r   r   r+   R   s*   ø€ ÷ ñ ™Ÿ™ð ©e¯k©kð ¸jñ r   c                ó   € Wn         W n        V # )zøSet the device and dtype used when creating prior boxes.

Args:
    device: Target device for the generated prior-box tensor.
    dtype: Target dtype for the generated prior-box tensor.

Returns:
    ``self`` with updated tensor creation settings.
©r.   r0   )r;   r.   r0   s   &&&r   ÚtoÚPriorBox.toR   s   € ð ŒØŒ
Øˆr   c                ó4   <€ V ^8„  d   QhRS[ P                  /# )r   r   )r   r   )r   r*   s   "€r   r   r+   `   s   ø€ ÷ ñ ™%Ÿ,™,ñ r   c           	     ó  € . p\        V P                  4       EF  w  r#V P                  V,          p\        V^ ,          4       FÔ  p\        V^,          4       F»  pV F²  pWpP                  ^,          ,          pWpP                  ^ ,          ,          p	VR,           V P
                  V,          ,          V P                  ^,          ,          p
VR,           V P
                  V,          ,          V P                  ^ ,          ,          pWW¸V	.,          pK´  	  K½  	  KÖ  	  EK  	  \        P                  ! WP                  V P                  R7      P                  R^4      pV P                  '       d   VP                  ^^ R7      pV# )zéGenerate YuNet prior boxes for all configured feature maps.

Returns:
    Tensor with shape ``(N, 4)``, where :math:`N` is the total
    number of anchors and the four values are normalized center-x,
    center-y, width, and height.
g      à?rA   )ÚmaxÚminr   )Ú	enumerater:   r$   r1   r'   r%   r   Útensorr.   r0   Úviewr&   Úclamp)r;   ÚanchorsÚkÚfr$   r<   ÚjÚmin_sizeÚs_kxÚs_kyÚcxÚcyÚoutputs   &            r   Ú__call__ÚPriorBox.__call__`   s  € ð  "ˆÜ˜d×/Ñ/×0‰DˆAØ#'§>¡>°!Õ#4ˆIä˜1˜Q�4–[�Ü˜q �tž�AÛ$-˜Ø'¯/©/¸!Õ*<Õ<˜Ø'¯/©/¸!Õ*<Õ<˜à #�g¨¯©°A­Õ6¸¿¹ÈÕ9KÕK˜Ø #�g¨¯©°A­Õ6¸¿¹ÈÕ9KÕK˜Ø¨°$Ð#7Õ7šó %.ó %ô !ñ 1ô —’˜g¯k©kÀÇÁÔL×QÑQÐRTÐVWÓXˆØ�9�9ˆ9Ø—\‘\ a¨Q�\Ó/ˆFØˆr   )r&   r.   r0   r5   r6   r7   r8   r9   r:   r'   r$   r%   N)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r=   rB   rV   Ú__static_attributes__Ú__classdictcell__)r*   s   @r   r   r   :   s(   ø‡ € Ù>÷uð u÷*ð ÷ö r   )r2   Útypingr   r   r   Ú__all__r   r   © r   r   Ú<module>rb      s*   ðó& ß ã à�xÐ
 €õG÷>?ó ?r   