Skip to content

Create api for image to text recognize using easyOCR and FastAPI framework.

Notifications You must be signed in to change notification settings

Jaylaelike/easyocr-fastapi-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easyocr-fastapi-app

A fastapi application that extracts text from images using easyocr.

Getting Started

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

Requirements for the software and other tools to build, test and push

  • Python 3.6+
  • fastapi
  • easyocr
  • numpy
  • PIL

Installing

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

API Endpoints

  • / 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.

Note

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.

About

Create api for image to text recognize using easyOCR and FastAPI framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published