# RF-DETR — Real-Time Object Detection Architecture by Roboflow > A state-of-the-art real-time object detection model designed for fine-tuning, achieving top results on COCO with a transformer-based architecture optimized for speed. ## Install Save as a script file and run: # RF-DETR — Real-Time Object Detection Architecture by Roboflow ## Quick Use ```bash pip install rf-detr from rfdetr import RFDETRBase model = RFDETRBase() detections = model.predict("image.jpg") ``` ## Introduction RF-DETR is a real-time object detection model architecture developed by Roboflow that achieves state-of-the-art accuracy on the COCO benchmark while maintaining real-time inference speed. It is specifically designed for easy fine-tuning on custom datasets. ## What RF-DETR Does - Provides real-time object detection with transformer-based accuracy - Achieves top performance on COCO without sacrificing inference speed - Supports fine-tuning on custom datasets with minimal code - Includes instance segmentation capabilities - Offers multiple model sizes for different speed-accuracy trade-offs ## Architecture Overview RF-DETR uses a hybrid architecture combining an efficient CNN backbone for feature extraction with a deformable transformer decoder for object queries. This design avoids the need for NMS post-processing, producing direct set predictions. The architecture is optimized for GPU inference with attention-efficient operators. ## Self-Hosting & Configuration - Install via pip with CUDA support for GPU acceleration - Pretrained weights download automatically on first use - Fine-tune with a single function call pointing to your labeled dataset - Export to ONNX or TensorRT for production deployment - Supports batch inference for throughput-critical pipelines ## Key Features - Real-time inference at 30+ FPS on modern GPUs - NMS-free architecture for simpler deployment pipelines - Built-in support for Roboflow dataset format and augmentation - Multiple model scales from Base to Large for flexibility - Published at ICLR with peer-reviewed methodology ## Comparison with Similar Tools - **YOLOv8/v9** — CNN-only architecture vs transformer decoder with better accuracy - **DINO-DETR** — slower convergence vs RF-DETR's fast training schedule - **RT-DETR** — similar concept but RF-DETR achieves higher mAP on COCO - **Detectron2** — research framework vs production-focused single-model package - **Grounding DINO** — open-vocabulary vs closed-set with higher speed ## FAQ **Q: What hardware do I need for inference?** A: An NVIDIA GPU with 4GB+ VRAM for real-time; CPU inference works but is slower. **Q: Can I fine-tune on my own dataset?** A: Yes, RF-DETR is specifically designed for fine-tuning with as few as 100 labeled images. **Q: What annotation formats are supported?** A: COCO JSON, Pascal VOC, and Roboflow format are all supported natively. **Q: Is there a license restriction for commercial use?** A: RF-DETR is released under the Apache 2.0 license, permitting commercial use. ## Sources - https://github.com/roboflow/rf-detr - https://blog.roboflow.com/rf-detr/ --- Source: https://tokrepo.com/en/workflows/asset-b2458724 Author: Script Depot