vietocr β Vietnamese financial-report OCR β v1.0.3_2
Recognizes cropped text lines, not complete PDF pages or table structure.
Validation-selected fine-tuned weights; no test-based checkpoint selection.
Dataset: datpq91/bctc-ocr-v1.0.3_2.
Dataset fingerprint: 9beb42d0f9b8f00357c36a901272d90f6e41a5fc12be5ba9ef017bb51c20a8fc.
Checkpoint SHA-256: 73714230dd5ba4c9dfc40cb71ee1dd159c3948e169671f61ff6bda4f7314fe21.
Preprocessing, vocabulary and generation limits are part of the model; retain the bundled files.
Download and recognize a crop
This training run was interrupted: 3 of 10 epochs are saved, at optimizer step 3189. The released model is selected by validation among the checkpoints reached.
Install PyTorch for your device and the pinned VietOCR source:
pip install "git+https://github.com/pbcquoc/vietocr.git@ebd1a86d1d26ca65306e97b72779563e76e00dd8"
import sys
from pathlib import Path
from huggingface_hub import snapshot_download
root = Path(snapshot_download("datpq91/vietocr-bctc-v1.0.3_2"))
sys.path.insert(0, str(root / "code"))
from model import Recognizer
recognizer = Recognizer(root, device="cpu") # or cuda:0
print(recognizer.predict(["crop.jpg"])[0]["prediction"])
Use this decoder for long lines; upstream Predictor defaults may use shorter limits.
model.pth can initialize another fine-tune; it contains no optimizer state.
Evaluation
| Weights | Test | Exact accuracy | CER | Normalized edit similarity |
|---|---|---|---|---|
| baseline | current | 73.4694% | 19.2701% | 92.3271% |
| baseline | reference_v1 | 81.1847% | 14.4462% | 93.7647% |
| finetuned | current | 93.5453% | 0.8957% | 99.0045% |
| finetuned | reference_v1 | 92.5087% | 1.0391% | 97.9528% |
Only available evaluation results are shown. CSV predictions/errors are in comparison/.
- Page splits within four reviewed PDFs; not a held-out-company experiment
- Labels were visually audited using previous error analyses; test is not an untouched external benchmark
- Downloads last month
- -