+
     °³jN.  ã                   ó’   € ^ RI t ^ RIHt ^ RIt^ RIHtHt ^RIHt  ! R R]P                  4      t	 ! R R]P                  4      t
R# )	é    N)ÚOptional)ÚnnÚTensor)Ú	ImageListc                   óú   a a€ ] tR t^
t oRtR]]P                  ,          /tRV 3R llt	]P                  ]P                  ! R4      3V3R lR lltV3R lR l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V ;t# )ÚAnchorGeneratorap  
Module that generates anchors for a set of feature maps and
image sizes.

The module supports computing anchors at multiple sizes and aspect ratios
per feature map. This module assumes aspect ratio = height / width for
each anchor.

sizes and aspect_ratios should have the same number of elements, and it should
correspond to the number of feature maps.

sizes[i] and aspect_ratios[i] can have an arbitrary number of elements,
and AnchorGenerator will output a set of sizes[i] * aspect_ratios[i] anchors
per spatial location for feature map i.

Args:
    sizes (Tuple[Tuple[int]]):
    aspect_ratios (Tuple[Tuple[float]]):
Úcell_anchorsc                ó¸  <€ \         SV `  4        \        V^ ,          \        \        34      '       g-   \        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      p\        V^ ,          \        \        34      '       g   V3\        V4      ,          pWn        W n        \        W4       UUu. uF  w  r4V P                  W44      NK  	  uppV n
        R# u uppi )r   c              3   ó&   "  € T F  q3x € K	  	  R # 5i©N© )Ú.0Úss   & Új/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torchvision/models/detection/anchor_utils.pyÚ	<genexpr>Ú+AnchorGenerator.__init__.<locals>.<genexpr>,   s   é € Ð.© 1�$«ùs   ‚N)ÚsuperÚ__init__Ú
isinstanceÚlistÚtupleÚlenÚsizesÚaspect_ratiosÚzipÚgenerate_anchorsr	   )Úselfr   r   ÚsizeÚaspect_ratioÚ	__class__s   &&&  €r   r   ÚAnchorGenerator.__init__#   s«   ø€ ô
 	‰ÑÔä˜% �(¤T¬5 M×2Ò2ç”EÑ.©Ó.—E‘EÑ.©Ó.Ó.ˆEÜ˜-¨Õ*¬T´5¨M×:Ò:Ø*Ð,¬s°5«zÕ9ˆMàŒ
Ø*ÔäPSÐTYÔPiô
ÙPiÑ:L¸$ˆD×!Ñ! $Ö5ÑPiò
ˆÖùó 
s   Â/CÚcpuc          
      ó€   <€ V ^8„  d   QhRS[ S[,          RS[ S[,          RS[P                  RS[P
                  RS[/# )é   Úscalesr   ÚdtypeÚdeviceÚreturn)r   ÚintÚfloatÚtorchr&   r'   r   )ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚAnchorGenerator.__annotate__:   sM   ø€ ÷ $ñ $á‘S•	ð$ñ ™E•{ð$ñ �{‰{ð	$ñ
 —‘ð$ñ 
ñ$ó    c                ó   € \         P                  ! WVR 7      p\         P                  ! W#VR 7      p\         P                  ! V4      p^V,          pVR,          VR,          ,          P                  R4      pVR,          VR,          ,          P                  R4      p\         P                  ! V) V) Wx.^R7      ^,          p	V	P                  4       # )©r&   r'   ©Údim)ºNNNN)Nr5   éÿÿÿÿ)r+   Ú	as_tensorÚsqrtÚviewÚstackÚround)
r   r%   r   r&   r'   Úh_ratiosÚw_ratiosÚwsÚhsÚbase_anchorss
   &&&&&     r   r   Ú AnchorGenerator.generate_anchors:   s¦   € ô —’ ¸VÔDˆÜŸš¨È6ÔRˆÜ—:’:˜mÓ,ˆØ�x•<ˆà�wÕ &¨¥/Õ1×7Ñ7¸Ó;ˆØ�wÕ &¨¥/Õ1×7Ñ7¸Ó;ˆä—{’{ R C¨"¨¨bÐ#5¸1Ô=ÀÕAˆØ×!Ñ!Ó#Ð#r0   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# )r$   r&   r'   )r+   r&   r'   )r,   r-   s   "€r   r.   r/   L   s'   ø€ ÷ nñ n¡e§k¡kð n¹5¿<¹<ñ nr0   c                óp   € V P                    Uu. uF  q3P                  WR 7      NK  	  upV n         R# u upi )r2   N)r	   Úto)r   r&   r'   Úcell_anchors   &&& r   Úset_cell_anchorsÚ AnchorGenerator.set_cell_anchorsL   s-   € Ø[_×[lÒ[lÓmÑ[lÈKŸ^™^°%˜^ÖGÑ[lÑmˆÖùÒms   �3c                ó0   <€ V ^8„  d   QhRS[ S[,          /# ©r$   r(   ©r   r)   )r,   r-   s   "€r   r.   r/   O   s   ø€ ÷ Qñ Q©$©s­)ñ Qr0   c                ó¨   € \        V P                  V P                  4       UUu. uF   w  r\        V4      \        V4      ,          NK"  	  upp# u uppi r   )r   r   r   r   )r   r   Úas   &  r   Únum_anchors_per_locationÚ(AnchorGenerator.num_anchors_per_locationO   s=   € Ü,/°·
±
¸D×<NÑ<NÔ,OÔPÑ,O¡D A”�A“œ˜Q›—�Ñ,OÒPÐPùÓPs   ¤&Ac                ó|   <€ V ^8„  d   QhRS[ S[ S[,          ,          RS[ S[ S[,          ,          RS[ S[,          /# )r$   Ú
grid_sizesÚstridesr(   )r   r)   r   )r,   r-   s   "€r   r.   r/   T   s:   ø€ ÷ ñ ¡t©D±­I¥ð ÁÁdÉ6ÅlÕASð ÑX\Ñ]cÕXdñ r0   c           	     ó:  € . pV P                   p\        P                  ! VR JR4       \        P                  ! \        V4      \        V4      u;8H  ;'       d    \        V4      8H  Mu R4       \	        WV4       EF  w  rVpVw  r‰Vw  r«VP
                  p\        P                  ! ^ V	\        P                  VR7      V,          p\        P                  ! ^ V\        P                  VR7      V
,          p\        P                  ! WíRR7      w  ppVP                  R4      pVP                  R4      p\        P                  ! VVVV3^R7      pVP                  VP                  R^^4      VP                  ^R^4      ,           P                  R^4      4       EK  	  V# )Nzcell_anchors should not be NonezíAnchors should be Tuple[Tuple[int]] because each feature map could potentially have different sizes and aspect ratios. There needs to be a match between the number of feature maps passed and the number of sizes / aspect ratios specified.r2   Úij©Úindexingr3   r6   )r	   r+   Ú_assertr   r   r'   ÚarangeÚint32ÚmeshgridÚreshaper:   Úappendr9   )r   rP   rQ   Úanchorsr	   r   Ústrider@   Úgrid_heightÚ
grid_widthÚstride_heightÚstride_widthr'   Úshifts_xÚshifts_yÚshift_yÚshift_xÚshiftss   &&&               r   Úgrid_anchorsÚAnchorGenerator.grid_anchorsT   sV  € ØˆØ×(Ñ(ˆÜ�Š�l¨$Ð.Ð0QÔRÜ�ŠÜ�
‹Oœs 7›|×@Ô@¬s°<Ó/@Ô@ðUô	
ô +.¨jÀ<×*PÑ&ˆD˜,Ø&*Ñ#ˆKØ*0Ñ'ˆMØ!×(Ñ(ˆFô —|’| A z¼¿¹ÈVÔTÐWcÕcˆHÜ—|’| A {¼%¿+¹+ÈfÔUÐXeÕeˆHÜ$Ÿ~š~¨hÈ4ÔPÑˆG�WØ—o‘o bÓ)ˆGØ—o‘o bÓ)ˆGÜ—[’[ '¨7°G¸WÐ!EÈ1ÔMˆFð �N‰N˜FŸK™K¨¨A¨qÓ1°L×4EÑ4EÀaÈÈQÓ4OÕO×XÑXÐY[Ð]^Ó_×`ñ +Qð" ˆr0   c                óL   <€ V ^8„  d   QhRS[ RS[S[,          RS[S[,          /# ©r$   Ú
image_listÚfeature_mapsr(   ©r   r   r   )r,   r-   s   "€r   r.   r/   s   s+   ø€ ÷ ñ ¡)ð ¹4Á½<ð ÉDÑQWÍLñ r0   c           
     óL  € V Uu. uF  q3P                   RR NK  	  ppVP                  P                   RR pV^ ,          P                  V^ ,          P                  rvV Uu. uF™  p\        P
                  ! R\        P                  VR7      P                  V^ ,          V^ ,          ,          4      \        P
                  ! R\        P                  VR7      P                  V^,          V^,          ,          4      .NK›  	  p	pV P                  Wg4       V P                  WI4      p
. p\        \        VP                  4      4       F$  pV
 Uu. uF  qÝNK  	  ppVP                  V4       K&  	  V Uu. uF  p\        P                  ! V4      NK  	  ppV# u upi u upi u upi u upi )r$   Nr2   éþÿÿÿr   )ÚshapeÚtensorsr&   r'   r+   ÚemptyÚint64Úfill_rF   rg   Úranger   Úimage_sizesr[   Úcat)r   rk   rl   Úfeature_maprP   Ú
image_sizer&   r'   ÚgrQ   Úanchors_over_all_feature_mapsr\   Ú_Úanchors_per_feature_mapÚanchors_in_imageÚanchors_per_images   &&&             r   ÚforwardÚAnchorGenerator.forwards   s~  € Ù@LÓMÁ°×'Ñ'¨¨Ó,Áˆ
ÐMØ×'Ñ'×-Ñ-¨b¨cÐ2ˆ
Ø$ Q�×-Ñ-¨|¸A­×/EÑ/Eˆvñ  ó
ñ
  �ô —’˜B¤e§k¡k¸&ÔA×GÑGÈ
ÐSTÍÐYZÐ[\ÕY]ÕH]Ó^Ü—’˜B¤e§k¡k¸&ÔA×GÑGÈ
ÐSTÍÐYZÐ[\ÕY]ÕH]Ó^óñ  ð 	ð 
ð 	×Ñ˜eÔ,Ø(,×(9Ñ(9¸*Ó(NÐ%Ø,.ˆÜ”s˜:×1Ñ1Ó2Ö3ˆAÙWtÓuÑWtÐ<SÒ 7ÑWtÐÐuØ�N‰NÐ+Ö,ñ 4ñ JQÓQÉÐ4E”5—9’9Ð.Ö/ÉˆÐQØˆùò# Nùò
ùò  vùâQs   …FÁ BFÅ

FÅ/F!)r   r	   r   )))é€   é   i   ))ç      à?ç      ð?g       @)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r+   r   Ú__annotations__r   Úfloat32r'   r   rF   rM   rg   r€   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r    r-   s   @@r   r   r   
   sv   ù‡ € ñð* 	˜˜UŸ\™\Õ*ð€O÷
ð6 #Ÿ]™]Ø$Ÿ|š|¨EÓ2÷$ò $÷$nð n÷Qð Q÷
ð ÷>÷ ð r0   r   c                   óö   a a€ ] tR t^ˆt oRtRV3R lV 3R lllt]P                  ]P                  ! R4      3V3R lR llt	V3R lR lt
]P                  3V3R	 lR
 lltV3R lR ltV3R lR ltRtVtV ;t# )ÚDefaultBoxGeneratora‘  
This module generates the default boxes of SSD for a set of feature maps and image sizes.

Args:
    aspect_ratios (List[List[int]]): A list with all the aspect ratios used in each feature map.
    min_ratio (float): The minimum scale :math:`    ext{s}_{        ext{min}}` of the default boxes used in the estimation
        of the scales of each feature map. It is used only if the ``scales`` parameter is not provided.
    max_ratio (float): The maximum scale :math:`    ext{s}_{        ext{max}}`  of the default boxes used in the estimation
        of the scales of each feature map. It is used only if the ``scales`` parameter is not provided.
    scales (List[float]], optional): The scales of the default boxes. If not provided it will be estimated using
        the ``min_ratio`` and ``max_ratio`` parameters.
    steps (List[int]], optional): It's a hyper-parameter that affects the tiling of default boxes. If not provided
        it will be estimated from the data.
    clip (bool): Whether the standardized values of default boxes should be clipped between 0 and 1. The clipping
        is applied while the boxes are encoded in format ``(cx, cy, w, h)``.
c                óž   <€ V ^8„  d   QhRS[ S[ S[,          ,          RS[RS[RS[S[ S[,          ,          RS[S[ S[,          ,          RS[/# )r$   r   Ú	min_ratioÚ	max_ratior%   ÚstepsÚclip)r   r)   r*   r   Úbool)r,   r-   s   "€r   r.   Ú DefaultBoxGenerator.__annotate__š   sa   ø€ ÷ >ñ >á™D¡�I•ð>ñ ð>ñ ð	>ñ
 ™™e�Õ%ð>ñ ™™S�	Õ"ð>ñ ñ>r0   c                óÔ  <€ \         S
V `  4        Ve%   \        V4      \        V4      8w  d   \        R4      hWn        WPn        W`n        \        V4      pVfo   V^8”  d_   W2,
          p\        V4       U	u. uF  q’W‰,          VR,
          ,          ,           NK!  	  up	V n        V P                  P                  R4       MW#.V n        MW@n        V P                  V4      V n        R # u up	i )Nz3aspect_ratios and steps should have the same lengthr…   )r   r   r   Ú
ValueErrorr   r–   r—   ru   r%   r[   Ú_generate_wh_pairsÚ	_wh_pairs)r   r   r”   r•   r%   r–   r—   Únum_outputsÚrange_ratioÚkr    s   &&&&&&&   €r   r   ÚDefaultBoxGenerator.__init__š   sÌ   ø€ ô 	‰ÑÔØÒ¤ ]Ó!3´s¸5³zÔ!AÜÐRÓSÐSØ*ÔØŒ
ØŒ	Ü˜-Ó(ˆð Š>Ø˜QŒØ'Õ3�ÜZ_Ð`kÔZlÓmÑZlÐUV¨;­?¸kÈCÕ>OÕ+P×PÐPÑZlÑm�”Ø—‘×"Ñ" 3Õ'à(Ð4�•à ŒKà×0Ñ0°Ó=ˆŽùò ns   Á5%C%r"   c          	      ój   <€ V ^8„  d   QhRS[ RS[P                  RS[P                  RS[S[,          /# )r$   rž   r&   r'   r(   )r)   r+   r&   r'   r   r   )r,   r-   s   "€r   r.   r™   ¸   s9   ø€ ÷ ñ ÙðÙ',§{¡{ðÙLQÏLÉLðá	‰f�ñr0   c           	     ó0  € . p\        V4       EF  pV P                  V,          p\        P                  ! V P                  V,          V P                  V^,           ,          ,          4      pWf.Ww..pV P                  V,           Fb  p	\        P                  ! V	4      p
V P                  V,          V
,          pV P                  V,          V
,          pVP                  W¼.WË..4       Kd  	  VP                  \        P                  ! W‚VR7      4       EK  	  V# )é   r2   )	ru   r%   Úmathr8   r   Úextendr[   r+   r7   )r   rž   r&   r'   r�   r    Ús_kÚ	s_prime_kÚwh_pairsÚarÚsq_arÚwÚhs   &&&&         r   rœ   Ú&DefaultBoxGenerator._generate_wh_pairs¸   sß   € ð #%ˆ	Ü�{×#ˆAà—+‘+˜a•.ˆCÜŸ	š	 $§+¡+¨a¥.°4·;±;¸qÀ1½uÕ3EÕ"EÓFˆIØ˜
 YÐ$:Ð;ˆHð ×(Ñ(¨×+Ð+�ÜŸ	š	 "›�Ø—K‘K •N UÕ*�Ø—K‘K •N UÕ*�Ø—‘ ! ¨!¨Ð 0Ö1ñ	 ,ð ×ÑœUŸ_š_¨XÈ6ÔR×Sñ $ð Ðr0   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# rI   rJ   )r,   r-   s   "€r   r.   r™   Ì   s   ø€ ÷ <ñ <©$©s­)ñ <r0   c                ór   € V P                    Uu. uF  p^^\        V4      ,          ,           NK  	  up# u upi )r$   )r   r   )r   Úrs   & r   rM   Ú,DefaultBoxGenerator.num_anchors_per_locationÌ   s0   € à(,×(:Ò(:Ó;Ñ(: 1��Aœ˜A›•J—�Ñ(:Ñ;Ð;ùÒ;s   �"4c                óv   <€ V ^8„  d   QhRS[ S[ S[,          ,          RS[ S[,          RS[P                  RS[/# )r$   rP   ry   r&   r(   )r   r)   r+   r&   r   )r,   r-   s   "€r   r.   r™   Ñ   s=   ø€ ÷ /ñ /Ù™t¡C�y�/ð/Ù7;¹Cµyð/ÙINÏÉð/á	ñ/r0   c                ó<  € . p\        V4       EFó  w  rVV P                  eD   V^,          V P                  V,          ,          pV^ ,          V P                  V,          ,          pMVw  r‡\        P                  ! ^ V^,          4      R,           V,          P	                  VR7      p	\        P                  ! ^ V^ ,          4      R,           V,          P	                  VR7      p
\        P
                  ! W©RR7      w  r¼VP                  R4      pVP                  R4      p\        P                  ! WË3\        V P                  V,          4      ,          RR7      P                  R^4      pV P                  '       d%   V P                  V,          P                  ^ ^R7      MV P                  V,          pVP                  V^ ,          V^,          ,          ^4      p\        P                  ! Wß3^R7      pVP                  V4       EKö  	  \        P                  ! V^ R7      # )Nr„   ©r&   rS   rT   r3   )ÚminÚmaxr6   )Ú	enumerater–   r+   rW   rD   rY   rZ   r:   r   r�   r—   ÚclampÚrepeatrw   r[   )r   rP   ry   r&   Údefault_boxesr    Úf_kÚx_f_kÚy_f_krb   rc   rd   re   rf   Ú_wh_pairr©   Údefault_boxs   &&&&             r   Ú_grid_default_boxesÚ'DefaultBoxGenerator._grid_default_boxesÑ   s–  € ð ˆÜ 
×+‰FˆAà�z‰zÒ%Ø" 1�¨¯
©
°1­Õ5�Ø" 1�¨¯
©
°1­Õ5‘à"‘�äŸš a¨¨Q­Ó0°3Õ6¸%Õ?×CÑCÈ%ÐCÓPˆHÜŸš a¨¨Q­Ó0°3Õ6¸%Õ?×CÑCÈ%ÐCÓPˆHÜ$Ÿ~š~¨hÈ4ÔPÑˆGØ—o‘o bÓ)ˆGØ—o‘o bÓ)ˆGä—[’[ 'Ð!3´c¸$¿.¹.ÈÕ:KÓ6LÕ!LÐRTÔU×]Ñ]Ð^`ÐbcÓdˆFà@DÇ	Ç	À	�t—~‘~ aÕ(×.Ñ.°1¸!Ð.Ô<ÈtÏ~É~Ð^_ÕO`ˆHØ—‘¨¨A­°°Qµ­¸!Ó<ˆHäŸ)š) VÐ$6¸AÔ>ˆKà× Ñ  ×-ñ+ ,ô. �yŠy˜¨AÔ.Ð.r0   c                ó    <€ V ^8„  d   QhRS[ /# rI   )Ústr)r,   r-   s   "€r   r.   r™   î   s   ø€ ÷ 	ñ 	™#ñ 	r0   c           
     ó    € V P                   P                   R V P                   RV P                   RV P                   RV P
                   R2
pV# )z(aspect_ratios=z, clip=z	, scales=z, steps=Ú))r    r†   r   r—   r%   r–   )r   r   s   & r   Ú__repr__ÚDefaultBoxGenerator.__repr__î   sX   € à�~‰~×&Ñ&Ð'ð (Ø!×/Ñ/Ð0Ø�d—i‘i�[Ø˜Ÿ™�}Ø�t—z‘z�lØðð 	
ð ˆr0   c                óL   <€ V ^8„  d   QhRS[ RS[S[,          RS[S[,          /# rj   rm   )r,   r-   s   "€r   r.   r™   ù   s+   ø€ ÷ ñ ¡)ð ¹4Á½<ð ÉDÑQWÍLñ r0   c                ó€  € V Uu. uF  q3P                   RR NK  	  ppVP                  P                   RR pV^ ,          P                  V^ ,          P                  rvV P	                  WEVR7      pVP                  V4      p. p	\        P                  ! V^,          V^ ,          .VP                  R7      p
VP                   Fu  pTp\        P                  ! VR,          RVR,          ,          ,
          V
,          VR,          RVR,          ,          ,           V
,          .R4      pV	P                  V4       Kw  	  V	# u upi )	r$   Nrµ   )r'   r„   ro   )r5   :Nr$   N)r5   :r$   NNr6   )rp   rq   r&   r'   rÁ   rD   r+   Útensorrv   rw   r[   )r   rk   rl   rx   rP   ry   r&   r'   r»   ÚdboxesÚx_y_sizer|   Údboxes_in_images   &&&          r   r€   ÚDefaultBoxGenerator.forwardù   s!  € Ù@LÓMÁ°×'Ñ'¨¨Ó,Áˆ
ÐMØ×'Ñ'×-Ñ-¨b¨cÐ2ˆ
Ø$ Q�×-Ñ-¨|¸A­×/EÑ/EˆvØ×0Ñ0°ÈuÐ0ÓUˆØ%×(Ñ(¨Ó0ˆàˆÜ—<’< ¨A¥°
¸1µÐ >À}×G[ÑG[Ô\ˆØ×'Ô'ˆAØ+ˆOÜ#Ÿišià$ UÕ+¨c°OÀEÕ4JÕ.JÕJÈhÕVØ$ UÕ+¨c°OÀEÕ4JÕ.JÕJÈhÕVðð óˆOð �M‰M˜/Ö*ñ (ð ˆùò% Ns   …D;)r�   r   r—   r%   r–   )g333333Ã?gÍÌÌÌÌÌì?NNT)r†   r‡   rˆ   r‰   rŠ   r   r+   rŒ   r'   rœ   rM   rÁ   rÇ   r€   r�   rŽ   r�   r�   s   @@r   r’   r’   ˆ   sp   ù‡ € ñ÷">õ >ð> 6;·]±]Ð[`×[gÒ[gÐhmÓ[n÷ò ÷(<ð <ð X]×WdÑWd÷/ò /÷:	ð 	÷÷ ð r0   r’   )r¥   Útypingr   r+   r   r   rk   r   ÚModuler   r’   r   r0   r   Ú<module>rÒ      s9   ðÛ Ý ã ß å !ô{�b—i‘iô {ô|D˜"Ÿ)™)ö Dr0   