Go to the source code of this file.
|
| STRING_PARAM_FLAG (model, "", "Name of model file (training or recognition)") |
|
| STRING_PARAM_FLAG (traineddata, "", "If model is a training checkpoint, then traineddata must " "be the traineddata file that was given to the trainer") |
|
| STRING_PARAM_FLAG (eval_listfile, "", "File listing sample files in lstmf training format.") |
|
| INT_PARAM_FLAG (max_image_MB, 2000, "Max memory to use for images.") |
|
| INT_PARAM_FLAG (verbosity, 1, "Amount of diagnosting information to output (0-2).") |
|
int | main (int argc, char **argv) |
|
◆ INT_PARAM_FLAG() [1/2]
INT_PARAM_FLAG |
( |
max_image_MB |
, |
|
|
2000 |
, |
|
|
"Max memory to use for images." |
|
|
) |
| |
◆ INT_PARAM_FLAG() [2/2]
INT_PARAM_FLAG |
( |
verbosity |
, |
|
|
1 |
, |
|
|
"Amount of diagnosting information to output (0-2)." |
|
|
) |
| |
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 38 of file lstmeval.cpp.
39 tesseract::CheckSharedLibraryVersion();
41 if (FLAGS_model.empty()) {
42 tprintf(
"Must provide a --model!\n");
45 if (FLAGS_eval_listfile.empty()) {
46 tprintf(
"Must provide a --eval_listfile!\n");
50 if (!mgr.
Init(FLAGS_model.c_str())) {
51 if (FLAGS_traineddata.empty()) {
52 tprintf(
"Must supply --traineddata to eval a training checkpoint!\n");
55 tprintf(
"%s is not a recognition model, trying training checkpoint...\n",
57 if (!mgr.
Init(FLAGS_traineddata.c_str())) {
58 tprintf(
"Failed to load language model from %s!\n",
59 FLAGS_traineddata.c_str());
64 tprintf(
"Failed to load model from: %s\n", FLAGS_model.c_str());
72 if (!tester.LoadAllEvalData(FLAGS_eval_listfile.c_str())) {
73 tprintf(
"Failed to load eval data from: %s\n", FLAGS_eval_listfile.c_str());
78 tester.RunEvalSync(0, &errs, mgr,
void OverwriteEntry(TessdataType type, const char *data, int size)
const char * string() const
void ParseArguments(int *argc, char ***argv)
bool Init(const char *data_file_name)
DLLSYM void tprintf(const char *format,...)
bool LoadDataFromFile(const char *filename, GenericVector< char > *data)
◆ STRING_PARAM_FLAG() [1/3]
STRING_PARAM_FLAG |
( |
model |
, |
|
|
"" |
, |
|
|
"Name of model file (training or recognition)" |
|
|
) |
| |
◆ STRING_PARAM_FLAG() [2/3]
STRING_PARAM_FLAG |
( |
traineddata |
, |
|
|
"" |
, |
|
|
"If model is a training |
checkpoint, |
|
|
then traineddata must " "be the traineddata file that was given to the trainer" |
|
|
) |
| |
◆ STRING_PARAM_FLAG() [3/3]
STRING_PARAM_FLAG |
( |
eval_listfile |
, |
|
|
"" |
, |
|
|
"File listing sample files in lstmf training format." |
|
|
) |
| |