Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Parameters for traincascade ect.

Hi!

Im trying to use traincascade to train an XML file for use in a face detector, but I'm having some problems with the parameters for both traincascade and its subfunctions. For my positive examples I have used the mergevec (https://github.com/wulfebw/mergevec) tool to make 2000 positive images from the 200 frontal face images I have. I also have 200 negative images, but read somewhere that you can set the numNeg variable to much higher than the actual negative images you possess, since traincascade will make variations of the negatives for use in the function. Because of this I have set the numNeg variable to 4000. Will this work? The function call for traincascade I have used is;

trainlbpcascade.exe -data FaceDetector -vec merged_vector.vec -bg negative/bg.txt -numPos 1600 -numNeg 4000 -numStages 10 -stageType LBP -mem 1024 -featureType LBP -w 24 -h 24 -bt DAB -maxDepth 2 -mode ALL

with these parameters:

PARAMETERS: cascadeDirName: FaceDetector vecFileName: merged_vector.vec bgFileName: negative/bg.txt numPos: 1600 numNeg: 4000 numStages: 10 precalcValBufSize[Mb] : 1024 precalcIdxBufSize[Mb] : 1024 acceptanceRatioBreakValue : -1 stageType: BOOST featureType: LBP sampleWidth: 24 sampleHeight: 24 boostType: DAB minHitRate: 0.995 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 2 maxWeakCount: 100

I am unsure as to what I should set the other parameters (minHitRate, maxFalseAlarmRate ect) to, and would appreciate any help regarding this.

Also, my traincascade call will currently only reach stage 3 and is only using 2 variables. I get the "Required leaf false alarm rate achieved. Branch training terminated." message, which I've read is caused by lack of positive images. Could this be the case, even with 2000 positives?

Sorry if the answers to these questions are self-explanatory, but I'm new to this and the learning curve has so far been steep. Thanks in advance for any help!