https://github.com/kumarmhaske/ocr-flask-application
OCR Flask Application: A web application built using Flask that leverages Azure Computer Vision API for Optical Character Recognition (OCR). Users can upload images, extract text from them, and download the processed results. The app is deployed on Azure App Service for scalability and accessibility.
https://github.com/kumarmhaske/ocr-flask-application
ai azure computer-vision handwriting-recognition image-processing ocr ocr-recognition optical-character-recognition
Last synced: over 1 year ago
JSON representation
OCR Flask Application: A web application built using Flask that leverages Azure Computer Vision API for Optical Character Recognition (OCR). Users can upload images, extract text from them, and download the processed results. The app is deployed on Azure App Service for scalability and accessibility.
- Host: GitHub
- URL: https://github.com/kumarmhaske/ocr-flask-application
- Owner: KumarMhaske
- Created: 2024-12-31T17:43:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-31T18:15:06.000Z (over 1 year ago)
- Last Synced: 2025-01-30T12:17:13.685Z (over 1 year ago)
- Topics: ai, azure, computer-vision, handwriting-recognition, image-processing, ocr, ocr-recognition, optical-character-recognition
- Language: HTML
- Homepage: https://ocrflaskapp-dxebc7d3dfh8hvha.eastus-01.azurewebsites.net/
- Size: 496 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OCR Flask Application
A web application built using **Flask** that integrates **Azure Computer Vision API** to perform **Optical Character Recognition (OCR)** on images. The application allows users to upload images, extract text, and download the results. It's deployed on **Azure App Service** for easy access and scalability.
## Features
- Upload images through a simple web interface
- Extract text from images using Azure Computer Vision OCR API
- Download the uploaded image after processing
- Easy to use and lightweight Flask app
- Hosted on Azure App Service
## Technologies Used
- **Flask**: Web framework for building the application
- **Azure Computer Vision API**: Used for performing OCR on uploaded images
- **HTML/CSS**: For creating the front-end interface
- **JavaScript**: To handle image uploads
- **Python**: Backend programming language
- **Pillow**: Python Imaging Library for image handling
- **GitHub Actions**: Continuous integration and deployment
## Requirements
- Python 3.6+
- Flask
- Azure SDK (`azure-cognitiveservices-vision`)
- Pillow
## Installation
To run this application locally:
1. Clone the repository:
```bash
git clone https://github.com/your-github-username/OCR-Flask-Application.git
```
2. Navigate into the project directory:
```bash
cd OCR-Flask-Application
```
3. Create a virtual environment:
```bash
python -m venv venv
```
4. Activate the virtual environment:
- On Windows:
```bash
.\venv\Scripts\activate
```
- On macOS/Linux:
```bash
source venv/bin/activate
```
5. Install the required dependencies:
```bash
pip install -r requirements.txt
```
6. Set up your Azure Computer Vision API key and endpoint as environment variables:
```bash
export COMPUTER_VISION_KEY="your_key"
export COMPUTER_VISION_ENDPOINT="your_endpoint"
```
On Windows, use `set` instead of `export`.
7. Run the application:
```bash
python app.py
```
8. Access the app in your browser at `http://127.0.0.1:5000`.
## Deployment
The application is deployed on **Azure App Service**. You can access it live through the following link:
[**Live Application**](https://ocrflaskapp-dxebc7d3dfh8hvha.eastus-01.azurewebsites.net/)
https://ocrflaskapp-dxebc7d3dfh8hvha.eastus-01.azurewebsites.net/
If you want to deploy the app, follow these steps:
1. Push the code to your GitHub repository.
2. Create a new App Service on Azure.
3. Configure continuous deployment from GitHub in the App Service settings.
## Screenshots
### Home Page

### OCR Result

## Usage
1. Open the app in your browser.
2. Upload an image containing text.
3. The extracted text will be displayed on the results page.
4. You can download the image as well.
## Contributing
Feel free to fork the repository and submit pull requests. Contributions are welcome!
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---