19 #ifndef TESSERACT_LSTM_LSTMRECOGNIZER_H_ 20 #define TESSERACT_LSTM_LSTMRECOGNIZER_H_ 100 series->EnumerateLayers(NULL, &layers);
127 for (
int i = 0; i < layers.
size(); ++i) {
185 double worst_dict_cert,
bool use_alternates,
187 float score_ratio,
bool one_word,
200 const TBOX& line_box,
bool debug,
bool use_alternates,
201 bool one_word,
float score_ratio,
float scale_factor,
207 float* min_output,
float* mean_output,
float* sd);
220 bool re_invert,
float label_threshold,
float* scale_factor,
233 int word_start,
int word_end,
float score_ratio,
234 float space_certainty,
bool debug,
243 float space_certainty,
bool use_alternates,
258 const char* window_name,
284 int best_choice,
int x_start,
int x_end);
300 float null_threshold,
331 int x_start,
int x_end,
float score_ratio);
336 bool AddBlobChoices(
int unichar_id,
float rating,
float certainty,
int col,
338 BLOB_CHOICE_IT* bc_it);
393 #endif // TESSERACT_LSTM_LSTMRECOGNIZER_H_
float GetLayerLearningRate(const STRING &id) const
LossType loss_type() const
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)
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)
LossType OutputLossType() const
bool IsTensorFlow() const
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)
const UNICHARSET & GetUnicharset() const
Network * GetLayer(const char *id) const
NetworkScratch scratch_space_
bool DeSerialize(TFile *fp)
bool IsUsingAdaGrad() const
void ScaleLearningRate(double factor)
GenericVector< STRING > EnumerateLayers() const
bool LoadDictionary(const char *lang, TessdataManager *mgr)
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)
CachingStrategy CacheStrategy() const
int sample_iteration() const
const char * DecodeSingleLabel(int label)
void LabelsViaReEncode(const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords)
const Dict * GetDict() const
void LabelsViaSimpleText(const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords)
bool TestFlag(NetworkFlags flag) const
void LabelsFromOutputs(const NetworkIO &outputs, float null_thr, GenericVector< int > *labels, GenericVector< int > *xcoords)
Network * GetLayer(const STRING &id) const
void DebugActivationRange(const NetworkIO &outputs, const char *label, int best_choice, int x_start, int x_end)
virtual StaticShape OutputShape(const StaticShape &input_shape) const
double learning_rate() const
void ScaleLayerLearningRate(const char *id, double factor)
void LabelsViaCTC(const NetworkIO &output, GenericVector< int > *labels, GenericVector< int > *xcoords)
void DisplayForward(const NetworkIO &inputs, const GenericVector< int > &labels, const GenericVector< int > &label_coords, const char *window_name, ScrollView **window)
void DebugActivationPath(const NetworkIO &outputs, const GenericVector< int > &labels, const GenericVector< int > &xcoords)
void SetIteration(int iteration)
void OutputStats(const NetworkIO &outputs, float *min_output, float *mean_output, float *sd)
bool AddBlobChoices(int unichar_id, float rating, float certainty, int col, int row, const UNICHARSET *target_unicharset, BLOB_CHOICE_IT *bc_it)
void LabelsViaThreshold(const NetworkIO &output, float null_threshold, GenericVector< int > *labels, GenericVector< int > *xcoords)
void set_seed(uinT64 seed)
STRING DecodeLabels(const GenericVector< int > &labels)
void DisplayLSTMOutput(const GenericVector< int > &labels, const GenericVector< int > &xcoords, int height, ScrollView *window)
int training_iteration() const
inT32 training_iteration_
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)
bool SimpleTextOutput() const
bool Serialize(TFile *fp) const
const char * DecodeLabel(const GenericVector< int > &labels, int start, int *end, int *decoded)
RecodeBeamSearch * search_
float LayerLearningRate(const char *id) const
void ScaleLayerLearningRate(const STRING &id, double factor)