Roboflow

Roboflow: RF-DETR

RF-DETR Overview

RF-DETR is a real-time transformer-based object detection model developed by Roboflow, with code and weights first released in March 2025 under the Apache 2.0 license. It is the first real-time model to exceed 60 AP on the Microsoft COCO benchmark, built on a DINOv2 vision transformer backbone with weight-sharing neural architecture search used to identify accuracy-latency trade-offs. The full family spans six sizes from Nano (30.5M parameters, 384×384 input) to 2XL (126.9M parameters, 880×880 input), with the accompanying research paper accepted to ICLR 2026.

RF-DETR is designed for strong domain adaptability, achieving state-of-the-art performance on RF100-VL, a benchmark measuring generalization to real-world object detection tasks across diverse domains. It is deployable through Roboflow Inference and supports fine-tuning on custom datasets, making it well suited for domain-specific applications with limited training data.

RF-DETR Interactive Demo

RF-DETR Details & Performance

Details

Vision Tasks

Object Detection

Features

Real-Time Vision

Usage

Past 30 Days

Performance

Avg. Latency

Alternatives to RF-DETR

Other models worth comparing for similar use cases.

Baidu
RT-DETR
RT-DETR (Real-Time Detection Transformer) is an object detection model developed by Baidu, released in April 2023 under the Apache 2.0 license. It is the first transformer-based real-time object detector, addressing the inference speed limitations of earlier DETR models through an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, enabling the model to process multi-scale features without the high computational overhead of standard transformer encoders.RT-DETR achieves 53.1% AP on COCO at 108 FPS on an NVIDIA T4 GPU for the RT-DETR-L variant, outperforming comparably sized YOLO detectors at similar speeds. It maintains end-to-end inference without non-maximum suppression, simplifying deployment pipelines. RT-DETR established the baseline for real-time transformer detection and has been extended by subsequent works including RF-DETR and RT-DETRv2.
RF-DETR Segmentation
RF-DETR Segmentation is a real-time instance segmentation model developed by Roboflow, with a preview base model released in October 2025 under the Apache 2.0 license and the full variant family — Nano through 2XL — released in January 2026. It extends the RF-DETR object detection architecture with a segmentation head inspired by MaskDINO, enabling pixel-level object delineation while maintaining the real-time performance characteristics of the base model. It is deployable through Roboflow Inference and the open-source rfdetr Python package.RF-DETR Segmentation supports fine-tuning on custom COCO- or YOLO-format instance segmentation datasets and is benchmarked on Microsoft COCO. It is suited for applications requiring both precise object masks and real-time inference, such as robotic manipulation, quality control, and augmented reality overlays.
Deci AI
YOLO-NAS
YOLO-NAS is an object detection model developed by Deci AI, released in May 2023 as part of the super-gradients open-source training library. The architecture was generated using Deci's proprietary Neural Architecture Search technology, AutoNAC, which searches for network structures that balance accuracy and inference latency on target hardware. This produced three model sizes (small, medium, and large) featuring quantization-friendly blocks that reduce accuracy loss when converting weights to INT8 precision for deployment on edge devices and mobile hardware.YOLO-NAS achieves competitive accuracy-latency tradeoffs against YOLOv5, YOLOv6, YOLOv7, and YOLOv8 on the Microsoft COCO benchmark at release, and ships with pretraining on Objects365 in addition to COCO. Note that YOLO-NAS uses a custom license: the surrounding super-gradients framework code is Apache-2.0, but the YOLO-NAS model weights are released under a separate non-commercial license that restricts production and commercial use. Teams evaluating YOLO-NAS for commercial applications should review the LICENSE.YOLONAS.md terms directly. Deci AI was acquired by NVIDIA in April 2024, and the super-gradients repository is no longer actively maintained by the original team. Users can still download and use the released weights, but no further updates or new variants are expected.
Meta
DETR
DETR (Detection Transformer) is an end-to-end object detection model developed by Facebook Research (Meta), released in May 2020. It is one of the first models to eliminate hand-crafted components such as anchor generation and non-maximum suppression by framing object detection as a direct set prediction problem, solved with a transformer encoder-decoder architecture built on top of a CNN backbone.DETR achieves 42.0% AP on the COCO benchmark with a ResNet-50 backbone, performing comparably to a well-tuned Faster R-CNN at the time of release. Its attention-based design allows it to reason about global context and long-range dependencies within an image. DETR is primarily used as a research baseline and architectural reference, with subsequent works such as Deformable DETR and DINO building on its foundations to address its slower training convergence and limited small-object detection capability.
HuggingFace
YOLOS
YOLOS (You Only Look at One Sequence) is a transformer-based object detection model widely distributed through Hugging Face Transformers, released in June 2021 under the MIT license. It applies a minimally adapted Vision Transformer to object detection by representing both the image and detection tokens as a flat sequence processed by standard multi-head self-attention, without convolutional components or feature pyramid networks. The architecture demonstrates that detection can be performed without region proposals or multi-scale feature fusion.YOLOS achieves moderate performance on COCO relative to purpose-built detectors, with its primary contribution being a demonstration of the transferability of ViT pre-training to detection tasks. It is most appropriate for research contexts exploring transformer-based detection architectures and for scenarios where architectural simplicity is preferred over peak accuracy.
Google
MobileNet SSD v2
MobileNet SSD v2 is a lightweight object detection model developed by Google Research, released in January 2018. It combines the MobileNetV2 backbone with the Single Shot MultiBox Detector (SSD) framework to produce a model optimized for inference on mobile and edge devices. MobileNetV2 introduces inverted residuals and linear bottlenecks to reduce computation while maintaining representational capacity compared to its predecessor.MobileNet SSD v2 is designed for real-time on-device detection, making it suitable for mobile apps, embedded systems, and IoT devices. It performs object detection across a fixed set of categories and can be fine-tuned on custom datasets. It trades peak accuracy for reduced inference cost and model size relative to larger two-stage detectors.

Deploy RF-DETR with an API

RF-DETR runs as a hosted REST endpoint through Roboflow Workflows. Pick a task, then hand the prompt to your coding agent or copy the code. Deploying the workflow into a free Roboflow workspace replaces the your-workspace and YOUR_API_KEY placeholders with your own.

Connect your agent to Roboflow (once)

Add the Roboflow MCP server

claude mcp add --transport http roboflow https://mcp.roboflow.com/mcp

Run /mcp and authorize Roboflow in your browser when the OAuth flow opens.

Start a new Claude Code session so the MCP loads, then paste the prompt below (it works the same in any agent).

Deploy this workflow to your Roboflow workspace to use it.

Integrate the Roboflow "RF-DETR" workflow into my app.

- Endpoint: POST https://serverless.roboflow.com/<your-workspace>/workflows/rf-detr-object-detection-coco-medium
- Auth: send my Roboflow API key as `api_key` in the request body, read from the ROBOFLOW_API_KEY env var (never hardcode).
- Body: { "api_key": ..., "inputs": { `image`: { type: "url" | "base64", value } } }.

With the Roboflow MCP connected, call `workflows_get` on "rf-detr-object-detection-coco-medium" to read the exact input schema (the source of truth), then `workflows_run` on a sample image to confirm the output shape before writing code (the MCP is authenticated, so this needs no key). Without the MCP, use the contract above.

Before running the app, set up these keys so it does not error at runtime:
- `ROBOFLOW_API_KEY` (sent as `api_key`) from https://app.roboflow.com/settings/api
Create a .gitignore'd .env with these variables, using placeholder values for any I haven't given you. Then pause and tell me directly, in your reply: the full path to the .env file, exactly which keys I need to paste in, and the link to get each one. Wait for me to confirm I've added them before you run anything. Do not run the app until I confirm.

Then add the integration to my codebase: match my project's language, framework, and conventions; read every key from environment variables (never hardcode); add basic error handling; and include a small runnable example. If you can't tell what language my project uses, ask me.
Installpip install inference-sdk

Deploy this workflow to your Roboflow workspace to use it.

# 1. Import the library
from inference_sdk import InferenceHTTPClient

# 2. Connect to your workflow
client = InferenceHTTPClient(
  api_url="https://serverless.roboflow.com",
  api_key="YOUR_API_KEY"
)

# 3. Run your workflow on an image
result = client.run_workflow(
  workspace_name="your-workspace",
  workflow_id="rf-detr-object-detection-coco-medium",
  images={
    "image": "YOUR_IMAGE.jpg"  # Path to your image file
  },
  use_cache=True  # cache workflow definition for 15 minutes
)

# 4. Get your results
print(result)

Deploy this workflow to your Roboflow workspace to use it.

const response = await fetch('https://serverless.roboflow.com/your-workspace/workflows/rf-detr-object-detection-coco-medium', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    inputs: {
      "image": {"type": "url", "value": "IMAGE_URL"}
    }
  })
});

const result = await response.json();
console.log(result);

Deploy this workflow to your Roboflow workspace to use it.

curl --location 'https://serverless.roboflow.com/your-workspace/workflows/rf-detr-object-detection-coco-medium' \
--header 'Content-Type: application/json' \
--data '{
  "api_key": "YOUR_API_KEY",
  "inputs": {
    "image": {"type": "url", "value": "IMAGE_URL"}
  }
}'

RF-DETR License

Apache-2.0 · Permissive license

RF-DETR is released under Apache-2.0, a permissive license. The RF-DETR license lets you run, fine-tune, and redistribute the model in commercial products with no obligation to open-source related code changes, so no separate commercial license is required.

Commercial use
Permitted. Because Apache-2.0 is permissive, RF-DETR can ship inside paid products and internal systems with no commercial license and no revenue threshold.
Modification
Permitted. Fine-tuning, quantizing, and distilling are all allowed, and your code changes can stay closed. Files you change must be marked as changed.
Redistribution
Permitted with attribution. Ship the Apache-2.0 license text and any NOTICE file alongside the weights or derived code.

Apache-2.0 grants an express patent license that terminates if you bring a patent claim over the work, and it disclaims warranties. Validate RF-DETR on your own data before you depend on it in production.

Read the full Apache 2.0 license ↗

Do I need a commercial license for RF-DETR?

This is the straightforward case: a permissive license is the best technical solution and you are free to deploy RF-DETR commercially without open-sourcing your own code.

Do not hesitate to reach out with questions for your commercial project — our team will help you start solving business problems on the first call. See Roboflow commercial licensing for the models included in each plan.

Talk to sales

This model is released under the Apache License 2.0, a permissive open-source license that allows commercial use, modification, distribution, and patent use.

Yes. Under the terms of the Apache 2.0 license, you can freely use this model for commercial purposes, including in proprietary products. You must retain the copyright notice and disclaimers when redistributing.

RF-DETR Nano, Small, Medium, and Large are released under the Apache 2.0 license. RF-DETR XL and 2XL are released under Roboflow's PML 1.0 license. See the Roboflow Licensing guide for commercial-use terms across variants.

License information is provided as a guide and is not legal advice.

Frequently Asked Questions About RF-DETR

RF-DETR is a pretrained computer vision model for object detection. Unlike a general vision language model, it returns structured predictions for its task rather than free text.

RF-DETR comes in 6 sizes: Nano (384×384), Small (512×512), Medium (576×576), Large (704×704), XL (700×700), 2XL (880×880). Smaller variants run faster on constrained hardware; larger ones trade speed for accuracy. You can switch sizes in the demo to compare them on the same image.

Yes. The demo on this page runs RF-DETR in the free Roboflow Playground: upload an image and see results in seconds. A free account unlocks unlimited runs.