2013-11-22 73 views
2

我在CentOS系統運行這些命令培訓功能不能訓練我的分類

opencv_traincascade -data data/cascade -vec samples1.vec -bg negative/infofile.txt -numPos 231 -numNeg 100 -w 25 -h 15 

訓練我的分類,並將其返回遵循

PARAMETERS: 
cascadeDirName: data/cascade 
vecFileName: samples1.vec 
bgFileName: negative/infofile.txt 
numPos: 231 
numNeg: 100 
numStages: 20 
precalcValBufSize[Mb] : 256 
precalcIdxBufSize[Mb] : 256 
stageType: BOOST 
featureType: HAAR 
sampleWidth: 25 
sampleHeight: 15 
boostType: GAB 
minHitRate: 0.995 
maxFalseAlarmRate: 0.5 
weightTrimRate: 0.95 
maxDepth: 1 
maxWeakCount: 100 
mode: BASIC 

===== TRAINING 0-stage ===== 
<BEGIN 
POS count : consumed 231 : 231 
Train dataset for temp stage can not be filled. Branch training terminated. 
Cascade classifier can't be trained. Check the used training parameters. 

誰能告訴我是什麼問題?:/

回答

3

負樣本數量太小。您應該通過在網頁上搜索更多不包含您檢測到的對象的背景圖像來增加它,例如1000。

0

列車級聯不會選擇您的負測試數據。請檢查negative/infofile.txt中指定的路徑。避免此問題的一種方法是在infofile.txt中使用相對路徑。詳細信息here