Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello,

I have also made some changes in traincascade for quite some time now. I have mainly worked on new features that could be used by Adaboost for object detection or recognition.

maxdepth : The adaboost algorithm is "meta-classifier" : it sums sucessive "weak-classifiers" confidence in the sample. In OpenCV the "weak-classifiers" are decision-trees. Depth is simply the maximum depth of each tree, so it makes each weak classifier more robust in training, but also the ensemble has higher risk of over-fitting the data. It has absolutely no connection to -maxtreesplit which is related to final number of leaves in the cascade final classifier.

For sake of clarity :

[cascade/Tree] -> nodes[AdaboostClassifier] -> WeakClassifiers[DecisionTrees] -> nodes[FeatureIdx]

in original traincascade you cannot build a Tree in the sense of 1st [].

tempLeafFARate : with this implementation (it's similar in the c version), we check the False Alarm Rate in the testing set, not in the training set. The theoretical formula FA_rate^#stages is absolutely not right in practice after some stages... in fact it has some asymptotical behavior.

For image testing i also think the CvCascadeImageReader is quite basic, but it does the job. The risk being that first stages false positives samples are almost all the same...so to use randomness is indeed better. Another possibility is to record every possible FP and sample randomly without replacement X% of the database...