| 168 | } |
| 169 | |
| 170 | std::vector<std::vector<mmod_rect>> extract_mmod_rect_vectors( |
| 171 | const std::vector<truth_image>& truth_images |
| 172 | ) |
| 173 | { |
| 174 | std::vector<std::vector<mmod_rect>> mmod_rects(truth_images.size()); |
| 175 | |
| 176 | const auto extract_mmod_rects_from_truth_image = [](const truth_image& truth_image) |
| 177 | { |
| 178 | return extract_mmod_rects(truth_image.truth_instances); |
| 179 | }; |
| 180 | |
| 181 | std::transform( |
| 182 | truth_images.begin(), |
| 183 | truth_images.end(), |
| 184 | mmod_rects.begin(), |
| 185 | extract_mmod_rects_from_truth_image |
| 186 | ); |
| 187 | |
| 188 | return mmod_rects; |
| 189 | } |
| 190 | |
| 191 | det_bnet_type train_detection_network( |
| 192 | const std::vector<truth_image>& truth_images, |
no test coverage detected