Metadata-Version: 2.1
Name: agl-ocr-reader
Version: 1.1.1
Summary: OCR API: This OCR API is an application for extracting text from images and PDF files. It is built using Flask, a Python web framework. It utilizes the pytesseract OCR library, pymupdf and the PIL library for image processing.
License: Apache-2.0
Author: Max Hild
Author-email: Maxhild10@gmail.com
Requires-Python: >=3.10.8,<4.0.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: anyio (==3.7.0)
Requires-Dist: blinker (==1.6.2)
Requires-Dist: bs4 (==0.0.1)
Requires-Dist: certifi (==2023.5.7)
Requires-Dist: cffi (==1.15.1)
Requires-Dist: charset-normalizer (==3.1.0)
Requires-Dist: ci-info (==0.3.0)
Requires-Dist: flask (==2.3.2)
Requires-Dist: flask-testing (==0.8.1)
Requires-Dist: hunspell (==0.5.5)
Requires-Dist: jsonify (==0.5)
Requires-Dist: numpy (==1.24.3)
Requires-Dist: opencv-python (==4.8.0.74)
Requires-Dist: pandas (==2.0.2)
Requires-Dist: pdf2image (==1.16.3)
Requires-Dist: pillow (==9.5.0)
Requires-Dist: poppler-utils (==0.1.0)
Requires-Dist: prov (==2.0.0)
Requires-Dist: pycparser (==2.21)
Requires-Dist: pydot (==1.4.2)
Requires-Dist: pymupdf (==1.22.3)
Requires-Dist: pyparsing (==3.0.9)
Requires-Dist: pytesseract (==0.3.10)
Requires-Dist: requests (==2.31.0)
Requires-Dist: simplejson (==3.19.1)
Requires-Dist: six (==1.16.0)
Requires-Dist: sniffio (==1.3.0)
Requires-Dist: spacy (==3.6.0)
Requires-Dist: starlette (==0.28.0)
Requires-Dist: tools (==0.1.9)
Requires-Dist: traits (==6.3.2)
Requires-Dist: tzdata (==2023.3)
Requires-Dist: urllib3 (==2.0.3)
Requires-Dist: uvicorn (==0.22.0)
Requires-Dist: werkzeug (==2.3.6)
Project-URL: Bug Tracker, https://github.com/wg-lux/OCR_Reader/issues
Project-URL: Homepage, https://github.com/wg-lux/OCR_Reader/tree/main
Description-Content-Type: text/markdown


# OCR App with API

The OCR app is an application for extracting text from images and PDF files. It is built on Flask, a Python web framework, and utilizes the Tesseract OCR library and the PIL library for image processing.

# Features

API for the upload of images and PDF files for text extraction.
Support for various image formats such as JPG, JPEG, PNG and PDF.
Processing of PDF files by converting them into images and extracting text from the images.
API access to the same texts.

# Requirements

To run the app, the dependencies from requirements.txt must be installed:

Flask
pytesseract
Tesseract OCR
PIL (Python Imaging Library)
fitz
You can install the dependencies with pip by running the following command:

pip install -r requirements.txt

# Starting the Application

Run the app with the following command:

python app.py

The app will be started in test mode on http://localhost:5000.

# API Access Guide

For API usage, a request can be sent for example as Python code with the path of the image in the following form:

url = 'http://localhost:5000/api_endpoint'
image_path = '/image_path'
files = {'image': open(image_path, 'rb')}
response = requests.post(url, files=files)

Note: Make sure the app is running.

# Instructions

Make sure the app is running in your webbrowser. Since no content is put on the homepage you will see a server error. To use the API send a request like in the request.py file, supplying your path to the image .

# Note

Make sure that Tesseract OCR is installed on your system and the 'TESSDATA_PREFIX' environment variable is correctly set to the directory with the Tesseract language data.

# Rechtliches

Medizinische Daten werden mit MedCat klassifiziert.
Die Erstellung erfolgt unter Verwendung der maschinenlesbaren Fassung des Bundesinstituts für Arzneimittel und Medizinprodukte (BfArM).

Max Hild // AG Lux // 2023

