|
tesseract
4.00.00dev
|
#include <lstmrecognizer.h>
Public Member Functions | |
| LSTMRecognizer () | |
| ~LSTMRecognizer () | |
| int | NumOutputs () const |
| int | training_iteration () const |
| int | sample_iteration () const |
| double | learning_rate () const |
| bool | IsHardening () const |
| LossType | OutputLossType () const |
| bool | SimpleTextOutput () const |
| bool | IsIntMode () const |
| bool | IsRecoding () const |
| CachingStrategy | CacheStrategy () 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) |
| bool | IsUsingAdaGrad () const |
| const UNICHARSET & | GetUnicharset () const |
| const Dict * | GetDict () const |
| void | SetIteration (int iteration) |
| int | NumInputs () const |
| int | null_char () const |
| bool | Serialize (TFile *fp) const |
| bool | DeSerialize (TFile *fp) |
| bool | LoadDictionary (const char *lang, TessdataManager *mgr) |
| void | RecognizeLine (const ImageData &image_data, bool invert, bool debug, double worst_dict_cert, bool use_alternates, const UNICHARSET *target_unicharset, const TBOX &line_box, float score_ratio, bool one_word, PointerVector< WERD_RES > *words) |
| void | WordsFromOutputs (const NetworkIO &outputs, const GenericVector< int > &labels, const GenericVector< int > label_coords, const TBOX &line_box, bool debug, bool use_alternates, bool one_word, float score_ratio, float scale_factor, const UNICHARSET *target_unicharset, PointerVector< WERD_RES > *words) |
| 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, float label_threshold, float *scale_factor, NetworkIO *inputs, NetworkIO *outputs) |
| WERD_RES * | WordFromOutput (const TBOX &line_box, const NetworkIO &outputs, int word_start, int word_end, float score_ratio, float space_certainty, bool debug, bool use_alternates, const UNICHARSET *target_unicharset, const GenericVector< int > &labels, const GenericVector< int > &label_coords, float scale_factor) |
| WERD_RES * | InitializeWord (const TBOX &line_box, int word_start, int word_end, float space_certainty, bool use_alternates, const UNICHARSET *target_unicharset, const GenericVector< int > &labels, const GenericVector< int > &label_coords, float scale_factor) |
| 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) |
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 | LabelsFromOutputs (const NetworkIO &outputs, float null_thr, GenericVector< int > *labels, GenericVector< int > *xcoords) |
| void | LabelsViaThreshold (const NetworkIO &output, float null_threshold, GenericVector< int > *labels, GenericVector< int > *xcoords) |
| void | LabelsViaCTC (const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords) |
| void | LabelsViaReEncode (const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords) |
| void | LabelsViaSimpleText (const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords) |
| BLOB_CHOICE_LIST * | GetBlobChoices (int col, int row, bool debug, const NetworkIO &output, const UNICHARSET *target_unicharset, int x_start, int x_end, float score_ratio) |
| bool | AddBlobChoices (int unichar_id, float rating, float certainty, int col, int row, const UNICHARSET *target_unicharset, BLOB_CHOICE_IT *bc_it) |
| 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 | training_flags_ |
| inT32 | training_iteration_ |
| inT32 | sample_iteration_ |
| inT32 | null_char_ |
| float | weight_range_ |
| float | learning_rate_ |
| float | momentum_ |
| TRand | randomizer_ |
| NetworkScratch | scratch_space_ |
| Dict * | dict_ |
| RecodeBeamSearch * | search_ |
| ScrollView * | debug_win_ |
Definition at line 55 of file lstmrecognizer.h.
| tesseract::LSTMRecognizer::LSTMRecognizer | ( | ) |
Definition at line 52 of file lstmrecognizer.cpp.
| tesseract::LSTMRecognizer::~LSTMRecognizer | ( | ) |
Definition at line 65 of file lstmrecognizer.cpp.
|
protected |
Definition at line 739 of file lstmrecognizer.cpp.
|
inline |
Definition at line 88 of file lstmrecognizer.h.
|
protected |
Definition at line 504 of file lstmrecognizer.cpp.
|
protected |
Definition at line 531 of file lstmrecognizer.cpp.
|
protected |
Definition at line 762 of file lstmrecognizer.cpp.
| STRING tesseract::LSTMRecognizer::DecodeLabels | ( | const GenericVector< int > & | labels | ) |
Definition at line 446 of file lstmrecognizer.cpp.
|
protected |
Definition at line 804 of file lstmrecognizer.cpp.
| bool tesseract::LSTMRecognizer::DeSerialize | ( | TFile * | fp | ) |
Definition at line 91 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 461 of file lstmrecognizer.cpp.
|
protected |
Definition at line 477 of file lstmrecognizer.cpp.
|
inline |
Definition at line 96 of file lstmrecognizer.h.
|
protected |
Definition at line 689 of file lstmrecognizer.cpp.
|
inline |
Definition at line 145 of file lstmrecognizer.h.
Definition at line 104 of file lstmrecognizer.h.
|
inline |
Definition at line 111 of file lstmrecognizer.h.
|
inline |
Definition at line 143 of file lstmrecognizer.h.
| WERD_RES * tesseract::LSTMRecognizer::InitializeWord | ( | const TBOX & | line_box, |
| int | word_start, | ||
| int | word_end, | ||
| float | space_certainty, | ||
| bool | use_alternates, | ||
| const UNICHARSET * | target_unicharset, | ||
| const GenericVector< int > & | labels, | ||
| const GenericVector< int > & | label_coords, | ||
| float | scale_factor | ||
| ) |
Definition at line 398 of file lstmrecognizer.cpp.
|
inline |
Definition at line 72 of file lstmrecognizer.h.
|
inline |
Definition at line 82 of file lstmrecognizer.h.
|
inline |
Definition at line 84 of file lstmrecognizer.h.
|
inline |
Definition at line 93 of file lstmrecognizer.h.
|
inline |
Definition at line 141 of file lstmrecognizer.h.
|
protected |
Definition at line 572 of file lstmrecognizer.cpp.
|
protected |
Definition at line 633 of file lstmrecognizer.cpp.
|
protected |
Definition at line 653 of file lstmrecognizer.cpp.
|
protected |
Definition at line 667 of file lstmrecognizer.cpp.
|
protected |
Definition at line 592 of file lstmrecognizer.cpp.
|
inline |
Definition at line 69 of file lstmrecognizer.h.
| bool tesseract::LSTMRecognizer::LoadDictionary | ( | const char * | lang, |
| TessdataManager * | mgr | ||
| ) |
Definition at line 131 of file lstmrecognizer.cpp.
|
inline |
Definition at line 156 of file lstmrecognizer.h.
|
inline |
Definition at line 153 of file lstmrecognizer.h.
|
inline |
Definition at line 60 of file lstmrecognizer.h.
|
inline |
Definition at line 75 of file lstmrecognizer.h.
| void tesseract::LSTMRecognizer::OutputStats | ( | const NetworkIO & | outputs, |
| float * | min_output, | ||
| float * | mean_output, | ||
| float * | sd | ||
| ) |
Definition at line 236 of file lstmrecognizer.cpp.
| void tesseract::LSTMRecognizer::RecognizeLine | ( | const ImageData & | image_data, |
| bool | invert, | ||
| bool | debug, | ||
| double | worst_dict_cert, | ||
| bool | use_alternates, | ||
| const UNICHARSET * | target_unicharset, | ||
| const TBOX & | line_box, | ||
| float | score_ratio, | ||
| bool | one_word, | ||
| PointerVector< WERD_RES > * | words | ||
| ) |
Definition at line 146 of file lstmrecognizer.cpp.
| bool tesseract::LSTMRecognizer::RecognizeLine | ( | const ImageData & | image_data, |
| bool | invert, | ||
| bool | debug, | ||
| bool | re_invert, | ||
| float | label_threshold, | ||
| float * | scale_factor, | ||
| NetworkIO * | inputs, | ||
| NetworkIO * | outputs | ||
| ) |
Definition at line 256 of file lstmrecognizer.cpp.
|
inline |
Definition at line 66 of file lstmrecognizer.h.
|
inline |
Definition at line 133 of file lstmrecognizer.h.
|
inline |
Definition at line 122 of file lstmrecognizer.h.
| bool tesseract::LSTMRecognizer::Serialize | ( | TFile * | fp | ) | const |
Definition at line 72 of file lstmrecognizer.cpp.
|
inline |
Definition at line 149 of file lstmrecognizer.h.
|
inlineprotected |
Definition at line 263 of file lstmrecognizer.h.
|
inline |
Definition at line 81 of file lstmrecognizer.h.
|
inline |
Definition at line 63 of file lstmrecognizer.h.
| WERD_RES * tesseract::LSTMRecognizer::WordFromOutput | ( | const TBOX & | line_box, |
| const NetworkIO & | outputs, | ||
| int | word_start, | ||
| int | word_end, | ||
| float | score_ratio, | ||
| float | space_certainty, | ||
| bool | debug, | ||
| bool | use_alternates, | ||
| const UNICHARSET * | target_unicharset, | ||
| const GenericVector< int > & | labels, | ||
| const GenericVector< int > & | label_coords, | ||
| float | scale_factor | ||
| ) |
Definition at line 332 of file lstmrecognizer.cpp.
| void tesseract::LSTMRecognizer::WordsFromOutputs | ( | const NetworkIO & | outputs, |
| const GenericVector< int > & | labels, | ||
| const GenericVector< int > | label_coords, | ||
| const TBOX & | line_box, | ||
| bool | debug, | ||
| bool | use_alternates, | ||
| bool | one_word, | ||
| float | score_ratio, | ||
| float | scale_factor, | ||
| const UNICHARSET * | target_unicharset, | ||
| PointerVector< WERD_RES > * | words | ||
| ) |
Definition at line 185 of file lstmrecognizer.cpp.
|
protected |
Definition at line 354 of file lstmrecognizer.h.
|
protected |
Definition at line 388 of file lstmrecognizer.h.
|
protected |
Definition at line 382 of file lstmrecognizer.h.
|
protected |
Definition at line 375 of file lstmrecognizer.h.
|
protected |
Definition at line 376 of file lstmrecognizer.h.
|
protected |
Definition at line 351 of file lstmrecognizer.h.
|
protected |
Definition at line 361 of file lstmrecognizer.h.
|
protected |
Definition at line 371 of file lstmrecognizer.h.
|
protected |
Definition at line 379 of file lstmrecognizer.h.
|
protected |
Definition at line 358 of file lstmrecognizer.h.
|
protected |
Definition at line 368 of file lstmrecognizer.h.
|
protected |
Definition at line 380 of file lstmrecognizer.h.
|
protected |
Definition at line 384 of file lstmrecognizer.h.
|
protected |
Definition at line 364 of file lstmrecognizer.h.
|
protected |
Definition at line 366 of file lstmrecognizer.h.
|
protected |
Definition at line 373 of file lstmrecognizer.h.