zdenop
0ac59df5f6
Merge pull request #2528 from zhuangzhuang/master
...
close log file handle before move it.
2019-07-01 07:55:05 +02:00
zhuangzhuang1988
99cb088708
close log file handle before move it.
2019-07-01 10:53:12 +08:00
Stefan Weil
cf46eaeac8
unittest: Fix and enable baseapi_thread_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-30 20:21:56 +02:00
Stefan Weil
b00e53fabf
unittest: Fix and enable stridemap_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-30 15:30:03 +02:00
Stefan Weil
4e576f844c
unittest: Fix and enable networkio_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-30 15:28:42 +02:00
Stefan Weil
2833db7c67
unittest: Fix and enable equationdetect_test
...
It requires Tensorflow. Skip one test because equ_gt1.tif is missing.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-30 12:39:54 +02:00
Stefan Weil
5409299763
unittest: Fix tests which need Tensorflow headers
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-29 11:43:12 +02:00
Egor Pugin
89de2bfcea
Merge pull request #2526 from zhuangzhuang/master
...
fix logger file encoding error.
2019-06-28 18:33:47 +03:00
zhuangzhuang1988
a3a361f73d
fix logger file encoding error.
2019-06-28 18:29:52 +08:00
zdenop
653faa3a64
Merge pull request #2523 from stweil/unilib
...
unittest: Add unilib.h and other code from Tensorflow and use it for more tests
2019-06-28 12:27:15 +02:00
Stefan Weil
655ba7af10
unittest: Fix compiler warnings (signed/unsigned)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-28 08:11:42 +02:00
Stefan Weil
40c1cf671f
unittest: Fix and enable pango_font_info_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-28 08:09:28 +02:00
Stefan Weil
04d85b4c0f
Add more test code for normstrngs_test
...
unilib.h is now available, so more code can be enabled.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-28 07:35:27 +02:00
Stefan Weil
aa54bf0f8b
Fix code from tensorflow/models/research/syntaxnet/util/utf8
...
See https://github.com/tensorflow/models/issues/7090 .
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-28 07:30:40 +02:00
Stefan Weil
0702194246
Add code from tensorflow/models
...
The new code was copied from the latest code on GitHub
(https://github.com/tensorflow/models/tree/master/research/syntaxnet ).
It is required for pango_font_info_test and other unit tests.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-28 07:30:40 +02:00
Stefan Weil
7093727da1
cmake: Fix build with OpenMP (issue #2462 )
...
Builds with gcc wrongly used /openmp instead of -fopenmp.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 13:20:52 +02:00
Stefan Weil
676b18834c
Fix check for icu 52.1 or newer
...
It detected old versions but did not disable the training build.
This completes commit 66da4df11d
.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 10:55:33 +02:00
Stefan Weil
5895534b5e
Update enum from unicode/uchar.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 10:55:33 +02:00
Stefan Weil
252d80cb6d
unittest: Fix function QCHECK (issue #2517 )
...
The function must print an error message if the condition fails.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 19:05:42 +02:00
Egor Pugin
111ef842ae
Add VS2019
2019-06-23 11:34:58 +03:00
Stefan Weil
c1264c189e
Fix format string for 64 bit integer
...
This fixes also a warning from gcc.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 09:31:09 +02:00
Stefan Weil
dfd35d3e27
baseapi: Remove old code
...
The workaround is no longer needed because _splitpath and _MAX_FNAME
were removed in commit cc0d87c5b8
.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 09:15:32 +02:00
Stefan Weil
dd261e8d42
Replace code using _splitpath_s (win32)
...
That simplifies the code and removes a dependency on "newer"
versions of Windows.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 09:15:15 +02:00
Stefan Weil
f522b039a5
Remove outdated comment
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 21:03:19 +02:00
Stefan Weil
ea20bf0373
Remove dummy code from LSTMTrainer::InitTensorFlowNetwork
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 21:01:40 +02:00
Stefan Weil
12f63c6097
Add package libpango1.0-dev to Travis configuration
...
It is needed to build the training tools.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 20:38:10 +02:00
Stefan Weil
efa3cae06d
Simplify unittest/Makefile.am
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 20:29:39 +02:00
Stefan Weil
41f91c96c8
cmake: Build training tools also on Linux and macOS
...
This enables CI tests for the code in src/training on Linux and macOS.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 20:27:56 +02:00
Egor Pugin
ab28a03e93
Merge pull request #2514 from stweil/tessresultcallback
...
Move LSTMTrainer from libtesseract to libtesseract_training
2019-06-22 18:34:49 +03:00
Stefan Weil
df98bb7368
Move LSTMTrainer from libtesseract to libtesseract_training
...
LSTMTrainer is only used for training, so the shared library for
Tesseract can be made smaller.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 16:23:51 +02:00
Egor Pugin
ee37abb7b3
Merge pull request #2515 from stweil/baseapi
...
Replace callback by direct function calls in TessBaseAPI::GetComponen…
2019-06-22 17:04:48 +03:00
Stefan Weil
cb2957b3d2
Replace callback by direct function calls in TessBaseAPI::GetComponentImages
...
The new code avoids dynamic memory allocation, uses faster function calls
and allows removing more code from tesscallback.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 14:54:31 +02:00
Stefan Weil
3159f42257
Remove unused GenericVector::dot_product
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 12:59:21 +02:00
Stefan Weil
bef73d9956
Remove unused GenericVector::compact
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 12:59:08 +02:00
Egor Pugin
3c6a04ea1a
Merge pull request #2512 from stweil/tessresultcallback
...
Simplify class LSTMTrainer
2019-06-22 13:41:21 +03:00
Stefan Weil
2a9b2fb32a
Remove wrong description for GenericVector::set_compare_callback and simplify code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 11:22:07 +02:00
Stefan Weil
bd13069fe8
Simplify class LSTMTrainer
...
The function pointers and callbacks file_reader_, file_writer_,
checkpointer_reader_ and checkpoint_writer_ are always set to
the same values. Replacing them by direct function calls
simplifies the code and allows removing more code from tesscallback.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-22 09:18:13 +02:00
zdenop
dff33d6d93
Merge pull request #2510 from stweil/tessresultcallback
...
Simplify indirect call of LMPainPoints::GeneratePainPoint
2019-06-22 06:55:27 +02:00
Stefan Weil
3871caae86
Simplify indirect call of LMPainPoints::GeneratePainPoint
...
It does neither need a temporary TessResultCallback2 nor the function
LMPainPoints::GenerateForBlamer.
This also allows removing more code from tesscallback.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-21 17:09:33 +02:00
zdenop
60b4c68d31
tesstrain_utils.sh: remove redundant code
2019-06-20 18:42:29 +02:00
Stefan Weil
5f23290655
tesscallback: Remove more unused code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-20 08:38:00 +02:00
Egor Pugin
21514457d4
Remove old and misguiding build steps on windows.
2019-06-17 18:53:36 +03:00
Stefan Weil
b967c62880
unittest: Add missing Leptonica library for textlineprojection_test
...
It is needed for builds with --enable-shared.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-17 15:10:16 +02:00
Stefan Weil
2c78735d97
ocrfeatures: Remove locally used functions from global interface
...
ReadFeature, WriteFeature are only used locally.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-17 15:09:39 +02:00
zdenop
a3593d994b
Merge pull request #2499 from stweil/embedded
...
Remove code for embedded build
2019-06-17 10:24:45 +02:00
Stefan Weil
674d6a90d8
Remove code for embedded build
...
That code is unrelated to Tesseract and can be easily implemented
by external projects which require it.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-17 09:55:33 +02:00
zdenop
60aee9f821
create OUTPUT_DIR did not exist; fixes #2497
2019-06-16 15:07:16 +02:00
Stefan Weil
ceabab8373
unittest: Catch missing eng.traineddata in baseapi_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 08:11:16 +02:00
Stefan Weil
bbd3626d77
unittest: Fix and enable normstrngs_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 08:01:11 +02:00
Stefan Weil
73e5241004
unittest: Fix and enable textlineprojection_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-15 10:22:44 +02:00