Commit Graph

6000 Commits

Author SHA1 Message Date
Stefan Weil
0fc6d8d7f0 Add missing hint for dotproduct parameter value "fma"
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-20 20:44:29 +02:00
Ger Hobbelt
f72d4b1fe7 NEON arch: dead ref cycle fix
When neon_available_ is ON, the DotProduct was set to point to DotProduct,
which should have been DotProductNative, as dotProduct is the *target* global itself:
see simddetect.h --> effectively making that part of the SetDotProduct() call
identical to this (no-op) statement: `DotProduct = DotProduct;`

Also added the Neon check in the Update() API, where it exists together
with the other checks (for AVX/SSE/etc.)

[sw: formatted commit message and merged into main branch]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-20 20:40:16 +02:00
Stefan Weil
dff7312aed Modernize code in SIMDDetect::Update
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-20 20:16:49 +02:00
Stefan Weil
3ab8dcbf72 Use Apple Accelerate framework for training and best models
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-20 19:27:54 +02:00
Johannes Künsebeck
3be11f12a9 Removed unused parameters declarations and definitions 2021-07-20 15:08:10 +02:00
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