-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathREADME
executable file
·65 lines (41 loc) · 1.53 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Introduction
============
There are 19 tools for measuring the performance and quality of OCR
output. See the user guide (user-guide.pdf) for more information.
Building
========
To build the tools, run:
make
To install them, run:
make install
To install them to a different directory, run:
make PREFIX=/my/install/directory install
Running tests with UTF-8
========================
Run the tool inside the ocrevalutf8 wrapper script, e.g.
ocrevalutf8 accuracy correct.txt ocr.txt
or
ocrevalutf8 wordacc correct.txt ocr.txt
This is needed as the tools don't (yet) natively handle UTF-8, but
they can handle strangely encoded UTF-16, which this wrapper script
delivers.
Testing Tesseract with a .traineddata file
==========================================
'tessaccsummary' is an included script to make testing the accuracy
of a Tesseract training file simple and easy.
The script expects a directory laid out as follows:
images/
images/firstimg.png
images/firstimg.txt
images/secondimg.png
images/secondimg.txt
The .txt file should be a UTF-8 file of the correct text ("ground
truth") for the .png file of the same name. The image and text
files may be named anything.
You can then run the script like so:
tessaccsummary images/ /path/to/lang.traineddata
This runs Tesseract using the provided .traineddata file on each
.png image in the image directory, and print the character
accuracy for each image.
You can instead get the word accuracy for each image like this:
tessaccsummary -w images/ /path/to/lang.traineddata