#include "base/commandlineflags.h"
#include "commontraining.h"
#include "genericvector.h"
#include "lstmtester.h"
#include "strngs.h"
#include "tprintf.h"
Go to the source code of this file.
◆ INT_PARAM_FLAG()
INT_PARAM_FLAG |
( |
max_image_MB |
, |
|
|
2000 |
, |
|
|
"Max memory to use for images." |
|
|
) |
| |
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
This program reads in a text file consisting of feature samples from a training page in the following format:
FontName UTF8-char-str xmin ymin xmax ymax page-number
NumberOfFeatureTypes(N)
FeatureTypeName1 NumberOfFeatures(M)
Feature1
...
FeatureM
FeatureTypeName2 NumberOfFeatures(M)
Feature1
...
FeatureM
...
FeatureTypeNameN NumberOfFeatures(M)
Feature1
...
FeatureM
FontName CharName ...
The result of this program is a binary inttemp file used by the OCR engine.
- Parameters
-
argc | number of command line arguments |
argv | array of command line arguments |
- Returns
- none
- Note
- Exceptions: none
-
History: Fri Aug 18 08:56:17 1989, DSJ, Created.
-
History: Mon May 18 1998, Christy Russson, Revistion started.
Definition at line 33 of file lstmeval.cpp.
35 if (FLAGS_model.empty()) {
36 tprintf(
"Must provide a --model!\n");
39 if (FLAGS_eval_listfile.empty()) {
40 tprintf(
"Must provide a --eval_listfile!\n");
45 tprintf(
"Failed to load model from: %s\n", FLAGS_eval_listfile.c_str());
50 if (!tester.LoadAllEvalData(FLAGS_eval_listfile.c_str())) {
51 tprintf(
"Failed to load eval data from: %s\n", FLAGS_eval_listfile.c_str());
55 STRING result = tester.RunEvalSync(0, &errs, model_data, 0);
const char * string() const
void ParseArguments(int *argc, char ***argv)
bool LoadDataFromFile(const char *filename, GenericVector< char > *data)
◆ STRING_PARAM_FLAG() [1/2]
STRING_PARAM_FLAG |
( |
model |
, |
|
|
"" |
, |
|
|
"Name of model file (training or recognition)" |
|
|
) |
| |
◆ STRING_PARAM_FLAG() [2/2]
STRING_PARAM_FLAG |
( |
eval_listfile |
, |
|
|
"" |
, |
|
|
"File listing sample files in lstmf training format." |
|
|
) |
| |