| 248 | // ---------------------------------------------------------------------------------------- |
| 249 | |
| 250 | inline void train_simple_object_detector ( |
| 251 | const std::string& dataset_filename, |
| 252 | const std::string& detector_output_filename, |
| 253 | const simple_object_detector_training_options& options |
| 254 | ) |
| 255 | { |
| 256 | dlib::array<array2d<rgb_pixel> > images; |
| 257 | std::vector<std::vector<rectangle> > boxes, ignore; |
| 258 | ignore = load_image_dataset(images, boxes, dataset_filename); |
| 259 | |
| 260 | simple_object_detector_py detector = train_simple_object_detector_on_images(dataset_filename, images, boxes, ignore, options); |
| 261 | |
| 262 | save_simple_object_detector_py(detector, detector_output_filename); |
| 263 | |
| 264 | if (options.be_verbose) |
| 265 | std::cout << "Saved detector to file " << detector_output_filename << std::endl; |
| 266 | } |
| 267 | |
| 268 | // ---------------------------------------------------------------------------------------- |
| 269 |
nothing calls this directly
no test coverage detected