GitPedia

Rf detr

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

From roboflow·Updated June 14, 2026·View on GitHub·

RF-DETR is a real-time transformer architecture for object detection and instance segmentation 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](https://cocodataset.org/#home) and [RF100-VL](https://github.com/roboflow/rf100-vl). The project is written primarily in Python, distributed under the Apache License 2.0 license, first published in 2025. It has gained significant community traction with 7,709 stars and 984 forks on GitHub. Key topics include: computer-vision, detr, instance-segmentation, machine-learning, object-detection.

Latest release: 1.8.0.rc0[RC] Keypoints preview
June 12, 2026View Changelog →

RF-DETR: Real-Time SOTA Detection and Segmentation

version
downloads
codecov
python-version
license

arXiv
hf space
colab
roboflow
discord

RF-DETR is a real-time transformer architecture for object detection and instance segmentation 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 both detection and instance segmentation 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.

https://github.com/user-attachments/assets/add23fd1-266f-4538-8809-d7dd5767e8e6

Install

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

bash
pip install rfdetr
<details> <summary>Install from source</summary> <br>

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.

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

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. The charts and tables below compare RF-DETR against other top real-time models across accuracy and latency for detection and segmentation. All latency numbers were measured on an NVIDIA T4 using TensorRT, FP16, and batch size 1. For full benchmarking methodology and reproducibility details, see roboflow/sab.

Detection

<img alt="rf_detr_1-4_latency_accuracy_object_detection" src="https://storage.googleapis.com/com-roboflow-marketing/rf-detr/rf_detr_1-4_latency_accuracy_object_detection.png" /> <details> <summary>See object detection benchmark numbers</summary> <br>
ArchitectureCOCO AP<sub>50</sub>COCO AP<sub>50:95</sub>RF100VL AP<sub>50</sub>RF100VL AP<sub>50:95</sub>Latency (ms)Params (M)ResolutionLicense
RF-DETR-N67.648.485.057.72.330.5384x384Apache 2.0
RF-DETR-S72.153.086.760.23.532.1512x512Apache 2.0
RF-DETR-M73.654.787.461.24.433.7576x576Apache 2.0
RF-DETR-L75.156.588.262.26.833.9704x704Apache 2.0
RF-DETR-XL △77.458.688.562.911.5126.4700x700PML 1.0
RF-DETR-2XL △78.560.189.063.217.2126.9880x880PML 1.0
YOLO11-N52.037.481.455.32.52.6640x640AGPL-3.0
YOLO11-S59.744.482.356.23.29.4640x640AGPL-3.0
YOLO11-M64.148.682.556.55.120.1640x640AGPL-3.0
YOLO11-L64.949.982.256.56.525.3640x640AGPL-3.0
YOLO11-X66.150.981.756.210.556.9640x640AGPL-3.0
YOLO26-N55.840.376.752.01.72.6640x640AGPL-3.0
YOLO26-S64.347.782.757.02.69.4640x640AGPL-3.0
YOLO26-M69.752.584.458.74.420.1640x640AGPL-3.0
YOLO26-L71.154.185.059.35.725.3640x640AGPL-3.0
YOLO26-X74.056.985.660.09.656.9640x640AGPL-3.0
LW-DETR-T60.742.984.757.11.912.1640x640Apache 2.0
LW-DETR-S66.848.085.057.42.614.6640x640Apache 2.0
LW-DETR-M72.052.686.859.84.428.2640x640Apache 2.0
LW-DETR-L74.656.187.461.56.946.8640x640Apache 2.0
LW-DETR-X76.958.387.962.113.0118.0640x640Apache 2.0
D-FINE-N60.242.784.458.22.13.8640x640Apache 2.0
D-FINE-S67.650.685.360.33.510.2640x640Apache 2.0
D-FINE-M72.655.085.560.65.419.2640x640Apache 2.0
D-FINE-L74.957.286.461.67.531.0640x640Apache 2.0
D-FINE-X76.859.386.962.211.562.0640x640Apache 2.0
</details>

Segmentation

<img alt="rf_detr_1-4_latency_accuracy_instance_segmentation" src="https://storage.googleapis.com/com-roboflow-marketing/rf-detr/rf_detr_1-4_latency_accuracy_instance_segmentation.png" /> <details> <summary>See instance segmentation benchmark numbers</summary> <br>
ArchitectureCOCO AP<sub>50</sub>COCO AP<sub>50:95</sub>Latency (ms)Params (M)ResolutionLicense
RF-DETR-Seg-N63.040.33.433.6312x312Apache 2.0
RF-DETR-Seg-S66.243.14.433.7384x384Apache 2.0
RF-DETR-Seg-M68.445.35.935.7432x432Apache 2.0
RF-DETR-Seg-L70.547.18.836.2504x504Apache 2.0
RF-DETR-Seg-XL72.248.813.538.1624x624Apache 2.0
RF-DETR-Seg-2XL73.149.921.838.6768x768Apache 2.0
YOLOv8-N-Seg45.628.33.53.4640x640AGPL-3.0
YOLOv8-S-Seg53.834.04.211.8640x640AGPL-3.0
YOLOv8-M-Seg58.237.37.027.3640x640AGPL-3.0
YOLOv8-L-Seg60.539.09.746.0640x640AGPL-3.0
YOLOv8-XL-Seg61.339.514.071.8640x640AGPL-3.0
YOLOv11-N-Seg47.830.03.62.9640x640AGPL-3.0
YOLOv11-S-Seg55.435.04.610.1640x640AGPL-3.0
YOLOv11-M-Seg60.038.56.922.4640x640AGPL-3.0
YOLOv11-L-Seg61.539.58.327.6640x640AGPL-3.0
YOLOv11-XL-Seg62.440.113.762.1640x640AGPL-3.0
YOLO26-N-Seg54.334.72.312.7640x640AGPL-3.0
YOLO26-S-Seg62.440.23.4710.4640x640AGPL-3.0
YOLO26-M-Seg67.844.06.3223.6640x640AGPL-3.0
YOLO26-L-Seg69.845.57.5828.0640x640AGPL-3.0
YOLO26-X-Seg71.646.812.9262.8640x640AGPL-3.0
</details>

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.

python
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)
<details> <summary>Run RF-DETR with Inference</summary> <br>

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.

python
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)
</details>
SizeRF-DETR package classInference package aliasCOCO AP<sub>50</sub>COCO AP<sub>50:95</sub>Latency (ms)Params (M)ResolutionLicense
NRFDETRNanorfdetr-nano67.648.42.330.5384x384Apache 2.0
SRFDETRSmallrfdetr-small72.153.03.532.1512x512Apache 2.0
MRFDETRMediumrfdetr-medium73.654.74.433.7576x576Apache 2.0
LRFDETRLargerfdetr-large75.156.56.833.9704x704Apache 2.0
XLRFDETRXLargerfdetr-xlarge77.458.611.5126.4700x700PML 1.0
2XLRFDETR2XLargerfdetr-2xlarge78.560.117.2126.9880x880PML 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.

python
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)
<details> <summary>Run RF-DETR-Seg with Inference</summary> <br>

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.

python
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)
</details>
SizeRF-DETR package classInference package aliasCOCO AP<sub>50</sub>COCO AP<sub>50:95</sub>Latency (ms)Params (M)ResolutionLicense
NRFDETRSegNanorfdetr-seg-nano63.040.33.433.6312x312Apache 2.0
SRFDETRSegSmallrfdetr-seg-small66.243.14.433.7384x384Apache 2.0
MRFDETRSegMediumrfdetr-seg-medium68.445.35.935.7432x432Apache 2.0
LRFDETRSegLargerfdetr-seg-large70.547.18.836.2504x504Apache 2.0
XLRFDETRSegXLargerfdetr-seg-xlarge72.248.813.538.1624x624Apache 2.0
2XLRFDETRSeg2XLargerfdetr-seg-2xlarge73.149.921.838.6768x768Apache 2.0

Train Models

RF-DETR supports training for both object detection and instance segmentation. 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.

bibtex
@misc{rf-detr, title={RF-DETR: Neural Architecture Search for Real-Time Detection Transformers}, author={Isaac Robinson and Peter Robicheaux and Matvei Popov and Deva Ramanan and Neehar Peri}, year={2025}, eprint={2511.09554}, archivePrefix={arXiv}, primaryClass={cs.CV}, 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.

<p align="center"> <a href="https://youtube.com/roboflow"><img src="https://media.roboflow.com/notebooks/template/icons/purple/youtube.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949634652" width="3%"/></a> <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/> <a href="https://roboflow.com"><img src="https://media.roboflow.com/notebooks/template/icons/purple/roboflow-app.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949746649" width="3%"/></a> <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/> <a href="https://www.linkedin.com/company/roboflow-ai/"><img src="https://media.roboflow.com/notebooks/template/icons/purple/linkedin.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633691" width="3%"/></a> <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/> <a href="https://docs.roboflow.com"><img src="https://media.roboflow.com/notebooks/template/icons/purple/knowledge.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949634511" width="3%"/></a> <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/> <a href="https://discuss.roboflow.com"><img src="https://media.roboflow.com/notebooks/template/icons/purple/forum.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633584" width="3%"/></a> <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/> <a href="https://blog.roboflow.com"><img src="https://media.roboflow.com/notebooks/template/icons/purple/blog.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633605" width="3%"/></a> </p>

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from roboflow/rf-detr via the GitHub API.Last fetched: 6/14/2026