Views
No views yet
docling-project/docling-layout-heron-onnx (Docling Heron, RT-DETRv2, 17-class
document-layout detection at 640×640). Produced for
RailReaderCore.Conv ops; the RT-DETR
transformer decoder is left in FP32.model.decoder.anchors_scale, add_2355_scale) to Inf, collapsing all
detection scores → zero detections. Leaving the decoder FP32 avoids this, and
the backbone is where essentially all of the convolutional compute (and the
speedup) lives. Quantizing any MatMul (encoder or decoder) was measured to
either break the model or reduce recall with no speed gain.| metric | value |
|---|---|
| recall | 0.990 |
| precision | 0.988 |
| mean IoU (matched) | 0.984 |
| pages with <90% recall | 1 / 88 |
| inference speedup (AVX-VNNI CPU, i7-12700H) | ~2.6–3× |
Caveat: agreement is measured against the FP32 Heron model, not labelled ground truth — i.e. this is near-lossless versus the model you would otherwise ship, not an independent mAP claim.
images uint8 [1,3,640,640] NCHW; orig_target_sizes int64
[1,2] = [W, H] (note: [W, H], not [H, W]).labels [1,300], boxes [1,300,4] (xyxy in pixel space),
scores [1,300].1from onnxruntime.quantization import quantize_static, QuantFormat, QuantType, CalibrationMethod
2quantize_static(
3 pre_processed_fp32, out, calibration_reader,
4 quant_format=QuantFormat.QDQ, per_channel=True,
5 activation_type=QuantType.QUInt8, weight_type=QuantType.QInt8,
6 calibrate_method=CalibrationMethod.MinMax,
7 op_types_to_quantize=["Conv"],
8)tools/quant-probe/ in RailReaderCore.docling-project/docling-layout-heron-onnx.