File size: 2,529 Bytes
2814fed | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | ---
license: apache-2.0
language:
- vi
library_name: paddleocr
pipeline_tag: image-to-text
tags:
- ocr
- vietnamese
- paddleocr
- document-ai
base_model: PaddlePaddle/PP-OCRv6_medium_rec
---
# tre-ocr: round 1 recogniser
A PaddleOCR PP-OCRv6 medium text recogniser, fine-tuned for Vietnamese, from
[ternlabs/tre-ocr](https://github.com/ternlabs/tre-ocr): OCR for Vietnamese documents, with
the accuracy measured, not assumed.
## What it is for
Reading **scanned Vietnamese stock-exchange disclosures** (resolutions, notices,
explanations filed by HOSE and HNX companies). It is meant to run inside the tre-ocr tool,
which pairs it with PaddleOCR's stock recogniser on the same text boxes: where their digits
differ the stock line is used, and a number is reported only when both agree with
confidence of at least 0.95. Otherwise the number is left empty (`[?]`), never guessed.
Used alone, outside that pairing, it has **not** been measured.
## Results (set F, measured once, pass marks fixed in advance)
40 scanned pages, none seen in training, at most 2 per company.
| Mark | Needed | Result | 95% interval |
|---|---|---|---|
| Number recall | ≥ 98% | **98.7%** (607 of 615) | 97.5 to 99.3 |
| Wrong when sure | ≤ 1% | **0.19%** (1 of 535) | 0.0 to 1.1 |
| Coverage | ≥ 85% | **87.4%** | |
| Company field | ≥ 90% | **91.7%** (22 of 24) | 74.2 to 97.7 |
The candidate passed each mark, but the intervals reach past them: close to the marks, not
clear of them. Tone marks were scored against a reading no person checked, so they are
reported in METHOD.md and never used as a pass. Full method, sets and limits:
[METHOD.md](https://github.com/ternlabs/tre-ocr/blob/main/METHOD.md).
## Limits
- **Financial statements have not passed**; the tool refuses them.
- Handwriting, other document kinds and other scan conditions are not measured.
## Training
Fine-tuned only on typed public filings rendered to look scanned. Every test-set file, and
every page naming a test-set company, was left out.
## Use
```
git clone https://github.com/ternlabs/tre-ocr && cd tre-ocr
pip install -r requirements-reader.txt # needs poppler-utils
bash tools/get_weights.sh # fetches and hash-checks these weights
python -I tools/read_pdf.py some.pdf --out cache/drafts
```
Files here: `round1-rec.tar.gz`, SHA-256
`010c5757be568a258d6657402a3acbbf6450f46dd978840e4f5a298e1e22fd5e`, the same archive
`get_weights.sh` checks.
## Licence
Apache License 2.0. Published by [Tern Labs](https://ternlabs.io).
|