RF-DETR-Base (DINOv2) — Medical Skin Lesion Detection (4 Classes)
Visually audited, ONNX-ready RF-DETR-Base (DINOv2 backbone) object detection model trained as part of the EVREN Multi-Architecture Object Detection & ONNX CPU Benchmark. On fuzzy dermoscopic skin-lesion boundaries (2,271 images, 4 classes), it achieved the highest overall validation accuracy and precision across all 6 tested architecture families.

Validation, Compute Profile & ONNX CPU Benchmark
| Metric | Value |
|---|---|
| Architecture | rfdetr-base (DINOv2 backbone, NMS-free) |
| Input Resolution | 560 × 560 (static batch=1 ONNX) |
| Classes | 4 (acne, bcc, melanoma, nevus — classes.json) |
| mAP@50 / mAP@50-95 | 81.17% / 56.80% |
| Precision / Recall | 79.23% / 74.71% |
| Training Hardware & Time | 1× NVIDIA H200 (141 GB HBM3e, AMP) · 67.7 min (40 epochs, 6.8× vs YOLO26m) |
| Peak Training VRAM | 20.0 GB |
| ONNX Size | 108.71 MB (best.onnx) |
CPU Inference (Intel Xeon @ 2.20GHz, 4 threads, FP32) | 495.9 ms (2.02 FPS) |
Pre-Release Visual Quality Audit: 20 non-training images (16 validation + 4 test, 0 training overlap; Green = GT, Cyan = ONNX Pred) ONNX audit: F1=0.712, P=0.703, R=0.722, 96.15% class accuracy on true positives (ImageNet mean/std normalization is mandatory; labels tensor is [1, 300, 5] with foreground in channels 0..3 and background in channel 4).
Quick Start (Pure NumPy + ONNX Runtime)
import numpy as np, onnxruntime as ort
from PIL import Image
sess = ort.InferenceSession("best.onnx", providers=["CPUExecutionProvider"])
img = Image.open("lesion.jpg").convert("RGB")
W, H = img.size
arr = np.asarray(img.resize((560, 560)), dtype=np.float32) / 255.0
arr = (arr - np.array([0.485, 0.456, 0.406], np.float32)) / np.array([0.229, 0.224, 0.225], np.float32)
inp = np.transpose(arr, (2, 0, 1))[None, ...] # static [1, 3, 560, 560]
dets, labels = sess.run(None, {"input": inp}) # dets: [1,300,4], labels: [1,300,5] (4 fg + 1 bg)
probs = 1.0 / (1.0 + np.exp(-np.clip(labels[0][:, :4], -60, 60)))
cls_ids = np.argmax(probs, axis=1)
scores = probs[np.arange(len(cls_ids)), cls_ids]
CLASSES = ["acne", "bcc", "melanoma", "nevus"]
for box, sc, cid in zip(dets[0][scores >= 0.35], scores[scores >= 0.35], cls_ids[scores >= 0.35]):
cx, cy, bw, bh = box[0]*W, box[1]*H, box[2]*W, box[3]*H
print(f"{CLASSES[cid]}: {sc:.2f} -> [{cx-bw/2:.1f}, {cy-bh/2:.1f}, {cx+bw/2:.1f}, {cy+bh/2:.1f}]")
Intended Use & Limitations
Released strictly for research, education, and benchmarking — not a clinical diagnostic device. Reported training durations (1× NVIDIA H200) and CPU latencies (Intel Xeon @ 2.20GHz, 4 threads) reflect our controlled experimental environment and should be validated on your own hardware and data.
Links & Attribution
- EVREN Model Page: cilt-lezyonu-tespiti-rf-detr-base-dinov2-4-sinif
- Full 24-Run Benchmark & Unified ONNX Decoder (GitHub): kenantabak/evren-multiarch-cv-onnx-benchmark
- Structured Benchmark Dataset (HF Parquet): kenantabak/evren-multiarch-cv-onnx-benchmark
- Turkish Engineering Deep-Dive (Dev.to): CNN vs Transformer: 4 Farklı Alanda 24 Kontrollü Nesne Tespiti Deneyi ve ONNX CPU Gerçeği
- License: Weights & model card released under
CC-BY-4.0. Underlying training framework licenses apply separately.