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
Windows (x64) compiled executable (tesseract.exe) doesn't work in any other windows machine (x64) #2674
Comments
CMake builds are currently optimized for the build host architecture. So if you build on a PC with AVX2 hardware, the resulting binaries won't work (= will crash) on a PC without AVX2. Either fix |
Builds using |
@stweil Thanks for your suggestions.
When you mentioned build using |
With disabling optimization OCR process will be slow. |
Do you have any guess on what performance degradation would be without optimization ? (I will need to test performance anyways but was just curious if you can make any rough guess here) Using cross-compiled windows build would be a problem for me, because I needed to changed the source code. |
With image from issue 263 I got this results (tesseract 5.0.0-alpha-447-g52cf, Intel Core i7-6600U 2,60GHz 2.8 GHz; 8 GB ram; Windows 64 bit) - 5 runs: With autooptimization: 26.177767169865813 Update: I posted more details in #263 |
Now you can turn off cmake autooptimization with: |
@zdenop, did you specify If not: please try latest Git master. It should be significantly faster. |
@stweil: I used cmake&ninja&clang and this combinations needs to specify |
@zdenop Hi, thanks for testing the performance with optimization on/off.
In your post, you mentioned
Does this mean if I use eng.traineddata from each git, OCR engine will perform differently based on trained data file? In other words, if I swap exsiting eng.traineddata with the one from "tessdata_fast", would it increase performance? After reading some doc, it looks like eng.traineddata has effect when using LSTM engine. I don't explicitly specify engine mode when executing. is LSTM used by default? |
I am not sure how do you measure performance, but
what is available => |
@zdenop Thanks, that makes sense. Quick question regarding compilation (will create a new ticket if needed) I'm using cmake to compile (shown below), which generate 64-bit executable. Is there any way to build 32-bit env executable?
Can I achieve all the same behavior above by using msbuild ? (Visual Studio compilation) |
|
Got it. Thanks for the help. |
Environment
Current Behavior:
I built tesseract executable from source using following this instruction
After step 6, I see tesseract.exe under "tesseract\build\bin\Release" directory, and executing it without any issue (working perfectly fine).
However, if once I copy entire \Release directory to another Windows with x64 platform (Windows Server 2008, 2016, etc..) It doesn't work anywhere else. (see screenshots below)
I have installed "Microsoft Visual C++ 2015-2019 Redistributable (x64)", so dependency does not look like issue here.
Screenshot 1 (Installed runtime libraries)
Screenshot 2 (Message box pop-up on different Windows machine)
Screenshot 3 (Windows Event Viewer)
Screenshot 4 (Windows Event Viewer) - FYI, disk is not on network, it's under C:
Can anyone suggest me with a fix? is there anything I'm missing during compilation procedure?
Suggested Fix:
The text was updated successfully, but these errors were encountered: