Tessract1 in multithreading

692 views
Skip to first unread message

renjitha nair

unread,
May 7, 2014, 7:07:32 AM5/7/14
to tesser...@googlegroups.com

Hi,

Try to execute a long list of files using tess4j  with Tesseract1 in multithread environment [using eclipse jobs api ] ,

Then some of the files failed due to  “Invalid Memory Exception”  , Other files are executed succesfully.

Please help to resolve this issue.

Execution env used in my project:

Java 7

JVM 32bit

OS 64 bit

 Thanks,

Renjitha

Quan Nguyen

unread,
May 8, 2014, 8:17:56 AM5/8/14
to tesser...@googlegroups.com
Could they be bad images? Can you reprocess them in subsequent runs?

renjitha nair

unread,
May 13, 2014, 1:27:54 AM5/13/14
to tesser...@googlegroups.com
Thank you for ur update :)

Actually image is not bad, my project is a pdf splitter so try to process the scanned pdf page contain single image per page, so the image size may be larger.
When i execute the failed files alone then it executed successfully...
This issue comes when executing a set files using thread...

Thanks,
Renjitha 


Jeryl Cook

unread,
Mar 11, 2015, 3:41:30 AM3/11/15
to tesser...@googlegroups.com


On Wednesday, May 7, 2014 at 7:07:32 AM UTC-4, renjitha nair wrote:

Hi,

Try to execute a long list of files using tess4j  with Tesseract1 in multithread environment [using eclipse jobs api ] ,

Then some of the files failed due to  “Invalid Memory Exception”  , Other files are executed succesfully.

Please help to resolve this issue.


i have this same issue, Tesseract does not appear to be thread-safe.

Quan Nguyen

unread,
Mar 11, 2015, 7:58:10 PM3/11/15
to tesser...@googlegroups.com
I had success running multi-threaded examples with Tess4J 2.0.0 Beta, which is based on Tesseract 3.03RC.

http://sourceforge.net/p/tess4j/discussion/1202293/thread/4562eccb/
http://sourceforge.net/p/tess4j/discussion/1202294/thread/55c2e865/

Dattatraya Tembare

unread,
Aug 29, 2018, 10:31:17 AM8/29/18
to tesseract-ocr
Thanks! for these examples, but they pretty old. I think there may be something inbuilt in new versions. 
I'm looking something like this with a new version, if there are any new examples please share.

I'm using tesseract on windows 64 bit.
C:\Users>tesseract --version
tesseract 4.0.0-alpha.20180109
 leptonica-1.74.4
  libgif 4.1.6(?) : libjpeg 8d (libjpeg-turbo 1.5.0) : libpng 1.6.24 : libtiff 4.0.6 : zlib 1.2.8 : libwebp 0.4.3 : libopenjp2 2.1.0

Expecting for input source as an array of File or array of BufferedImage and output will be array/map of String

Thanks!
Datta

Dattatraya Tembare

unread,
Aug 29, 2018, 10:43:15 AM8/29/18
to tesser...@googlegroups.com
Thanks! for these examples, but they pretty old. I think there may be something inbuilt in new versions. 
I'm looking something like this with a new version, if there are any new examples please share.

I'm using tesseract on windows 64 bit.
C:\Users>tesseract --version
tesseract 4.0.0-alpha.20180109
 leptonica-1.74.4
  libgif 4.1.6(?) : libjpeg 8d (libjpeg-turbo 1.5.0) : libpng 1.6.24 : libtiff 4.0.6 : zlib 1.2.8 : libwebp 0.4.3 : libopenjp2 2.1.0
AND 
<dependency>
<groupId>net.sourceforge.tess4j</groupId>
<artifactId>tess4j</artifactId>
<version>4.0.1</version>
</dependency>
 

Expecting for input source as an array of File or array of BufferedImage and output will be array/map of String

Thanks!
Datta


On Wednesday, March 11, 2015 at 7:58:10 PM UTC-4, Quan Nguyen wrote:
I had success running multi-threaded examples with Tess4J 2.0.0 Beta, which is based on Tesseract 3.03RC.

http://sourceforge.net/p/tess4j/discussion/1202293/thread/4562eccb/
http://sourceforge.net/p/tess4j/discussion/1202294/thread/55c2e865/

On Wednesday, March 11, 2015 at 2:41:30 AM UTC-5, Jeryl Cook wrote:


On Wednesday, May 7, 2014 at 7:07:32 AM UTC-4, renjitha nair wrote:

Hi,

Try to execute a long list of files using tess4j  with Tesseract1 in multithread environment [using eclipse jobs api ] ,

Then some of the files failed due to  “Invalid Memory Exception”  , Other files are executed succesfully.

Please help to resolve this issue.


i have this same issue, Tesseract does not appear to be thread-safe.

Execution env used in my project:

Java 7

JVM 32bit

OS 64 bit

 Thanks,

Renjitha

--
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.
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/995cf325-76ad-4ca4-a447-ceb9f2a32f8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Best Regards,
Dattatraya Tembare
Reply all
Reply to author
Forward
0 new messages