Reference for ultralytics/models/rtdetr/model.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/model.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.models.rtdetr.model.RTDETR
Bases: Model
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:
Name | Type | Description |
---|---|---|
model |
str
|
Path to the pre-trained model. |
Examples:
>>> from ultralytics import RTDETR
>>> model = RTDETR("rtdetr-l.pt")
>>> results = model("image.jpg")
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
str
|
Path to the pre-trained model. Supports .pt, .yaml, and .yml formats. |
'rtdetr-l.pt'
|
Raises:
Type | Description |
---|---|
NotImplementedError
|
If the model file extension is not 'pt', 'yaml', or 'yml'. |
Source code in ultralytics/models/rtdetr/model.py
📅 Created 1 year ago
✏️ Updated 6 months ago