RF-DETR for TI EdgeAI

Real-Time Transformer Detection with a DINOv2 Backbone

License Framework Task Dataset


Overview

RF-DETR is a real-time transformer-based object detection (and instance segmentation) architecture developed by Roboflow, achieving state-of-the-art accuracy/latency trade-offs on COCO (presented at ICLR 2026). It builds on a DINOv2 ViT backbone paired with a DETR-style decoder and a hierarchical feature pyramid, giving it strong small-object and dense-scene performance without the NMS and anchor-tuning overhead of traditional detectors.

RF-DETR ships in six size variants, Nano through 2XLarge, for flexible accuracy-speed trade-offs. The Nano through Large variants are released under Apache 2.0; XLarge and 2XLarge require the rfdetr[plus] extra and are licensed under PML 1.0. This folder packages the ONNX exports and TIDL configs for the Apache-licensed detection variants (Nano/Small/Medium/Large); the prepare_model.py script can additionally export the PML-licensed XLarge/2XLarge detection variants and the segmentation family on request.


Model Variants

Model Input Size mAP[.5:.95]% mAP[.50]% Validated Devices Config
rfdetr_nano 384Γ—384 48.4 67.6 TDA4VH rfdetr_nano_config.yaml
rfdetr_small 512Γ—512 53.0 72.1 TDA4VH rfdetr_small_config.yaml
rfdetr_medium 576Γ—576 54.7 73.6 TDA4VH rfdetr_medium_config.yaml
rfdetr_large 704Γ—704 56.5 75.1 TDA4VH rfdetr_large_config.yaml

mAP values are on COCO val2017. rfdetr_xlarge (700Γ—700, mAP[.5:.95] 58.6) and rfdetr_2xlarge (880Γ—880, mAP[.5:.95] 60.1) are available via prepare_model.py --plus but are licensed under PML 1.0 and are not shipped as ONNX/config files in this folder.

Recommended for edge deployment: rfdetr_nano (best accuracy/compute trade-off, smallest)


Quick Start

Prerequisites

# ONNX export dependencies
pip install "rfdetr[onnx]"

# For XLarge / 2XLarge variants (PML 1.0 license)
pip install "rfdetr[onnx,plus]"

# Inference and deployment
pip install onnx>=1.22.0
pip install onnxruntime>=1.23.2

Export the Model

# List all available variants with accuracy and latency info
python prepare_model.py --list-models

# Export the default model (rfdetr_nano)
python prepare_model.py

# Export a specific model variant
python prepare_model.py --model rfdetr_medium

# Export multiple variants at once
python prepare_model.py --model rfdetr_nano rfdetr_small rfdetr_medium rfdetr_large

# Export XLarge / 2XLarge (requires rfdetr[plus], PML 1.0 license)
python prepare_model.py --model rfdetr_xlarge rfdetr_2xlarge --plus

The script automatically:

  • Installs rfdetr[onnx] (or rfdetr[onnx,plus] for XLarge/2XLarge) if not already present
  • Downloads pretrained COCO weights from HuggingFace on first use
  • Exports the selected variant(s) to ONNX (opset 17 by default, static batch dimension)
  • Saves the result as rfdetr_<variant>.onnx in the output directory

Compile and Infer uing edgeai-tidlrunner

Note: Run the commands below from inside the tidlrunner directory (the cloned edgeai-tidlrunner repository), with --config_path pointing to this model's config file.

Compile using edgeai-tidlrunner - on PC

cd /path/to/edgeai-tidlrunner
tidlrunner-cli compile --target_device J784S4 \
  --config_path /path/to/rfdetr_nano_config.yaml

Run Inference Benchmark - on device

cd /path/to/edgeai-tidlrunner
tidlrunner-cli infer --target_device J784S4 \
  --config_path /path/to/rfdetr_nano_config.yaml

Compile and Infer using edgeai-tidl-tools (Advanced):

Follow the instructions at https://github.com/TexasInstruments/edgeai-tidl-tools

Deploy using edgeai-tidl-tools:

Deplyment can be done using edgeai-tidl-tools. For ONNX models, onnxruntime-tidl with TIDL acceleration can be used. Consult the documentation of edgeai-tidl-tools for more details.


Citation

If you use RF-DETR in your research, please cite:

@software{rfdetr2025,
  title        = {RF-DETR},
  author       = {Robinson, Isaac and Robicheaux, Peter and Popov, Matvei},
  year         = {2025},
  publisher    = {Roboflow},
  url          = {https://github.com/roboflow/rf-detr},
  note         = {International Conference on Learning Representations (ICLR) 2026}
}

πŸ”— Resources

Resource Link
RF-DETR Source Code roboflow/rf-detr
RF-DETR Documentation rfdetr.roboflow.com
RF-DETR on HuggingFace huggingface.co/roboflow
edgeai-tidl-tools GitHub
edgeai-tidlrunner GitHub
EdgeAI SDK Documentation

Related Models

RT-DETRv2 Real-time DETR variant Anchor-free, NMS-free

DEIMv2 DETR-family detector Improved matching/training

Deformable-DETR Sparse attention DETR Faster convergence

DETR Original transformer detector End-to-end set prediction


Maintained by: Texas Instruments EdgeAI Team
Last Updated: August 2026

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support