whatisgithub

What is rf-detr?

roboflow/rf-detr — explained in plain English

Analysis updated 2026-06-22

7,063PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

RF-DETR is a Python library for detecting objects and tracing their precise outlines in images and video, using a vision transformer model that balances speed and accuracy across multiple size variants.

Mindmap

mindmap
  root((rf-detr))
    What it does
      Object detection
      Instance segmentation
      Fine-tuning support
    Tech stack
      Python
      DINOv2 backbone
      PyTorch
    Use cases
      App integration
      Custom dataset training
      Video analysis
    Setup
      pip install
      Colab notebook
      Hugging Face demo
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add object detection to your app to automatically find and label specific items in photos or video

USE CASE 2

Fine-tune the model on your own labeled dataset so it detects custom objects unique to your project

USE CASE 3

Run instance segmentation to trace the exact outline of each detected object, not just a bounding box

What is it built with?

PythonPyTorchDINOv2CUDAHugging FaceGoogle Colab

How does it compare?

roboflow/rf-detrschollz/howmanypeoplearearoundyangchris11/samurai
Stars7,0637,0617,065
LanguagePythonPythonPython
Setup difficultymoderatemoderatehard
Complexity3/52/54/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

A GPU is strongly recommended for practical inference speed, CPU-only use is possible but significantly slower.

Smaller and medium model variants are free for any use under Apache 2.0, the two largest variants require a separate commercial license.

So what is it?

RF-DETR is a Python library from Roboflow for detecting objects and segmenting their shapes in images and video. Object detection means locating specific things in an image and drawing a box around each one. Instance segmentation goes further and traces the precise outline of each detected object. RF-DETR does both through the same simple interface. The model was accepted at ICLR 2026, a major academic machine learning conference, and achieves top results on COCO, the standard benchmark used to compare object detection models. It is built on a type of neural network called a vision transformer, specifically using a backbone called DINOv2 developed by Meta. Compared to similarly fast models, it offers a strong balance between speed and accuracy. Multiple size variants are available: smaller versions run faster and use less memory, while larger ones achieve higher accuracy. The smaller to medium variants are released under the Apache 2.0 open-source license, while the two largest variants use a more restrictive commercial license. To use RF-DETR, you install it with a single pip command in a Python 3.10 or newer environment. You can then load a pre-trained model and run detection on your own images or video in a few lines of code. The library also supports fine-tuning on your own labeled dataset if you want the model to specialize in detecting particular objects. Roboflow provides a notebook on Google Colab showing the fine-tuning process end to end, and the model can be used directly through a Hugging Face web interface if you want to test it without installing anything. The library integrates with Roboflow's broader tooling for building computer vision applications, but the core detection and segmentation features work independently. A Discord community is available for questions and support.

Copy-paste prompts

Prompt 1
Using the RF-DETR Python library, write code to load a pre-trained model and detect all objects in a local image file, then draw bounding boxes with labels on the result.
Prompt 2
Help me fine-tune RF-DETR on a custom Roboflow dataset to detect only the specific objects relevant to my project, show me the full training setup.
Prompt 3
How do I run RF-DETR inference on a video file and save the output with detected objects highlighted frame by frame?
Prompt 4
Compare RF-DETR model sizes for real-time GPU inference: which variant gives the best speed without sacrificing too much accuracy?

Frequently asked questions

What is rf-detr?

RF-DETR is a Python library for detecting objects and tracing their precise outlines in images and video, using a vision transformer model that balances speed and accuracy across multiple size variants.

What language is rf-detr written in?

Mainly Python. The stack also includes Python, PyTorch, DINOv2.

What license does rf-detr use?

Smaller and medium model variants are free for any use under Apache 2.0, the two largest variants require a separate commercial license.

How hard is rf-detr to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is rf-detr for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.