Use the box with bounding box regression applied to do NMS in the loss.

This commit is contained in:
Davis King 2020-09-01 06:58:35 -04:00
parent 0e721e5cae
commit 4b92804dc2

View File

@ -1487,7 +1487,7 @@ namespace dlib
// The point of this loop is to fill out the truth_score_hits array. // The point of this loop is to fill out the truth_score_hits array.
for (size_t i = 0; i < dets.size() && final_dets.size() < max_num_dets; ++i) for (size_t i = 0; i < dets.size() && final_dets.size() < max_num_dets; ++i)
{ {
if (overlaps_any_box_nms(final_dets, dets[i].rect)) if (overlaps_any_box_nms(final_dets, dets[i].rect_bbr))
continue; continue;
const auto& det_label = options.detector_windows[dets[i].tensor_channel].label; const auto& det_label = options.detector_windows[dets[i].tensor_channel].label;
@ -1556,7 +1556,7 @@ namespace dlib
// detections. // detections.
for (unsigned long i = 0; i < dets.size() && final_dets.size() < max_num_dets; ++i) for (unsigned long i = 0; i < dets.size() && final_dets.size() < max_num_dets; ++i)
{ {
if (overlaps_any_box_nms(final_dets, dets[i].rect)) if (overlaps_any_box_nms(final_dets, dets[i].rect_bbr))
continue; continue;
const auto& det_label = options.detector_windows[dets[i].tensor_channel].label; const auto& det_label = options.detector_windows[dets[i].tensor_channel].label;