A fastapi application that extracts text from images using easyocr.
These instructions will give you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on deploying the project on a live system.
Requirements for the software and other tools to build, test and push
- Python 3.6+
- fastapi
- easyocr
- numpy
- PIL
A step by step series of examples that tell you how to get a development environment running
Installation
pip install -r requirements.txt
Usage
uvicorn main:app --reload
/
The root endpoint that returns a simple message "Hello World"/ocr
The OCR endpoint that takes an image file and returns the extracted text as an array of strings./ocr_form
The OCR endpoint for handling form data that takes an image file and returns the extracted text as an array of strings.
This app is currently setup to only recognize text in Thai language. If you want to recognize text in other languages, modify the ocr = easyocr.Reader(["th"]) in the code accordingly.