Cascade classifier, few questions

asked 2014-04-22 09:47:30 -0500

mada gravatar image

Hi, I've got a few questions about Haar cascade classifier (opencv_traincascade).

Let's say I've got 5000 positives and 10000 negatives(of various sizes) in my training set. After the training is done, detector still has some false and missed detections.

1)How will adding lots of false positives to the training set influence the cascade training? From my experience false positives could be eliminated, but with the drawback of missing more positives. Is there a better approach?

2)Importance of the order of negatives in .txt file? I reckon the important ones, like usual backgrounds and objects appearing the most should be placed first. So they could be eliminated in the first stages...some other suggestions?

3)Is there an optimal number of positives and negatives that are used for training? Also, same question for positives/negatives ratio?


edit retag flag offensive close merge delete


To train perfect, STAGES should be as high as possible. if you trained the object with 30 to 40 stages this will provide the perfect detection.

Amit gravatar imageAmit ( 2014-04-26 23:31:16 -0500 )edit

Yes, false alarm rate would be very low. But, more true positives would be missed, since at the beginning of every stage a few positives are omitted and new ones selected from .vec file.

mada gravatar imagemada ( 2014-04-28 02:29:29 -0500 )edit