← Work

RF-DETR-CPP

Header-only C++ inference for RF-DETR: detection, segmentation and keypoints on ONNX Runtime with CPU, CUDA or TensorRT, no Python at runtime

Creator & Maintainer · 2026 · active · GitHub ↗

Problem

RF-DETR is Roboflow’s real-time transformer detector built on DINOv2 features. Its reference tooling is Python-first, which makes it hard to drop into C++ robotics and embedded pipelines.

Approach

One include gives a pipeline for each RF-DETR task family: detection, instance segmentation and keypoints. The execution provider (CPU, CUDA or TensorRT) is chosen at construction time with a single enum. Export the model once, then deploy without Python.

Results

  • Detection, segmentation and keypoint tasks with per-task CLIs and GoogleTest suites.
  • CI runs detection parity and segmentation and keypoint structural tests on every push.
  • Builds on Linux, macOS and Windows, with Docker images for CPU and GPU.

Stack

  • C++17
  • ONNX Runtime
  • OpenCV
  • CUDA / TensorRT (optional)
  • CMake

Technologies

  • C++17
  • ONNX Runtime
  • OpenCV
  • CUDA
  • TensorRT