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.
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
f16Mike Petrucci mikepetrucci, CC0, https://commons.wikimedia.org/wiki/File:People_crossing_street_(Unsplash).jpg
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
f16Retired electrician, CC0, https://commons.wikimedia.org/wiki/File:Moscow,_Paveletskaya_Square,_people_at_bus_stop_Sept_2025_02.jpg
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
f16Jeff Sheldon ugmonk, CC0, https://commons.wikimedia.org/wiki/File:Office_desk_with_computer_and_music_player_(Unsplash).jpg
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 appModel files are hosted on Google Drive. Large files may open a confirmation page before downloading.
Small
SlabWeights stored as int8 in blocks of 64. Slab decodes them to float when loading, so it runs at the same speed; scores move more than with FP16 (see Accuracy).
Platforms: macos · android
rf-detr-nano-int8.slab
33.2 MB · Hosted download
SHA-256 checksum
32db43a98203d242f45e838a7dc9b41760cd8425163fcdc30ca2604cf3c9a1ffLICENSE-RF-DETR.txt
11 KB
SHA-256 checksum
8cabf52c61130fc97a7e5da5e3685ccf44841c0c53d6f881189369b136603ccaConversion 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-int8.slab slab-load meta set rf-detr-nano-int8.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.
| Platform | Engine | Status | Precision |
|---|---|---|---|
| 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
150.7 ms
Measured time · scope below
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: 151.38 ms median.
Mac with Apple M1 Max
Slab · GPU
macOS 26.6.2
93.1 ms
Measured time · scope below
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: 94.17 ms median.
Mac with Apple M1 Max
Slab · NPU
macOS 26.6.2
186.9 ms
Measured time · scope below
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.52 ms median.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · CPU
Android 17
873.0 ms
Measured time · scope below
Median of 13 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, letterboxing and decoding boxes included: 846 ms median. open_ms: opening the session. Peak memory (resident) after the runs: 195 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · GPU
Android 17
243.0 ms
Measured time · scope below
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 · int8
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: 150 of 151 boxes matched (mean IoU 0.991), 4 extra. On identical input tensors: 150 of 151 matched (mean IoU 0.991), 4 extra, largest score difference 0.112.
macos · GPU · int8
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: 150 of 151 boxes matched (mean IoU 0.991), 4 extra. On identical input tensors: 150 of 151 matched (mean IoU 0.991), 4 extra, largest score difference 0.112.
macos · NPU · int8
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: 148 of 151 boxes matched (mean IoU 0.982), 1 extra. On identical input tensors: 148 of 151 matched (mean IoU 0.982), 2 extra, largest score difference 0.049.
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.