问题描述
我想通过对测试数据集使用 vision.CascadeObjectdetector('mouth')
来检查嘴部检测结果的平均精度。我只是想将这些结果与其他物体检测器方法进行比较,但出现错误。
示例如下:
mouthDetector = vision.CascadeObjectDetector('mouth');
numImages = height(testDataTbl);
results = table('Size',[numImages 1],...
'VariableTypes',{'cell'},...
'VariableNames',{'Boxes'});
for i = 1 : numImages
I = imread(testDataTbl.files{i});
bboxes = mouthDetector(I);
results.Boxes{i} = bboxes;
end
[ap,recall,precision] = evaluateDetectionPrecision(results,testDataTbl(:,2));
figure
plot(recall,precision)
grid on
title(sprintf('Average Precision = %.1f',ap))
运行此代码后,出现错误:
Expected the width of the detection results table to be greater than or equal to 2.
Error in vision.internal.detector.evaluationInputValidation (line 22)
checkDetectionResultsTable(detectionResults,classes,boxValidationFcn,filename);
Error in evaluateDetectionPrecision (line 119)
[gtds,classes] = vision.internal.detector.evaluationInputValidation(detectionResults,..
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)