tachiwin/Tachiwin-OCR-1.5
TachiwinOCR 1.5 ๐ฆก
for the Indigenous Languages of Mexico
This is a PaddleOCR-VL Finetune specialized in the 68 indigenous languages of Mexico and their diverse character and glyph repertoire making a world first in tech access and linguistic rights
Inference
You can perform inference using the PaddleOCR pipeline or the transformers library.
Option A: Using PaddleOCR
from paddleocr import PaddleOCRVL
# Load the fine-tuned model
pipeline = PaddleOCRVL(
vl_rec_model_name="tachiwin/Tachiwin-OCR-1.5",
vl_rec_model_dir=path_to_tachiwin_downloaded_model,
)
# Predict on an image
output = pipeline.predict("test.png")
for res in output:
res.print()
res.save_to_json(save_path="output")
res.save_to_markdown(save_path="output")Option B: Using Transformers
from PIL import Image
import torch
from transformers import AutoModelForCausalLM, AutoProcessor
MODEL = "tachiwin/Tachiwin-OCR-1.5"
image_path = "my_image.png"
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
image = Image.open(image_path).convert("RGB")
model = AutoModelForCausalLM.from_pretrained(
MODEL,
trust_remote_code=True,
torch_dtype=torch.bfloat16
).to(DEVICE).eval()
processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)
messages = [
{"role": "user", "content": [
{"type": "image", "image": image},
{"type": "text", "text": "OCR:"},
]}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt"
).to(DEVICE)
outputs = model.generate(**inputs, max_new_tokens=1024, min_new_tokens=1)
generated_text = processor.batch_decode(outputs, skip_special_tokens=True)[0]
print(generated_text)๐ Benchmark Results
Tachiwin-OCR 1.5 was evaluated against the base PaddleOCR-VL 1.5 model using a diverse subset of Indigenous language samples. The fine-tuning results demonstrate dramatic improvements in both character and word recognition accuracy โ far surpassing the gains seen in version 1.0.
Summary Metrics
Version Comparison: 1.0 โ 1.5
Detailed Comparison โ v1.5 Sample Results
Results across 21 language samples. Languages with tonal or complex diacritic systems show the most dramatic improvements:
Key Findings
- Unprecedented Accuracy Gains: 14 out of 21 languages achieved a fine-tuned CER of 0.00%, meaning perfect character-level recognition on those samples โ a result not seen in v1.0.
- Hardest Cases Tackled: Languages like Amuzgo (
amu) and Zapotec (zao, sample 11) started with CERs above 85โ93% and were reduced to zero after fine-tuning, representing improvements of over 85 and 93 percentage points respectively. - Remaining Challenges:
mto(Totontepec Mixe) remains the most difficult language in the set, with a fine-tuned CER of 32.47% โ still a 65% relative improvement over its raw baseline, but indicating further work is needed for highly complex orthographies. - Word-Level Leap: WER dropped from 38.59% to just 3.60% โ a 34.98 percentage point absolute improvement, compared to only 7.81pp in v1.0, demonstrating a qualitative leap in the model's ability to reconstruct full word forms in these language families.
- Robustness: The model continues to show high resilience against synthetic distortions applied during the data generation phase. Tachiwin (from Totonac - "Language") is dedicated to bridging the digital divide for indigenous languages of Mexico through AI technology.
- Developed by: Tachiwin
- License: apache-2.0
- Finetuned from model : PaddlePaddle/PaddleOCR-VL-1.5
This paddleocr_vl model was trained 2x faster with Unsloth
