Error for using Threshold

2 ビュー (過去 30 日間)
Abdussalam Elhanashi
Abdussalam Elhanashi 2019 年 9 月 28 日
コメント済み: Rik 2019 年 9 月 29 日
Hi Guys
I am using the code below with Threshold and i got Error
Herein the code
load('gTruth.mat')
output = selectLabels(gTruth,'signal');
if ~isfolder(fullfile('EvaluationData'))
mkdir EvaluationData
addpath('EvaluationData');
evaluationData = objectDetectorTrainingData(gTruth,...
'SamplingFactor',1,'WriteLocation','EvaluationData');
end
imds = imageDatastore(fullfile('EvaluationData'));
numImages = height(evaluationData);
result(numImages,:) = struct('Boxes',[],'Scores',[]);
for i = 1:numImages
% Read Image
I = readimage(imds,i);
% Detect the object of interest
[bboxes, scores] = detect(detector,I,'MiniBatchSize', 32);
% Store result
result(i).Boxes = bboxes;
result(i).Scores = scores;
end
% Convert structure to table
results = struct2table(result);
overlap = 0.1;
% Evaluate Metrics
[ap,recall,precision] = evaluateDetectionPrecision(results...
,evaluationData(:,2),overlap);
[am,fppi,missRate] = evaluateDetectionMissRate(results,evaluationData(:,2),overlap)
Herein the Error
Undefined operator '>' for input arguments of type 'cell'.
Error in Evaluationthedetector (line 29)
goodRows = [results.Scores] > 0.66;
  1 件のコメント
Rik
Rik 2019 年 9 月 29 日
Apparently results.Scores contains cells, and not a numerical data type. This is probably caused by the conversion to a table.

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by