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

Function train_shape_predictor_on_images_py

tools/python/src/shape_predictor.cpp:94–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92// ----------------------------------------------------------------------------------------
93
94inline shape_predictor train_shape_predictor_on_images_py (
95 const py::list& pyimages,
96 const py::list& pydetections,
97 const shape_predictor_training_options& options
98)
99{
100 const unsigned long num_images = py::len(pyimages);
101 if (num_images != py::len(pydetections))
102 throw dlib::error("The length of the detections list must match the length of the images list.");
103
104 std::vector<std::vector<full_object_detection> > detections(num_images);
105 dlib::array<numpy_image<unsigned char>> images(num_images);
106 images_and_nested_params_to_dlib(pyimages, pydetections, images, detections);
107
108 return train_shape_predictor_on_images(images, detections, options);
109}
110
111
112inline double test_shape_predictor_with_images_py (

Callers

nothing calls this directly

Calls 4

lenFunction · 0.85
errorClass · 0.85

Tested by

no test coverage detected