Convert PDF/Image to TXT using EasyOcr - the best OCR engine available!

Overview

TwitterFacebookInstagramYouTubeWhatsAppWWWPinterestE-Mail


PDFImage2TXT - DOWNLOAD INSTALLER HERE

What can you do with it?

  • Convert scanned PDFs to TXT.
  • Convert scanned Documents to TXT.
  • No coding required!!
  • Installer for Windows
  • Source code included!
  • MIT license

How to install/run?

Tutorial and things you have to know:

,.-''-.,_,.' Step 1 '.,_,.-''-., Screenshot
Defining the problem:
As a German teacher in Brazil, quite often I have
to read texts about philosophy, politics, medicine etc. with my
students. Nowadays, the PDF format is the most common file format to
share text because of its simplicity.

As a German teacher, I distinguish between 3 types of PDFs:

1) The “text-is-text-format”:
The text we see is a real text (for the computer). We can copy and
paste it and search through it using CTRL + F. If all PDFs were like
this, my tool wouldn’t be necessary.

2) The “text-is-picture-with-a-text-overlay-format”: The text we are reading is actually a picture,
but there is a text layer on top of it. Sometimes that works so great that we can’t even notice a difference to the “text-is-text-format”,
but many times we end up getting results like you can see on the right
picture when we use CTRL + C !

3) The “text-is-picture-format”: For
us humans, it is a text but for the computer it is a picture, there
are no additional text layers. We can neither copy the text nor can we
use CTRL + F to search through it.
,.-''-.,_,.' Step 2 '.,_,.-''-., Screenshot
Why PDFImage2TXT?
There are some tools around to solve this problem, but I haven’t found
any which use EasyOCR. EasyOCR is made by some Indian company and
produces the greatest results ever! It is incredible how good it is!
It is far better than everything that I have seen so far, even better
than Googles Tesseract! The only problem is that it is really slow,
but I rather wait longer for great results than having shxxxy results right away.
The only thing I needed to make EasyOcr work the way I
wanted to, was a way to convert the PDF file to images. After searching for about 5 minutes on GitHub, I found a nice tool to convert each page of a PDF
to a jpg file of good quality (300 DPI). Since pdf2jpg
uses Java, please ensure that
Java is installed on your system! If it is not installed, PDFImage2TXT
won’t work on your PC!
,.-''-.,_,.' Step 3 '.,_,.-''-., Screenshot
How to use it?
PDFImage2TXT is very simple to use:
1) Install it
2) Start it
3) Select the PDF or image you want to convert
4) If you convert a PDF file, you can decide what pages you want to convert to text:

if you write 11,12,13,14,15 after having selected the PDF, the app will only convert the pages 11,12,13,14,15!
If you write "ALL", the app will convert the whole PDF document to text!

5) If you convert a picture to text, there is nothing else to configure.
,.-''-.,_,.' Step 4 '.,_,.-''-., Screenshot
Behind the scenes:
You don't have to choose a name for the output folder or file! During the
process, a folder with the same name as your PDF + the ending "_dir"
will be created, and special characters in the name of the folder will be
replaced by underlines.

(Example: Jürgen Habermas - Strukturwandel der Öffentlichkeit -Suhrkamp (2001).pdf becomes J_rgen_Habermas_Strukturwandel_der_ffentlichkeit_Suhrkamp_2001_pdf_dir)

Please make sure that there isn’t already a folder with that name!
Inside the folder, there will be 2 files for each page: one JPG and one TXT
,.-''-.,_,.' Step 5 '.,_,.-''-., Screenshot
Once the entire process is done, PDFImage2TXT will create a single TXT file by joining all TXT files
The final TXT file will be in the same folder and will contain the prefix "complete"!
Everything that you want is in that file! You only need that file!
If you want, you can delete everything else!
,.-''-.,_,.' Step 6 '.,_,.-''-., Screenshot
As you can see, thanks to EasyOcr the results are almost perfect!
The script I wrote, takes care of the hyphens at the end of each line. It
makes sure that all separated words are not separated in the converted
document!
PDFImage2TXT took about 1h15m for a PDF with around
1,000,000 characters. I used an Intel i5-9600KF @ 3.7 GHz with 6
Cores. It should be a lot faster with CUDA enabled (for everybody with
an NVIDIA GPU), but I couldn't get it to run on my PC. I am able to
use Cupy, OpenCV and Spacy with CUDA, but not Easy OCR. If you have
any solution, please tell me/us! It would be nice to implement that
feature!

License

PDFImage2TXT - Copyright (C) 2021 Johannes Fischer www.queroestudaralemao.com.br

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Donations

If this project has helped you somehow, consider donating a small amount. After being absent from computer programming for more than 20 years, I started again this year. At the beginning of 2021, I suffered from a bone infection and had to spend more than 3 months in hospital (only laying in bed!). To kill time, I stared learning Python, which rapidly became something bigger for me than just a "time killer". pavypal

Owner
Hans Alemão
A German teacher living in Brazil
Hans Alemão
Tools for manipulating and evaluating the hOCR format for representing multi-lingual OCR results by embedding them into HTML.

hocr-tools About About the code Installation System-wide with pip System-wide from source virtualenv Available Programs hocr-check -- check the hOCR f

OCRopus 285 Dec 08, 2022
Demo for the paper "Overlap-aware low-latency online speaker diarization based on end-to-end local segmentation"

Streaming speaker diarization Overlap-aware low-latency online speaker diarization based on end-to-end local segmentation by Juan Manuel Coria, Hervé

Juanma Coria 185 Jan 01, 2023
Text page dewarping using a "cubic sheet" model

page_dewarp Page dewarping and thresholding using a "cubic sheet" model - see full writeup at https://mzucker.github.io/2016/08/15/page-dewarping.html

Matt Zucker 1.2k Dec 29, 2022
OCR powered screen-capture tool to capture information instead of images

NormCap OCR powered screen-capture tool to capture information instead of images. Links: Repo | PyPi | Releases | Changelog | FAQs Content: Quickstart

575 Dec 31, 2022
Multi-Oriented Scene Text Detection via Corner Localization and Region Segmentation

This is the official implementation of "Multi-Oriented Scene Text Detection via Corner Localization and Region Segmentation". For more details, please

Pengyuan Lyu 309 Dec 06, 2022
Handwritten Character Recognition using CNN

Handwritten Character Recognition using CNN Problem Definition The main objective of this project is to solve the problem of handwritten character rec

Mohit Kaushik 4 Mar 02, 2022
Image processing is one of the most common term in computer vision

Image processing is one of the most common term in computer vision. Computer vision is the process by which computers can understand images and videos, and how they are stored, manipulated, and retri

Happy N. Monday 3 Feb 15, 2022
fishington.io bot with OpenCV and NumPy

fishington.io-bot fishington.io bot with using OpenCV and NumPy bot can continue to fishing fully automatically how to use Open cmd in fishington.io-b

Bahadır Araz 77 Jan 02, 2023
This can be use to convert text in a file to handwritten text.

TextToHandwriting This can be used to convert text to handwriting. Clone this project or download the code. Run TextToImage.py give the filename of th

Ashutosh Mahapatra 2 Feb 06, 2022
A curated list of awesome synthetic data for text location and recognition

awesome-SynthText A curated list of awesome synthetic data for text location and recognition and OCR datasets. Text location SynthText SynthText_Chine

Tianzhong 283 Jan 05, 2023
Lightning Fast Language Prediction 🚀

whatthelang Lightning Fast Language Prediction 🚀 Dependencies The dependencies can be installed using the requirements.txt file: $ pip install -r req

Indix 152 Oct 16, 2022
A Python wrapper for the tesseract-ocr API

tesserocr A simple, Pillow-friendly, wrapper around the tesseract-ocr API for Optical Character Recognition (OCR). tesserocr integrates directly with

Fayez 1.7k Dec 31, 2022
OCR of Chicago 1909 Renumbering Plan

Requirements: Python 3 (probably at least 3.4) pipenv (pip3 install pipenv) tesseract (brew install tesseract, at least if you have a mac and homebrew

ted whalen 2 Nov 21, 2021
Genalog is an open source, cross-platform python package allowing generation of synthetic document images with custom degradations and text alignment capabilities.

Genalog is an open source, cross-platform python package allowing generation of synthetic document images with custom degradations and text alignment capabilities.

Microsoft 235 Dec 22, 2022
The code for CVPR2022 paper "Likert Scoring with Grade Decoupling for Long-term Action Assessment".

Likert Scoring with Grade Decoupling for Long-term Action Assessment This is the code for CVPR2022 paper "Likert Scoring with Grade Decoupling for Lon

10 Oct 21, 2022
YOLOv5 in DOTA with CSL_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)

YOLOv5_DOTA_OBB YOLOv5 in DOTA_OBB dataset with CSL_label.(Oriented Object Detection) Datasets and pretrained checkpoint Datasets : DOTA Pretrained Ch

1.1k Dec 30, 2022
Automatically resolve RidderMaster based on TensorFlow & OpenCV

AutoRiddleMaster Automatically resolve RidderMaster based on TensorFlow & OpenCV 基于 TensorFlow 和 OpenCV 实现的全自动化解御迷士小马谜题 Demo How to use Deploy the ser

神龙章轩 5 Nov 19, 2021
Convert Text-to Handwriting Using Python

Convert Text-to Handwriting Using Python Description In this project we'll use python library that's "pywhatkit" for converting text to handwriting. t

8 Nov 19, 2022
A pkg stiching around view images(4-6cameras) to generate bird's eye view.

AVP-BEV-OPEN Please check our new work AVP_SLAM_SIM A pkg stiching around view images(4-6cameras) to generate bird's eye view! View Demo · Report Bug

Xinliang Zhong 37 Dec 01, 2022
Smart computer vision application

Smart-computer-vision-application Backend : opencv and python Library required:

2 Jan 31, 2022