Commit Graph

5690 Commits

Author SHA1 Message Date
Stefan Weil
f0fb6809e3 Use SIMD instructions for DotProductNative
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-14 19:13:01 +02:00
Tadahito Yao
12e0fb4e01
Fix deadlock in lstmtraing. () 2021-07-10 10:59:10 +03:00
Stefan Weil
767fb5a177 Fix LSTMTrainerTest.BidiTest
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-04 18:41:19 +02:00
Stefan Weil
915c29e3c8 Fix IntSimdMatrixTest.AVX2
Fixes: 872816897a
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-04 09:07:35 +02:00
Stefan Weil
e0af8d12e6 Fix check for NEON on 32 bit ARM
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-03 15:43:10 +02:00
Stefan Weil
158c845228 Catch another FP division by 0 (fixes issue )
Rewriting the code avoids FP operations (so makes it potentially faster)
and fixes the division by 0.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-03 15:37:24 +02:00
Stefan Weil
4333b2cea3
Use CMAKE_SYSTEM_PROCESSOR to check for SIMD support options ()
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-02 16:23:58 +03:00
Stefan Weil
4b630a8813 Catch FP division by 0 (fixes issue )
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-02 15:04:31 +02:00
Łukasz Nocuń
38f0fdcd88
Fix CMake Linux build () 2021-06-30 00:16:51 +03:00
OgreTransporter
4d0f027f58
Bugfix OpenMP with Visual Studio ()
* Bugfix OpenMP with Visual Studio

* Test for working VS2019 update instead of first version of VS2019
2021-06-29 21:06:38 +03:00
Stefan Weil
a701454ae5
Fix vector resize with init for all elements (issue ) ()
Fixes: c8b8d266d6
Fixes: 9710bc0465
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-06-29 21:05:29 +03:00
nagadomi
ff1062d39d
Add --reset_learning_rate option to lstmtraining ()
When the --reset_learning_rate option is specified,
it resets the learning rate stored in each layer of the network
loaded with --continue_from to the value specified by the --learning_rate option.
If checkpoint is available, it does nothing.
2021-06-28 11:48:07 +03:00
nagadomi
d8bd78f8e2
Fix missing reset of best_error_history_ in LSTMTrainer::InitIterations() () 2021-06-27 09:26:32 +03:00
Stefan Weil
29e842df46 CI: Replace g++-8 by g++-11 for MacOS
g++-8 is no longer installed, therefore CI fails for that compiler.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-06-26 14:56:07 +02:00
nagadomi
b2fa77f8f0
Show layer specified learning rates with combine_tessdata -l () 2021-06-26 08:08:54 +03:00
Łukasz Nocuń
c583ecef29
Fix permanently disabled optimizations in CMake () 2021-06-24 21:16:23 +03:00
MonkeybreadSoftware
75e6c3ea4c
Null check for GetSourceYResolution ()
* Null check for GetSourceYResolution

Added missing NULL check to avoid crash when we read property in our tesseract wrapper.

* Added missing return value.

added -1 to return if undefined.
2021-06-16 16:35:24 +03:00
Egor Pugin
7a308edcb1
Merge pull request from amitdo/remove-var
Remove unused variable
2021-05-21 23:07:26 +03:00
Amit Dovev
bf979c801a Remove unused variable 2021-05-21 20:34:09 +03:00
Egor Pugin
a72408fdef
Merge pull request from amitdo/pango
Raise Minimum required Pango version to 1.38.0
2021-05-21 20:09:27 +03:00
Egor Pugin
ef69805298
Merge pull request from amitdo/sauvola
ThresholdMethod::TiledSauvola -> ThresholdMethod::Sauvola
2021-05-21 20:08:59 +03:00
Amit Dovev
8615f65cc4 Raise Minimum required Pango version to 1.38.0 2021-05-21 19:56:37 +03:00
Amit Dovev
c24538518c ThresholdMethod::TiledSauvola -> ThresholdMethod::Sauvola
The fact that this method uses tiles is implementation detail. It does not change the result compared to Sauvola without tiles. The use of tiles minimize memory consumption.
2021-05-21 18:15:30 +03:00
Stefan Weil
93348a83a3 Remove scripts for training
They were replaced by Python3 scripts (part of the tesstrain repository).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-18 10:47:44 +02:00
Stefan Weil
5eb2e86635 Fix some typos (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-17 15:18:43 +02:00
nagadomi
42e4b91132 Refactor ObjectCache::DeleteUnusedObjects with reverse iterator 2021-05-17 14:50:30 +02:00
Stefan Weil
d4bcbbd6de Add test for TessBaseAPI::ClearPersistentCache to unit tests
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-17 09:28:21 +02:00
Egor Pugin
83a27d357a
Merge pull request from nagadomi/fix_segv
Fix crash in ObjectCache::DeleteUnusedObjects
2021-05-17 07:50:00 +03:00
nagadomi
dc4a8a6ce0 Fix crash in ObjectCache::DeleteUnusedObjects 2021-05-17 10:25:17 +09:00
Stefan Weil
1c77e50b97 travis: Use libleptonica-dev from Ubuntu focal instead of local build
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-16 11:56:12 +02:00
Stefan Weil
f6a67c52d8 Simplify list of required packages for CI builds
libcairo2-dev is automatically installed as a direct dependency of libpango1.0-dev.
libicu-dev is an indirect dependency and also installed automatically.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-16 11:23:58 +02:00
Stefan Weil
0c4e2f1cb5 Fix comment in code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-16 07:47:19 +02:00
Stefan Weil
364431dbb9 Remove unneeded dependency autoconf-archive from CI builds
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-16 07:45:12 +02:00
Stefan Weil
19db25e5e5 Update submodule abseil to tagged release 20210324.1
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-15 15:08:01 +02:00
Amit D
bbfd240d46 Update README.md 2021-05-15 15:06:47 +02:00
Stefan Weil
57b7974292 Remove an arbitrary limit for the image size
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-15 15:03:22 +02:00
Stefan Weil
a0cf117c5d Fix compiler warning in binarization code (uninitialized local variable)
Simplify the code also a little bit.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-15 15:03:22 +02:00
Stefan Weil
bf84fb9f2d Optimize code for binarization
Some code is only needed for Otsu or even not at all.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-15 15:03:22 +02:00
Stefan Weil
4b5dd25b84 Fix compiler warning
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-15 15:03:22 +02:00
Stefan Weil
bf3421ff12 Fix autoconf build for latest MacOS (Intel and M1)
On latest MacOS 11.3 the system header file "ostream" includes a file
named "version".

The macro DEFAULT_INCLUDES adds the source root to the list of include
directories by default. As MacOS uses a case insensitive file system,
the compiler finds and includes the file "VERSION" there which causes
compiler errors and a failing build process.

Setting an empty DEFAULT_INCLUDES fixes that, but requires moving
config_auto.h to another directory in the include search path.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-13 17:22:58 +02:00
Stefan Weil
12c29639fc Add conditional compilation with GRAPHICS_DISABLED
This fixes a compiler warning when GRAPHICS_DISABLED is defined.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-13 17:22:24 +02:00
Stefan Weil
6c7df2acf3 Fix warning from autoconf
autoconf reported this warning:

    configure.ac:263: warning: AC_CHECK_HEADERS("tensorflow/core/framework/graph.pb.h"): you should use literals

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-05-13 12:57:20 +02:00
Egor Pugin
95689f5c5c
Merge pull request from nickjwhite/lstmevalmoreinfo
lstmeval: Print char and word error rates for each line tested
2021-05-11 15:25:16 +03:00
Nick White
ad7010a5eb lstmeval: Only print char and word error rates for verbosity 2/3 2021-05-11 13:15:35 +01:00
Nick White
4787414d88 lstmeval: Print char and word error rates for each line tested 2021-05-11 10:54:34 +01:00
Egor Pugin
43747d6ea8 Postfix for . 2021-05-10 15:06:27 +03:00
Egor Pugin
e7c01a6f15
Merge pull request from amitdo/thresholder
Add more binarization options
2021-05-10 14:45:03 +03:00
Amit Dovev
21e76c7a13 Convert enum ThreshMethod to enum class 2021-05-09 18:49:09 +03:00
Egor Pugin
176d0927bd Allow explicit casts of Image to Pix**. 2021-05-07 21:30:42 +03:00
Amit Dovev
11c73c9481 Add more binarization options
Use functions from Leptonica to provide more binarization options. The new options are: 1) Adaptive Otsu and 2) Sauvola (Tiled) .
2021-05-07 16:48:26 +03:00