Skip to content

OCR is a technology that recognizes text within a digital image. It is commonly used to recognize text in scanned documents, but it serves many other purposes as well. OCR software processes a digital image by locating and recognizing characters, such as letters, numbers, and symbols.

Notifications You must be signed in to change notification settings

absam97/ocr_yolo_tesseract

Repository files navigation

I made some changes to the repo - now you can just clone it and follow below steps to do ocr -

  1. Install tesseract from here https://github.com/tesseract-ocr/tesseract/wiki

  2. chang pytesseract.pytesseract.tesseract_cmd = '/app/.apt/usr/bin/tesseract' in the app.py file to tesseract installed location.

  3. change your current directory to the repo using terminal, git bash or anaconda prompt

  4. run pip install -r requirements.txt

  5. run python app.py

  6. run localhost in your web browser

  7. drag and drop an image following the instructions and voila you'll get a text output

ocr_yolo_tesseract

OCR is a technology that recognizes text within a digital image. It is commonly used to recognize text in scanned documents, but it serves many other purposes as well. OCR software processes a digital image by locating and recognizing characters, such as letters, numbers, and symbols.

I acquired the data for this task from here - https://dataturks.com/projects/devika.mishra/Indian_Number_plates -

Images in this dataset looks like -

Steps - Instructions - Please make changes to the code input locations wherever required, for images mainly.

  1. Use Trained Model to generate text region with the help of the file generate_text_region.py from terminal you have to make changes to the location of input image. after doing this change run this code in your terminal - python generate_text_region.py

Output would look like - In you python file's directory look for licence0000.jpg

  1. Now Use this image to input in the check skew using this command in the terminal -

deskew input.png

if skew is present use deskew --output output.png input.png

after deskewing image would look like -

  1. Use below command to generate text as output from finale deskewed image -

python read_text.py

output would look like this -

You can convert this to text file as well using >'name.txt' in above python statement

For more information check out google colab notebook -

https://colab.research.google.com/drive/1O43GwR5VFz7-TslFiCegL0ixn00zbAl4#scrollTo=ppTaAffN-lCW

About

OCR is a technology that recognizes text within a digital image. It is commonly used to recognize text in scanned documents, but it serves many other purposes as well. OCR software processes a digital image by locating and recognizing characters, such as letters, numbers, and symbols.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages