roboflow/rf-detrPublic

RF-DETR is a real-time object detection and segmentation model architecture developed by Roboflow, SOTA on COCO, designed for fine-tuning. [ICLR 2026]

AI summary: A real-time vision transformer model delivering state-of-the-art accuracy for object detection and instance segmentation.

Stars
9.7K
+22 today
Forks
1.2K
Watchers
77
Open issues
70
Open PRs
19
Contributors
~107
Commits
1.2K
Branches
21

PythonApache-2.0Created Mar 19, 2025Last push 1d agoLatest release 1.11.0+93 stars this week+305 this month

Quick answers

What is rf-detr?
A real-time vision transformer model delivering state-of-the-art accuracy for object detection and instance segmentation.
What does rf-detr do?
RF-DETR is an advanced, real-time computer vision architecture developed by Roboflow, built upon the DINOv2 vision transformer backbone. It is designed to achieve state-of-the-art accuracy while maintaining low latency, making it highly competitive on benchmark datasets like Microsoft COCO. Unlike traditional models that require separate architectures for different tasks, RF-DETR supports object detection, instance segmentation, and keypoint detection through a single, unified API. It is specifically engineered to be easily fine-tuned on custom datasets, allowing practitioners to rapidly deploy high-performance vision models for specialized industrial or commercial applications.
Who is rf-detr for?
Machine learning engineers, computer vision researchers, and data scientists looking for a highly accurate, easily fine-tuned vision model. It requires proficiency in Python and deep learning frameworks.
How do I get started with rf-detr?
pip install rfdetr
How popular is rf-detr on GitHub?
roboflow/rf-detr has 9,678 stars and 1,219 forks on GitHub, and gained 93 stars in the last 7 days.
What license does rf-detr use?
roboflow/rf-detr is released under the Apache-2.0 license.

Star history

since Sep 7, 2026
02.5K5K7.5KSep 2026Sep 2026Sep 2026Oct 2026
9.7K stars as of Oct 3, 2026. Measured daily since Sep 7, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
OctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 2 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 1 commit2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 1 commit2025-12-12: 2 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 2 commits2026-01-07: 0 commits2026-01-08: 2 commits2026-01-09: 1 commit2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 2 commits2026-01-13: 5 commits2026-01-14: 9 commits2026-01-15: 0 commits2026-01-16: 2 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 11 commits2026-01-20: 5 commits2026-01-21: 23 commits2026-01-22: 17 commits2026-01-23: 7 commits2026-01-24: 0 commits2026-01-25: 1 commit2026-01-26: 2 commits2026-01-27: 2 commits2026-01-28: 5 commits2026-01-29: 2 commits2026-01-30: 4 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 2 commits2026-02-04: 4 commits2026-02-05: 0 commits2026-02-06: 2 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 6 commits2026-02-11: 8 commits2026-02-12: 11 commits2026-02-13: 2 commits2026-02-14: 6 commits2026-02-15: 0 commits2026-02-16: 5 commits2026-02-17: 0 commits2026-02-18: 8 commits2026-02-19: 9 commits2026-02-20: 13 commits2026-02-21: 3 commits2026-02-22: 1 commit2026-02-23: 6 commits2026-02-24: 1 commit2026-02-25: 1 commit2026-02-26: 9 commits2026-02-27: 20 commits2026-02-28: 23 commits2026-03-01: 10 commits2026-03-02: 2 commits2026-03-03: 3 commits2026-03-04: 16 commits2026-03-05: 8 commits2026-03-06: 2 commits2026-03-07: 1 commit2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 20 commits2026-03-11: 3 commits2026-03-12: 2 commits2026-03-13: 5 commits2026-03-14: 2 commits2026-03-15: 0 commits2026-03-16: 4 commits2026-03-17: 4 commits2026-03-18: 1 commit2026-03-19: 14 commits2026-03-20: 4 commits2026-03-21: 0 commits2026-03-22: 4 commits2026-03-23: 5 commits2026-03-24: 7 commits2026-03-25: 5 commits2026-03-26: 0 commits2026-03-27: 2 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 4 commits2026-03-31: 6 commits2026-04-01: 2 commits2026-04-02: 6 commits2026-04-03: 1 commit2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 1 commit2026-04-07: 0 commits2026-04-08: 2 commits2026-04-09: 11 commits2026-04-10: 5 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 2 commits2026-04-14: 1 commit2026-04-15: 3 commits2026-04-16: 4 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 4 commits2026-04-22: 1 commit2026-04-23: 5 commits2026-04-24: 5 commits2026-04-25: 2 commits2026-04-26: 0 commits2026-04-27: 1 commit2026-04-28: 3 commits2026-04-29: 3 commits2026-04-30: 2 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 2 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 1 commit2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 4 commits2026-05-14: 0 commits2026-05-15: 2 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 6 commits2026-05-19: 2 commits2026-05-20: 0 commits2026-05-21: 5 commits2026-05-22: 1 commit2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 2 commits2026-05-26: 13 commits2026-05-27: 4 commits2026-05-28: 6 commits2026-05-29: 4 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 2 commits2026-06-03: 3 commits2026-06-04: 6 commits2026-06-05: 3 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 4 commits2026-06-12: 3 commits2026-06-13: 6 commits2026-06-14: 2 commits2026-06-15: 8 commits2026-06-16: 3 commits2026-06-17: 3 commits2026-06-18: 0 commits2026-06-19: 5 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 5 commits2026-06-23: 4 commits2026-06-24: 3 commits2026-06-25: 5 commits2026-06-26: 4 commits2026-06-27: 2 commits2026-06-28: 0 commits2026-06-29: 2 commits2026-06-30: 1 commit2026-07-01: 0 commits2026-07-02: 2 commits2026-07-03: 2 commits2026-07-04: 1 commit2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 6 commits2026-07-08: 4 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 5 commits2026-07-15: 3 commits2026-07-16: 2 commits2026-07-17: 4 commits2026-07-18: 3 commits2026-07-19: 0 commits2026-07-20: 2 commits2026-07-21: 2 commits2026-07-22: 2 commits2026-07-23: 4 commits2026-07-24: 2 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 5 commits2026-07-28: 6 commits2026-07-29: 1 commit2026-07-30: 7 commits2026-07-31: 9 commits2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 4 commits2026-08-04: 7 commits2026-08-05: 6 commits2026-08-06: 10 commits2026-08-07: 6 commits2026-08-08: 1 commit2026-08-09: 0 commits2026-08-10: 6 commits2026-08-11: 3 commits2026-08-12: 6 commits2026-08-13: 9 commits2026-08-14: 3 commits2026-08-15: 1 commit2026-08-16: 2 commits2026-08-17: 6 commits2026-08-18: 7 commits2026-08-19: 2 commits2026-08-20: 4 commits2026-08-21: 6 commits2026-08-22: 4 commits2026-08-23: 2 commits2026-08-24: 9 commits2026-08-25: 3 commits2026-08-26: 0 commits2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 0 commits2026-09-01: 0 commits2026-09-02: 8 commits2026-09-03: 5 commits2026-09-04: 7 commits2026-09-05: 2 commits2026-09-06: 0 commits2026-09-07: 6 commits2026-09-08: 2 commits2026-09-09: 2 commits2026-09-10: 8 commits2026-09-11: 2 commits2026-09-12: 0 commits2026-09-13: 1 commit2026-09-14: 9 commits2026-09-15: 8 commits2026-09-16: 5 commits2026-09-17: 6 commits2026-09-18: 9 commits2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 4 commits2026-09-22: 9 commits2026-09-23: 4 commits2026-09-24: 8 commits2026-09-25: 5 commits2026-09-26: 1 commit2026-09-27: 1 commit2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits
863 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Very active

    863 commits in 52 weeks

  • Community-driven

    ~107 contributors

  • Well documented

    High community health score

  • Permissive license

    Apache-2.0

  • Continuous integration

    Automated checks passing

What rf-detr does

RF-DETR is an advanced, real-time computer vision architecture developed by Roboflow, built upon the DINOv2 vision transformer backbone. It is designed to achieve state-of-the-art accuracy while maintaining low latency, making it highly competitive on benchmark datasets like Microsoft COCO. Unlike traditional models that require separate architectures for different tasks, RF-DETR supports object detection, instance segmentation, and keypoint detection through a single, unified API. It is specifically engineered to be easily fine-tuned on custom datasets, allowing practitioners to rapidly deploy high-performance vision models for specialized industrial or commercial applications.

Machine learning engineers, computer vision researchers, and data scientists looking for a highly accurate, easily fine-tuned vision model. It requires proficiency in Python and deep learning frameworks.

  • DINOv2 backbone: Leverages a powerful, pre-trained vision transformer to extract highly robust features from images.
  • Unified vision API: Performs object detection, instance segmentation, and keypoint detection using a single consistent architecture.
  • Real-time performance: Optimized for low-latency inference, enabling deployment in time-sensitive edge applications.
  • State-of-the-art accuracy: Achieves top-tier performance metrics on standard computer vision benchmarks like COCO.
  • Fine-tuning optimized: Designed specifically for rapid adaptation to novel, custom datasets with minimal configuration.

Where teams use it

Automated quality inspection

Deploy an instance segmentation model to precisely identify and measure manufacturing defects on an assembly line.

Autonomous vehicle perception

Utilize real-time object detection to rapidly identify pedestrians, vehicles, and traffic signs from a camera feed.

Medical image analysis

Fine-tune the model to accurately segment specific anatomical structures or anomalies in radiology scans.

Retail analytics

Implement keypoint detection to analyze customer posture and interaction with store displays in real time.

Getting started: pip install rfdetr

README

develop branch

RF-DETR: Real-Time SOTA Object Detection, Instance Segmentation, and Keypoint Detection


RF-DETR is a real-time transformer architecture for object detection, instance segmentation, and keypoint detection (preview) developed by Roboflow. Built on a DINOv2 vision transformer backbone, RF-DETR delivers state-of-the-art accuracy and latency trade-offs on Microsoft COCO and RF100-VL.

RF-DETR uses a DINOv2 vision transformer backbone and supports object detection, instance segmentation, and keypoint detection (preview) in a single, consistent API. The open-source rfdetr package and Apache-designated models are released under Apache 2.0, while Plus components (rfdetr_plus, including RF-DETR-XL/2XL detection models) are licensed under PML 1.0.

The published RF-DETR sizes were created with neural architecture search (NAS) — and the same NAS method is now available on the Roboflow platform, so you can discover the best architecture for your own dataset. Learn more in the NAS docs.

rf-detr-segmentation-promo.mp4

Install

To install RF-DETR, install the rfdetr package in a Python>=3.10 environment with pip.

pip install rfdetr
Install from source

By installing RF-DETR from source, you can explore the most recent features and enhancements that have not yet been officially released. Please note that these updates are still in development and may not be as stable as the latest published release.

pip install https://github.com/roboflow/rf-detr/archive/refs/heads/develop.zip

Benchmarks

RF-DETR achieves state-of-the-art results in both object detection and instance segmentation, with benchmarks reported on Microsoft COCO and RF100-VL (RF100-VL for detection only). The charts and tables below compare RF-DETR against other top real-time models across accuracy and latency for detection and segmentation. All COCO accuracy numbers are measured in-house for every model shown, computed with pycocotools in SAB over the full 5,000-image val2017 split, so every row is directly comparable and may differ from vendor-reported figures. The sole exception is rows marked †, which are quoted from the original authors' paper and were not measured in SAB. All latency numbers were measured on an NVIDIA T4 using TensorRT, FP16, and batch size 1. Parameter counts are deployment (fused) nn.Module parameter counts (model.parameters(), not the raw tensor count of the saved checkpoint), except rows marked †, which are the authors' reported counts. For full benchmarking methodology and reproducibility details, see roboflow/sab.

Detection

rf_detr_1-4_latency_accuracy_object_detection

See object detection benchmark numbers
Architecture COCO AP50 COCO AP50:95 RF100VL AP50 RF100VL AP50:95 Latency (ms) Params (M) Resolution License
RF-DETR-N 67.6 48.4 85.0 57.7 2.3 30.5 384x384 Apache 2.0
RF-DETR-S 72.1 53.0 86.7 60.2 3.5 32.1 512x512 Apache 2.0
RF-DETR-M 73.6 54.7 87.4 61.2 4.4 33.7 576x576 Apache 2.0
RF-DETR-L 75.1 56.5 88.2 62.2 6.8 33.9 704x704 Apache 2.0
RF-DETR-XL △ 77.4 58.6 88.5 62.9 11.5 126.4 700x700 PML 1.0
RF-DETR-2XL △ 78.5 60.1 89.0 63.2 17.2 126.9 880x880 PML 1.0
YOLO11-N 52.0 37.4 81.4 55.3 2.5 2.6 640x640 AGPL-3.0
YOLO11-S 59.7 44.4 82.3 56.2 3.2 9.4 640x640 AGPL-3.0
YOLO11-M 64.1 48.6 82.5 56.5 5.1 20.1 640x640 AGPL-3.0
YOLO11-L 64.9 49.9 82.2 56.5 6.5 25.3 640x640 AGPL-3.0
YOLO11-X 66.1 50.9 81.7 56.2 10.5 56.9 640x640 AGPL-3.0
YOLO26-N 55.8 40.3 76.7 52.0 1.7 2.6 640x640 AGPL-3.0
YOLO26-S 64.3 47.7 82.7 57.0 2.6 9.4 640x640 AGPL-3.0
YOLO26-M 69.7 52.5 84.4 58.7 4.4 20.1 640x640 AGPL-3.0
YOLO26-L 71.1 54.1 85.0 59.3 5.7 25.3 640x640 AGPL-3.0
YOLO26-X 74.0 56.9 85.6 60.0 9.6 56.9 640x640 AGPL-3.0
LW-DETR-T 60.7 42.9 84.7 57.1 1.9 12.1 640x640 Apache 2.0
LW-DETR-S 66.8 48.0 85.0 57.4 2.6 14.6 640x640 Apache 2.0
LW-DETR-M 72.0 52.6 86.8 59.8 4.4 28.2 640x640 Apache 2.0
LW-DETR-L 74.6 56.1 87.4 61.5 6.9 46.8 640x640 Apache 2.0
LW-DETR-X 76.9 58.3 87.9 62.1 13.0 118.0 640x640 Apache 2.0
D-FINE-N 60.2 42.7 84.4 58.2 2.1 3.8 640x640 Apache 2.0
D-FINE-S 67.6 50.6 85.3 60.3 3.5 10.2 640x640 Apache 2.0
D-FINE-M 72.6 55.0 85.5 60.6 5.4 19.2 640x640 Apache 2.0
D-FINE-L 74.9 57.2 86.4 61.6 7.5 31.0 640x640 Apache 2.0
D-FINE-X 76.8 59.3 86.9 62.2 11.5 62.0 640x640 Apache 2.0
SAM 3 † — — — 61.6 — ~850 1008x1008 N/A

† Reported by the SAM 3 authors (arXiv:2511.16719, Table 36), not measured by us in SAB. The value is SAM 3 fine-tuned on the full RF100-VL training set, which is the same setting as the RF100VL columns above — SAM 3's paper reports LW-DETR-m at 59.8 on this benchmark, matching our own measurement, so the numbers line up. Dashes mark results SAM 3 does not report under this protocol. Parameter count is the paper's stated ~850 M (~450 M vision + ~300 M text encoders + ~100 M detector/tracker).

Segmentation

rf_detr_1-4_latency_accuracy_instance_segmentation

See instance segmentation benchmark numbers
Architecture COCO AP50 COCO AP50:95 Latency (ms) Params (M) Resolution License
RF-DETR-Seg-N 63.0 40.3 3.4 33.6 312x312 Apache 2.0
RF-DETR-Seg-S 66.2 43.1 4.4 33.7 384x384 Apache 2.0
RF-DETR-Seg-M 68.4 45.3 5.9 35.7 432x432 Apache 2.0
RF-DETR-Seg-L 70.5 47.1 8.8 36.2 504x504 Apache 2.0
RF-DETR-Seg-XL 72.2 48.8 13.5 38.1 624x624 Apache 2.0
RF-DETR-Seg-2XL 73.1 49.9 21.8 38.6 768x768 Apache 2.0
YOLOv8-N-Seg 45.6 28.3 3.5 3.4 640x640 AGPL-3.0
YOLOv8-S-Seg 53.8 34.0 4.2 11.8 640x640 AGPL-3.0
YOLOv8-M-Seg 58.2 37.3 7.0 27.3 640x640 AGPL-3.0
YOLOv8-L-Seg 60.5 39.0 9.7 46.0 640x640 AGPL-3.0
YOLOv8-XL-Seg 61.3 39.5 14.0 71.8 640x640 AGPL-3.0
YOLOv11-N-Seg 47.8 30.0 3.6 2.9 640x640 AGPL-3.0
YOLOv11-S-Seg 55.4 35.0 4.6 10.1 640x640 AGPL-3.0
YOLOv11-M-Seg 60.0 38.5 6.9 22.4 640x640 AGPL-3.0
YOLOv11-L-Seg 61.5 39.5 8.3 27.6 640x640 AGPL-3.0
YOLOv11-XL-Seg 62.4 40.1 13.7 62.1 640x640 AGPL-3.0
YOLO26-N-Seg 54.3 34.7 2.31 2.7 640x640 AGPL-3.0
YOLO26-S-Seg 62.4 40.2 3.47 10.4 640x640 AGPL-3.0
YOLO26-M-Seg 67.8 44.0 6.32 23.6 640x640 AGPL-3.0
YOLO26-L-Seg 69.8 45.5 7.58 28.0 640x640 AGPL-3.0
YOLO26-X-Seg 71.6 46.8 12.92 62.8 640x640 AGPL-3.0

Keypoints

RF-DETR Keypoint mAP vs latency chart comparing against YOLO26-pose and YOLO11-pose on MS COCO

See keypoint detection benchmark numbers
Architecture COCO AP50:95 Latency (ms) Params (M) License
RF-DETR Keypoint (Preview) 71.8 9.7 40.7 Apache 2.0
YOLO11-pose N 48.9 3.2 2.9 AGPL-3.0
YOLO11-pose S 57.5 3.4 9.9 AGPL-3.0
YOLO11-pose M 64.2 5.2 20.9 AGPL-3.0
YOLO11-pose L 65.2 6.6 26.2 AGPL-3.0
YOLO11-pose X 68.6 10.6 58.8 AGPL-3.0
YOLO26-pose N 55.9 1.9 2.9 AGPL-3.0
YOLO26-pose S 62.0 2.7 10.4 AGPL-3.0
YOLO26-pose M 68.0 4.6 21.5 AGPL-3.0
YOLO26-pose L 69.2 5.9 25.9 AGPL-3.0
YOLO26-pose X 71.0 9.8 57.6 AGPL-3.0

Keypoint benchmarks report AP50:95 (OKS-based); this is the standard COCO keypoint comparison metric.

NAS on the Roboflow Platform

RF100-VL accuracy-latency Pareto chart showing RF-DETR NAS trained on the Roboflow platform outperforming the paper NAS and named configs

Since the paper release, we have improved RF-DETR NAS training on the Roboflow platform even further. A single training run gives you every model size, with results that beat not only the open-source checkpoints but also our own paper NAS results. Try it now!

Run Models

Detection

RF-DETR provides multiple model sizes, ranging from Nano to 2XLarge. To use a different model size, replace the class name in the code snippet below with another class from the table.

import supervision as sv
from rfdetr import RFDETRMedium
from rfdetr.assets.coco_classes import COCO_CLASSES

model = RFDETRMedium()

detections = model.predict("https://media.roboflow.com/dog.jpg", threshold=0.5)

labels = [f"{COCO_CLASSES[class_id]}" for class_id in detections.class_id]

annotated_image = sv.BoxAnnotator().annotate(detections.metadata["source_image"], detections)
annotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels)

Note: COCO_CLASSES works for COCO-pretrained models. For fine-tuned models, use detections.data["class_name"] instead — it resolves class names from the checkpoint and works for both COCO and custom datasets.

Run RF-DETR with Inference

You can also run RF-DETR models using the Inference library. To switch model size, select the appropriate inference package alias from the table below.

import requests
import supervision as sv
from PIL import Image
from inference import get_model

model = get_model("rfdetr-medium")

image = Image.open(requests.get("https://media.roboflow.com/dog.jpg", stream=True).raw)
predictions = model.infer(image, confidence=0.5)[0]
detections = sv.Detections.from_inference(predictions)

annotated_image = sv.BoxAnnotator().annotate(image, detections)
annotated_image = sv.LabelAnnotator().annotate(annotated_image, detections)
Size RF-DETR package class Inference package 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

△ Requires the rfdetr_plus extension: pip install rfdetr[plus]. See License for details.

Segmentation

RF-DETR supports instance segmentation with model sizes from Nano to 2XLarge. To use a different model size, replace the class name in the code snippet below with another class from the table.

import supervision as sv
from rfdetr import RFDETRSegMedium
from rfdetr.assets.coco_classes import COCO_CLASSES

model = RFDETRSegMedium()

detections = model.predict("https://media.roboflow.com/dog.jpg", threshold=0.5)

labels = [f"{COCO_CLASSES[class_id]}" for class_id in detections.class_id]

annotated_image = sv.MaskAnnotator().annotate(detections.metadata["source_image"], detections)
annotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels)
Run RF-DETR-Seg with Inference

You can also run RF-DETR-Seg models using the Inference library. To switch model size, select the appropriate inference package alias from the table below.

import requests
import supervision as sv
from PIL import Image
from inference import get_model

model = get_model("rfdetr-seg-medium")

image = Image.open(requests.get("https://media.roboflow.com/dog.jpg", stream=True).raw)
predictions = model.infer(image, confidence=0.5)[0]
detections = sv.Detections.from_inference(predictions)

annotated_image = sv.MaskAnnotator().annotate(image, detections)
annotated_image = sv.LabelAnnotator().annotate(annotated_image, detections)
Size RF-DETR package class Inference package 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

Keypoints

RF-DETR supports keypoint detection (preview) with RFDETRKeypointPreview, pretrained on COCO person keypoints.

from rfdetr import RFDETRKeypointPreview

model = RFDETRKeypointPreview()
key_points = model.predict("image.jpg", threshold=0.5)
Size RF-DETR package class COCO AP50:95 Latency (ms) Params (M) Resolution License
Keypoint (Preview) RFDETRKeypointPreview 71.8 9.7 40.7 576x576 Apache 2.0

Train Models

RF-DETR supports training for object detection, instance segmentation, and keypoint detection (preview). You can train models in Google Colab or directly on the Roboflow platform. Below you will find a step-by-step video fine-tuning tutorial.

rf-detr-tutorial-banner

Documentation

Visit our documentation website to learn more about how to use RF-DETR.

License

Licensing is split by component:

  • The open-source rfdetr package and Apache-designated model weights are licensed under Apache License 2.0. See LICENSE.
  • Plus components, including the rfdetr_plus extension and RF-DETR-XL / RF-DETR-2XL detection models, are licensed under PML 1.0.

Acknowledgements

Our work is built upon LW-DETR, DINOv2, and Deformable DETR. Thanks to their authors for their excellent work!

Citation

If you find our work helpful for your research, please consider citing the following BibTeX entry.

@inproceedings{robinson2026rfdetr,
  title     = {RF-DETR: Real-Time Detection Transformer},
  author    = {Robinson, Isaac and Robicheaux, Peter and Popov, Matvei and Ramanan, Deva and Peri, Neehar},
  booktitle = {International Conference on Learning Representations (ICLR)},
  year      = {2026},
  url       = {https://arxiv.org/abs/2511.09554}
}

Contribute

We welcome and appreciate all contributions! If you notice any issues or bugs, have questions, or would like to suggest new features, please open an issue or pull request. By sharing your ideas and improvements, you help make RF-DETR better for everyone.

Project Activity

Weekly Activity and Growth Metrics

PyPI downloads cover completed Monday-to-Sunday periods and exclude known mirrors. New stars are calculated from consecutive scheduled GitHub snapshots.

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

31 total
  1. RF-DETR 1.11.0 widens the export surface and speeds up training. Three new export formats land — OpenVINO IR (with configurable precision), LiteRT via litert-torch, and Apple Core AI (`.aimodel`, for iOS/iPadOS/macOS 27+) — alongside dynamic-batch TensorRT engines built through a single optimization profile, so one engine now serves a batch range instead of one fixed size. Training gains opt-in CUDA-graph replay (combinable with `torch.compile`, plus a Transformer Engine FP8 capture route on supported hardware) and a WebDataset streaming reader for tar-shard training input at scale. This release also completes a deprecation cycle from 1.9.0: `RFDETR.optimize_for_inference()`, `TrainConfig.lr_drop`/`lr_min_factor`, and the standalone synthetic-dataset generator are removed, and export internals were restructured into one `Exporter` class per format behind a registry. `RFDETR.export()`'s own signature is unchanged, but code importing the old converter functions directly needs updated imports. See the Migration guide below for exact before/after code. ## ✨ Spotlights / highlights ### Breaking: export internals restructured into one `Exporter` class per format Each export f

  2. RF-DETR 1.10.1 is a patch release: `compile=True` now actually reaches CUDA's `torch.compile` path under the default `multi_scale=True` recipe, and peak CUDA memory in segmentation loss drops by sampling ground-truth masks one image at a time. It also carries several device-sync and strategy-selection fixes for the still-experimental, undocumented TPU/XLA training path (tracked under issue #1058) — see Notable Changes below. No breaking changes in this release. ## ✨ Spotlights ### ⚡ `compile=True` now actually compiles on CUDA with the default `multi_scale=True` The compile gate previously excluded multi-scale training, but the exclusion sat behind checks that already required a CUDA device *and* CUDA accelerator — so it only ever blocked the CUDA path, where `dynamic=True` already handles the varying input size. Setting `compile=True` on a default recipe previously logged a notice and trained eagerly instead. ([#1436]; [#1411], shipped in 1.10.0, made compilation reachable in the first place) ```python from rfdetr import RFDETRSmall model = RFDETRSmall() model.train(dataset_dir="...", compile=True) # multi_scale=True by default — now actually compiles on CUDA ``

  3. v1.10.0: Faster Training & Inference1.10.0Sep 4, 202626 downloads

    🎉 **RF-DETR 1.10.0 is a training-focused release: a 10k-image dataset trained for 10 epochs on an L4 went from 55 minutes to 31 minutes.** **Faster, with no code change:** - **−23% per training step** at the default batch size, from the optimizer parameter-group merge. - **Up to −46% on `predict()`** for large input frames, from moving uint8 widening onto the accelerator. - **1.25–2.26× DataLoader throughput** on input-bound runs, from packed targets and draft JPEG decoding. **New:** a **GPU batched linear-assignment solver** for the matcher on CUDA, active automatically on eligible devices. **Six changes alter behavior for callers who change nothing. Read the Migration guide before you retrain:** - Validation evaluates **one model per epoch instead of two**, so `val/*` metrics now describe the EMA model. - `grad_accum_steps` defaults to **`1` instead of `4`**, moving the default effective batch from 16 to 4. - Optimizer parameter groups collapse from **one-per-parameter to one-per-hyperparameter**. - Dataset builders **validate their config** instead of silently falling back to wrong defaults. - `log_per_class_metrics` defaults to **`False`**, dropping per-c

  4. v1.9.4: Export & Aug Correctness Fixes1.9.4Aug 24, 2026251 downloads

    RF-DETR 1.9.4 is a maintenance release: no public API removed or renamed, no new public API — the new arguments below sit on private ONNX/TFLite reference helpers. It fixes seven bugs — two in export (ONNX/TFLite background-logit-slot assumption, a keypoint tensor misidentified as a segmentation mask), two silent annotation-corruption bugs in augmentation (keypoint flip with empty flip-pairs, Albumentations `TimeReverse`/`SquareSymmetry`), one training-correctness bug (`BestModelCallback` scoring PyTorch Lightning's sanity-check pass as a real epoch), one non-square training resize bug, and one environment-dependent TFLite export failure. Users exporting sparse-ID COCO checkpoints — including the official pretrained weights — or legacy background-first keypoint checkpoints, training keypoint models with the pydantic-default empty `keypoint_flip_pairs`, using custom Albumentations `TimeReverse`/`SquareSymmetry` configs, starting a new training run seeded from `pretrain_weights`, or training non-square models benefit most from this release. See the migration guide below — three behavior changes may need action on upgrade. ## ✨ Spotlights / highlights ### Export: configurable

  5. RF-DETR 1.9.3 is a maintenance release: no breaking changes, no new top-level public API. It fixes ten user-facing bugs and improves five behavior refinements, spanning training (YOLO test-split evaluation, auto-batch memory estimation, resumed-run metrics history, EMA epoch-boundary double-counting), inference (`predict()` no longer blocks per-image on a CUDA sync for CUDA-tensor inputs), export (ONNX/TFLite no longer silently drop multi-label detections, ONNX Runtime benchmark now honors `--device`), and segmentation (`skip_blocks` path now applies the learned feature projection it was missing during training). Users training on YOLO-format datasets with a `test` split, exporting to ONNX/TFLite, or relying on `batch_size="auto"` benefit most from this release. Callers passing CUDA tensors directly to `predict()` get a small inference speedup from the sync fix; everyone should note the `PostProcess` tie-breaking change described below — non-breaking, but worth a glance if code depends on exact output order. ## ✨ Spotlights / highlights ### `predict()` no longer blocks on a per-image CUDA sync for CUDA-tensor inputs ([#1341](https://github.com/roboflow/rf-detr/pull/1341))

Code frequency

additions and deletions
+25.6K-25.6KWeek of 2025-10-05: +0 linesWeek of 2025-10-05: -0 linesWeek of 2025-10-12: +179 linesWeek of 2025-10-12: -44 linesWeek of 2025-10-19: +0 linesWeek of 2025-10-19: -0 linesWeek of 2025-10-26: +0 linesWeek of 2025-10-26: -0 linesWeek of 2025-11-02: +0 linesWeek of 2025-11-02: -0 linesWeek of 2025-11-09: +13 linesWeek of 2025-11-09: -7 linesWeek of 2025-11-16: +0 linesWeek of 2025-11-16: -0 linesWeek of 2025-11-23: +0 linesWeek of 2025-11-23: -0 linesWeek of 2025-11-30: +0 linesWeek of 2025-11-30: -0 linesWeek of 2025-12-07: +153 linesWeek of 2025-12-07: -72 linesWeek of 2025-12-14: +0 linesWeek of 2025-12-14: -0 linesWeek of 2025-12-21: +0 linesWeek of 2025-12-21: -0 linesWeek of 2025-12-28: +0 linesWeek of 2025-12-28: -0 linesWeek of 2026-01-04: +237 linesWeek of 2026-01-04: -61 linesWeek of 2026-01-11: +681 linesWeek of 2026-01-11: -383 linesWeek of 2026-01-18: +5,279 linesWeek of 2026-01-18: -2,410 linesWeek of 2026-01-25: +453 linesWeek of 2026-01-25: -221 linesWeek of 2026-02-01: +1,418 linesWeek of 2026-02-01: -555 linesWeek of 2026-02-08: +17,752 linesWeek of 2026-02-08: -14,501 linesWeek of 2026-02-15: +8,781 linesWeek of 2026-02-15: -3,608 linesWeek of 2026-02-22: +12,475 linesWeek of 2026-02-22: -1,958 linesWeek of 2026-03-01: +5,523 linesWeek of 2026-03-01: -2,271 linesWeek of 2026-03-08: +21,084 linesWeek of 2026-03-08: -25,572 linesWeek of 2026-03-15: +7,430 linesWeek of 2026-03-15: -3,196 linesWeek of 2026-03-22: +5,346 linesWeek of 2026-03-22: -1,195 linesWeek of 2026-03-29: +3,744 linesWeek of 2026-03-29: -647 linesWeek of 2026-04-05: +4,551 linesWeek of 2026-04-05: -1,250 linesWeek of 2026-04-12: +3,491 linesWeek of 2026-04-12: -311 linesWeek of 2026-04-19: +2,654 linesWeek of 2026-04-19: -673 linesWeek of 2026-04-26: +1,853 linesWeek of 2026-04-26: -296 linesWeek of 2026-05-03: +1,453 linesWeek of 2026-05-03: -113 linesWeek of 2026-05-10: +1,887 linesWeek of 2026-05-10: -141 linesWeek of 2026-05-17: +4,797 linesWeek of 2026-05-17: -3,741 linesWeek of 2026-05-24: +8,509 linesWeek of 2026-05-24: -1,360 linesWeek of 2026-05-31: +4,182 linesWeek of 2026-05-31: -1,310 linesWeek of 2026-06-07: +2,548 linesWeek of 2026-06-07: -2,768 linesWeek of 2026-06-14: +6,478 linesWeek of 2026-06-14: -938 linesWeek of 2026-06-21: +17,220 linesWeek of 2026-06-21: -10,039 linesWeek of 2026-06-28: +3,885 linesWeek of 2026-06-28: -1,002 linesWeek of 2026-07-05: +1,571 linesWeek of 2026-07-05: -831 linesWeek of 2026-07-12: +7,330 linesWeek of 2026-07-12: -1,788 linesWeek of 2026-07-19: +5,576 linesWeek of 2026-07-19: -1,774 linesWeek of 2026-07-26: +7,785 linesWeek of 2026-07-26: -708 linesWeek of 2026-08-02: +6,465 linesWeek of 2026-08-02: -666 linesWeek of 2026-08-09: +8,331 linesWeek of 2026-08-09: -1,106 linesWeek of 2026-08-16: +8,502 linesWeek of 2026-08-16: -1,098 linesWeek of 2026-08-23: +3,273 linesWeek of 2026-08-23: -247 linesWeek of 2026-08-30: +6,124 linesWeek of 2026-08-30: -638 linesWeek of 2026-09-06: +10,034 linesWeek of 2026-09-06: -2,066 linesWeek of 2026-09-13: +20,171 linesWeek of 2026-09-13: -5,537 linesWeek of 2026-09-20: +20,664 linesWeek of 2026-09-20: -6,712 linesWeek of 2026-09-27: +653 linesWeek of 2026-09-27: -40 linesOct 5, 2025Sep 27, 2026
+260.5K lines added, -103.9K removed over the last year.

Commits per week

last 52 weeks
630Week of 2025-10-05: 0 commitsWeek of 2025-10-12: 2 commitsWeek of 2025-10-19: 0 commitsWeek of 2025-10-26: 0 commitsWeek of 2025-11-02: 0 commitsWeek of 2025-11-09: 1 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 3 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 5 commitsWeek of 2026-01-11: 18 commitsWeek of 2026-01-18: 63 commitsWeek of 2026-01-25: 16 commitsWeek of 2026-02-01: 8 commitsWeek of 2026-02-08: 33 commitsWeek of 2026-02-15: 38 commitsWeek of 2026-02-22: 61 commitsWeek of 2026-03-01: 42 commitsWeek of 2026-03-08: 32 commitsWeek of 2026-03-15: 27 commitsWeek of 2026-03-22: 23 commitsWeek of 2026-03-29: 19 commitsWeek of 2026-04-05: 19 commitsWeek of 2026-04-12: 10 commitsWeek of 2026-04-19: 17 commitsWeek of 2026-04-26: 9 commitsWeek of 2026-05-03: 3 commitsWeek of 2026-05-10: 6 commitsWeek of 2026-05-17: 14 commitsWeek of 2026-05-24: 29 commitsWeek of 2026-05-31: 14 commitsWeek of 2026-06-07: 13 commitsWeek of 2026-06-14: 21 commitsWeek of 2026-06-21: 23 commitsWeek of 2026-06-28: 8 commitsWeek of 2026-07-05: 10 commitsWeek of 2026-07-12: 17 commitsWeek of 2026-07-19: 12 commitsWeek of 2026-07-26: 28 commitsWeek of 2026-08-02: 34 commitsWeek of 2026-08-09: 28 commitsWeek of 2026-08-16: 31 commitsWeek of 2026-08-23: 14 commitsWeek of 2026-08-30: 22 commitsWeek of 2026-09-06: 20 commitsWeek of 2026-09-13: 38 commitsWeek of 2026-09-20: 31 commitsWeek of 2026-09-27: 1 commitsOct 5, 2025Sep 27, 2026
863 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 7 commitsSun 1:00 — 1 commitsSun 2:00 — 0 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 2 commitsSun 9:00 — 3 commitsSun 10:00 — 2 commitsSun 11:00 — 1 commitsSun 12:00 — 1 commitsSun 13:00 — 1 commitsSun 14:00 — 0 commitsSun 15:00 — 1 commitsSun 16:00 — 2 commitsSun 17:00 — 1 commitsSun 18:00 — 2 commitsSun 19:00 — 1 commitsSun 20:00 — 1 commitsSun 21:00 — 2 commitsSun 22:00 — 0 commitsSun 23:00 — 2 commitsMon 0:00 — 0 commitsMon 1:00 — 1 commitsMon 2:00 — 0 commitsMon 3:00 — 1 commitsMon 4:00 — 2 commitsMon 5:00 — 1 commitsMon 6:00 — 1 commitsMon 7:00 — 2 commitsMon 8:00 — 1 commitsMon 9:00 — 6 commitsMon 10:00 — 3 commitsMon 11:00 — 10 commitsMon 12:00 — 9 commitsMon 13:00 — 7 commitsMon 14:00 — 7 commitsMon 15:00 — 18 commitsMon 16:00 — 8 commitsMon 17:00 — 7 commitsMon 18:00 — 11 commitsMon 19:00 — 15 commitsMon 20:00 — 8 commitsMon 21:00 — 7 commitsMon 22:00 — 8 commitsMon 23:00 — 13 commitsTue 0:00 — 6 commitsTue 1:00 — 6 commitsTue 2:00 — 3 commitsTue 3:00 — 1 commitsTue 4:00 — 2 commitsTue 5:00 — 1 commitsTue 6:00 — 0 commitsTue 7:00 — 2 commitsTue 8:00 — 5 commitsTue 9:00 — 4 commitsTue 10:00 — 7 commitsTue 11:00 — 1 commitsTue 12:00 — 19 commitsTue 13:00 — 11 commitsTue 14:00 — 14 commitsTue 15:00 — 12 commitsTue 16:00 — 16 commitsTue 17:00 — 14 commitsTue 18:00 — 14 commitsTue 19:00 — 7 commitsTue 20:00 — 7 commitsTue 21:00 — 12 commitsTue 22:00 — 9 commitsTue 23:00 — 4 commitsWed 0:00 — 1 commitsWed 1:00 — 9 commitsWed 2:00 — 2 commitsWed 3:00 — 2 commitsWed 4:00 — 1 commitsWed 5:00 — 5 commitsWed 6:00 — 2 commitsWed 7:00 — 2 commitsWed 8:00 — 4 commitsWed 9:00 — 6 commitsWed 10:00 — 8 commitsWed 11:00 — 6 commitsWed 12:00 — 17 commitsWed 13:00 — 7 commitsWed 14:00 — 13 commitsWed 15:00 — 19 commitsWed 16:00 — 11 commitsWed 17:00 — 18 commitsWed 18:00 — 24 commitsWed 19:00 — 10 commitsWed 20:00 — 8 commitsWed 21:00 — 14 commitsWed 22:00 — 12 commitsWed 23:00 — 6 commitsThu 0:00 — 18 commitsThu 1:00 — 17 commitsThu 2:00 — 8 commitsThu 3:00 — 4 commitsThu 4:00 — 2 commitsThu 5:00 — 0 commitsThu 6:00 — 4 commitsThu 7:00 — 7 commitsThu 8:00 — 7 commitsThu 9:00 — 8 commitsThu 10:00 — 15 commitsThu 11:00 — 13 commitsThu 12:00 — 18 commitsThu 13:00 — 9 commitsThu 14:00 — 9 commitsThu 15:00 — 18 commitsThu 16:00 — 22 commitsThu 17:00 — 13 commitsThu 18:00 — 23 commitsThu 19:00 — 16 commitsThu 20:00 — 8 commitsThu 21:00 — 11 commitsThu 22:00 — 17 commitsThu 23:00 — 16 commitsFri 0:00 — 11 commitsFri 1:00 — 10 commitsFri 2:00 — 7 commitsFri 3:00 — 5 commitsFri 4:00 — 4 commitsFri 5:00 — 1 commitsFri 6:00 — 4 commitsFri 7:00 — 4 commitsFri 8:00 — 4 commitsFri 9:00 — 7 commitsFri 10:00 — 5 commitsFri 11:00 — 9 commitsFri 12:00 — 9 commitsFri 13:00 — 11 commitsFri 14:00 — 6 commitsFri 15:00 — 11 commitsFri 16:00 — 11 commitsFri 17:00 — 10 commitsFri 18:00 — 10 commitsFri 19:00 — 18 commitsFri 20:00 — 10 commitsFri 21:00 — 9 commitsFri 22:00 — 6 commitsFri 23:00 — 2 commitsSat 0:00 — 7 commitsSat 1:00 — 1 commitsSat 2:00 — 4 commitsSat 3:00 — 2 commitsSat 4:00 — 2 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 3 commitsSat 8:00 — 5 commitsSat 9:00 — 4 commitsSat 10:00 — 3 commitsSat 11:00 — 6 commitsSat 12:00 — 3 commitsSat 13:00 — 6 commitsSat 14:00 — 6 commitsSat 15:00 — 3 commitsSat 16:00 — 3 commitsSat 17:00 — 1 commitsSat 18:00 — 0 commitsSat 19:00 — 2 commitsSat 20:00 — 4 commitsSat 21:00 — 1 commitsSat 22:00 — 0 commitsSat 23:00 — 1 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Sep 8, 2026weekly#14+224
Sep 7, 2026weekly#14+224