ó
    Eñi]  ã                   ó”   • S SK JrJr  S SKJr  S SKJrJr  S SK	J
r
   " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      rg)é    )ÚAnyÚUnion)Ú
tv_tensors)Ú
functionalÚ	Transform)ÚCLAMPING_MODE_TYPEc                   ó¸   ^ • \ rS rSrSr\R                  4rS\\	\R                  4   SS4U 4S jjrS\R                  S\\	\4   S\R                  4S	 jrS
rU =r$ )ÚConvertBoundingBoxFormaté   aK  Convert bounding box coordinates to the given ``format``, eg from "CXCYWH" to "XYXY".

Args:
    format (str or tv_tensors.BoundingBoxFormat): output bounding box format.
        Possible values are defined by :class:`~torchvision.tv_tensors.BoundingBoxFormat` and
        string values match the enums, e.g. "XYXY" or "XYWH" etc.
ÚformatÚreturnNc                 ó.   >• [         TU ]  5         Xl        g ©N)ÚsuperÚ__init__r   )Úselfr   Ú	__class__s     €Ú\/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torchvision/transforms/v2/_meta.pyr   Ú!ConvertBoundingBoxFormat.__init__   s   ø€ Ü‰ÑÔØ�ó    ÚinptÚparamsc                 ó>   • [         R                  " XR                  S9$ )N)Ú
new_format)ÚFÚconvert_bounding_box_formatr   ©r   r   r   s      r   Ú	transformÚ"ConvertBoundingBoxFormat.transform   s   € Ü×,Ò,¨T¿k¹kÑJÐJr   )r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   ÚBoundingBoxesÚ_transformed_typesr   ÚstrÚBoundingBoxFormatr   Údictr   r   Ú__static_attributes__Ú__classcell__©r   s   @r   r
   r
      su   ø† ñð %×2Ñ2Ð4Ðð˜u S¨*×*FÑ*FÐ%FÑGð ÈD÷ ðK˜j×6Ñ6ð KÀÀSÈ#ÀXÁð KÐS]×SkÑSk÷ Kò Kr   r
   c                   ó¨   ^ • \ rS rSrSrSS\\\4   SS4U 4S jjjr\	R                  4rS\	R                  S\\\4   S\	R                  4S	 jrS
rU =r$ )ÚClampBoundingBoxesé   a  Clamp bounding boxes to their corresponding image dimensions.

Args:
    clamping_mode: Default is "auto" which relies on the input box'
        ``clamping_mode`` attribute. Read more in :ref:`clamping_mode_tuto`
        for more details on how to use this transform.
Úclamping_moder   Nc                 ó.   >• [         TU ]  5         Xl        g r   )r   r   r0   ©r   r0   r   s     €r   r   ÚClampBoundingBoxes.__init__$   s   ø€ Ü‰ÑÔØ*Õr   r   r   c                 ó>   • [         R                  " XR                  S9$ )N©r0   )r   Úclamp_bounding_boxesr0   r   s      r   r   ÚClampBoundingBoxes.transform*   s   € Ü×%Ò% d×:LÑ:LÑMÐMr   r5   )Úauto)r    r!   r"   r#   r$   r   r   r'   r   r   r%   r&   r)   r   r   r*   r+   r,   s   @r   r.   r.      sv   ø† ññ+ eÐ,>ÀÐ,CÑ&Dð +ÐRV÷ +ð +ð %×2Ñ2Ð4ÐðN˜j×6Ñ6ð NÀÀSÈ#ÀXÁð NÐS]×SkÑSk÷ Nò Nr   r.   c                   óz   • \ rS rSrSr\R                  4rS\R                  S\\	\
4   S\R                  4S jrSrg)	ÚClampKeyPointsé.   z†Clamp keypoints to their corresponding image dimensions.

The clamping is done according to the keypoints' ``canvas_size`` meta-data.
r   r   r   c                 ó.   • [         R                  " U5      $ r   )r   Úclamp_keypointsr   s      r   r   ÚClampKeyPoints.transform6   s   € Ü× Ò  Ó&Ð&r   © N)r    r!   r"   r#   r$   r   Ú	KeyPointsr&   r)   r'   r   r   r*   r?   r   r   r:   r:   .   sF   † ñð
 %×.Ñ.Ð0Ðð'˜j×2Ñ2ð '¸DÀÀcÀ¹Nð 'Èz×OcÑOc÷ 'r   r:   c                   óš   ^ • \ rS rSrSrS\SS4U 4S jjr\R                  4r	S\R                  S\
\\4   S\R                  4S	 jrS
rU =r$ )ÚSetClampingModeé:   a   Sets the ``clamping_mode`` attribute of the bounding boxes for future transforms.



Args:
    clamping_mode: The clamping mode to set. Possible values are: "soft",
        "hard", or ``None``. Read more in :ref:`clamping_mode_tuto` for more
        details on how to use this transform.
r0   r   Nc                 ój   >• [         TU ]  5         Xl        U R                  S;  a  [        SU 35      eg )N)NÚsoftÚhardz.clamping_mode must be soft, hard or None, got )r   r   r0   Ú
ValueErrorr2   s     €r   r   ÚSetClampingMode.__init__E   s;   ø€ Ü‰ÑÔØ*Ôà×ÑÐ%;Ó;ÜÐMÈmÈ_Ð]Ó^Ð^ð <r   r   r   c                 óH   • UR                  5       nU R                  Ul        U$ r   )Úcloner0   )r   r   r   Úouts       r   r   ÚSetClampingMode.transformN   s    € Ø(,¯
©
«ˆØ ×.Ñ.ˆÔØˆ
r   r5   )r    r!   r"   r#   r$   r   r   r   r%   r&   r)   r'   r   r   r*   r+   r,   s   @r   rB   rB   :   sd   ø† ñð_Ð&8ð _¸T÷ _ð %×2Ñ2Ð4Ðð˜j×6Ñ6ð ÀÀSÈ#ÀXÁð ÐS]×SkÑSk÷ ò r   rB   N)Útypingr   r   Útorchvisionr   Útorchvision.transforms.v2r   r   r   Ú&torchvision.tv_tensors._bounding_boxesr   r
   r.   r:   rB   r?   r   r   Ú<module>rQ      sE   ðß å "ß @Ý EôK˜yô Kô&N˜ô Nô&	'�Yô 	'ô�iõ r   