Relaxed the default non-max suppression parameters used by the mmod_options

object so that users of the deep learning MMOD tool don't get spurious errors
about impossibly labeled objects during training.
This commit is contained in:
Davis King 2017-05-29 20:06:37 -04:00
parent 88383a848b
commit 0ef3b736fd
1 changed files with 10 additions and 0 deletions

View File

@ -412,6 +412,16 @@ namespace dlib
overlaps_nms = find_tight_overlap_tester(temp);
// Relax the non-max-suppression a little so that it doesn't accidentally make
// it impossible for the detector to output boxes matching the training data.
// This could be a problem with the tightest possible nms test since there is
// some small variability in how boxes get positioned between the training data
// and the coordinate system used by the detector when it runs. So relaxing it
// here takes care of that.
double relax_amount = 0.10;
auto iou_thresh = std::min(1.0, overlaps_nms.get_iou_thresh()+relax_amount);
auto percent_covered_thresh = std::min(1.0, overlaps_nms.get_percent_covered_thresh()+relax_amount);
overlaps_nms = test_box_overlap(iou_thresh, percent_covered_thresh);
}
};