Skip to content
imaged

Object detection

RF-DETR Nano

Roboflow's real-time transformer detector: the most accurate in this group for its class of models. Apache-2.0.

Apache-2.0rf-detrdetrtransformercocoapache-2.0
Choose a variant

About this model

RF-DETR Nano finds objects in a photo and boxes them, among the 80 COCO classes. It is a detection transformer on a DINOv2 backbone: instead of scoring thousands of anchor boxes it predicts a fixed set of 300 objects directly, so it needs no NMS step.

Roboflow reports 48.4 mAP 50-95 (67.6 AP50) on COCO at 384 x 384 with 30.5 million parameters, under Apache-2.0.

What you can build

  • Accurate detection where the frame rate can be lower
  • Commercial apps that need an Apache-2.0 detector
  • A strong base for fine-tuning on your own classes with Roboflow's tooling

People crossing street

f16
Input
People crossing street (Unsplash)

Mike Petrucci mikepetrucci, CC0, https://commons.wikimedia.org/wiki/File:People_crossing_street_(Unsplash).jpg

Output
The photo with 10 boxes found by RF-DETR Nano
10 boxes on the Metal (FP16 pack), score 0.5 or more:
person 0.81 at [771, 373, 798, 439]
person 0.78 at [125, 359, 161, 450]
person 0.75 at [381, 361, 432, 448]
traffic light 0.73 at [881, 252, 898, 299]
traffic light 0.72 at [64, 158, 91, 222]
person 0.71 at [522, 356, 567, 445]
car 0.70 at [230, 352, 322, 423]
person 0.69 at [493, 364, 526, 441]
traffic light 0.67 at [850, 250, 873, 299]
person 0.63 at [442, 369, 466, 428]

Bus stop people

f16
Input
Moscow, Paveletskaya Square, people at bus stop Sept 2025 02

Retired electrician, CC0, https://commons.wikimedia.org/wiki/File:Moscow,_Paveletskaya_Square,_people_at_bus_stop_Sept_2025_02.jpg

Output
The photo with 10 boxes found by RF-DETR Nano
10 boxes on the Metal (FP16 pack), score 0.5 or more:
person 0.92 at [326, 218, 452, 567]
person 0.90 at [456, 215, 577, 563]
person 0.90 at [193, 229, 287, 471]
person 0.90 at [111, 240, 205, 473]
suitcase 0.89 at [527, 393, 615, 568]
backpack 0.85 at [460, 266, 535, 379]
suitcase 0.82 at [304, 422, 388, 573]
truck 0.79 at [179, 40, 320, 202]
traffic light 0.69 at [27, 67, 47, 110]
backpack 0.61 at [350, 276, 426, 394]

Office desk computer

f16
Input
Office desk with computer and music player (Unsplash)

Jeff Sheldon ugmonk, CC0, https://commons.wikimedia.org/wiki/File:Office_desk_with_computer_and_music_player_(Unsplash).jpg

Output
The photo with 2 boxes found by RF-DETR Nano
2 boxes on the Metal (FP16 pack), score 0.5 or more:
cup 0.96 at [621, 507, 776, 717]
tv 0.76 at [411, 1, 786, 415]

Variants & downloads

Choose the build for your app

Model files are hosted on Google Drive. Large files may open a confirmation page before downloading.

Standard

Slab

Weights stored in FP16: half the size of FP32, the same boxes.

Platforms: macos · android

rf-detr-nano-f16.slab

55.1 MB · Hosted download

Download
SHA-256 checksum
eb905bfadef772524e57f43271f940f7eef26e8243b99648a2647c630d1fe178

LICENSE-RF-DETR.txt

11 KB

Download
SHA-256 checksum
8cabf52c61130fc97a7e5da5e3685ccf44841c0c53d6f881189369b136603cca
Conversion details
command
curl -L -o rf-detr-nano.pth https://storage.googleapis.com/rfdetr/nano_coco/checkpoint_best_regular.pth python -c "from rfdetr import RFDETRNano; RFDETRNano(pretrain_weights='rf-detr-nano.pth').export(output_dir='.', format='onnx', opset_version=17, verbose=False)" # rfdetr 1.11.2 python -c "import sys; sys.modules['onnxruntime'] = None; import onnx, onnxslim; onnx.save(onnxslim.slim('rfdetr-nano.onnx'), 'model.onnx')" # onnxslim 0.1.98 in a fresh process, without onnxruntime: either changes how it folds constants python -c "from rfdetr.assets.coco_classes import COCO_CLASSES as C; open('labels.txt', 'w').write('\n'.join(C.get(i, 'N/A') for i in range(91)) + '\n')" slab-load convert model.onnx model.slab --input input=1x3x384x384 --meta task=detect --meta resize=stretch --meta normalize=imagenet --meta color=rgb --meta decode=detr --meta labels:labels=@labels.txt slab-load quantize model.slab rf-detr-nano-f16.slab --f16 slab-load meta set rf-detr-nano-f16.slab default_backend.macos=gpu

Integration examples

Python

python

import slab

cfg = slab.Config(cache_dir="/tmp/slab_cache", license=open("license.slablic.txt").read())
session = slab.Session(cfg, "rf-detr-nano-f16.slab", warmup=True)
out = session.run(slab.Input(frame=slab.Frame.open("photo.jpg")))
for b in out.boxes(score_threshold=0.5, iou_threshold=1.0):
    print(b.label, round(b.score, 2), b.x1, b.y1, b.x2, b.y2)

Device & backend compatibility

Pack default: macos / GPU. The fastest backend on the Mac (about 93 ms per frame); the Neural Engine finds nearly the same boxes but is slower and takes about 17 s to open.

Available execution backends for RF-DETR Nano
PlatformEngineStatusPrecision
apple

CPU

CPU

Supported

Measured on macOS.

f32
apple

Metal

GPU

Supported

Measured on macOS. The default.

f32
apple

Apple Neural Engine

NPU

Supported

Measured on macOS. The Neural Engine computes in FP16.

f16
android

CPU

CPU

Supported

Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17.

f32
android

Vulkan

GPU

Supported

Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17.

f32
android

Qualcomm Hexagon NPU (QNN)

NPU

Not supported

Tried on a Samsung Galaxy S23 Ultra (Hexagon v73): Slab's QNN backend has no translation for Expand yet.

—

Performance

Results depend on the device, runtime, and test conditions. Each measurement keeps its own context.

Mac with Apple M1 Max

Slab · CPU

macOS 26.6.2

137.1 ms

Measured time · scope below

f16Session open (ms): 24 Platform: macos Runs: 100 Input: 1, 3, 384, 384 Measured: 2026-10-28

Median of 100 warm runs of the model, box selection included (Slab's run time). From a 1920 x 1080 photo, letterboxing and decoding boxes included: 137.53 ms median.

Mac with Apple M1 Max

Slab · GPU

macOS 26.6.2

93.3 ms

Measured time · scope below

f16Session open (ms): 223 Platform: macos Runs: 100 Input: 1, 3, 384, 384 Measured: 2026-10-28

Median of 100 warm runs of the model, box selection included (Slab's run time). From a 1920 x 1080 photo, letterboxing and decoding boxes included: 93.85 ms median.

Mac with Apple M1 Max

Slab · NPU

macOS 26.6.2

187.2 ms

Measured time · scope below

f16Session open (ms): 17523 Platform: macos Runs: 100 Input: 1, 3, 384, 384 Measured: 2026-10-28

Median of 100 warm runs of the model, box selection included (Slab's run time). From a 1920 x 1080 photo, letterboxing and decoding boxes included: 187.24 ms median.

Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)

Slab · CPU

Android 17

851.0 ms

Measured time · scope below

f16Session open (ms): 117 Platform: android Runs: 14 Input: 1, 3, 384, 384 Measured: 2026-11-06

Median of 14 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, letterboxing and decoding boxes included: 812 ms median. open_ms: opening the session. Peak memory (resident) after the runs: 196 MB.

Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)

Slab · GPU

Android 17

238.0 ms

Measured time · scope below

f16Session open (ms): 104 Platform: android Runs: 41 Input: 1, 3, 384, 384 Measured: 2026-11-06

Median of 41 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, letterboxing and decoding boxes included: 242 ms median. open_ms: opening the session with the GPU programs already in the cache folder (the first open on a device compiles them, about 0.3 s more). Peak memory (resident) after the runs: 178 MB.

Accuracy checks

macos · CPU · f16

RF-DETR's own predict() (and, for the model alone, its PyTorch network on the same tensor), threshold 0.5, 67 public-domain photos (Wikimedia Commons), boxes scoring 0.5 or more; a box matches with the same class and IoU 0.5 or more

With Slab preprocessing: 151 of 151 boxes matched (mean IoU 0.999), 2 extra. On identical input tensors: 151 of 151 matched (mean IoU 0.999), 2 extra, largest score difference 0.005.

macos · GPU · f16

RF-DETR's own predict() (and, for the model alone, its PyTorch network on the same tensor), threshold 0.5, 67 public-domain photos (Wikimedia Commons), boxes scoring 0.5 or more; a box matches with the same class and IoU 0.5 or more

With Slab preprocessing: 151 of 151 boxes matched (mean IoU 0.999), 2 extra. On identical input tensors: 151 of 151 matched (mean IoU 0.999), 2 extra, largest score difference 0.005.

macos · NPU · f16

RF-DETR's own predict() (and, for the model alone, its PyTorch network on the same tensor), threshold 0.5, 67 public-domain photos (Wikimedia Commons), boxes scoring 0.5 or more; a box matches with the same class and IoU 0.5 or more

With Slab preprocessing: 149 of 151 boxes matched (mean IoU 0.985), 2 extra. On identical input tensors: 147 of 151 matched (mean IoU 0.985), 2 extra, largest score difference 0.046.

Before you choose this model

  • Only the 80 COCO classes.
  • Slow on Slab today: about 93 ms per frame on an M1 Max GPU and 17 s to prepare for the Neural Engine. The boxes are exact, but its deformable attention is not yet fast in Slab; this is being worked on.
  • Works at 384 x 384, so very small objects in large photos are harder to find.