From 331b2d753fb9913ed220021bcc32723f068f8786 Mon Sep 17 00:00:00 2001 From: Davis King Date: Thu, 15 Dec 2011 20:30:32 -0500 Subject: [PATCH] Improved error messages from object detector. --- dlib/svm/structural_svm_object_detection_problem.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlib/svm/structural_svm_object_detection_problem.h b/dlib/svm/structural_svm_object_detection_problem.h index 2f0d5667d..d2762e98d 100644 --- a/dlib/svm/structural_svm_object_detection_problem.h +++ b/dlib/svm/structural_svm_object_detection_problem.h @@ -184,6 +184,9 @@ namespace dlib sout << "The offending rectangles are:\n"; sout << "rect1: "<< mapped_rects[i] << endl; sout << "rect2: "<< mapped_rects[j] << endl; + sout << "overlap amount: " << + mapped_rects[i].intersect(mapped_rects[j]).area()/(double)( mapped_rects[i]+mapped_rects[j]).area() + << endl; throw dlib::impossible_labeling_error(sout.str()); } }