tesseract 4.1.1
|
#include <lstmrecognizer.h>
Public Member Functions | |
LSTMRecognizer () | |
LSTMRecognizer (const STRING language_data_path_prefix) | |
~LSTMRecognizer () | |
int | NumOutputs () const |
int | training_iteration () const |
int | sample_iteration () const |
double | learning_rate () const |
LossType | OutputLossType () const |
bool | SimpleTextOutput () const |
bool | IsIntMode () const |
bool | IsRecoding () const |
bool | IsTensorFlow () const |
GenericVector< STRING > | EnumerateLayers () const |
Network * | GetLayer (const STRING &id) const |
float | GetLayerLearningRate (const STRING &id) const |
void | ScaleLearningRate (double factor) |
void | ScaleLayerLearningRate (const STRING &id, double factor) |
void | ConvertToInt () |
const UNICHARSET & | GetUnicharset () const |
const UnicharCompress & | GetRecoder () const |
const Dict * | GetDict () const |
void | SetIteration (int iteration) |
int | NumInputs () const |
int | null_char () const |
bool | Load (const ParamsVectors *params, const char *lang, TessdataManager *mgr) |
bool | Serialize (const TessdataManager *mgr, TFile *fp) const |
bool | DeSerialize (const TessdataManager *mgr, TFile *fp) |
bool | LoadCharsets (const TessdataManager *mgr) |
bool | LoadRecoder (TFile *fp) |
bool | LoadDictionary (const ParamsVectors *params, const char *lang, TessdataManager *mgr) |
void | RecognizeLine (const ImageData &image_data, bool invert, bool debug, double worst_dict_cert, const TBOX &line_box, PointerVector< WERD_RES > *words, int lstm_choice_mode=0) |
void | OutputStats (const NetworkIO &outputs, float *min_output, float *mean_output, float *sd) |
bool | RecognizeLine (const ImageData &image_data, bool invert, bool debug, bool re_invert, bool upside_down, float *scale_factor, NetworkIO *inputs, NetworkIO *outputs) |
STRING | DecodeLabels (const GenericVector< int > &labels) |
void | DisplayForward (const NetworkIO &inputs, const GenericVector< int > &labels, const GenericVector< int > &label_coords, const char *window_name, ScrollView **window) |
void | LabelsFromOutputs (const NetworkIO &outputs, GenericVector< int > *labels, GenericVector< int > *xcoords) |
Protected Member Functions | |
void | SetRandomSeed () |
void | DisplayLSTMOutput (const GenericVector< int > &labels, const GenericVector< int > &xcoords, int height, ScrollView *window) |
void | DebugActivationPath (const NetworkIO &outputs, const GenericVector< int > &labels, const GenericVector< int > &xcoords) |
void | DebugActivationRange (const NetworkIO &outputs, const char *label, int best_choice, int x_start, int x_end) |
void | LabelsViaReEncode (const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords) |
void | LabelsViaSimpleText (const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords) |
const char * | DecodeLabel (const GenericVector< int > &labels, int start, int *end, int *decoded) |
const char * | DecodeSingleLabel (int label) |
Protected Attributes | |
Network * | network_ |
CCUtil | ccutil_ |
UnicharCompress | recoder_ |
STRING | network_str_ |
int32_t | training_flags_ |
int32_t | training_iteration_ |
int32_t | sample_iteration_ |
int32_t | null_char_ |
float | learning_rate_ |
float | momentum_ |
float | adam_beta_ |
TRand | randomizer_ |
NetworkScratch | scratch_space_ |
Dict * | dict_ |
RecodeBeamSearch * | search_ |
ScrollView * | debug_win_ |
Definition at line 54 of file lstmrecognizer.h.
tesseract::LSTMRecognizer::LSTMRecognizer | ( | ) |
Definition at line 54 of file lstmrecognizer.cpp.
tesseract::LSTMRecognizer::LSTMRecognizer | ( | const STRING | language_data_path_prefix | ) |
Definition at line 49 of file lstmrecognizer.cpp.
tesseract::LSTMRecognizer::~LSTMRecognizer | ( | ) |
Definition at line 67 of file lstmrecognizer.cpp.
|
inline |
Definition at line 125 of file lstmrecognizer.h.
|
protected |
Definition at line 360 of file lstmrecognizer.cpp.
|
protected |
Definition at line 387 of file lstmrecognizer.cpp.
|
protected |
Definition at line 475 of file lstmrecognizer.cpp.
STRING tesseract::LSTMRecognizer::DecodeLabels | ( | const GenericVector< int > & | labels | ) |
Definition at line 302 of file lstmrecognizer.cpp.
|
protected |
Definition at line 517 of file lstmrecognizer.cpp.
bool tesseract::LSTMRecognizer::DeSerialize | ( | const TessdataManager * | mgr, |
TFile * | fp | ||
) |
Definition at line 105 of file lstmrecognizer.cpp.
void tesseract::LSTMRecognizer::DisplayForward | ( | const NetworkIO & | inputs, |
const GenericVector< int > & | labels, | ||
const GenericVector< int > & | label_coords, | ||
const char * | window_name, | ||
ScrollView ** | window | ||
) |
Definition at line 317 of file lstmrecognizer.cpp.
|
protected |
Definition at line 333 of file lstmrecognizer.cpp.
|
inline |
Definition at line 80 of file lstmrecognizer.h.
|
inline |
Definition at line 137 of file lstmrecognizer.h.
Definition at line 88 of file lstmrecognizer.h.
|
inline |
Definition at line 95 of file lstmrecognizer.h.
|
inline |
Definition at line 135 of file lstmrecognizer.h.
|
inline |
Definition at line 133 of file lstmrecognizer.h.
|
inline |
Definition at line 71 of file lstmrecognizer.h.
|
inline |
Definition at line 73 of file lstmrecognizer.h.
|
inline |
Definition at line 77 of file lstmrecognizer.h.
void tesseract::LSTMRecognizer::LabelsFromOutputs | ( | const NetworkIO & | outputs, |
GenericVector< int > * | labels, | ||
GenericVector< int > * | xcoords | ||
) |
Definition at line 430 of file lstmrecognizer.cpp.
|
protected |
Definition at line 442 of file lstmrecognizer.cpp.
|
protected |
Definition at line 456 of file lstmrecognizer.cpp.
|
inline |
Definition at line 63 of file lstmrecognizer.h.
bool tesseract::LSTMRecognizer::Load | ( | const ParamsVectors * | params, |
const char * | lang, | ||
TessdataManager * | mgr | ||
) |
Definition at line 74 of file lstmrecognizer.cpp.
bool tesseract::LSTMRecognizer::LoadCharsets | ( | const TessdataManager * | mgr | ) |
Definition at line 130 of file lstmrecognizer.cpp.
bool tesseract::LSTMRecognizer::LoadDictionary | ( | const ParamsVectors * | params, |
const char * | lang, | ||
TessdataManager * | mgr | ||
) |
Definition at line 164 of file lstmrecognizer.cpp.
bool tesseract::LSTMRecognizer::LoadRecoder | ( | TFile * | fp | ) |
Definition at line 140 of file lstmrecognizer.cpp.
|
inline |
Definition at line 144 of file lstmrecognizer.h.
|
inline |
Definition at line 143 of file lstmrecognizer.h.
|
inline |
Definition at line 60 of file lstmrecognizer.h.
|
inline |
Definition at line 64 of file lstmrecognizer.h.
void tesseract::LSTMRecognizer::OutputStats | ( | const NetworkIO & | outputs, |
float * | min_output, | ||
float * | mean_output, | ||
float * | sd | ||
) |
Definition at line 206 of file lstmrecognizer.cpp.
bool tesseract::LSTMRecognizer::RecognizeLine | ( | const ImageData & | image_data, |
bool | invert, | ||
bool | debug, | ||
bool | re_invert, | ||
bool | upside_down, | ||
float * | scale_factor, | ||
NetworkIO * | inputs, | ||
NetworkIO * | outputs | ||
) |
Definition at line 232 of file lstmrecognizer.cpp.
void tesseract::LSTMRecognizer::RecognizeLine | ( | const ImageData & | image_data, |
bool | invert, | ||
bool | debug, | ||
double | worst_dict_cert, | ||
const TBOX & | line_box, | ||
PointerVector< WERD_RES > * | words, | ||
int | lstm_choice_mode = 0 |
||
) |
Definition at line 184 of file lstmrecognizer.cpp.
|
inline |
Definition at line 62 of file lstmrecognizer.h.
|
inline |
Definition at line 117 of file lstmrecognizer.h.
|
inline |
Definition at line 106 of file lstmrecognizer.h.
bool tesseract::LSTMRecognizer::Serialize | ( | const TessdataManager * | mgr, |
TFile * | fp | ||
) | const |
Definition at line 86 of file lstmrecognizer.cpp.
|
inline |
Definition at line 141 of file lstmrecognizer.h.
|
inlineprotected |
Definition at line 215 of file lstmrecognizer.h.
|
inline |
Definition at line 70 of file lstmrecognizer.h.
|
inline |
Definition at line 61 of file lstmrecognizer.h.
|
protected |
Definition at line 284 of file lstmrecognizer.h.
|
protected |
Definition at line 262 of file lstmrecognizer.h.
|
protected |
Definition at line 296 of file lstmrecognizer.h.
|
protected |
Definition at line 290 of file lstmrecognizer.h.
|
protected |
Definition at line 281 of file lstmrecognizer.h.
|
protected |
Definition at line 282 of file lstmrecognizer.h.
|
protected |
Definition at line 259 of file lstmrecognizer.h.
|
protected |
Definition at line 269 of file lstmrecognizer.h.
|
protected |
Definition at line 279 of file lstmrecognizer.h.
|
protected |
Definition at line 287 of file lstmrecognizer.h.
|
protected |
Definition at line 266 of file lstmrecognizer.h.
|
protected |
Definition at line 276 of file lstmrecognizer.h.
|
protected |
Definition at line 288 of file lstmrecognizer.h.
|
protected |
Definition at line 292 of file lstmrecognizer.h.
|
protected |
Definition at line 272 of file lstmrecognizer.h.
|
protected |
Definition at line 274 of file lstmrecognizer.h.