Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -9,5 +9,84 @@ app_file: app.py
|
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
---
|
|
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
---
|
12 |
+
# OCR Image to Text Converter
|
13 |
|
14 |
+
## Overview
|
15 |
+
|
16 |
+
This project is an OCR (Optical Character Recognition) application that allows users to extract text from images. It supports multiple languages and provides a user-friendly interface for uploading images, performing OCR, and searching within the extracted text.
|
17 |
+
|
18 |
+
## Features
|
19 |
+
|
20 |
+
- Upload images for text extraction
|
21 |
+
- Support for multiple languages (including Hindi, English, Thai, French, Chinese, Japanese, and Korean)
|
22 |
+
- Visualize OCR results with bounding boxes around detected text
|
23 |
+
- Search functionality within the extracted text
|
24 |
+
- Example images provided for testing
|
25 |
+
|
26 |
+
## Technologies Used
|
27 |
+
|
28 |
+
- Python
|
29 |
+
- Gradio (for the web interface)
|
30 |
+
- EasyOCR (for optical character recognition)
|
31 |
+
- PIL (Python Imaging Library)
|
32 |
+
- PyTorch
|
33 |
+
|
34 |
+
## Setup and Installation
|
35 |
+
|
36 |
+
1. Clone this repository:
|
37 |
+
```
|
38 |
+
git clone https://huggingface.co/spaces/Omarrran/ocr_iitr
|
39 |
+
cd ocr_iitr
|
40 |
+
```
|
41 |
+
|
42 |
+
2. Install the required dependencies:
|
43 |
+
```
|
44 |
+
pip install pillow gradio torch easyocr
|
45 |
+
```
|
46 |
+
|
47 |
+
3. Run the application:
|
48 |
+
```
|
49 |
+
python app.py
|
50 |
+
```
|
51 |
+
|
52 |
+
4. Open your web browser and navigate to the local URL provided by Gradio (usually `http://127.0.0.1:7860`).
|
53 |
+
|
54 |
+
## Usage
|
55 |
+
|
56 |
+
1. Upload an image or select one of the provided examples.
|
57 |
+
2. Choose the language(s) for OCR processing.
|
58 |
+
3. Click the "Perform OCR" button to extract text from the image.
|
59 |
+
4. View the result image with bounding boxes and the extracted text.
|
60 |
+
5. Use the search box to find specific text within the extracted content.
|
61 |
+
|
62 |
+
## Example Images
|
63 |
+
|
64 |
+
The application includes several example images for testing:
|
65 |
+
|
66 |
+
- English text
|
67 |
+
- Hindi text
|
68 |
+
- Thai text
|
69 |
+
- French text
|
70 |
+
- Chinese text
|
71 |
+
- Japanese text
|
72 |
+
- Korean text
|
73 |
+
|
74 |
+
These images are automatically downloaded when you run the application.
|
75 |
+
|
76 |
+
## Alternative Version
|
77 |
+
|
78 |
+
An alternative, ready-to-use version of this OCR application is available on Vercel. You can access it [here](https://iitr-haq-nawaz-maliks-projects.vercel.app/).
|
79 |
+
|
80 |
+
## Notes
|
81 |
+
|
82 |
+
- The OCR process may take a few seconds to complete, especially for larger or more complex images.
|
83 |
+
- The accuracy of text extraction may vary depending on the quality of the input image and the complexity of the text.
|
84 |
+
|
85 |
+
## Contributing
|
86 |
+
|
87 |
+
Contributions to improve the application are welcome. Please feel free to submit issues or pull requests.
|
88 |
+
|
89 |
+
## License
|
90 |
+
|
91 |
+
license: mit
|
92 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|