§
    —/jÝ  ã                   ón   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ  G d	„ d
e¦  «        ZdS )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                   óJ   ‡ — e Zd ZdZddeddfˆ fd„Zedefd„¦   «         Zˆ xZ	S )	ÚRTDETRa†  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")
    úrtdetr-l.ptÚmodelÚreturnNc                 óp   •— t           s
J d¦   «         ‚t          ¦   «                              |d¬¦  «         dS )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     €úd/home/longshao/multi-rider-rag/.venv/lib/python3.11/site-packages/ultralytics/models/rtdetr/model.pyr   zRTDETR.__init__(   s<   ø€ õ Ð8Ð8Ð8Ñ8Ô8ˆzÝ‰Œ×Ò˜u¨8ÐÑ4Ô4Ð4Ð4Ð4ó    c                 ó<   — dt           t          t          t          dœiS )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_mapzRTDETR.task_map1   s'   € ð Ý,Ý,Ý(Ý-ð	ð ð
ð 	
r   )r   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústrr   ÚpropertyÚdictr   Ú__classcell__)r   s   @r   r   r      s   ø€ € € € € ðð ð$5ð 5˜cð 5°dð 5ð 5ð 5ð 5ð 5ð 5ð ð
˜$ð 
ð 
ð 
ñ „Xð
ð 
ð 
ð 
ð 
r   r   N)r    Úultralytics.engine.modelr   Úultralytics.nn.tasksr   Úultralytics.utils.torch_utilsr   Úpredictr   Útrainr   Úvalr	   r   © r   r   ú<module>r,      s±   ððð ð +Ð *Ð *Ð *Ð *Ð *Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø 4Ð 4Ð 4Ð 4Ð 4Ð 4à $Ð $Ð $Ð $Ð $Ð $Ø  Ð  Ð  Ð  Ð  Ð  Ø  Ð  Ð  Ð  Ð  Ð  ð*
ð *
ð *
ð *
ð *
ˆUñ *
ô *
ð *
ð *
ð *
r   