ó
    œþöhô  ã                   óf   • S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr   " S	 S
\5      rg)ag  
Interface for Baidu's RT-DETR, a Vision Transformer-based real-time object detector.

RT-DETR offers real-time performance and high accuracy, excelling in accelerated backends like CUDA with TensorRT.
It features an efficient hybrid encoder and IoU-aware query selection for enhanced detection accuracy.

References:
    https://arxiv.org/pdf/2304.08069.pdf
é    )ÚModel)ÚRTDETRDetectionModel)Ú
TORCH_1_11é   )ÚRTDETRPredictor)ÚRTDETRTrainer)ÚRTDETRValidatorc                   óT   ^ • \ rS rSrSrS	S\SS4U 4S jjjr\S\4S j5       r	Sr
U =r$ )
ÚRTDETRé   aW  
Interface for Baidu's RT-DETR model, a Vision Transformer-based real-time object detector.

This model provides real-time performance with high accuracy. It supports efficient hybrid encoding, IoU-aware
query selection, and adaptable inference speed.

Attributes:
    model (str): Path to the pre-trained model.

Methods:
    task_map: Return a task map for RT-DETR, associating tasks with corresponding Ultralytics classes.

Examples:
    Initialize RT-DETR with a pre-trained model
    >>> from ultralytics import RTDETR
    >>> model = RTDETR("rtdetr-l.pt")
    >>> results = model("image.jpg")
ÚmodelÚreturnNc                 óF   >• [         (       d   S5       e[        TU ]	  USS9  g)z£
Initialize the RT-DETR model with the given pre-trained model file.

Args:
    model (str): Path to the pre-trained model. Supports .pt, .yaml, and .yml formats.
zRTDETR requires torch>=1.11Údetect)r   ÚtaskN)r   ÚsuperÚ__init__)Úselfr   Ú	__class__s     €ÚY/home/james-whalen/.local/lib/python3.13/site-packages/ultralytics/models/rtdetr/model.pyr   ÚRTDETR.__init__)   s'   ø€ ÷ ŠzÐ8Ð8Ó8ˆzÜ‰Ñ˜u¨8ÐÒ4ó    c                 ó4   • S[         [        [        [        S.0$ )zÃ
Return a task map for RT-DETR, associating tasks with corresponding Ultralytics classes.

Returns:
    (dict): A dictionary mapping task names to Ultralytics task classes for the RT-DETR model.
r   )Ú	predictorÚ	validatorÚtrainerr   )r   r	   r   r   )r   s    r   Útask_mapÚRTDETR.task_map3   s"   € ð Ü,Ü,Ü(Ü-ñ	ð
ð 	
r   © )zrtdetr-l.pt)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ústrr   ÚpropertyÚdictr   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      s;   ø† ññ&5˜cð 5°d÷ 5ð 5ð ð
˜$ó 
ó ö
r   r   N)r$   Úultralytics.engine.modelr   Úultralytics.nn.tasksr   Úultralytics.utils.torch_utilsr   Úpredictr   Útrainr   Úvalr	   r   r   r   r   Ú<module>r0      s*   ðñõ +Ý 5Ý 4å $Ý  Ý  ô-
ˆUõ -
r   