building a fast digit recognition solution with python - pycon · atto help description r ead 6447...
TRANSCRIPT
![Page 1: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/1.jpg)
Building a fast digit recognition solution with Python
Stephen Hsu
http://about.me/cchhsu
2013.05.24
![Page 2: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/2.jpg)
One day ……
![Page 3: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/3.jpg)
@#$%^
#$%$@$
@#$%@# Sorry,
I was
wrong
![Page 4: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/4.jpg)
![Page 5: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/5.jpg)
My Goodness ….
![Page 6: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/6.jpg)
Image
Recognition
![Page 7: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/7.jpg)
There is a python
module named
pytesser
![Page 8: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/8.jpg)
![Page 9: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/9.jpg)
Tesseract OCR
Introduction
- Open source OCR engine
- Started at the HP labs between 1985 and 1994
- C, C++
- Google used it for document scan project
Training
- Images fonts of Benchmark tools are non-standard.
- Training Process is fun !
![Page 10: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/10.jpg)
Technologies
Common
Windows
Linux
Python 2.7
3rd party APP
jTessBoxEditor
Tesseract OCR
Imaging Process
pytesser
PIL
datetime, time
re
os, sys
csv
glob
![Page 11: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/11.jpg)
Image Pre-Processing
Image Cropping
- Crosshairs
Pixel Interpolation
20M Pixel 99M Pixel
Recognition rate from
42% to 99.99%
Binarization Processing
Lines Recognition
![Page 12: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/12.jpg)
Image Pre-Processing Sample
Original Image Image Cropping Pixel Interpolation
![Page 13: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/13.jpg)
Extracted Text
then ……..
Parser
In: Number
Out: Structured
number
Store & Convert
In: Structured Number
Out: CSV File
Sample_20130522214241.csv
![Page 14: Building a fast digit recognition solution with Python - PyCon · ATTO Help Description R ead 6447 7062 14229 22528 37185 38328 36671 38623 es3S3 38847 85353 go 180 256.0 5120 T 10](https://reader035.vdocument.in/reader035/viewer/2022071100/5fd8e21653ec6f4bd9294c41/html5/thumbnails/14.jpg)
END