Detection models
| Size | Python class | Inference alias | COCO AP50 | COCO AP50:95 | Latency (ms) | Params (M) | Resolution | License |
|---|---|---|---|---|---|---|---|---|
| N | RFDETRNano | rfdetr-nano | 67.6 | 48.4 | 2.3 | 30.5 | 384x384 | Apache 2.0 |
| S | RFDETRSmall | rfdetr-small | 72.1 | 53.0 | 3.5 | 32.1 | 512x512 | Apache 2.0 |
| M | RFDETRMedium | rfdetr-medium | 73.6 | 54.7 | 4.4 | 33.7 | 576x576 | Apache 2.0 |
| L | RFDETRLarge | rfdetr-large | 75.1 | 56.5 | 6.8 | 33.9 | 704x704 | Apache 2.0 |
| XL △ | RFDETRXLarge | rfdetr-xlarge | 77.4 | 58.6 | 11.5 | 126.4 | 700x700 | PML 1.0 |
| 2XL △ | RFDETR2XLarge | rfdetr-2xlarge | 78.5 | 60.1 | 17.2 | 126.9 | 880x880 | PML 1.0 |
△ The XLarge and 2XLarge detection models are part of the
rfdetr_plus extension, licensed under PML 1.0. Install with pip install rfdetr[plus]. These models require a Roboflow account.Segmentation models
| Size | Python class | Inference alias | COCO AP50 | COCO AP50:95 | Latency (ms) | Params (M) | Resolution | License |
|---|---|---|---|---|---|---|---|---|
| N | RFDETRSegNano | rfdetr-seg-nano | 63.0 | 40.3 | 3.4 | 33.6 | 312x312 | Apache 2.0 |
| S | RFDETRSegSmall | rfdetr-seg-small | 66.2 | 43.1 | 4.4 | 33.7 | 384x384 | Apache 2.0 |
| M | RFDETRSegMedium | rfdetr-seg-medium | 68.4 | 45.3 | 5.9 | 35.7 | 432x432 | Apache 2.0 |
| L | RFDETRSegLarge | rfdetr-seg-large | 70.5 | 47.1 | 8.8 | 36.2 | 504x504 | Apache 2.0 |
| XL | RFDETRSegXLarge | rfdetr-seg-xlarge | 72.2 | 48.8 | 13.5 | 38.1 | 624x624 | Apache 2.0 |
| 2XL | RFDETRSeg2XLarge | rfdetr-seg-2xlarge | 73.1 | 49.9 | 21.8 | 38.6 | 768x768 | Apache 2.0 |
Choosing a model size
The right model size depends on your latency and accuracy constraints:- Nano / Small — best for edge devices, real-time applications, or when GPU resources are limited. Nano runs at 2.3 ms latency with 30.5 M parameters.
- Medium — a balanced starting point for most use cases. Medium achieves 54.7 AP50:95 at 4.4 ms latency.
- Large — higher accuracy at moderate cost. Large reaches 56.5 AP50:95 at 6.8 ms.
- XLarge / 2XLarge — maximum accuracy for detection tasks where latency is less critical. These models require
pip install rfdetr[plus].
Load a model by class name
Import the class for your chosen size and instantiate it. The pretrained COCO weights are downloaded automatically on first use.Load a custom checkpoint
Usepretrain_weights to load a fine-tuned or custom checkpoint instead of the default COCO weights.
RFDETR.from_checkpoint() to automatically infer the model class from the checkpoint:
Object detection
Run RF-DETR detection models on images, video, and streams.
Instance segmentation
Run RF-DETR segmentation models for pixel-level masks.
Benchmarks
Full benchmark comparison tables across all model sizes.
Train a model
Fine-tune RF-DETR on your own dataset.