pixel_values — [batch, 3, 800, 800] (float32)logits [batch, 300, 25], pred_boxes [batch, 300, 4]torch.onnx.export (TorchScript path) from HuggingFace Transformers1import onnxruntime as ort
2import numpy as np
3
4sess = ort.InferenceSession("pp_doclayout_v3_dynbatch.onnx")
5images = np.random.randn(4, 3, 800, 800).astype(np.float32) # batch of 4
6logits, pred_boxes = sess.run(None, {"pixel_values": images})[:2]| ID | Label | ID | Label |
|---|---|---|---|
| 0 | abstract | 13 | header |
| 1 | algorithm | 14 | image |
| 2 | aside_text | 15 | formula |
| 3 | chart | 16 | number |
| 4 | content | 17 | paragraph_title |
| 5 | formula | 18 | reference |
| 6 | doc_title | 19 | reference_content |
| 7 | figure_title | 20 | seal |
| 8 | footer | 21 | table |
| 9 | footer | 22 | text |
| 10 | footnote | 23 | text |
| 11 | formula_number | 24 | vision_footnote |
| 12 | header |