Commit Graph

5845 Commits

Author SHA1 Message Date
zdenop
8dd7936475
Solve clang reporting unused variable in ExtractMicros function (#3501)
* mark attribute as unused for compiler
* try c++17 standard https://en.cppreference.com/w/cpp/language/attributes/maybe_unused
2021-07-18 01:59:49 +02:00
SpaceIm
b2fea77a27 fix cross-build to iOS/tvOS/watchOS
On these OS, executables are bundle, and they need a BUNDLE DESTINATION, otherwise CMake configuration fails.
See https://cmake.org/cmake/help/latest/policy/CMP0006.html
2021-07-17 09:29:34 +02:00
nagadomi
7fe0624838
Fix spec string of convolution layer (#3499) 2021-07-16 18:21:52 +03:00
Stefan Weil
88d4028a5a Enable pragma for SIMD also when _OPENMP is defined
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-15 16:03:43 +02:00
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. (#3488) 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 #3483)
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 (#3484)
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 #3483)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-02 15:04:31 +02:00
Łukasz Nocuń
38f0fdcd88
Fix CMake Linux build (#3478) 2021-06-30 00:16:51 +03:00
OgreTransporter
4d0f027f58
Bugfix OpenMP with Visual Studio (#3475)
* 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 #3473) (#3474)
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 (#3470)
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() (#3469) 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 (#3468) 2021-06-26 08:08:54 +03:00
Łukasz Nocuń
c583ecef29
Fix permanently disabled optimizations in CMake (#3467) 2021-06-24 21:16:23 +03:00
MonkeybreadSoftware
75e6c3ea4c
Null check for GetSourceYResolution (#3457)
* 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 #3439 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 #3438 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 #3437 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 #3431 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 #3422 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
Nick White
9c82cc63c2 Switch to NFC normalisation everywhere 2021-05-11 10:18:06 +01:00