An open API service indexing awesome lists of open source software.

https://github.com/devinci-it/ocr_server

OCR Server is a web application built with Flask that utilizes Optical Character Recognition (OCR) to extract text from images. It provides a simple interface for users to upload images and receive the extracted text.
https://github.com/devinci-it/ocr_server

flask python

Last synced: 3 months ago
JSON representation

OCR Server is a web application built with Flask that utilizes Optical Character Recognition (OCR) to extract text from images. It provides a simple interface for users to upload images and receive the extracted text.

Awesome Lists containing this project

README

          

# OCR Server

OCR Server is a web application built with Flask that utilizes Optical Character Recognition (OCR) to extract text from images. It provides a simple interface for users to upload images and receive the extracted text.

## Features

- Image uploading: Users can upload images containing text for OCR processing.
- Text extraction: The application extracts text from uploaded images using OCR.
- Demo functionality: Provides a demo page for users to try OCR on a sample image.

## Installation

1. Clone the repository:

```
git clone https://github.com/devinci-it/ocr_server
cd OCR_Server
```

2. (Optional) Create and activate a virtual environment:

```
python -m venv venv
source venv/bin/activate
```

3. Install dependencies:

```
pip install -r requirements.txt
```

- Alternatively, you can install the requirements system-wide:

```
pip install --upgrade Flask-WTF # Upgrade Flask-WTF
pip install --upgrade Flask-WTF # Upgrade Flask-WTF
```

4. Configure the application:

- Create a `config.cfg` file based on the provided `config.cfg.example` and set the necessary parameters.
- Ensure that you have the necessary configurations for Flask, such as the `SECRET_KEY`, `DEBUG`, `HOST`, `SSL_CERTIFICATE`, and `SSL_PRIVATE_KEY`.

5. Run the application:

```
python run.py
```

## Usage

- Access the application through your web browser at the specified host and port.
- Upload an image containing text on the homepage.
- The application will process the image and display the extracted text.

## Configuration

The application can be configured using the `config.cfg` file. Here are the available configurations:

- `DEBUG`: Set to `True` for debug mode.
- `HOST`: Host IP address or domain name.
- `SSL_CERTIFICATE`: Path to SSL certificate file for HTTPS (optional).
- `SSL_PRIVATE_KEY`: Path to SSL private key file for HTTPS (optional).

## Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or create a pull request.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.