Gujarati OCR Model

An Optical Character Recognition model for the Gujarati language, developed for digitizing printed and scanned Gujarati documents.

Developed by

GIL AI Department

Model Description

This model is trained to extract Gujarati text from scanned document images, printed text images, and digital document pages. It handles a wide range of Gujarati script characters including conjuncts, matras, and diacritics.

Performance

  • Exact Word Accuracy: 96.2%
  • Average Character Error Rate (CER): 1.35%
  • Test set: 10,090 real scanned Gujarati word images

Intended Use

  • Digitization of printed Gujarati government documents
  • Scanned book and newspaper text extraction
  • Automated Gujarati document processing pipelines

Training Data

Trained on real scanned Gujarati printed document images with verified ground truth labels.

How to Use

from transformers import TrOCRProcessor, VisionEncoderDecoderModel
from PIL import Image

processor = TrOCRProcessor.from_pretrained("umangchaudhari/gujarati-ocr")
model = VisionEncoderDecoderModel.from_pretrained("umangchaudhari/gujarati-ocr")

image = Image.open("your_gujarati_document.jpg").convert("RGB")
pixel_values = processor(images=image, return_tensors="pt").pixel_values

generated = model.generate(pixel_values, max_new_tokens=64)
text = processor.batch_decode(generated, skip_special_tokens=True)[0]
print(text)
Downloads last month
15
Safetensors
Model size
0.3B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using umangchaudhari/gujarati-ocr 1