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
Handwriting Recognition System based on a deep Convolutional Recurrent Neural Network architecture

Handwriting Recognition System This repository is the Tensorflow implementation of the Handwriting Recognition System described in Handwriting Recogni

Edgard Chammas 346 Jan 07, 2023
Code for the paper: Fusformer: A Transformer-based Fusion Approach for Hyperspectral Image Super-resolution

Fusformer Code for the paper: "Fusformer: A Transformer-based Fusion Approach for Hyperspectral Image Super-resolution" Plateform Python 3.8.5 + Pytor

Jin-Fan Hu (胡锦帆) 11 Dec 12, 2022
Basic functions manipulating images using the OpenCV library

OpenCV Basic functions manipulating images using the OpenCV library. Reading Ima

Shatha Siala 3 Feb 17, 2022
An Agnostic Computer Vision Framework - Pluggable to any Training Library: Fastai, Pytorch-Lightning with more to come

An Agnostic Object Detection Framework IceVision is the first agnostic computer vision framework to offer a curated collection with hundreds of high-q

airctic 790 Jan 05, 2023
governance proposal to make fei redeemable for eth

Feil Proposal 🌲 Abstract Migrate all ETH from Fei protocol-controlled value into Yearn ETH Vault. Allow redemptions of outstanding FEI for yvETH. At

13 Mar 31, 2022
RRD: Rotation-Sensitive Regression for Oriented Scene Text Detection

RRD: Rotation-Sensitive Regression for Oriented Scene Text Detection For more details, please refer to our paper. Citing Please cite the related works

Minghui Liao 102 Jun 29, 2022
This is a GUI for scrapping PDFs with the help of optical character recognition making easier than ever to scrape PDFs.

pdf-scraper-with-ocr With this tool I am aiming to facilitate the work of those who need to scrape PDFs either by hand or using tools that doesn't imp

Jacobo José Guijarro Villalba 75 Oct 21, 2022
An Implementation of the seglink alogrithm in paper Detecting Oriented Text in Natural Images by Linking Segments

Tips: A more recent scene text detection algorithm: PixelLink, has been implemented here: https://github.com/ZJULearning/pixel_link Contents: Introduc

dengdan 484 Dec 07, 2022
Semantic-based Patch Detection for Binary Programs

PMatch Semantic-based Patch Detection for Binary Programs Requirement tensorflow-gpu 1.13.1 numpy 1.16.2 scikit-learn 0.20.3 ssdeep 3.4 Usage tar -xvz

Mr.Curiosity 3 Sep 02, 2022
(CVPR 2021) ST3D: Self-training for Unsupervised Domain Adaptation on 3D Object Detection

ST3D Code release for the paper ST3D: Self-training for Unsupervised Domain Adaptation on 3D Object Detection, CVPR 2021 Authors: Jihan Yang*, Shaoshu

CVMI Lab 224 Dec 28, 2022
Simple app for visual editing of Page XML files

Name nw-page-editor - Simple app for visual editing of Page XML files. Version: 2021.02.22 Description nw-page-editor is an application for viewing/ed

Mauricio Villegas 27 Jun 20, 2022
Face Anonymizer - FaceAnonApp v1.0

Face Anonymizer - FaceAnonApp v1.0 Blur faces from image and video files in /data/files folder. Contents Repo of the source files for the FaceAnonApp.

6 Apr 18, 2022
OCR-D-compliant page segmentation

ocrd_segment This repository aims to provide a number of OCR-D-compliant processors for layout analysis and evaluation. Installation In your virtual e

OCR-D 59 Sep 10, 2022
Pixel art search engine for opengameart

Pixel Art Reverse Image Search for OpenGameArt What does the final search look like? The final search with an example can be found here. It looks like

Eivind Magnus Hvidevold 92 Nov 06, 2022
An interactive interface for using OpenCV's GrabCut algorithm for image segmentation.

Interactive GrabCut An interactive interface for using OpenCV's GrabCut algorithm for image segmentation. Setup Install dependencies: pip install nump

Jason Y. Zhang 16 Oct 10, 2022
Text to QR-CODE

QR CODE GENERATO USING PYTHON Author : RAFIK BOUDALIA. Installation Use the package manager pip to install foobar. pip install pyqrcode Usage from tki

Rafik Boudalia 2 Oct 13, 2021
SCOUTER: Slot Attention-based Classifier for Explainable Image Recognition

SCOUTER: Slot Attention-based Classifier for Explainable Image Recognition PDF Abstract Explainable artificial intelligence has been gaining attention

87 Dec 26, 2022
Official code for "Bridging Video-text Retrieval with Multiple Choice Questions", CVPR 2022 (Oral).

Bridging Video-text Retrieval with Multiple Choice Questions, CVPR 2022 (Oral) Paper | Project Page | Pre-trained Model | CLIP-Initialized Pre-trained

Applied Research Center (ARC), Tencent PCG 99 Jan 06, 2023
TextBoxes: A Fast Text Detector with a Single Deep Neural Network https://github.com/MhLiao/TextBoxes 基于SSD改进的文本检测算法,textBoxes_note记录了之前整理的笔记。

TextBoxes: A Fast Text Detector with a Single Deep Neural Network Introduction This paper presents an end-to-end trainable fast scene text detector, n

zhangjing1 24 Apr 28, 2022
Let's explore how we can extract text from forms

Form Segmentation Let's explore how we can extract text from any forms / scanned pages. Objectives The goal is to find an algorithm that can extract t

Philip Doxakis 42 Jun 05, 2022