https://github.com/khaouitiabdelhakim/arabicocr-python-tutorial
This project uses the ArabicOcr package to convert Arabic text in images to editable text using OCR techniques.
https://github.com/khaouitiabdelhakim/arabicocr-python-tutorial
ocr ocr-python ocr-recognition ocr-text-reader pip python script
Last synced: 4 days ago
JSON representation
This project uses the ArabicOcr package to convert Arabic text in images to editable text using OCR techniques.
- Host: GitHub
- URL: https://github.com/khaouitiabdelhakim/arabicocr-python-tutorial
- Owner: khaouitiabdelhakim
- Created: 2024-07-02T15:23:55.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T21:21:47.000Z (6 months ago)
- Last Synced: 2024-10-24T09:40:18.425Z (6 months ago)
- Topics: ocr, ocr-python, ocr-recognition, ocr-text-reader, pip, python, script
- Language: Python
- Homepage: https://khaouitiapps.vercel.app
- Size: 611 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Arabic OCR
This project uses the `ArabicOcr` package to convert Arabic text in images to editable text using OCR techniques.
> [!NOTE]
> The script may take a long time to run the first time as it installs the prediction model.## Installation
Install the required package using pip:
```bash
pip install ArabicOcr
```## Usage
```python
from ArabicOcr import arabicocr# Define the input and output image paths
image_path = 'pic.jpg'
out_image = 'out.jpg'# Perform OCR on the image
results = arabicocr.arabic_ocr(image_path, out_image)
print(results)# Extract words from the results
words = [result[1] for result in results]# Save the words to a text file
with open('file.txt', 'w', encoding='utf-8') as myfile:
myfile.write(str(words))
```## Description
The `ArabicOcr` package is used to convert Arabic text in images to text using OCR techniques.