Ask Your Question
1

HaarTraining: Find detected object with highest score

asked 2013-05-08 04:58:05 -0600

vinayverma gravatar image

updated 2013-05-08 04:58:51 -0600

Need to detect only the object (single instance) with maximum score/confidence using HaarTraining. I have obtained a cascade classifier for my object ( using 1000 Positives, 21000 Negatives) and tried to use it with opencv facedetect example in C++. It is detecting my object whenever present but in addition, there are atleast 10 more objects detected (false detection). Is it possible to find out the object with highest score/confidence in the list returned by CascadeClassifier.detectMultiScale(). Is it somehow obtained using rejectLevels & levelWeights? I can't find any documentation related to this.

I have already tried it successfully with latent svm. It returns the score along the detection list as well but it takes lot of time in processing the frame.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-05-08 05:00:44 -0600

The cascade classifier training doesn't return any confidence score like the latentSVM approach does. However, what you could do is retrieve all found detections and count the amount of overlapping detections. The rule used widely spread is two windows overlapping more than 50% vote for the same detection. This way you can define your own quality measure.

edit flag offensive delete link more

Comments

That means i'll have to process the list of detections and obtain their scores by this 50% overlapp rule (i might also have to groupRectangles with > 50% overlapp). However, I am just curious after looking at some of the videos of object detection using Haartraining (http://opencvuser.blogspot.in/2011/08/creating-haar-cascade-classifier-aka.html, http://www.youtube.com/watch?v=DLSQebBrKsc). Why their number of detections is 1-2 and mine is 10-20. Is it because they have done the same overlapp processing or because their classifier was trained to a better stage (mine is stage 7).

vinayverma gravatar imagevinayverma ( 2013-05-08 05:15:42 -0600 )edit

It can be one or the other. They could have trained their detector to stage 20 or so. On the other hand, they could also have used a specific threshold measure, the one you can set for neighbourdetections, which segments the good from the false positives.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-05-08 05:27:26 -0600 )edit
1

Thanks Steven for your quick replies. I'll first try to train my detector for higher stages.

vinayverma gravatar imagevinayverma ( 2013-05-08 06:23:21 -0600 )edit

Question Tools

Stats

Asked: 2013-05-08 04:58:05 -0600

Seen: 1,927 times

Last updated: May 08 '13