Indra OCR Vietnamese (v1)

Fine-tuned version of datalab-to/indra-ocr optimized for high-accuracy Vietnamese document text recognition.

This checkpoint is a drop-in replacement for the official indra-ocr pipeline. It retains full architecture compatibility with Datalab's ONNX runtime while significantly boosting accuracy on Vietnamese administrative decrees, academic research publications, and structured forms.


Benchmark & Evaluation

Evaluated on held-out Vietnamese test data across administrative (Chinhphu), academic (VJOL), and real-world forms (Datalab snapshot):

Metric Base Model (datalab-to/indra-ocr) Fine-Tuned (ANZ-Innovation/indra-v1) Improvement
Character Error Rate (CER NFD) 8.48% 1.49% -82.44% relative
Exact Line Accuracy 39.44% 82.45% +43.02% absolute

Training Stats & Efficiency

  • Hardware: 1x NVIDIA RTX A4000 16GB
  • Throughput: ~668.0 samples/second
  • Total Training Duration: 2419.8s (40.3 minutes, 16 epochs, best at epoch 14)
  • Dataset Partitioning:
    • Train: 57,030 lines
    • Validation: 3,887 lines
    • Test (Held-out): 3,887 lines
    • Total: 64,804 lines
    • Sources:
      • Government decrees & administrative documents (Chinhphu): 3,445 lines
      • Academic journals & scientific publications (VJOL): 5,118 lines
      • Datalab DBNet detector-matched clean document lines: 21,241 lines
      • Photorealistic synthetic document lines (Liberation Serif/Sans, Lato, DejaVu): 35,000 lines

Quickstart & Usage

You can use this fine-tuned model directly with the official indra-ocr package or ONNX Runtime:

pip install indra-ocr huggingface_hub

1. In Python with indra_ocr:

from huggingface_hub import snapshot_download
import indra_ocr
import cv2

# Download model weights from Hugging Face
model_dir = snapshot_download(repo_id="ANZ-Innovation/indra-v1")

# Load OCR pipeline
converter = indra_ocr.load(path=model_dir)

# Read image (grayscale)
img = cv2.imread("document_vn.png", cv2.IMREAD_GRAYSCALE)

# Run full OCR (detection + recognition)
result = converter.ocr(img)

for line in result.lines:
    print(f"  {line.text}")

Technical Details

  • Recognizer Architecture: Multi-scale 1D depthwise separable convolutional backbone with 128-channel CTC classifier head (~1.24M parameters).
  • Format: High-performance ONNX model (rec.onnx) with frozen batch normalization and dynamic sequence length masking.
  • License: Modified OpenRAIL-M (commercial use permitted subject to Indra OCR terms).

Developed by ANZ Innovation.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support