r/computervision • u/CoreEpoch • Sep 17 '26
Showcase RT-DETRv2-S in 32.7 MB INT8 ONNX: 45.7 COCO AP on stock ONNX Runtime & OpenVINO (No GPU or NMS required)
If you've tried deploying real-time DETRs or other CV models and are interested in better performance you might have explored quantization briefly and if so you may have figured out that it's largely broken in many instances. I developed a tool to address that and would like to share some of the open-weight CV models that resulted.
The main focus of this post is what I thought would be a "top pick" of the CV models: RT-DETRv2-S. It was quantized into a single-file INT8 QDQ ONNX model using 128 COCO calibration images without any retraining or fine-tuning. The resulting artifact runs on stock onnxruntime or OpenVINO across CPU and GPU with no custom plugins or accelerators required.
Accuracy & CPU Performance
Evaluated on COCO val2017
| Model | AP@[.5:.95] | Model Size | CPU Latency (OpenVINO) | CPU Latency (ORT 4-thread) |
|---|---|---|---|---|
FP32 Baseline (rtdetr_v2_r18vd) | 48.1 | 81.0 MB | 161 ms (6.2 FPS) | 175 ms (5.7 FPS) |
| Stock ORT Static INT8 (default calib) | 4.2 | 32.6 MB | — | 113 ms (collapsed) |
| Kenosis Quantized INT8 | 45.7 | 32.7 MB | 76.5 ms (13.1 FPS) | 144 ms (6.9 FPS) |
Under OpenVINO on CPU, the quantized INT8 model delivers a 2.1× speedup (76.5 ms / 13.1 FPS) while retaining 95.0% of FP32 detection accuracy.
Minimal Run Example
from huggingface_hub import hf_hub_download
import numpy as np, onnxruntime as ort
from PIL import Image
path = hf_hub_download("CoreEpoch/rtdetrv2-s-int8-onnx", "rtdetrv2_s_640_int8_kenosis.onnx")
sess = ort.InferenceSession(path, providers=["CPUExecutionProvider"])
img = Image.open("your_image.jpg").convert("RGB")
x = np.asarray(img.resize((640, 640), Image.BILINEAR), np.float32) / 255.0
logits, boxes = sess.run(None, {"input": x.transpose(2, 0, 1)[None]})
scores = 1.0 / (1.0 + np.exp(-logits[0]))
q, c = divmod(int(scores.argmax()), scores.shape[1])
print(f"Top detection: class {c}, score {scores.max():.2f}, box {boxes[0][q]}") Model weights, SHA-256 verification hashes, detection demos, and evaluation scripts to reproduce the full COCO table are public here:
- Hugging Face: https://huggingface.co/CoreEpoch/rtdetrv2-s-int8-onnx
- GitHub Index: https://github.com/CoreEpoch/int8-models
I want to know if anyone with a raspberry Pi or any weird edge devices could try running this particular model and sharing the result.. and I want to know people's opinions on DETR vs YOLO and which other models would have interest in being quantized to see if they'd outperform the standard model or not without heavily degraded accuracy. I chose this model in particular to share because I thought it's what "the people" would want but I'm open to other suggestions as well.

