| 252 | } |
| 253 | |
| 254 | inline double test_shape_predictor_py ( |
| 255 | const std::string& dataset_filename, |
| 256 | const std::string& predictor_filename |
| 257 | ) |
| 258 | { |
| 259 | // Load the images, no scales can be provided |
| 260 | dlib::array<array2d<unsigned char> > images; |
| 261 | // This interface cannot take the scales parameter. |
| 262 | std::vector<std::vector<double> > scales; |
| 263 | std::vector<std::vector<full_object_detection> > objects; |
| 264 | load_image_dataset(images, objects, dataset_filename); |
| 265 | |
| 266 | // Load the shape predictor |
| 267 | shape_predictor predictor; |
| 268 | deserialize(predictor_filename) >> predictor; |
| 269 | |
| 270 | return test_shape_predictor_with_images(images, objects, scales, predictor); |
| 271 | } |
| 272 | |
| 273 | // ---------------------------------------------------------------------------------------- |
| 274 |
nothing calls this directly
no test coverage detected