|
tesseract v5.3.3.20231005
|
#include <lstmrecognizer.h>
Public Member Functions | |
| LSTMRecognizer () | |
| LSTMRecognizer (const std::string &language_data_path_prefix) | |
| ~LSTMRecognizer () | |
| int | NumOutputs () const |
| int | training_iteration () const |
| int | sample_iteration () const |
| float | learning_rate () const |
| LossType | OutputLossType () const |
| bool | SimpleTextOutput () const |
| bool | IsIntMode () const |
| bool | IsRecoding () const |
| bool | IsTensorFlow () const |
| std::vector< std::string > | EnumerateLayers () const |
| Network * | GetLayer (const std::string &id) const |
| float | GetLayerLearningRate (const std::string &id) const |
| const char * | GetNetwork () const |
| float | GetAdamBeta () const |
| float | GetMomentum () const |
| void | ScaleLearningRate (double factor) |
| void | ScaleLayerLearningRate (const std::string &id, double factor) |
| void | SetLearningRate (float learning_rate) |
| void | SetLayerLearningRate (const std::string &id, float learning_rate) |
| void | ConvertToInt () |
| const UNICHARSET & | GetUnicharset () const |
| UNICHARSET & | GetUnicharset () |
| const UnicharCompress & | GetRecoder () const |
| const Dict * | GetDict () const |
| Dict * | GetDict () |
| void | SetIteration (int iteration) |
| int | NumInputs () const |
| int | null_char () const |
| bool | Load (const ParamsVectors *params, const std::string &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 std::string &lang, TessdataManager *mgr) |
| void | RecognizeLine (const ImageData &image_data, float invert_threshold, bool debug, double worst_dict_cert, const TBOX &line_box, PointerVector< WERD_RES > *words, int lstm_choice_mode=0, int lstm_choice_amount=5) |
| void | OutputStats (const NetworkIO &outputs, float *min_output, float *mean_output, float *sd) |
| bool | RecognizeLine (const ImageData &image_data, float invert_threshold, bool debug, bool re_invert, bool upside_down, float *scale_factor, NetworkIO *inputs, NetworkIO *outputs) |
| std::string | DecodeLabels (const std::vector< int > &labels) |
| void | DisplayForward (const NetworkIO &inputs, const std::vector< int > &labels, const std::vector< int > &label_coords, const char *window_name, ScrollView **window) |
| void | LabelsFromOutputs (const NetworkIO &outputs, std::vector< int > *labels, std::vector< int > *xcoords) |
Protected Member Functions | |
| void | SetRandomSeed () |
| void | DisplayLSTMOutput (const std::vector< int > &labels, const std::vector< int > &xcoords, int height, ScrollView *window) |
| void | DebugActivationPath (const NetworkIO &outputs, const std::vector< int > &labels, const std::vector< int > &xcoords) |
| void | DebugActivationRange (const NetworkIO &outputs, const char *label, int best_choice, int x_start, int x_end) |
| void | LabelsViaReEncode (const NetworkIO &output, std::vector< int > *labels, std::vector< int > *xcoords) |
| void | LabelsViaSimpleText (const NetworkIO &output, std::vector< int > *labels, std::vector< int > *xcoords) |
| const char * | DecodeLabel (const std::vector< int > &labels, unsigned start, unsigned *end, int *decoded) |
| const char * | DecodeSingleLabel (int label) |
Protected Attributes | |
| Network * | network_ |
| CCUtil | ccutil_ |
| UnicharCompress | recoder_ |
| std::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 51 of file lstmrecognizer.h.
| tesseract::LSTMRecognizer::LSTMRecognizer | ( | ) |
Definition at line 55 of file lstmrecognizer.cpp.
| tesseract::LSTMRecognizer::LSTMRecognizer | ( | const std::string & | language_data_path_prefix | ) |
Definition at line 50 of file lstmrecognizer.cpp.
| tesseract::LSTMRecognizer::~LSTMRecognizer | ( | ) |
Definition at line 68 of file lstmrecognizer.cpp.
|
inline |
Definition at line 181 of file lstmrecognizer.h.
|
protected |
Definition at line 451 of file lstmrecognizer.cpp.
|
protected |
Definition at line 476 of file lstmrecognizer.cpp.
|
protected |
Definition at line 560 of file lstmrecognizer.cpp.
| std::string tesseract::LSTMRecognizer::DecodeLabels | ( | const std::vector< int > & | labels | ) |
Definition at line 394 of file lstmrecognizer.cpp.
|
protected |
Definition at line 612 of file lstmrecognizer.cpp.
| bool tesseract::LSTMRecognizer::DeSerialize | ( | const TessdataManager * | mgr, |
| TFile * | fp | ||
| ) |
Definition at line 133 of file lstmrecognizer.cpp.
| void tesseract::LSTMRecognizer::DisplayForward | ( | const NetworkIO & | inputs, |
| const std::vector< int > & | labels, | ||
| const std::vector< int > & | label_coords, | ||
| const char * | window_name, | ||
| ScrollView ** | window | ||
| ) |
Definition at line 411 of file lstmrecognizer.cpp.
|
protected |
Definition at line 422 of file lstmrecognizer.cpp.
|
inline |
Definition at line 100 of file lstmrecognizer.h.
|
inline |
Definition at line 132 of file lstmrecognizer.h.
|
inline |
Definition at line 203 of file lstmrecognizer.h.
|
inline |
Definition at line 200 of file lstmrecognizer.h.
|
inline |
Definition at line 108 of file lstmrecognizer.h.
|
inline |
Definition at line 115 of file lstmrecognizer.h.
|
inline |
Definition at line 137 of file lstmrecognizer.h.
|
inline |
Definition at line 127 of file lstmrecognizer.h.
|
inline |
Definition at line 196 of file lstmrecognizer.h.
|
inline |
Definition at line 192 of file lstmrecognizer.h.
|
inline |
Definition at line 189 of file lstmrecognizer.h.
|
inline |
Definition at line 87 of file lstmrecognizer.h.
|
inline |
Definition at line 91 of file lstmrecognizer.h.
|
inline |
Definition at line 95 of file lstmrecognizer.h.
| void tesseract::LSTMRecognizer::LabelsFromOutputs | ( | const NetworkIO & | outputs, |
| std::vector< int > * | labels, | ||
| std::vector< int > * | xcoords | ||
| ) |
Definition at line 519 of file lstmrecognizer.cpp.
|
protected |
Definition at line 530 of file lstmrecognizer.cpp.
|
protected |
Definition at line 542 of file lstmrecognizer.cpp.
|
inline |
Definition at line 72 of file lstmrecognizer.h.
| bool tesseract::LSTMRecognizer::Load | ( | const ParamsVectors * | params, |
| const std::string & | lang, | ||
| TessdataManager * | mgr | ||
| ) |
Definition at line 75 of file lstmrecognizer.cpp.
| bool tesseract::LSTMRecognizer::LoadCharsets | ( | const TessdataManager * | mgr | ) |
Definition at line 180 of file lstmrecognizer.cpp.
| bool tesseract::LSTMRecognizer::LoadDictionary | ( | const ParamsVectors * | params, |
| const std::string & | lang, | ||
| TessdataManager * | mgr | ||
| ) |
Definition at line 224 of file lstmrecognizer.cpp.
| bool tesseract::LSTMRecognizer::LoadRecoder | ( | TFile * | fp | ) |
Definition at line 198 of file lstmrecognizer.cpp.
|
inline |
Definition at line 218 of file lstmrecognizer.h.
|
inline |
Definition at line 213 of file lstmrecognizer.h.
|
inline |
Definition at line 57 of file lstmrecognizer.h.
|
inline |
Definition at line 76 of file lstmrecognizer.h.
| void tesseract::LSTMRecognizer::OutputStats | ( | const NetworkIO & | outputs, |
| float * | min_output, | ||
| float * | mean_output, | ||
| float * | sd | ||
| ) |
Definition at line 295 of file lstmrecognizer.cpp.
| bool tesseract::LSTMRecognizer::RecognizeLine | ( | const ImageData & | image_data, |
| float | invert_threshold, | ||
| bool | debug, | ||
| bool | re_invert, | ||
| bool | upside_down, | ||
| float * | scale_factor, | ||
| NetworkIO * | inputs, | ||
| NetworkIO * | outputs | ||
| ) |
Definition at line 321 of file lstmrecognizer.cpp.
| void tesseract::LSTMRecognizer::RecognizeLine | ( | const ImageData & | image_data, |
| float | invert_threshold, | ||
| bool | debug, | ||
| double | worst_dict_cert, | ||
| const TBOX & | line_box, | ||
| PointerVector< WERD_RES > * | words, | ||
| int | lstm_choice_mode = 0, |
||
| int | lstm_choice_amount = 5 |
||
| ) |
Definition at line 247 of file lstmrecognizer.cpp.
|
inline |
Definition at line 67 of file lstmrecognizer.h.
|
inline |
Definition at line 153 of file lstmrecognizer.h.
|
inline |
Definition at line 142 of file lstmrecognizer.h.
| bool tesseract::LSTMRecognizer::Serialize | ( | const TessdataManager * | mgr, |
| TFile * | fp | ||
| ) | const |
Definition at line 93 of file lstmrecognizer.cpp.
|
inline |
Definition at line 209 of file lstmrecognizer.h.
|
inline |
Definition at line 172 of file lstmrecognizer.h.
|
inline |
Definition at line 161 of file lstmrecognizer.h.
|
inlineprotected |
Definition at line 288 of file lstmrecognizer.h.
|
inline |
Definition at line 84 of file lstmrecognizer.h.
|
inline |
Definition at line 62 of file lstmrecognizer.h.
|
protected |
Definition at line 354 of file lstmrecognizer.h.
|
protected |
Definition at line 332 of file lstmrecognizer.h.
|
protected |
Definition at line 366 of file lstmrecognizer.h.
|
protected |
Definition at line 360 of file lstmrecognizer.h.
|
protected |
Definition at line 351 of file lstmrecognizer.h.
|
protected |
Definition at line 352 of file lstmrecognizer.h.
|
protected |
Definition at line 329 of file lstmrecognizer.h.
|
protected |
Definition at line 339 of file lstmrecognizer.h.
|
protected |
Definition at line 349 of file lstmrecognizer.h.
|
protected |
Definition at line 357 of file lstmrecognizer.h.
|
protected |
Definition at line 336 of file lstmrecognizer.h.
|
protected |
Definition at line 346 of file lstmrecognizer.h.
|
protected |
Definition at line 358 of file lstmrecognizer.h.
|
protected |
Definition at line 362 of file lstmrecognizer.h.
|
protected |
Definition at line 342 of file lstmrecognizer.h.
|
protected |
Definition at line 344 of file lstmrecognizer.h.