diff --git a/dlib/svm/structural_svm_object_detection_problem.h b/dlib/svm/structural_svm_object_detection_problem.h index 1075a0130..e53b722e9 100644 --- a/dlib/svm/structural_svm_object_detection_problem.h +++ b/dlib/svm/structural_svm_object_detection_problem.h @@ -334,7 +334,7 @@ namespace dlib // The point of this loop is to fill out the truth_score_hits array. for (unsigned long i = 0; i < dets.size() && final_dets.size() < max_num_dets; ++i) { - if (overlaps_any_box(final_dets, dets[i].second)) + if (overlaps_any_box(boxes_overlap, final_dets, dets[i].second)) continue; const std::pair truth = find_best_match(truth_object_detections[idx], dets[i].second); @@ -371,7 +371,7 @@ namespace dlib // detections. for (unsigned long i = 0; i < dets.size() && final_dets.size() < max_num_dets; ++i) { - if (overlaps_any_box(final_dets, dets[i].second)) + if (overlaps_any_box(boxes_overlap, final_dets, dets[i].second)) continue; const std::pair truth = find_best_match(truth_object_detections[idx], dets[i].second); @@ -431,19 +431,6 @@ namespace dlib } - bool overlaps_any_box ( - const std::vector& truth_object_detections, - const dlib::rectangle& rect - ) const - { - for (unsigned long i = 0; i < truth_object_detections.size(); ++i) - { - if (boxes_overlap(truth_object_detections[i], rect)) - return true; - } - return false; - } - bool overlaps_ignore_box ( const long idx, const dlib::rectangle& rect