Firkraag / ocr

a web service which can take an uploaded image and find any letters in it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

a web service which can take an uploaded image and find any letters in it

Run

Run the following command to launch the web service:

docker-compose up

then open http://127.0.0.1:8000/recognization/

Test

Run the following command:

python manage.py test

The ocr test will evaluate the edit distance between the actual string and the string we get from image. If the edit distance is less than one-tenth of the actual string, we consider it an successful ocr.

Requirements

  • pytesseract~=0.3.7: python wrap for tesseract, an OCR package written in C++

  • Pillow~=8.1.0

  • Django~=3.1.5

  • editdistance~=0.5.3: evaluate the edit distance between the actual string and the string we get from the image.

  • opencv-python: preprocess the image, perform a threshold to segment the foreground from the background,

    or apply a median blur to reduce noise.

About

a web service which can take an uploaded image and find any letters in it


Languages

Language:JavaScript 96.4%Language:Python 2.9%Language:HTML 0.5%Language:Dockerfile 0.2%