Skip to content

Reference for ultralytics/models/rtdetr/


Full source code for this file is available at Help us fix any issues you see by submitting a Pull Request 🛠️. Thank you 🙏!


Bases: Model

RTDETR model interface.

Source code in ultralytics/models/rtdetr/
class RTDETR(Model):
    RTDETR model interface.

    def __init__(self, model='') -> None:
        if model and model.split('.')[-1] not in ('pt', 'yaml', 'yml'):
            raise NotImplementedError('RT-DETR only supports creating from *.pt file or *.yaml file.')
        super().__init__(model=model, task='detect')

    def task_map(self):
        return {
            'detect': {
                'predictor': RTDETRPredictor,
                'validator': RTDETRValidator,
                'trainer': RTDETRTrainer,
                'model': RTDETRDetectionModel}}

Created 2023-07-16, Updated 2023-08-07
Authors: glenn-jocher (5), Laughing-q (1)