我正在尝试通过内置的 Matlab 函数“ trainCascadeObjectDetector ”训练级联分类器,但是当我调用此函数时,它总是显示以下错误消息:
trainCascadeObjectDetector('MCsDetector.xml',positiveInstances(1:5000,:),'./negativeSubFolder/',...
'FalseAlarmRate',0.01,'NumCascadeStages',5, 'FeatureType', 'LBP');
Automatically setting ObjectTrainingSize to [ 32, 32 ]
Using at most 980 of 1000 positive samples per stage
Using at most 1960 negative samples per stage
265 ocvTrainCascade(filenameParams, trainerParams, cascadeParams, boostParams, ...
Training stage 1 of 5
[....................................................Time to train stage 1: 12 seconds
Error using ocvTrainCascade
Error in generating samples for training. No samples could be generated for training the first cascade stage.
Error in trainCascadeObjectDetector (line 265)
ocvTrainCascade(filenameParams, trainerParams, cascadeParams, boostParams, ...
样本数量为5000张正片和11000张负片。Matlab 版本是 2014a,在 Ubuntu 12.04 上运行。
我不确定是否需要增加更多的训练数据,因为错误信息是:
生成训练样本时出错。无法生成用于训练第一个级联阶段的样本。
你能看看这个吗?谢谢!