RT-DETRv2-S β INT8 ONNX, 45.7 AP COCO in 32.7 MB
RT-DETRv2-S (PekingU/rtdetr_v2_r18vd, Apache-2.0) quantized with Kenosis β 128-image COCO calibration, no retraining. 45.7 AP (95.0% of FP32) from a single 32.7 MB file, on ONNX Runtime or OpenVINO, CPU or GPU, no accelerator required.
Accuracy
COCO val2017, 4,800 images (disjoint from the 128 calibration images), pycocotools bbox.
| model | AP50:95 | retention | size |
|---|---|---|---|
| FP32 baseline | 48.1 | β | 81.0 MB |
| Kenosis quantized | 45.7 | 95.0% | 32.7 MB |
Run
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"class {c}, score {scores.max():.2f}, box {boxes[0][q]}")
Input 1x3x640x640, RGB, /255 (no mean/std). Outputs logits [1,300,80]
(contiguous COCO-80 order) and boxes [1,300,4] (normalized cxcywh).
run_detect.py / eval_coco.py reproduce the demo and table.
Integrity & license
rtdetrv2_s_640_int8_kenosis.onnx (32,666,936 B) β SHA-256 2FBEA12F3A66DA22BE0C0404F78D378F0D6F4C2F8107A5444EE00C6AB717974D.
Apache-2.0 (base RT-DETRv2, Lv et al. 2024, retained). Quantized with Kenosis (patent pending) Β· coreepoch.dev
Model tree for CoreEpoch/rtdetrv2-s-int8-onnx
Base model
PekingU/rtdetr_v2_r18vd