RF-DETR Core ML

FP16 Core ML exports of Roboflow RF-DETR object-detection models for clients running on macOS.

Included models

Variant Input Package size COCO AP Intended use
RF-DETR Medium 1 ร— 3 ร— 576 ร— 576 FP32 58 MB 54.7 Balanced local detection
RF-DETR Large 1 ร— 3 ร— 704 ร— 704 FP32 59 MB 56.5 Higher-accuracy local detection

The packages use Core ML's ML Program format with FP16 weights. They were exported from the official pretrained checkpoints with rfdetr==1.9.4, coremltools==9.0, and the upstream format="coreml" exporter.

Input and output contract

The input feature is tensors, a contiguous NCHW FP32 tensor. Resize the image to the variant's square input resolution, convert RGB channels to [0, 1], then apply ImageNet normalization:

mean = [0.485, 0.456, 0.406]
std  = [0.229, 0.224, 0.225]

Each model has two outputs identified by shape:

  • boxes: 1 ร— 300 ร— 4, FP16 normalized center_x, center_y, width, height
  • logits: 1 ร— 300 ร— 91, FP16 COCO sparse-category logits

Apply an independent sigmoid to every query/class logit. Flatten the query/class score grid, select the highest 300 pairs, then apply the confidence threshold. COCO category IDs use the sparse 1...90 mapping; slot 0 and the unused category gaps are not detections. RF-DETR does not require NMS.

macOS performance

Measured through native Swift MLModel with computeUnits = .all on a Mac mini with Apple M4 Pro and 64 GB unified memory, after 10 warmups and across 100 consecutive predictions:

Variant Median p95 Approximate throughput
Medium 25.7 ms 27.6 ms 39 predictions/s
Large 45.7 ms 46.5 ms 22 predictions/s

These measurements cover model prediction only. Client-side image conversion and result decoding are additional work. Performance on a base M4 was not measured.

Provenance and limitations

  • Upstream project: roboflow/rf-detr
  • Exporter release: 1.9.4
  • Checkpoints: official RF-DETR Medium and RF-DETR Large COCO weights selected by that release
  • Export host: macOS 26.6.2 on Apple silicon

The upstream Core ML exporter is marked experimental. Clients should pin an immutable repository revision, verify downloaded file hashes, compile packages once with MLModel.compileModel(at:), and validate output parity for their own images before production use.

License

RF-DETR source and the Medium and Large model weights are distributed under Apache License 2.0. See LICENSE and the upstream repository for attribution and notices.

Downloads last month
9
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support