MCPcopy Create free account
hub / github.com/davisking/dlib / train_shape_predictor

Function train_shape_predictor

tools/python/src/shape_predictor.h:215–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 }
214
215 inline void train_shape_predictor (
216 const std::string& dataset_filename,
217 const std::string& predictor_output_filename,
218 const shape_predictor_training_options& options
219 )
220 {
221 dlib::array<array2d<unsigned char> > images;
222 std::vector<std::vector<full_object_detection> > objects;
223 load_image_dataset(images, objects, dataset_filename);
224
225 shape_predictor predictor = train_shape_predictor_on_images(images, objects, options);
226
227 serialize(predictor_output_filename) << predictor;
228
229 if (options.be_verbose)
230 std::cout << "Training complete, saved predictor to file " << predictor_output_filename << std::endl;
231 }
232
233// ----------------------------------------------------------------------------------------
234

Callers

nothing calls this directly

Calls 3

load_image_datasetFunction · 0.85
serializeFunction · 0.70

Tested by

no test coverage detected