Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tesseract 4.0 support #385

Closed
asevans48 opened this issue Feb 24, 2017 · 19 comments
Closed

Tesseract 4.0 support #385

asevans48 opened this issue Feb 24, 2017 · 19 comments

Comments

@asevans48
Copy link

Tesseract 4.0 is feature complete (https://github.com/tesseract-ocr/tesseract/wiki/4.0%20Accuracy%20and%20Performance). Any chance of an update to the java-cpp presets?

Keep up the great work.

@saudet
Copy link
Member

saudet commented Feb 24, 2017

Sure, mind giving it a try yourself?

@asevans48
Copy link
Author

I'll see if I can find the time. I know its intensive. Right now I am starting to write for a blog, trying get a company going, and doing the whole 9-5/6pm thing.

@shengc
Copy link

shengc commented Aug 3, 2017

would be really helpful if presets can upgrade the supported version of tesseract to 4.0, as it was trained with LSTM

On a separate note, I tried to resolve against 1.3.4-SNAPSHOT, but got a few resolution errors for dependencies like,

tesseract-3.05.01-1.3.4-20170801.192635-8-linux-x86_64.jar
leptonica-1.74.4-1.3.4-20170801.192633-8-linux-x86_64.jar
...

Is this the right one to use?

"org.bytedeco.javacpp-presets" % "tesseract-platform" % "3.05.01-1.3.4-SNAPSHOT"

Do I have to use a custom resolver ?

@saudet
Copy link
Member

saudet commented Aug 3, 2017 via email

@shengc
Copy link

shengc commented Aug 3, 2017

Sorry, I am not sure if I follow. I am using sbt to resolve the dependencies. Do you actually mean that sbt has issue with SNAPSHOT artifacts ? And what exactly does "but it works if they are in
.m2/repository instead" mean ?

@saudet
Copy link
Member

saudet commented Aug 3, 2017

Sorry, I meant sbt as well as Gradle. If the artifacts are available in ~/.m2/repository and we ask Gradle or sbt to pick them up from there, it works.

@saudet
Copy link
Member

saudet commented Aug 8, 2017

Could you please report this issue upstream so the guys working on sbt can get this working properly? That would be great.

@malz
Copy link

malz commented Feb 4, 2018

+1 on this issue, Tesseract 4.0.0 support would be much appreciated.

@saudet
Copy link
Member

saudet commented Feb 4, 2018

@amalow Please try to update the presets! If you encounter any issues, I will help you out.

@malz
Copy link

malz commented Feb 5, 2018

This could be my bad, able to build Leptonica successfully but when building Tesseract mvn install is crashing at:

libtool: warning: library '/Users/adam/.javacpp/cache/leptonica-1.74.4-1.4.1-SNAPSHOT-macosx-x86_64.jar/org/bytedeco/javacpp/macosx-x86_64/lib//liblept.la' was moved.

grep: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -O2 -DNDEBUG -I../ccstruct -I../ccutil -I../viewer -DUSE_STD_NAMESPACE -I/Users/adam/.javacpp/cache/leptonica-1.74.4-1.4.1-SNAPSHOT-macosx-x86_64.jar/org/bytedeco/javacpp/macosx-x86_64/include/ -I/Users/adam/.javacpp/cache/leptonica-1.74.4-1.4.1-SNAPSHOT-macosx-x86_64.jar/org/bytedeco/javacpp/macosx-x86_64/include/leptonica/ -I/usr/local/Cellar/pango/1.40.7/include/pango-1.0 -I/usr/local/Cellar/glib/2.52.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.41/include -I/usr/local/Cellar/cairo/1.14.10/include/cairo -I/usr/local/Cellar/glib/2.52.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.41/include -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.12.4/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libpng/1.6.34/include/libpng16 -g -O2 -std=c++11 -MT intsimdmatrix.lo -MD -MP -MF .deps/intsimdmatrix.Tpo -c intsimdmatrix.cpp -o intsimdmatrix.o >/dev/null 2>&1

sed: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory

libtool:   error: '/Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la' is not a valid libtool archive

I had a brief look through the project search and couldn't find anything related to Travis, may be an issue within Tesseract? Otherwise I've updated the OEM enum to allow the LSTM defaults, this currently is a breaking change (if someone is specifying 2 for CUBE it'll now run the LSTM, however I can fix this to be backwards compatible)

@saudet
Copy link
Member

saudet commented Feb 5, 2018

Tesseract requires libtool to build. Make sure to follow these instructions before attempting a build on your Mac: https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments#mac-os-x-x86_64

@malz
Copy link

malz commented Feb 5, 2018

All of those tools are present on my system, I've built Tesseract from source previously

The above output was with -X on mvn, this is what is produced without that flag

grep: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory
grep: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory
grep: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory
sed: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory
grep: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory
sed: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory
sed: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory
sed: /Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la: No such file or directory
libtool:   error: '/Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la' is not a valid libtool archive
libtool:   error: '/Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la' is not a valid libtool archive
libtool:   error: '/Users/travis/build/bytedeco/javacpp-presets/leptonica/cppbuild/macosx-x86_64/lib/libjpeg.la' is not a valid libtool archive

Its important to note as well that I don't have a User named 'travis' on this system.

@saudet
Copy link
Member

saudet commented Feb 5, 2018

Well it works fine on my system and on Travis Ci, so something is off with your machine I'm afraid.

@saudet
Copy link
Member

saudet commented Feb 5, 2018

It looks like it's trying to use builds of Leptonica from Travis CI, and Mac is known to have issues with changing directories yes. This just means it's not finding your build of Leptonica. Don't try to build them separately. Build them together as per the instructions in the README.md file.

@malz
Copy link

malz commented Feb 6, 2018

I've updated the presets (seemed like there were only a couple changes) and am installing successfully, my clang++ on OSX is being difficult (strange as it can compile tesseract just fine) when i'm trying to mvn package Tesseract, currently working on compiling for Linux.

@saudet
Copy link
Member

saudet commented Feb 6, 2018

Great, send a pull request and we'll see if Travis CI has issues! Thanks

@toranaga
Copy link

toranaga commented Feb 6, 2018

Any plans when would be available ?

@saudet
Copy link
Member

saudet commented Feb 7, 2018

@toranaga It's already available at pull #522.

I'll mark this as a duplicate of the pull request. Let's continue this thread over there! Thanks

@saudet
Copy link
Member

saudet commented Apr 12, 2018

Included with commit 16d067c !

Please give it a try with snapshots: http://bytedeco.org/builds/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants