RF-DETR text region/line detection (ONNX)

ONNX export of Kansallisarkisto/rfdetr_textline_textregion_detection_model, exported at 432x432 input resolution, opset 17.

Verified to reproduce the original PyTorch model's scores, boxes, and classes to sub-pixel precision on real test images.

Classes

ID Class Description
1 text_region Larger regions of text content
2 text_line Individual lines of text

Files

  • rfdetr-textline-textregion.onnx, weights inlined (no external .onnx.data file needed)

Inputs / outputs

  • Input input: float32 [1, 3, 432, 432], ImageNet-normalized RGB, resized to 432x432 ignoring aspect ratio (matches the original model's own preprocessing)
  • Output dets: [1, 200, 4], boxes in cxcywh, normalized [0, 1]
  • Output labels: [1, 200, 4], raw per-class logits (apply sigmoid)
  • Output masks: [1, 200, 108, 108], raw per-query instance mask logits aligned to the full input canvas (not box-relative)

Decoding: prob = sigmoid(labels), flatten to [200 * 4], sort descending, take the top 200. For each kept entry, boxIdx = flatIdx // 4, classIdx = flatIdx % 4; class 1 is text_region, class 2 is text_line.

See the original model's card for training data and evaluation metrics; this repository only changes the runtime format.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mxth-computes/rfdetr-textline-textregion-onnx