Skip to content

This repository is intended for validation of Japanese OCR accuracy using Tesseract OCR + pytesseract.

License

Notifications You must be signed in to change notification settings

iwstkhr/python-ocr-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python OCR sample using Tesseract OCR + pytesseract

Introduction

This repository is intended for validation of Japanese OCR accuracy using Tesseract OCR + pytesseract.
Run, Melos! written by Osamu Dazai is used as a sample PDF.

Version

Tesseract OCR 4.1.1

Processing Summary

A python script - app.py - executes the following:

Usage

$ NAME=pytesseract-sample
$ docker build -t $NAME .
$ docker run --name $NAME $NAME
$
$ # You can see OCR processing result in `result.txt`.
$ docker cp $NAME:/usr/src/app/result.txt ./
$ less result.txt
$
$ # Clean up
$ docker container rm $NAME
$ docker image rm $NAME

Validation Result

Because the result is composed of a single line, diff could not help.
Please use GUI diff tools like Araxis Merge on Mac, WinMerge on Windows, etc.
You can compare original.txt with result.txt in this repository.

I think the result is practical in some situations and accuracy will be more and more improved.

However, accuracy will be highly likely to worsen depending on PDF layout which you use, because the PDF used here is very simple layout and has no diagrams, tables, etc. Maybe the sample PDF - Run, Melos! - is old Japanese style, so it might affect OCR accuracy.

About

This repository is intended for validation of Japanese OCR accuracy using Tesseract OCR + pytesseract.

Topics

Resources

License

Stars

Watchers

Forks