Tesseract 4 LSTM vs TesseractAndCube performance

1 821 visningar
Hoppa till det första olästa meddelandet

THintz

oläst,
22 mars 2017 11:05:592017-03-22
till tesseract-ocr
LSTM recognize via TessBaseAPIRecognize() gives me the following performance numbers for the same bi-tonal image.  The image is read and passed as a bitmap.  These numbers are only for the TessBaseAPIRecognize() call portion of the process.

The question is this: should I have expected LSTM Only mode to be faster than Tesseract and Cube mode?

This is an x64 Windows build of Tesseract with Leptonica 1.74.1.  eng.traindata was used from the 4.0 download.

RECOGNIZE TIME: 00:00:11.3292062 | ENGINE: LstmOnly

RECOGNIZE TIME: 00:00:05.9569210 | ENGINE: TesseractAndCube

RECOGNIZE TIME: 00:00:10.6854010 | ENGINE: TesseractAndLstm

RECOGNIZE TIME: 00:00:10.6725257 | ENGINE: Default



universal reseller

oläst,
22 mars 2017 11:28:302017-03-22
till tesser...@googlegroups.com
​how did you used cube engine on tesse 4 !?

ShreeDevi Kumar

oläst,
22 mars 2017 11:29:372017-03-22
till tesser...@googlegroups.com

On 22-Mar-2017 8:58 PM, "universal reseller" <unire...@gmail.com> wrote:
​how did you used cube engine on tesse 4 !?

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/CAC9ebrorORNrpApquscKiPf2Qbguc85qY1SJve6heu2j4Dithg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

ShreeDevi Kumar

oläst,
22 mars 2017 11:32:412017-03-22
till tesser...@googlegroups.com
The initial 4.0alpha tag from November has cube in it. It was deleted later and is no longer in master.

In fact, the OEM code for LSTM was originally 4 and now is 2.

Shouldn't semantic versioning require tagging at major updates?


- excuse the brevity, sent from mobile
On 22-Mar-2017 8:58 PM, "universal reseller" <unire...@gmail.com> wrote:
​how did you used cube engine on tesse 4 !?

--

ShreeDevi Kumar

oläst,
22 mars 2017 12:04:242017-03-22
till tesser...@googlegroups.com
Sorry, mentioned incorrect code for LSTM

OCR Engine modes:
  0    Original Tesseract only.
  1    Neural nets LSTM only.
  2    Tesseract + LSTM.
  3    Default, based on what is available

- excuse the brevity, sent from mobile

THintz

oläst,
22 mars 2017 12:37:072017-03-22
till tesseract-ocr
I'm sure I cloned master on 3/20/2017 3:55.   publictypes.h defines this:

enum OcrEngineMode {
  OEM_TESSERACT_ONLY,           // Run Tesseract only - fastest
  OEM_LSTM_ONLY,                // Run just the LSTM line recognizer.
  OEM_TESSERACT_LSTM_COMBINED,  // Run the LSTM recognizer, but allow fallback
                                // to Tesseract when things get difficult.
  OEM_DEFAULT,                  // Specify this mode when calling init_*(),
                                // to indicate that any of the above modes
                                // should be automatically inferred from the
                                // variables in the language-specific config,
                                // command-line configs, or if not specified
                                // in any of the above should be set to the
                                // default OEM_TESSERACT_ONLY.
  OEM_CUBE_ONLY,                // Run Cube only - better accuracy, but slower
  OEM_TESSERACT_CUBE_COMBINED,  // Run both and combine results - best accuracy
};



On Wednesday, March 22, 2017 at 12:04:24 PM UTC-4, shree wrote:
Sorry, mentioned incorrect code for LSTM

OCR Engine modes:
  0    Original Tesseract only.
  1    Neural nets LSTM only.
  2    Tesseract + LSTM.
  3    Default, based on what is available

- excuse the brevity, sent from mobile
On 22-Mar-2017 9:02 PM, "ShreeDevi Kumar" <shree...@gmail.com> wrote:
The initial 4.0alpha tag from November has cube in it. It was deleted later and is no longer in master.

In fact, the OEM code for LSTM was originally 4 and now is 2.

Shouldn't semantic versioning require tagging at major updates?

- excuse the brevity, sent from mobile
On 22-Mar-2017 8:58 PM, "universal reseller" <unire...@gmail.com> wrote:
​how did you used cube engine on tesse 4 !?

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.

THintz

oläst,
22 mars 2017 13:54:272017-03-22
till tesseract-ocr
I noticed OpenMP support isn't enabled by default.  I'll get new timings.

What do modes 4 & 5 do if Cube is no longer present?  They produced good output, and performance was the best. 

THintz

oläst,
22 mars 2017 17:18:542017-03-22
till tesseract-ocr
Enabling OpenMP in Visual Studio for the build roughly doubled LSTM performance.

ShreeDevi Kumar

oläst,
22 mars 2017 22:15:152017-03-22
till tesser...@googlegroups.com
See https://github.com/tesseract-ocr/tesseract/commit/5deebe6c279f70215935c1f86baa7e7016c7f2a7

Ray's comment for commit

Moved cube aside without deleting it.



- excuse the brevity, sent from mobile
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.

To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden