SlideShare a Scribd company logo
8. Modernization Efforts
Cleaning up the code and adding
newer technology
Ray Smith, Google Inc.
Tesseract Tutorial: DAS 2014 Tours France
Code Cleanup
● Conversion to C++ completed
● Thread-compatibility: can run multiple instances in separate
threads
● Multi-language (single and mixed) capability:
copes with jpn, heb, hin, and mixes such as hin+eng
● Removed many hard-coded limits, eg on character set, dawgs
● New beam search
● ResultIterator for accessing the internal data
● More generic classifier API for plug-n-play experiments
● Removed lots of dead code, including IMAGE class.
Tesseract Tutorial: DAS 2014 Tours France
OpenCL activity (Partnership with AMD)
Motivation:
● Accelerated Processing Units (APUs) and integrated GPUs are now
common place across Desktop, Mobile and Server platforms. GPUs have
~10x compute capability compared to CPUs
● OpenCL is a platform independent open-source parallel programming
language that exploits GPU capabilities
● Tesseract processing pipeline consists of several parallel-friendly steps
mainly in image preprocessing & Character / Word recognition
● Hence Tesseract OCR processing has been accelerated using OpenCL
Tesseract Tutorial: DAS 2014 Tours France
Open CL Progress (Data provided by AMD team)
Speed-up so far 36%, with the class pruner still to do!
Times shown in seconds on 6
page color business letter on
AMD A10-7850K Kaveri
machine with OpenCL1.2
ClassPruner, feature extraction,
MasterMatcher still to do.
OpenCL2.0 coming.
Module Native
CPU
OpenCL Speed-up
ratio
Tiff Image Read + color mapping 3.837 2.546 1.507
RGB to gray 5.157 0.691 7.463
Histogram 4.423 0.384 11.518
Thresholding 5.474 0.268 20.425
Morphology (layout analysis) 4.950 0.323 15.325
Master Matcher (knn classifier) 25.954 9.249 2.806
Other (work in progress) 74.209 76.626 0.968
Total 124.004 91.168 1.360
Tesseract Tutorial: DAS 2014 Tours France
Plug-n-Play Classifier API (Highlights)
class ShapeClassifier {
…
virtual int UnicharClassifySample(const TrainingSample& sample, Pix* page_pix,
int debug, UNICHAR_ID keep_this,
GenericVector<UnicharRating>* results);
virtual int ClassifySample(const TrainingSample& sample, Pix* page_pix,
int debug, UNICHAR_ID keep_this,
GenericVector<ShapeRating>* results);
● Either UnicharClassifySample or ClassifySample may be
implemented.
● Difference is whether to return a UNICHAR_ID or indirect through a
Shapetable.
Tesseract Tutorial: DAS 2014 Tours France
Input data for Classifier
class TrainingSample : public ELIST_LINK {
Pix* GetSamplePix(int padding, Pix* page_pix) const;
UNICHAR_ID class_id() const;
int font_id() const;
const INT_FEATURE_STRUCT* features() const;
const MicroFeature* micro_features() const;
Provides access to everything from an image of the character through
to the current tesseract features.
Tesseract Tutorial: DAS 2014 Tours France
Algorithmic Modernization
● Cube added Convolutional NN, but improvement was
disappointing.
● It would be nice to eliminate the polygonal approximation…
● It would be nice to eliminate the need for accurate baseline
normalization
=> New classifier experiments
Tesseract Tutorial: DAS 2014 Tours France
Cube
● Standard Convolutional Neural Network character classifier.
● Uses over-segmentation and (a different) beam search for
character segmentation.
● Implemented as an alternative word recognizer.
● Achieves about 50% reduction in errors on Hindi when run together
with Tesseract’s word recognizer.
● Improvement for other languages disappointing: few % for major
slow-down (3x).
● Training code unmaintained, unused.
Tesseract Tutorial: DAS 2014 Tours France
Eliminate the Polygonal Approximation?
Pixel edge step outlines -> Polygonal approximation
Tesseract Tutorial: DAS 2014 Tours France
Challenge: Eliminate the Polygonal Approximation!
● Allow feature extraction from greyscale by eliminating the
dependence on the polygonal approximation.
● Make it faster and more accurate for CJK, Indic, and OSD.
● Keep everything else as constant as possible:
○ Same feature definition
○ Same segmentation search/word recognizer
○ Same training data, but add scope for significantly more fonts.
Tesseract Tutorial: DAS 2014 Tours France
Idea 1: Modernize. Apply boosting to Class Pruner
Result:
● Improves accuracy on Training data.
● Generalization hard to achieve.
● Spreading difficult to incorporate into boosting framework.
Tesseract Tutorial: DAS 2014 Tours France
Idea 2: Pure Logic is Superior to Emotion, Captain
Q: If Tesseract is a kNN classifier, why doesn't it achieve 100% accuracy on its
training data?
A: It clusters its training samples (by font) and uses the cluster means only =>
any individual sample may not be nearest to the correct cluster center.
Q: How can we achieve 100% accuracy on the training data?
A: Pure Logic. OR together all the training samples in the class pruner.
Q: Doesn't that make it accept anything as anything?
A: Not with proper shape clustering.
Tesseract Tutorial: DAS 2014 Tours France
Binary Pruner in Action
Quantized Features Matched against multiple
fonts
Matched against a single
font
Tesseract Tutorial: DAS 2014 Tours France
How about Generalization?
● Early experiments showed the BinaryPruner less accurate on
unseen fonts when trained on 200 fonts than the ClassPruner
trained on 32 fonts.
● Adding a 'halo' classifier working on the near neighbors of the
training samples fixed the problem - at a cost:
Character subst errs -2.5% (UNLV)
Flat word drops -0.15%
Bulk drops +2.3%
CPU +110%
Tesseract Tutorial: DAS 2014 Tours France
Non-Obvious observation:
Despite being designed over 20 years ago, the current Tesseract
classifier is incredibly difficult to beat with so-called modern methods.
(Without cheating by changing features or upping the number of
training fonts)
Why?
Tesseract Tutorial: DAS 2014 Tours France
Statistical Dependence Strikes Again
● Small features to large proto matching
accounts well for large-scale features
● Binary quantization of feature space is
a loser
● HMMs, DBNs and LSTMs have a
better chance than other methods
Tesseract Tutorial: DAS 2014 Tours France
LSTM Integration
● LSTM code based on OCROpus Python implementation.
● Expanded capabilities including 2-D, and input of Tesseract
features, as well as images.
● Fully integrated with Tesseract at the line level. (May change)
● Visualization with existing Viewer API.
● Training code included (unlike cube).
● Parallelized with openMP.
● Likely will get OpenCL implementation too.
● Coming in next release of Tesseract.
Tesseract Tutorial: DAS 2014 Tours France
Thanks for Listening!
Questions?

More Related Content

Viewers also liked

CS_rapport_final_fr_v3_1
CS_rapport_final_fr_v3_1CS_rapport_final_fr_v3_1
CS_rapport_final_fr_v3_1Solin TEM
 
Khmer ocr scientificday_itc
Khmer ocr scientificday_itcKhmer ocr scientificday_itc
Khmer ocr scientificday_itc
Solin TEM
 
Khmer ocr itc
Khmer ocr itcKhmer ocr itc
Khmer ocr itc
Solin TEM
 
cs15 slide_v2
cs15 slide_v2cs15 slide_v2
cs15 slide_v2Solin TEM
 
0 tutorial contents
0 tutorial contents0 tutorial contents
0 tutorial contents
Solin TEM
 
Khmer ocr using gfd
Khmer ocr using gfdKhmer ocr using gfd
Khmer ocr using gfd
Solin TEM
 
Khmer ocr using gfd_seminar_day
Khmer ocr using gfd_seminar_dayKhmer ocr using gfd_seminar_day
Khmer ocr using gfd_seminar_day
Solin TEM
 

Viewers also liked (7)

CS_rapport_final_fr_v3_1
CS_rapport_final_fr_v3_1CS_rapport_final_fr_v3_1
CS_rapport_final_fr_v3_1
 
Khmer ocr scientificday_itc
Khmer ocr scientificday_itcKhmer ocr scientificday_itc
Khmer ocr scientificday_itc
 
Khmer ocr itc
Khmer ocr itcKhmer ocr itc
Khmer ocr itc
 
cs15 slide_v2
cs15 slide_v2cs15 slide_v2
cs15 slide_v2
 
0 tutorial contents
0 tutorial contents0 tutorial contents
0 tutorial contents
 
Khmer ocr using gfd
Khmer ocr using gfdKhmer ocr using gfd
Khmer ocr using gfd
 
Khmer ocr using gfd_seminar_day
Khmer ocr using gfd_seminar_dayKhmer ocr using gfd_seminar_day
Khmer ocr using gfd_seminar_day
 

Similar to 8 modernization efforts

An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learning
Valéry BERNARD
 
Introduction Machine Learning by MyLittleAdventure
Introduction Machine Learning by MyLittleAdventureIntroduction Machine Learning by MyLittleAdventure
Introduction Machine Learning by MyLittleAdventure
mylittleadventure
 
Bdd Net Frameworks
Bdd Net FrameworksBdd Net Frameworks
Bdd Net Frameworks
hdgarcia
 
Edge and ai
Edge and aiEdge and ai
Edge and ai
Vishwas N
 
The Flow of TensorFlow
The Flow of TensorFlowThe Flow of TensorFlow
The Flow of TensorFlow
Jeongkyu Shin
 
Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU
Andrés Leonardo Martinez Ortiz
 
Common Design of Deep Learning Frameworks
Common Design of Deep Learning FrameworksCommon Design of Deep Learning Frameworks
Common Design of Deep Learning Frameworks
Kenta Oono
 
BRV CTO Summit Deep Learning Talk
BRV CTO Summit Deep Learning TalkBRV CTO Summit Deep Learning Talk
BRV CTO Summit Deep Learning Talk
Doug Chang
 
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud MLScaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Seldon
 
Toronto meetup 20190917
Toronto meetup 20190917Toronto meetup 20190917
Toronto meetup 20190917
Bill Liu
 
Shuzworld Analysis
Shuzworld AnalysisShuzworld Analysis
Shuzworld Analysis
Brenda Thomas
 
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.jsTensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
Stijn Decubber
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Raffi Khatchadourian
 
Présentation du FME World Tour 2018 à Québec
Présentation du FME World Tour 2018 à QuébecPrésentation du FME World Tour 2018 à Québec
Présentation du FME World Tour 2018 à Québec
Guillaume Genest
 
Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...
Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...
Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...
AI Frontiers
 
Austin,TX Meetup presentation tensorflow final oct 26 2017
Austin,TX Meetup presentation tensorflow final oct 26 2017Austin,TX Meetup presentation tensorflow final oct 26 2017
Austin,TX Meetup presentation tensorflow final oct 26 2017
Clarisse Hedglin
 
ML in Android
ML in AndroidML in Android
ML in Android
Jose Antonio Corbacho
 
DAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - Introduction
Dragan Nikolić
 
Scale machine learning deployment
Scale machine learning deploymentScale machine learning deployment
Scale machine learning deployment
Gang Tao
 

Similar to 8 modernization efforts (20)

An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learning
 
Introduction Machine Learning by MyLittleAdventure
Introduction Machine Learning by MyLittleAdventureIntroduction Machine Learning by MyLittleAdventure
Introduction Machine Learning by MyLittleAdventure
 
Bdd Net Frameworks
Bdd Net FrameworksBdd Net Frameworks
Bdd Net Frameworks
 
Edge and ai
Edge and aiEdge and ai
Edge and ai
 
The Flow of TensorFlow
The Flow of TensorFlowThe Flow of TensorFlow
The Flow of TensorFlow
 
Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU
 
Common Design of Deep Learning Frameworks
Common Design of Deep Learning FrameworksCommon Design of Deep Learning Frameworks
Common Design of Deep Learning Frameworks
 
BRV CTO Summit Deep Learning Talk
BRV CTO Summit Deep Learning TalkBRV CTO Summit Deep Learning Talk
BRV CTO Summit Deep Learning Talk
 
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud MLScaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
 
Toronto meetup 20190917
Toronto meetup 20190917Toronto meetup 20190917
Toronto meetup 20190917
 
Shuzworld Analysis
Shuzworld AnalysisShuzworld Analysis
Shuzworld Analysis
 
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.jsTensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
 
Présentation du FME World Tour 2018 à Québec
Présentation du FME World Tour 2018 à QuébecPrésentation du FME World Tour 2018 à Québec
Présentation du FME World Tour 2018 à Québec
 
Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...
Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...
Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...
 
Austin,TX Meetup presentation tensorflow final oct 26 2017
Austin,TX Meetup presentation tensorflow final oct 26 2017Austin,TX Meetup presentation tensorflow final oct 26 2017
Austin,TX Meetup presentation tensorflow final oct 26 2017
 
ML in Android
ML in AndroidML in Android
ML in Android
 
DAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - Introduction
 
SSI Poster
SSI PosterSSI Poster
SSI Poster
 
Scale machine learning deployment
Scale machine learning deploymentScale machine learning deployment
Scale machine learning deployment
 

Recently uploaded

Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 

Recently uploaded (20)

Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 

8 modernization efforts

  • 1. 8. Modernization Efforts Cleaning up the code and adding newer technology Ray Smith, Google Inc.
  • 2. Tesseract Tutorial: DAS 2014 Tours France Code Cleanup ● Conversion to C++ completed ● Thread-compatibility: can run multiple instances in separate threads ● Multi-language (single and mixed) capability: copes with jpn, heb, hin, and mixes such as hin+eng ● Removed many hard-coded limits, eg on character set, dawgs ● New beam search ● ResultIterator for accessing the internal data ● More generic classifier API for plug-n-play experiments ● Removed lots of dead code, including IMAGE class.
  • 3. Tesseract Tutorial: DAS 2014 Tours France OpenCL activity (Partnership with AMD) Motivation: ● Accelerated Processing Units (APUs) and integrated GPUs are now common place across Desktop, Mobile and Server platforms. GPUs have ~10x compute capability compared to CPUs ● OpenCL is a platform independent open-source parallel programming language that exploits GPU capabilities ● Tesseract processing pipeline consists of several parallel-friendly steps mainly in image preprocessing & Character / Word recognition ● Hence Tesseract OCR processing has been accelerated using OpenCL
  • 4. Tesseract Tutorial: DAS 2014 Tours France Open CL Progress (Data provided by AMD team) Speed-up so far 36%, with the class pruner still to do! Times shown in seconds on 6 page color business letter on AMD A10-7850K Kaveri machine with OpenCL1.2 ClassPruner, feature extraction, MasterMatcher still to do. OpenCL2.0 coming. Module Native CPU OpenCL Speed-up ratio Tiff Image Read + color mapping 3.837 2.546 1.507 RGB to gray 5.157 0.691 7.463 Histogram 4.423 0.384 11.518 Thresholding 5.474 0.268 20.425 Morphology (layout analysis) 4.950 0.323 15.325 Master Matcher (knn classifier) 25.954 9.249 2.806 Other (work in progress) 74.209 76.626 0.968 Total 124.004 91.168 1.360
  • 5. Tesseract Tutorial: DAS 2014 Tours France Plug-n-Play Classifier API (Highlights) class ShapeClassifier { … virtual int UnicharClassifySample(const TrainingSample& sample, Pix* page_pix, int debug, UNICHAR_ID keep_this, GenericVector<UnicharRating>* results); virtual int ClassifySample(const TrainingSample& sample, Pix* page_pix, int debug, UNICHAR_ID keep_this, GenericVector<ShapeRating>* results); ● Either UnicharClassifySample or ClassifySample may be implemented. ● Difference is whether to return a UNICHAR_ID or indirect through a Shapetable.
  • 6. Tesseract Tutorial: DAS 2014 Tours France Input data for Classifier class TrainingSample : public ELIST_LINK { Pix* GetSamplePix(int padding, Pix* page_pix) const; UNICHAR_ID class_id() const; int font_id() const; const INT_FEATURE_STRUCT* features() const; const MicroFeature* micro_features() const; Provides access to everything from an image of the character through to the current tesseract features.
  • 7. Tesseract Tutorial: DAS 2014 Tours France Algorithmic Modernization ● Cube added Convolutional NN, but improvement was disappointing. ● It would be nice to eliminate the polygonal approximation… ● It would be nice to eliminate the need for accurate baseline normalization => New classifier experiments
  • 8. Tesseract Tutorial: DAS 2014 Tours France Cube ● Standard Convolutional Neural Network character classifier. ● Uses over-segmentation and (a different) beam search for character segmentation. ● Implemented as an alternative word recognizer. ● Achieves about 50% reduction in errors on Hindi when run together with Tesseract’s word recognizer. ● Improvement for other languages disappointing: few % for major slow-down (3x). ● Training code unmaintained, unused.
  • 9. Tesseract Tutorial: DAS 2014 Tours France Eliminate the Polygonal Approximation? Pixel edge step outlines -> Polygonal approximation
  • 10. Tesseract Tutorial: DAS 2014 Tours France Challenge: Eliminate the Polygonal Approximation! ● Allow feature extraction from greyscale by eliminating the dependence on the polygonal approximation. ● Make it faster and more accurate for CJK, Indic, and OSD. ● Keep everything else as constant as possible: ○ Same feature definition ○ Same segmentation search/word recognizer ○ Same training data, but add scope for significantly more fonts.
  • 11. Tesseract Tutorial: DAS 2014 Tours France Idea 1: Modernize. Apply boosting to Class Pruner Result: ● Improves accuracy on Training data. ● Generalization hard to achieve. ● Spreading difficult to incorporate into boosting framework.
  • 12. Tesseract Tutorial: DAS 2014 Tours France Idea 2: Pure Logic is Superior to Emotion, Captain Q: If Tesseract is a kNN classifier, why doesn't it achieve 100% accuracy on its training data? A: It clusters its training samples (by font) and uses the cluster means only => any individual sample may not be nearest to the correct cluster center. Q: How can we achieve 100% accuracy on the training data? A: Pure Logic. OR together all the training samples in the class pruner. Q: Doesn't that make it accept anything as anything? A: Not with proper shape clustering.
  • 13. Tesseract Tutorial: DAS 2014 Tours France Binary Pruner in Action Quantized Features Matched against multiple fonts Matched against a single font
  • 14. Tesseract Tutorial: DAS 2014 Tours France How about Generalization? ● Early experiments showed the BinaryPruner less accurate on unseen fonts when trained on 200 fonts than the ClassPruner trained on 32 fonts. ● Adding a 'halo' classifier working on the near neighbors of the training samples fixed the problem - at a cost: Character subst errs -2.5% (UNLV) Flat word drops -0.15% Bulk drops +2.3% CPU +110%
  • 15. Tesseract Tutorial: DAS 2014 Tours France Non-Obvious observation: Despite being designed over 20 years ago, the current Tesseract classifier is incredibly difficult to beat with so-called modern methods. (Without cheating by changing features or upping the number of training fonts) Why?
  • 16. Tesseract Tutorial: DAS 2014 Tours France Statistical Dependence Strikes Again ● Small features to large proto matching accounts well for large-scale features ● Binary quantization of feature space is a loser ● HMMs, DBNs and LSTMs have a better chance than other methods
  • 17. Tesseract Tutorial: DAS 2014 Tours France LSTM Integration ● LSTM code based on OCROpus Python implementation. ● Expanded capabilities including 2-D, and input of Tesseract features, as well as images. ● Fully integrated with Tesseract at the line level. (May change) ● Visualization with existing Viewer API. ● Training code included (unlike cube). ● Parallelized with openMP. ● Likely will get OpenCL implementation too. ● Coming in next release of Tesseract.
  • 18. Tesseract Tutorial: DAS 2014 Tours France Thanks for Listening! Questions?