SlideShare a Scribd company logo
1 of 18
Download to read offline
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_itcSolin TEM
 
Khmer ocr itc
Khmer ocr itcKhmer ocr itc
Khmer ocr itcSolin TEM
 
cs15 slide_v2
cs15 slide_v2cs15 slide_v2
cs15 slide_v2Solin TEM
 
0 tutorial contents
0 tutorial contents0 tutorial contents
0 tutorial contentsSolin TEM
 
Khmer ocr using gfd
Khmer ocr using gfdKhmer ocr using gfd
Khmer ocr using gfdSolin TEM
 
Khmer ocr using gfd_seminar_day
Khmer ocr using gfd_seminar_dayKhmer ocr using gfd_seminar_day
Khmer ocr using gfd_seminar_daySolin 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 LearningValéry BERNARD
 
Introduction Machine Learning by MyLittleAdventure
Introduction Machine Learning by MyLittleAdventureIntroduction Machine Learning by MyLittleAdventure
Introduction Machine Learning by MyLittleAdventuremylittleadventure
 
Bdd Net Frameworks
Bdd Net FrameworksBdd Net Frameworks
Bdd Net Frameworkshdgarcia
 
The Flow of TensorFlow
The Flow of TensorFlowThe Flow of TensorFlow
The Flow of TensorFlowJeongkyu Shin
 
Common Design of Deep Learning Frameworks
Common Design of Deep Learning FrameworksCommon Design of Deep Learning Frameworks
Common Design of Deep Learning FrameworksKenta Oono
 
BRV CTO Summit Deep Learning Talk
BRV CTO Summit Deep Learning TalkBRV CTO Summit Deep Learning Talk
BRV CTO Summit Deep Learning TalkDoug 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 MLSeldon
 
Toronto meetup 20190917
Toronto meetup 20190917Toronto meetup 20190917
Toronto meetup 20190917Bill Liu
 
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.jsTensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.jsStijn 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ébecGuillaume 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 2017Clarisse Hedglin
 
DAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDragan Nikolić
 
Scale machine learning deployment
Scale machine learning deploymentScale machine learning deployment
Scale machine learning deploymentGang 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

Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...shivangimorya083
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...amitlee9823
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 

Recently uploaded (20)

Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 

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?