Skip to content
ModelListedExternal
Download

Rf Detr Large

RF-DETR is a real-time detection transformer family introduced in RF-DETR: Neural Architecture Search for Real-Time Detection Transformers by Robinson et al. and integrated in 🤗 Transformers via PR #36895.

KindOtherVersionRevision f62f7dd

Model source

Kind
Other
File size
130 MB
Version
vRevision f62f7dd
Updated
Sep 27, 2026
Downloads
4.1K
Tasks
Object detection
Source
Hugging Face

Source description

RF-DETR (Large)

RF-DETR is a real-time detection transformer family introduced in RF-DETR: Neural Architecture Search for Real-Time Detection Transformers by Robinson et al. and integrated in 🤗 Transformers via PR #36895.

Model description

RF-DETR is an end-to-end object detection model that combines ideas from LW-DETR and Deformable DETR: a DINOv2-with-registers style ViT backbone (with an RF-DETR windowing pattern for efficient attention), a multi-scale projector between encoder and decoder, and a multi-scale deformable DETR decoder for fast convergence and strong accuracy–latency tradeoffs.

Key Architectural Details:

  • Backbone: DINOv2-with-registers style ViT with RF-DETR windowed / full attention alternation (instead of a purely convolutional encoder).
  • Multi-scale fusion: RF-DETR multi-scale projector (C2f-style blocks in the LW-DETR lineage) to aggregate multi-level backbone features before the decoder.
  • Decoder: Deformable DETR-style decoder with multi-scale deformable cross-attention; depth and input resolution vary by checkpoint (NAS frontier).
  • Queries: DETR-style object queries with bipartite matching and auxiliary decoder losses for training stability.

Training Details:

  • Detection losses: classification plus bounding-box L1 and GIoU, with auxiliary losses on intermediate decoder layers.
  • Group DETR: parallel decoder copies during training for faster convergence (same high-level idea as LW-DETR's Group DETR).
  • NAS (family-level): the RF-DETR paper uses weight-sharing neural architecture search over practical accuracy–latency knobs after adapting a shared backbone on the target dataset, so many checkpoints correspond to different subnets without full independent retrains for every point on the frontier.

How to use

You can use the raw model for object detection. See the model hub to look for all available RF-DETR models.

Here is how to use this model:

from transformers import AutoImageProcessor, RfDetrForObjectDetection
import torch
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

processor = AutoImageProcessor.from_pretrained("stevenbucaille/rf-detr-large")
model = RfDetrForObjectDetection.from_pretrained("stevenbucaille/rf-detr-large")

inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)

# convert outputs (bounding boxes and class logits) to COCO API
# let's only keep detections with score > 0.35
target_sizes = torch.tensor([image.size[::-1]])
results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.35)[0]

for score, label, box in list(zip(results["scores"], results["labels"], results["boxes"]))[:8]:
    box = [round(i, 2) for i in box.tolist()]
    print(
            f"Detected {model.config.id2label[label.item()]} with confidence "
            f"{round(score.item(), 3)} at location {box}"
    )

This should output:

Detected remote with confidence 0.99 at location [40.68, 73.34, 175.62, 118.01]
Detected cat with confidence 0.986 at location [348.33, 24.59, 640.12, 373.98]
Detected cat with confidence 0.986 at location [13.36, 54.71, 316.59, 473.24]
Detected remote with confidence 0.947 at location [334.29, 76.64, 370.47, 187.34]
Detected couch with confidence 0.549 at location [1.67, 0.92, 639.56, 474.81]
Detected remote with confidence 0.135 at location [338.6, 76.26, 369.93, 130.59]
Detected remote with confidence 0.268 at location [258.99, 54.31, 291.03, 78.72]
Detected remote with confidence 0.119 at location [335.04, 150.52, 352.63, 186.95]

Training data

These checkpoints are trained on the standard COCO 2017 object detection dataset label space (80 categories) as reflected in config.id2label.

BibTeX entry and citation info

@misc{robinson2026rfdetrneuralarchitecturesearch,
      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={2026},
      eprint={2511.09554},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://huggingface.co/papers/2511.09554},
}

This model was originally contributed by stevenbucaille in 🤗 transformers.

Sources

1 source
Hugging FacePrimaryVersion f62f7dd5252b61097cbace33886045816dadbde9
huggingface.co/Roboflow/rf-detr-large/tree/f62f7dd5252b61097cbace33886045816dadbde9

Verified Sep 27

Model artifacts

1 artifact

model.safetensors

safetensors · 130 MB · SHA-256 1ec604598aea…cd7d · Hugging Face

Download

Source excerpts

2 excerpts

--- license: apache-2.0 tags: - object-detection - vision datasets: - coco pipeline_tag: object-detection library_name: transformers --- # RF-DETR (Large) RF-DETR is a real-time detection transformer family introduced in [RF-DETR: Neural Architecture Search for Real-Time Detection Transformers](https://huggingface.co/papers/2511.09554) by Robinson et al. and integrated in 🤗 Transformers via [PR #36895](https://github.com/huggingface/transformers/pull/36895). ## Model description RF-DETR is an end-to-end object detection model that combines ideas from LW-DETR and Deformable DETR: a DINOv2-with-registers style ViT backbone (with an RF-DETR windowing pattern for efficient attention), a multi-scale projector between encoder and decoder, and a multi-scale deformable DETR decoder for fast convergence and strong accuracy–latency tradeoffs. Key Architectural Details: - **Backbone:** DINOv2-with-registers style ViT with RF-DETR **windowed / full** attention alternation (instead of a purely convolutional encoder). - **Multi-scale fusion:** **RF-DETR multi-scale projector** (C2f-style blocks in the LW-DETR lineage) to aggregate multi-level backbone features before the decoder. - **Decoder:** **Deformable DETR**-style decoder with multi-scale deformable cross-attention; depth and input resolution vary by checkpoint (NAS frontier). - **Queries:** DETR-style object queries with bipartite matching and auxiliary decoder losses for training stability. Training Details: - **Detection losses:** classification plus bounding-box L1 and GIoU, with auxiliary losses on intermediate decoder layers. - **Group DETR:** parallel decoder copies during training for faster convergence (same high-level idea as LW-DETR's Group DETR). - **NAS (family-level):** the RF-DETR paper uses weight-sharing neural architecture search over practical accuracy–latency knobs after adapting a shared backbone on the target dataset, so many checkpoints correspond to different subnets without full independent retrains for every point on the frontier. ### How to use You can use the raw model for object detection. See the [model hub](https://huggingface.co/models?search=stevenbucaille/rf-detr) to look for all available RF-DETR models. Here is how to use this model: ```python from transformers import AutoImageProcessor, RfDetrForObjectDetection import torch from PIL import Image import requests url...

Source context: 4081 downloads · 17 likes · Pipeline object-detection · Library transformers · Repo Roboflow/rf-detr-large