SLANet+ โ Core ML
PaddleOCR's SLANet_plus table-structure model, converted to Core ML for use
on Apple platforms. Given an image of a table it returns the table's structure
tokens (<td>, <td colspan="4">, <tr>โฆ) and one bounding quadrilateral per
cell. It reads no text. In Platen2 the cell text comes from the PDF's own
text layer, so no character in a rendered table is authored by a model.
| Input | 1ร3ร488ร488, BGR, ImageNet mean/std applied by position |
| Outputs | loc [1,501,8] cell quads ยท structure [1,501,50] token logits |
| Size | 12 MB (fp32) |
| Speed | ~42 ms per table on an M5 Max |
Provenance and changes
Converted from slanet-plus.onnx as published by
RapidAI/RapidTable, which is itself an
ONNX export of PaddleX's SLANet_plus. The weights are unmodified; what
changed is the serialisation:
- the ONNX graph was brought across as PyTorch and re-exported to Core ML
- the encoder was folded at a static 488ร488 input
- SLAHead's early-exit
Loopwas unrolled to its own 501-step bound, because Core ML has no loop construct for it
Verified against the ONNX original on 23 real table regions: identical structure token sequences on all 23, worst cell-box delta 0.005 px.
Notes for implementers
- fp32, not fp16. Token sequences survive fp16 but the cell-box regression does not โ 36.9 px worst error on the Neural Engine.
- Outputs are padded to a 64-byte row.
structurereports shape[1,501,50]with strides[32064,64,1]. Read by stride, not as a tight buffer. - Resize with a plain bilinear sample. Antialiased downscaling changes the token sequence on some tables with no other symptom.
- The 50-token vocabulary is in
user_defined_metadata["structure_tokens"].
Licence
Apache License 2.0, inherited from PaddlePaddle. Copyright (c) PaddlePaddle Authors. ONNX export by RapidAI. Converted to Core ML by tekl; weights unmodified, serialisation changed as described above.
- Downloads last month
- -
Model tree for rageyu/platen2-pdf-table
Base model
PaddlePaddle/SLANet_plus