Commit Graph

4040 Commits

Author SHA1 Message Date
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
zdenop
982bdf3845
Merge pull request #2495 from stweil/scanutils_test
unittest: Fix and enable scanutils_test
2019-06-14 20:45:28 +02:00
zdenop
fad96db497
Merge pull request #2494 from Shreeshrii/master
Allow saving of box/tiff pairs during legacy tesseract training
2019-06-14 20:44:49 +02:00
Stefan Weil
e0e29126ac unittest: Fix and enable scanutils_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-14 16:51:39 +02:00
Shree
6fa4587949 Allow saving of box/tiff pairs during base tesseract training 2019-06-14 09:35:39 +00:00
Shree
45cdf741ae Allow saving of box/tiff pairs during base tesseract training 2019-06-14 09:32:41 +00:00
Shree
832c6edb97 Allow saving of box/tiff pairs during base tesseract training 2019-06-14 09:25:54 +00:00
zdenop
3afc946d5e
Merge pull request #2492 from jbarlow83/fix-text2image
Fix text2image compilation on C++17 compilers
2019-06-14 07:45:14 +02:00
James R. Barlow
a9890afd12 Fix text2image compilation on C++17 compilers
C++17 drops support for `std::random_shuffle`, breaking C++17 compilers
that run to compile text2image.cpp. std::shuffle is valid on C++11
through C++17, so use std::shuffle instead.

Due to the use `std::random_shuffle`, `text2image --render_ngrams`
would not give consistent results for different compilers or platforms.
With the current change, the same random number generator is used for
all platforms and initialized to the same seed, so training output
should be consistent.
2019-06-13 16:07:20 -07:00
Stefan Weil
3c507100c6 unittest: Fix and enable ligature_table_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-11 16:40:23 +02:00
Egor Pugin
5717b098aa [sw] Remove inexistent include dirs. 2019-06-08 17:45:37 +03:00
Egor Pugin
c570772bce [sw] Exclude missing include dir. 2019-06-08 17:41:02 +03:00
Egor Pugin
17c8ac29a2
Update appveyor.yml 2019-06-06 13:31:55 +03:00
Egor Pugin
421e3e44cb Update sw script. 2019-06-06 00:56:12 +03:00
zdenop
5e62d02230 cmake: using c++ standard for g++ 2019-06-01 21:49:30 +02:00
Stefan Weil
b9a31eca37 Revert "Do not hardcode c++11 for unix builds"
This reverts commit 4348793bd5.
It is needed for Travis CI based on Ubuntu Trusty.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-01 17:42:24 +02:00
zdenop
359f3c555d
Merge pull request #2477 from ismail/master
Fix OpenMP builds on Unix
2019-05-31 15:42:06 +02:00
İsmail Dönmez
ab28df7448
Fix OpenMP builds on Unix 2019-05-31 14:18:26 +02:00
İsmail Dönmez
4348793bd5 Do not hardcode c++11 for unix builds 2019-05-31 14:11:11 +02:00
İsmail Dönmez
5df58fc979 Detect and use C++17 support for CMake builds 2019-05-31 14:11:11 +02:00
zdenop
ee2d7172b7
Merge pull request #2475 from stweil/std
Add dot product implementation using std::inner_product
2019-05-31 13:31:57 +02:00