+
    åûj±  ã                  ó„   € ^ RI Ht ^ RIHt ^ RIHtHt ^ RIt^ RIH	u H
t ] ! R R4      4       t] ! R R4      4       tR# )	é    )Úannotations)Ú	dataclass)ÚAnyÚUnionNc                  óž   € ] tR t^t$ RtR]R&   R]R&   R]R&   ]R R l4       t]R R	 l4       t]R
 R l4       t	]R R l4       t
R R ltRtR# )ÚDISKFeaturesaâ  Hold the integer-pixel keypoints, descriptors and detection scores that DISK detects in one image.

``features = disk(images)[b]`` is what :class:`DISK` returns for image ``b``: ``features.keypoints`` ``(N, 2)``,
integer ``(x, y)`` pixels, also read as :attr:`x` and :attr:`y`, ``features.descriptors`` ``(N, D)``,
L2-normalised, and ``features.detection_scores`` ``(N,)``, with ``N = features.n``. It is not batched, because
DISK detects a different number of keypoints in each image; ``features.to(device)`` moves the three tensors.

Convention:
    The keypoints, scores and descriptors that :class:`~kornia.feature.DISK` returns for one image; its
    Convention block gives their frame and order.

Args:
    keypoints: torch.Tensor of shape ``(N, 2)``, where ``N`` is the number of keypoints.
    descriptors: torch.Tensor of shape ``(N, D)``, where ``D`` is the descriptor dimension.
    detection_scores: torch.Tensor of shape ``(N,)``, the detection heatmap value at each keypoint: a raw
                      logit of the network, not a log-probability.

See Also:
    - :class:`DISK`: the detector, which returns one of these per image.
    - :class:`ALIKEDFeatures`: the same container for :class:`ALIKED`, whose keypoints are sub-pixel.

útorch.TensorÚ	keypointsÚdescriptorsÚdetection_scoresc               ó   € V ^8„  d   QhRR/# )é   ÚreturnÚint© )Úformats   "ÚWC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\feature\disk\structs.pyÚ__annotate__ÚDISKFeatures.__annotate__9   s   € ÷ 'ñ '�3ñ 'ó    c                ó<   € V P                   P                  ^ ,          # )zyReturn the number of stored keypoints.

Returns:
    Number of detected DISK keypoints stored in this feature container.
)r
   Úshape©Úselfs   &r   ÚnÚDISKFeatures.n8   s   € ð �~‰~×#Ñ# AÕ&Ð&r   c               ó   € V ^8„  d   QhRR/# )r   r   zUnion[str, torch.device, None]r   )r   s   "r   r   r   B   s   € ÷ %ñ %Ð6ñ %r   c                ó.   € V P                   P                  # )zPReturn the device of the stored tensors.

Returns:
    Device of the keypoints.
)r
   Údevicer   s   &r   r   ÚDISKFeatures.deviceA   s   € ð �~‰~×$Ñ$Ð$r   c               ó   € V ^8„  d   QhRR/# ©r   r   r	   r   )r   s   "r   r   r   K   ó   € ÷ $ñ $�<ñ $r   c                ó(   € V P                   R,          # )z<Accesses the x coordinates of keypoints (along image width).)ºNNNr   ©r
   r   s   &r   ÚxÚDISKFeatures.xJ   ó   € ð �~‰~˜dÕ#Ð#r   c               ó   € V ^8„  d   QhRR/# r"   r   )r   s   "r   r   r   P   r#   r   c                ó(   € V P                   R,          # )z=Accesses the y coordinates of keypoints (along image height).)r%   é   r&   r   s   &r   ÚyÚDISKFeatures.yO   r)   r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úargsr   Úkwargsr   r   r   )r   s   "r   r   r   T   s!   € ÷ 
ñ 
˜ð 
 sð 
¨|ñ 
r   c           	     ó¸   € \        V P                  P                  ! V/ VB V P                  P                  ! V/ VB V P                  P                  ! V/ VB 4      # )a@  Return a copy whose keypoints, descriptors and detection scores went through :meth:`torch.Tensor.to`.

Args:
    *args: Arguments passed to :meth:`torch.Tensor.to`.
    **kwargs: Keyword arguments passed to :meth:`torch.Tensor.to`.

Returns:
    A new DISKFeatures object with tensors of appropriate type and location.

)r   r
   Útor   r   )r   r0   r1   s   &*,r   r3   ÚDISKFeatures.toT   sZ   € ô Ø�N‰N×Ò˜tÐ. vÑ.Ø×Ñ×Ò Ð0¨Ñ0Ø×!Ñ!×$Ò$ dÐ5¨fÑ5ó
ð 	
r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__Úpropertyr   r   r'   r-   r3   Ú__static_attributes__r   r   r   r   r      ss   ‡ ñð. ÓØÓØ"Ó"àô'ó ð'ð ô%ó ð%ð ô$ó ð$ð ô$ó ð$÷
ñ 
r   r   c                  ó<   € ] tR t^ft$ RtR]R&   R]R&   R R ltRtR# )	Ú	Keypointsz¼A temporary struct used to store keypoint detections and their log-probabilities.

After construction, merge_with_descriptors is used to select corresponding descriptors from unet output.
r	   ÚxysÚdetection_logpc               ó    € V ^8„  d   QhRRRR/# )r   r   r	   r   r   r   )r   s   "r   r   ÚKeypoints.__annotate__p   s   € ÷ 
Fñ 
F°,ð 
FÀ<ñ 
Fr   c                ój  € VP                   pV P                  P                  w  r4VRWC3,          P                  p\        P                  ! VRR7      pV P                  P                  \        P                  ! V\        P                  4      4      p\        WeV P                  P                  V4      4      # )z]Select descriptors from a dense `descriptors` torch.Tensor, at locations given by `self.xys`.r%   )Údiméÿÿÿÿ)Údtyper?   ÚTÚFÚ	normalizer3   ÚtorchÚpromote_typesÚfloat32r   r@   )r   r   rF   r'   r-   Údescr?   s   &&     r   Úmerge_with_descriptorsÚ Keypoints.merge_with_descriptorsp   sƒ   € à×!Ñ!ˆØ�x‰x�z‰z‰ˆà˜1˜a˜7Õ#×%Ñ%ˆÜ�{Š{˜4 RÔ(ˆð �h‰h�k‰kœ%×-Ò-¨e´U·]±]ÓCÓDˆÜ˜C t×':Ñ':×'=Ñ'=¸eÓ'DÓEÐEr   r   N)r5   r6   r7   r8   r9   r:   rN   r<   r   r   r   r>   r>   f   s!   ‡ ñð
 
ÓØ Ó ÷
Fñ 
Fr   r>   )Ú
__future__r   Údataclassesr   Útypingr   r   rJ   Útorch.nn.functionalÚnnÚ
functionalrH   r   r>   r   r   r   Ú<module>rV      sR   ðõ$ #å !ß ã ß Ð ð ÷G
ð G
ó ðG
ðT ÷Fð Fó òFr   