Here is the completed model card based on the provided information:


library_name: transformers
language:
- ur

Model Card for Urdu OCR Model

This model, cxfajar197/urdu-ocr, is trained on Urdu data specifically designed for OCR tasks. It works best with single-line Urdu text images, primarily focusing on printed text. The model is optimized for extracting accurate Urdu text from such images and can be easily utilized using the Hugging Face pipeline API.

Uses

Direct Use

This model can be directly used for Urdu handwriting recognition tasks, particularly for extracting text from scanned documents or handwritten notes.

Downstream Use

This model can be fine-tuned further for specific handwriting datasets or integrated into larger OCR systems for Urdu or multilingual text recognition.

Out-of-Scope Use

The model is not suitable for languages other than Urdu or domains with highly noisy or distorted images without further fine-tuning.

Bias, Risks, and Limitations

The model may exhibit biases inherent in the training data. Misrecognition of complex or ambiguous handwriting is possible. Users should carefully evaluate its performance in their specific use case.

Recommendations

Users should test the model thoroughly on their specific dataset and consider additional fine-tuning if required. Misuse in sensitive applications (e.g., legal or medical document OCR) should be avoided without rigorous evaluation.

How to Get Started with the Model

Use the code below to get started with the model:

from transformers import pipeline

# Load the pipeline with your model
pipe = pipeline("image-to-text", model="cxfajar197/urdu-ocr")

# Path to the image file
image_path = "/content/001-0002-01.png"  # Replace with your image path

# Generate text from the image
generated_text = pipe(image_path)

# Print the output
print("Generated Text:", generated_text)

Factors

The model was tested on handwritten text images with varying font styles and complexities.

Summary

The model achieves competitive accuracy on Urdu handwritten text recognition tasks, demonstrating its effectiveness for real-world applications.

Environmental Impact

  • Hardware Type: NVIDIA GPU

Compute Infrastructure

Hardware

NVIDIA GPU (e.g., A100)

Software

Python, PyTorch, Hugging Face Transformers

Citation

BibTeX:

@misc {fajar_pervaiz_2024, author = { {Fajar Pervaiz} }, title = { urdu-ocr (Revision f6feb32) }, year = 2024, url = { https://huggingface.co/cxfajar197/urdu-ocr }, doi = { 10.57967/hf/3644 }, publisher = { Hugging Face } }

Model Card Authors

Fajar Pervaiz

Model Card Contact

[email protected]

Downloads last month
236
Safetensors
Model size
293M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for cxfajar197/urdu-ocr

Finetunes
2 models