我试图运行我的第一个opencv训练集,并且我不相信opencv_traincascade正在取得进展。对于我的训练集,我有9张正面图像和10张负面图像。要创建我使用的样本
opencv_createsamples -vec box.vec -w 44 -h 50
对于我的训练集我运行
opencv_traincascade -data data -vec box.vec -bg bg.txt -numPos 8 -numNeg 10 -numStages 2 -w 44 -h 50 -featureType LBP
所有正面和负面图像都是44x50,这是两个工具的输出
opencv_createsamples
Info file name: (NULL)
Img file name: (NULL)
Vec file name: box.vec
BG file name: (NULL)
Num: 1000
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Original image will be scaled to:
Width: $backgroundWidth / 44
Height: $backgroundHeight / 50
opencv_traincascade
PARAMETERS:
cascadeDirName: data
vecFileName: box.vec
bgFileName: bg.txt
numPos: 8
numNeg: 10
numStages: 1
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: LBP
sampleWidth: 44
sampleHeight: 50
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
===== TRAINING 0-stage =====
<BEGIN
POS count : consumed 8 : 8
NEG count : acceptanceRatio 10 : 1
即使经过多个小时的运行,训练也从未显示任何其他输出。我在数据目录中看不到任何数据。显然,我做错了什么,我很想知道它是什么。