--- 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 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 pervaizfajar@gmail.com