2017-02-27 31 views
0

所以我在網上搜索這是一個很常見的錯誤,但我試過給定的解決方案無濟於事。是:OpenCV列車級聯給出錯誤「」溫度級的列車數據集不能填充「

C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata>opencv_traincascade -data my_trained -vec positives.vec -bg negativedata.txt -numPos 30 -numNeg 76 -numStages 15 -minHitRate 0.995 -w 197 -h 197 -featureType LBP -precalcValBufSize 1024 -precalcIdxBufSize 1024 
PARAMETERS: 
cascadeDirName: my_trained 
vecFileName: positives.vec 
bgFileName: negativedata.txt 
numPos: 30 
numNeg: 76 
numStages: 15 
precalcValBufSize[Mb] : 1024 
precalcIdxBufSize[Mb] : 1024 
acceptanceRatioBreakValue : -1 
stageType: BOOST 
featureType: LBP 
sampleWidth: 197 
sampleHeight: 197 
boostType: GAB 
minHitRate: 0.995 
maxFalseAlarmRate: 0.5 
weightTrimRate: 0.95 
maxDepth: 1 
maxWeakCount: 100 
Number of unique features given windowSize [197,197] : 41409225 

===== TRAINING 0-stage ===== 

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

C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata> 

和我negativedata.txt文件在表格76行信息的:

negatives/1411814567410.jpg 1 2 2 199 199 
negatives/20131225_192702.jpg 1 2 2 199 199 
negatives/20131225_193214.jpg 1 2 2 199 199 
negatives/20131225_193325.jpg 1 2 2 199 199 
negatives/20131225_193327.jpg 1 2 2 199 199 
negatives/20131225_193328.jpg 1 2 2 199 199 

請有人可以幫我找出這個問題,因爲我仍然不知道爲什麼,我得到這個錯誤,我在windows系統上做了這個,謝謝

回答

0

發現了問題,顯然BG文件不應包含限制所以現在我的文件的格式爲

C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/ff.JPG 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/fifa.JPG 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/fred.JPG 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/IMG-20140718-WA0008-1.jpg 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/IMG-20150102-WA0013.jpg 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/IMG-20150120-WA0005.jpg 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/IMG_20140109_.jpg 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/IMG_20140405_205621.jpg 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/IMG_20140405_214225.jpg 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/IMG_20140405_214225_transparent.png 
C:\Users\kosyn_000\Dropbox\OpenCVtrainingdata\negatives/IMG_20140405_214225_transparent_small.png 

,並輸出我的xml文件的罰款;儘管需要一點時間。大聲笑,我不能相信這是簡單的把我拖回去。