File size: 2,929 Bytes
bf4268d
 
 
 
 
631f287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250cd40
631f287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
language:
- ur
pipeline_tag: image-to-text
library_name: transformers
---

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

---

```yaml
library_name: transformers
language:
- ur
```

# Model Card for Urdu OCR Model

<!-- Provide a quick summary of what the model is/does. -->

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:

```python
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]