naver-clova-ix/cord-v2
Viewer • Updated • 1k • 16k • 134
A fine-tune of microsoft/layoutlm-base-uncased (revision 30e3cdd39c11f09757b0fcf7598533d05052acef, MIT) that tags each OCR word of a receipt or invoice with the field it belongs to. It runs in the visitor's browser through ONNX Runtime Web in the Documents lab of The Collection, a personal portfolio.
Trained by labs-training/documents/train.py at commit 4926c84988395d904598cf0ef902717f95d44d63, seed 20261015, clean tree. Exported by export.py (exporter torchscript, opset 17).
naver-clova-ix/cord-v2, revision 7f0115a4b758a71d6473b8d085751692da2fef98, CC-BY-4.0): 800 training receipts, 100 test receipts. Attribution: CORD, NAVER Clova Information Extraction, licensed CC BY 4.0.documents/make_invoices.py with seed 20261015, English and Spanish. Labels are exact by construction. The generator is easy, so the CORD figure is the honest one.Span-level, on held-out test sets never used for training or for choosing the quantisation.
| Model | Test set | Precision | Recall | Micro F1 | Macro F1 | Spans |
|---|---|---|---|---|---|---|
| ONNX fp32 (reference, not published) | CORD test | 94.97% | 95.04% | 95.00% | 89.88% | 1310 |
| ONNX fp32 (reference, not published) | Synthetic invoices test | 100.00% | 100.00% | 100.00% | 100.00% | 7024 |
| ONNX int8, per-channel (published) | CORD test | 93.10% | 93.66% | 93.38% | 74.99% | 1310 |
| ONNX int8, per-channel (published) | Synthetic invoices test | 100.00% | 100.00% | 100.00% | 100.00% | 7024 |
Quantisation: onnxruntime quantize_dynamic, weights QInt8; per-channel was chosen on CORD validation, not on test.
10 epochs, batch 8, learning rate 5e-05, on mps.
Base model
microsoft/layoutlm-base-uncased