MCPcopy Create free account
hub / github.com/creatale/node-dv / PreTrainingSetup

Method PreTrainingSetup

deps/tesseract/classify/mastertrainer.cpp:257–265  ·  view source on GitHub ↗

Gets the samples ready for training. Use after both ReadTrainingSamples+PostLoadCleanup or DeSerialize. Re-indexes the features and computes canonical and cloud features.

Source from the content-addressed store, hash-verified

255// ReadTrainingSamples+PostLoadCleanup or DeSerialize.
256// Re-indexes the features and computes canonical and cloud features.
257void MasterTrainer::PreTrainingSetup() {
258 if (debug_level_ > 0)
259 tprintf("PreTrainingSetup...\n");
260 samples_.IndexFeatures(feature_space_);
261 samples_.ComputeCanonicalFeatures();
262 if (debug_level_ > 0)
263 tprintf("ComputeCloudFeatures...\n");
264 samples_.ComputeCloudFeatures(feature_space_.Size());
265}
266
267// Sets up the master_shapes_ table, which tells which fonts should stay
268// together until they get to a leaf node classifier.

Callers

nothing calls this directly

Calls 4

ComputeCloudFeaturesMethod · 0.80
SizeMethod · 0.80
IndexFeaturesMethod · 0.45

Tested by

no test coverage detected