rf-detr

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

https://github.com/roboflow/rf-detr

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    1 of 14 committers (7.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.1%) to scientific vocabulary

Keywords

computer-vision detr machine-learning object-detection rf-detr

Keywords from Contributors

captioning fine-tuning florence-2 multimodal objectdetection paligemma phi-3-vision qwen2-vl transformers vision-and-language

Scientific Fields

Earth and Environmental Sciences Physical Sciences - 40% confidence
Engineering Computer Science - 40% confidence
Last synced: 4 months ago · JSON representation ·

Repository

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

Basic Info
  • Host: GitHub
  • Owner: roboflow
  • License: apache-2.0
  • Language: Python
  • Default Branch: develop
  • Homepage: https://rfdetr.roboflow.com
  • Size: 9.36 MB
Statistics
  • Stars: 2,871
  • Watchers: 37
  • Forks: 327
  • Open Issues: 121
  • Releases: 1
Topics
computer-vision detr machine-learning object-detection rf-detr
Created 10 months ago · Last pushed 4 months ago
Metadata Files
Readme Contributing License Citation

README.md

RF-DETR: SOTA Real-Time Object Detection Model

version downloads python-version license

hf space colab roboflow discord

RF-DETR is a real-time, transformer-based object detection model developed by Roboflow and released under the Apache 2.0 license.

RF-DETR-N outperforms YOLO11-N by 10 mAP points on the Microsoft COCO benchmark while running faster at inference. On RF100-VL, RF-DETR achieves state-of-the-art results, with RF-DETR-M beating YOLO11-M by an average of 5 mAP points across aerial datasets including drone, satellite, and radar.

rf-detr-tutorial-banner

News

  • 2025/09/02: RF-DETR fine-tuning YouTube tutorial released. Learn step-by-step how to fine-tune RF-DETR on your custom dataset.
  • 2025/07/23: Released three new checkpoints for RF-DETR: Nano, Small, and Medium.
  • 2025/05/16: Added optimize_for_inference method, improving native PyTorch inference speed by up to 2x depending on platform.
  • 2025/04/03: Introduced early stopping, gradient checkpointing, metric saving, training resume, TensorBoard, and W&B logging.
  • 2025/03/20: Released RF-DETR real-time object detection model. Code and checkpoints for RF-DETR-Large and RF-DETR-Base are available.

Results

RF-DETR achieves state-of-the-art performance on both the Microsoft COCO and the RF100-VL benchmarks.

rf-detr-coco-rf100-vl-9

| Architecture | COCO AP50 | COCO AP50:95 | RF100VL AP50 | RF100VL AP50:95 | Latency (ms) | Params (M) | |:------------:|:--------------------:|:--------------------------:|:--------------------------:|:---------------------------:|:---------------:|:------------:| | RF-DETR-N | 67.6 | 48.4 | 84.1 | 57.1 | 2.32 | 30.5 | | RF-DETR-S | 72.1 | 53.0 | 85.9 | 59.6 | 3.52 | 32.1 | | RF-DETR-M | 73.6 | 54.7 | 86.6 | 60.6 | 4.52 | 33.7 | | YOLO11-N | 52.0 | 37.4 | 81.4 | 55.3 | 2.49 | 2.6 | | YOLO11-S | 59.7 | 44.4 | 82.3 | 56.2 | 3.16 | 9.4 | | YOLO11-M | 64.1 | 48.6 | 82.5 | 56.5 | 5.13 | 20.1 | | YOLO11-L | 65.3 | 50.2 | x | x | 6.65 | 25.3 | | YOLO11-X | 66.5 | 51.2 | x | x | 11.92 | 56.9 | | LW-DETR-T | 60.7 | 42.9 | x | x | 1.91 | 12.1 | | LW-DETR-S | 66.8 | 48.0 | 84.5 | 58.0 | 2.62 | 14.6 | | LW-DETR-M | 72.0 | 52.6 | 85.2 | 59.4 | 4.49 | 28.2 | | D-FINE-N | 60.2 | 42.7 | 83.6 | 57.7 | 2.12 | 3.8 | | D-FINE-S | 67.6 | 50.7 | 84.5 | 59.9 | 3.55 | 10.2 | | D-FINE-M | 72.6 | 55.1 | 84.6 | 60.2 | 5.68 | 19.2 |

See our benchmark notes in the RF-DETR documentation.

We are actively working on RF-DETR Large and X-Large models using the same techniques we used to achieve the strong accuracy that RF-DETR Medium attains. This is why RF-DETR Large and X-Large is not yet reported on our pareto charts and why we haven't benchmarked other models at similar sizes. Check back in the next few weeks for the launch of new RF-DETR Large and X-Large models.

Installation

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

bash 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. ```bash pip install git+https://github.com/roboflow/rf-detr.git ```

Inference

The easiest path to deployment is using Roboflow's Inference package.

The code below lets you run rfdetr-base on an image:

```python import os import supervision as sv from inference import get_model from PIL import Image from io import BytesIO import requests

url = "https://media.roboflow.com/dog.jpeg" image = Image.open(BytesIO(requests.get(url).content))

model = get_model("rfdetr-base")

predictions = model.infer(image, confidence=0.5)[0]

detections = sv.Detections.from_inference(predictions)

labels = [prediction.class_name for prediction in predictions.predictions]

annotatedimage = image.copy() annotatedimage = sv.BoxAnnotator(color=sv.ColorPalette.ROBOFLOW).annotate(annotatedimage, detections) annotatedimage = sv.LabelAnnotator(color=sv.ColorPalette.ROBOFLOW).annotate(annotated_image, detections, labels) ```

Predict

You can also use the .predict method to perform inference during local development. The .predict() method accepts various input formats, including file paths, PIL images, NumPy arrays, and torch tensors. Please ensure inputs use RGB channel order. For torch.Tensor inputs specifically, they must have a shape of (3, H, W) with values normalized to the [0..1) range. If you don't plan to modify the image or batch size dynamically at runtime, you can also use .optimize_for_inference() to get up to 2x end-to-end speedup, depending on platform.

```python import io import requests import supervision as sv from PIL import Image from rfdetr import RFDETRBase from rfdetr.util.cococlasses import COCOCLASSES

model = RFDETRBase()

model.optimizeforinference()

url = "https://media.roboflow.com/notebooks/examples/dog-2.jpeg"

image = Image.open(io.BytesIO(requests.get(url).content)) detections = model.predict(image, threshold=0.5)

labels = [ f"{COCOCLASSES[classid]} {confidence:.2f}" for classid, confidence in zip(detections.classid, detections.confidence) ]

annotatedimage = image.copy() annotatedimage = sv.BoxAnnotator().annotate(annotatedimage, detections) annotatedimage = sv.LabelAnnotator().annotate(annotated_image, detections, labels)

sv.plotimage(annotatedimage) ```

Train a Model

You can fine-tune an RF-DETR Nano, Small, Medium, and Base model with a custom dataset using the rfdetr Python package.

Read our training tutorial to get started

Documentation

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

License

Both the code and the weights pretrained on the COCO dataset are released under the Apache 2.0 license.

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 @software{rf-detr, author = {Robinson, Isaac and Robicheaux, Peter and Popov, Matvei}, license = {Apache-2.0}, title = {RF-DETR}, howpublished = {\url{https://github.com/roboflow/rf-detr}}, year = {2025}, note = {SOTA Real-Time Object Detection Model} }

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.

Owner

  • Name: Roboflow
  • Login: roboflow
  • Kind: organization
  • Email: hello@roboflow.com
  • Location: United States of America

Citation (CITATION.cff)

cff-version: 1.2.0
title: "RF-DETR"
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - family-names: Robinson
    given-names: Isaac
    email: isaac@roboflow.com
    affiliation: Roboflow
  - family-names: Robicheaux
    given-names: Peter
    email: peter@roboflow.com
    affiliation: Roboflow
  - family-names: Popov
    given-names: Matvei
    email: matvei@roboflow.com
    affiliation: Roboflow
repository-code: 'https://github.com/roboflow/rf-detr'
abstract: 'A state-of-the-art, real-time object detection model developed by Roboflow.'
date-released: 2025-03-20
keywords:
  - object detection
  - computer vision
  - rf-detr
  - detr
license: "Apache-2.0"

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 173
  • Total Committers: 14
  • Avg Commits per committer: 12.357
  • Development Distribution Score (DDS): 0.728
Past Year
  • Commits: 173
  • Committers: 14
  • Avg Commits per committer: 12.357
  • Development Distribution Score (DDS): 0.728
Top Committers
Name Email Commits
Piotr Skalski p****2@g****m 47
Peter Robicheaux p****r@r****m 36
Matvezy m****v@t****u 34
Isaac Robinson i****c@r****m 19
James j****g@j****g 12
Onuralp SEZER t****r@g****m 8
Mario da Graca m****a@g****e 7
Leonidas Valavanis v****s@g****m 3
farukalamai m****2@g****m 2
Fabio Milentiansen Sim f****m@g****m 1
Fazri Gading s****0@g****m 1
Joseph Nelson j****2@g****m 1
Lyuboslav Petrov p****v@g****m 1
Gaétan Dubuc g****1@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 119
  • Total pull requests: 54
  • Average time to close issues: 6 days
  • Average time to close pull requests: 3 days
  • Total issue authors: 91
  • Total pull request authors: 27
  • Average comments per issue: 2.97
  • Average comments per pull request: 1.67
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 119
  • Pull requests: 54
  • Average time to close issues: 6 days
  • Average time to close pull requests: 3 days
  • Issue authors: 91
  • Pull request authors: 27
  • Average comments per issue: 2.97
  • Average comments per pull request: 1.67
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • robmarkcole (7)
  • BotaoPeng98 (5)
  • LeMinhNgan (4)
  • Kallinteris-Andreas (3)
  • Ryan-Marchi (3)
  • Wangwang99999 (3)
  • panagiotamoraiti (3)
  • fdarvas (3)
  • XiphosF (3)
  • Abdul-Mukit (3)
  • mkrupczak3 (3)
  • DoniaDriss12 (3)
  • SebastianJanampa (3)
  • SilvaneUX (3)
  • GitGura (2)
Pull Request Authors
  • probicheaux (22)
  • isaacrob-roboflow (18)
  • Matvezy (17)
  • SkalskiP (9)
  • developer0hye (6)
  • onuralpszr (6)
  • valavanisleonidas (4)
  • sergiovillanueva (3)
  • capjamesg (3)
  • mario-dg (3)
  • farukalamai (2)
  • Ahmed-Samir11 (2)
  • panagiotamoraiti (2)
  • rajatprasun (2)
  • surya3214 (2)
Top Labels
Issue Labels
bug (30) enhancement (9) duplicate (6)
Pull Request Labels
documentation (1) bug (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 23,595 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 16
  • Total maintainers: 4
pypi.org: rfdetr-isarsoft

RF-DETR

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 11 Last month
Rankings
Dependent packages count: 8.9%
Average: 29.5%
Dependent repos count: 50.1%
Maintainers (1)
Last synced: 4 months ago
pypi.org: rfdetr

RF-DETR

  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 23,584 Last month
Rankings
Dependent packages count: 9.5%
Average: 31.4%
Dependent repos count: 53.3%
Last synced: 4 months ago

Dependencies

rfdetr/deploy/requirements.txt pypi
.github/workflows/publish-pre-release.yml actions
.github/workflows/publish-release.yml actions
pyproject.toml pypi