Python tool that takes the OCR.space JSON output as input and draws a text overlay on top of the image.

Overview

OCR.space OCR Result Checker


=> Draw OCR overlay on top of image

Python tool that takes the OCR.space JSON output as input, and draws an overlay on top of the image.

The tool can be useful - for example - to test and debug OCR results from the Free OCR API.


License: Open-Source MIT License - https://opensource.org/licenses/MIT

V1.1 - 20211125

V2.0 - 20220130


How to use it:

  • Make sure you have python 3 installed.

  • Make sure you have pillow (PIL, Python Imaging Library) installed. pip install pillow

  • These libraries must be installed For Arabic (right to left) support. pip install --upgrade arabic-reshaper pip install python-bidi

  • Each platform may have different fonts for Unicode which include Chinese characters and they are in different folders. In order to make it standard across platforms we included Arial Unicode.ttf font within this project.

  • Keep Arial Unicode.ttf in the same folder with the script.

  • Usage example:

    python overlay.py input.jpg input.json [=> output will be INPUT file name with "_overlay.png" added.]

    OR depending on your python installations and configurations

    python3 overlay.py input.jpg input.json

  • Input can be both jpeg and png. Output will always be a png.

Added Arabic (right to left text) support:

If an image file name (before extension) ends with "_ara" then right to left logic is applied.

You might also like...
Use Youdao OCR API to covert your clipboard image to text.
Use Youdao OCR API to covert your clipboard image to text.

Alfred Clipboard OCR 注:本仓库基于 oott123/alfred-clipboard-ocr 的逻辑用 Python 重写,换用了有道 AI 的 API,准确率更高,有效防止百度导致隐私泄露等问题,并且有道 AI 初始提供的 50 元体验金对于其资费而言个人用户基本可以永久使用

A tool for extracting text from scanned documents (via OCR), with user-defined post-processing.

The project is based on older versions of tesseract and other tools, and is now superseded by another project which allows for more granular control o

Detect text blocks and OCR poorly scanned PDFs in bulk. Python module available via pip.
Detect text blocks and OCR poorly scanned PDFs in bulk. Python module available via pip.

doc2text doc2text extracts higher quality text by fixing common scan errors Developing text corpora can be a massive pain in the butt. Much of the tex

A pure pytorch implemented ocr project including text detection and recognition
A pure pytorch implemented ocr project including text detection and recognition

ocr.pytorch A pure pytorch implemented ocr project. Text detection is based CTPN and text recognition is based CRNN. More detection and recognition me

MXNet OCR implementation. Including text recognition and detection.

insightocr Text Recognition Accuracy on Chinese dataset by caffe-ocr Network LSTM 4x1 Pooling Gray Test Acc SimpleNet N Y Y 99.37% SE-ResNet34 N Y Y 9

OCR software for recognition of handwritten text
OCR software for recognition of handwritten text

Handwriting OCR The project tries to create software for recognition of a handwritten text from photos (also for Czech language). It uses computer vis

Generate text images for training deep learning ocr model
Generate text images for training deep learning ocr model

New version release:https://github.com/oh-my-ocr/text_renderer Text Renderer Generate text images for training deep learning OCR model (e.g. CRNN). Su

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted. ocrmypdf # it's a scriptable c

A bot that extract text from images using the Tesseract OCR.
A bot that extract text from images using the Tesseract OCR.

Text from image (OCR) @ocr_text_bot A simple bot to extract text from images. Usage What do I need? A AWS key configured locally, see here. NodeJS. I

Comments
  • Parsing ocr.space API response

    Parsing ocr.space API response

    Code works fine except one typo, I would say. Looks like Python code expects Overlay while API output renders TextOverlay.

    Probably line #67: for line in pr["Overlay"]["Lines"]:

    Should be: for line in pr["TextOverlay"]["Lines"]:

    You can see that in live API demo response which should be the latest version, I guess.

    Once changed that, code works fine.

    opened by QoT 1
Owner
a9t9
Open-Source software, code snippets and experiments mainly related to UI.Vision RPA, Copyfish & OCR.space OCR API. Maintained by the a9t9 software team.
a9t9
It is a image ocr tool using the Tesseract-OCR engine with the pytesseract package and has a GUI.

OCR-Tool It is a image ocr tool made in Python using the Tesseract-OCR engine with the pytesseract package and has a GUI. This is my second ever pytho

Khant Htet Aung 4 Jul 11, 2022
Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)

English | 简体中文 Introduction PaddleOCR aims to create multilingual, awesome, leading, and practical OCR tools that help users train better models and a

null 27.5k Jan 8, 2023
Indonesian ID Card OCR using tesseract OCR

KTP OCR Indonesian ID Card OCR using tesseract OCR KTP OCR is python-flask with tesseract web application to convert Indonesian ID Card to text / JSON

Revan Muhammad Dafa 5 Dec 6, 2021
This pyhton script converts a pdf to Image then using tesseract as OCR engine converts Image to Text

Script_Convertir_PDF_IMG_TXT Este script de pyhton convierte un pdf en Imagen luego utilizando tesseract como motor OCR convierte la Imagen a Texto. p

alebogado 1 Jan 27, 2022
A facial recognition device is a device that takes an image or a video of a human face and compares it to another image faces in a database.

A facial recognition device is a device that takes an image or a video of a human face and compares it to another image faces in a database. The structure, shape and proportions of the faces are compared during the face recognition steps.

Pavankumar Khot 4 Mar 19, 2022
Fun program to overlay a mask to yourself using a webcam

Superhero Mask Overlay Description Simple project made for fun. It consists of placing a mask (a PNG image with transparent background) on your face.

KB Kwan 10 Dec 1, 2022
Code for the paper STN-OCR: A single Neural Network for Text Detection and Text Recognition

STN-OCR: A single Neural Network for Text Detection and Text Recognition This repository contains the code for the paper: STN-OCR: A single Neural Net

Christian Bartz 496 Jan 5, 2023
OCR system for Arabic language that converts images of typed text to machine-encoded text.

Arabic OCR OCR system for Arabic language that converts images of typed text to machine-encoded text. The system currently supports only letters (29 l

Hussein Youssef 144 Jan 5, 2023
OCR, Scene-Text-Understanding, Text Recognition

Scene-Text-Understanding Survey [2015-PAMI] Text Detection and Recognition in Imagery: A Survey paper [2014-Front.Comput.Sci] Scene Text Detection and

Alan Tang 354 Dec 12, 2022