RF-DETR: Neural Architecture Search for Real-Time Detection Transformers
Paper • 2511.09554 • Published • 9
An object detection model trained for privacy-blurring of Dutch traffic enforcement (speed camera) photos. The model detects three classes: persons, vehicles, and license plates.
| ID | Class | Description |
|---|---|---|
| 0 | person |
Pedestrians, drivers, cyclists |
| 1 | vehicle |
Cars, buses, trucks, motorcycles |
| 2 | license_plate |
License plates (NL + EU formats) |
The model was trained on a combination of four datasets:
License plate annotations were oversampled 4× with grayscale ROI augmentation applied to each copy, simulating IR/night flash camera conditions.
| Parameter | Value |
|---|---|
| Epochs | 50 |
| Effective batch size | 32 |
| Learning rate | 0.0001 |
| Optimizer | AdamW (RF-DETR default) |
| Hardware | NVIDIA A100 (Google Colab) |
| Training date | 2026-04-12 |
| Metric | Score |
|---|---|
| mAP@0.5 | see evaluation results |
pip install rfdetr huggingface_hub
from rfdetr import RFDETRBase
from huggingface_hub import hf_hub_download
from PIL import Image
# Download model
weights_path = hf_hub_download(
repo_id="Rickkosse/rfdetr-flitsfoto-detector",
filename="checkpoint_best_total.pth"
)
# Load model
model = RFDETRBase(pretrain_weights=weights_path)
model.optimize_for_inference() # optional: ~2x faster
# Run inference
image = Image.open("photo.jpg").convert("RGB")
detections = model.predict(image, threshold=0.3)
# Classes: 0=person, 1=vehicle, 2=license_plate
for xyxy, cls, conf in zip(detections.xyxy, detections.class_id, detections.confidence):
x1, y1, x2, y2 = map(int, xyxy)
label = ["person", "vehicle", "license_plate"][int(cls)]
print(f"{label}: {conf:.2f} @ [{x1}, {y1}, {x2}, {y2}]")
import onnxruntime as ort
import numpy as np
from PIL import Image
from huggingface_hub import hf_hub_download
onnx_path = hf_hub_download(
repo_id="Rickkosse/rfdetr-flitsfoto-detector",
filename="inference_model.onnx"
)
session = ort.InferenceSession(
onnx_path,
providers=["CUDAExecutionProvider", "CPUExecutionProvider"]
)
mean = np.array([0.485, 0.456, 0.406], dtype=np.float32)
std = np.array([0.229, 0.224, 0.225], dtype=np.float32)
image = Image.open("photo.jpg").convert("RGB").resize((560, 560))
img_np = (np.array(image, dtype=np.float32) / 255.0 - mean) / std
img_np = np.transpose(img_np, (2, 0, 1))[None] # NCHW
boxes, labels = session.run(None, {"input": img_np})
from rfdetr import RFDETRBase
from huggingface_hub import hf_hub_download
weights = hf_hub_download("Rickkosse/rfdetr-flitsfoto-detector", "checkpoint_best_total.pth")
model = RFDETRBase(pretrain_weights=weights)
# Replace RFDETRBase() initialisation in PrivacyBlurPipeline.__init__
This model is released under the Apache 2.0 License. Free to use for both commercial and non-commercial purposes. See LICENSE for details.
If you use this model in research or products, please cite:
@misc{flitsfoto-detector-2026,
title = {RF-DETR Traffic Enforcement Detector},
author = {Rickkosse},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/Rickkosse/rfdetr-flitsfoto-detector}
}
And the underlying datasets:
@misc{vehicle-registration-plates-trudk,
title = {Vehicle Registration Plates Dataset},
author = {Augmented Startups},
year = {2022},
url = {https://universe.roboflow.com/augmented-startups/vehicle-registration-plates-trudk}
}
@misc{eulpr2025,
title = {EULPR: European License Plate Recognition},
author = {Finbarrs Oketunji},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/0xnu/european-licence-plate}
}
@misc{coco-license-plate-pseudo-labels,
title = {COCO License Plate Pseudo-Labels},
author = {Rickkosse},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/Rickkosse/coco-license-plate-pseudo-labels}
}
@misc{rf-detr,
title = {RF-DETR: Neural Architecture Search for Real-Time Detection Transformers},
author = {Isaac Robinson and Peter Robicheaux and Matvei Popov and Deva Ramanan and Neehar Peri},
year = {2025},
url = {https://arxiv.org/abs/2511.09554}
}