Opencv haar training parameters : Mode & symmentry

asked 2016-03-03 23:31:20 -0600

Prakash gravatar image

I am using Opencv 3.0 Before beginning training i wanted to set 'mode' parameter to 'all' below is the command line argument

C:\OpenCV\build\x64\vc12\bin\opencv_traincascade.exe -data cascade -numStages 20 -vec samples.vec -bg NegativeSet.txt -precalcValBufSize 3750 -precalcIdxBufSize 3750 -numPos 333 -numNeg 922 -minHitRate 0.995 -maxfalsealarm 0.5 -w 36 -h 28 -mode ALL

even though i am explicitly specifying mode parameter it still uses default value (BASIC), as u can see below

D:\>C:\OpenCV\build\x64\vc12\bin\opencv_traincascade.exe -data cascade -numStages 20 -vec samples.vec -bg NegativeSet.txt -precalcValBufSize 3750 -precalcIdxBufSize 3750 -numPos 333 -numNeg 922 -minHi
tRate 0.995 -maxfalsealarm 0.5 -w 36 -h 28 -mode All
PARAMETERS:
cascadeDirName: cascade
vecFileName: samples.vec
bgFileName: NegativeSet.txt
numPos: 333
numNeg: 922
numStages: 20
precalcValBufSize[Mb] : 3750
precalcIdxBufSize[Mb] : 3750
stageType: BOOST
featureType: HAAR
sampleWidth: 36
sampleHeight: 28
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: BASIC

my second question is, How to use -nonsym ? if i append -nonsym at the end or anywhere between command line argument, training crashes once i pass the arguments (as soon as i hit enter in cmd) it says "opencv_traincascade.exe has stopped working"

below is the cmd line argument including -nonsym

C:\OpenCV\build\x64\vc12\bin\opencv_traincascade.exe -data cascade -numStages 20 -vec samples.vec -bg NegativeSet.txt -precalcValBufSize 3750 -precalcIdxBufSize 3750 -numPos 333 -numNeg 922 -minHitRate 0.995 -maxfalsealarm 0.5 -w 36 -h 28 -mode ALL -nonsym

Thanks & regards

edit retag flag offensive close merge delete

Comments

There is a typo error, it should be -maxFalseAlarmRate. Maybe it caused a problem with the arguments parsing ? Or maybe you have to explicitly specify that you want to use HAAR features: -featureType HAAR.

The argument -nonsym is not listed in the documentation, where does it come from ?

Eduardo gravatar imageEduardo ( 2016-03-04 04:10:57 -0600 )edit

changed -maxfalsealarm to -maxFalseAlarmRate still not working!

Prakash gravatar imagePrakash ( 2016-03-04 04:14:06 -0600 )edit