Clear Filters
Clear Filters

Problem with evaluateObjectDetection function

5 views (last 30 days)
Patrizia
Patrizia on 15 Jul 2024 at 9:03
Commented: Walter Roberson ungefär 4 timmar ago
Hello, everyone,
I would like help with the function in question...
I attach the tables groundTruthData and detectionResults.
thanks
CODE:
% Evaluate object detection results
metrics = evaluateObjectDetection(detectionResultsTbl, groundTruthDataTbl);
Unrecognized function or variable 'detectionResultsTbl'.
% Extract precision and recall for a specific class ID (e.g. classID = 1)
classID = 1;
precision = metrics.ClassMetrics.Precision{classID};
recall = metrics.ClassMetrics.Recall{classID};
% Plot the precision-recall curve
figure
plot(recall, precision);
xlabel("Recall");
ylabel("Precision");
grid on;
title(sprintf("Average Precision = %.2f", metrics.ClassMetrics.mAP(classID)));
ERROR:
Error using evaluateObjectDetection>iFindOutputIdxsFromDS
Missing data in detectionResults. Unable to find Label data in detectionResults.
Error in evaluateObjectDetection (line 27)
predOutIdxs = iFindOutputIdxsFromDS(dsResultsCopy, 3, "detectionResults");
Error in untitled2 (line 306)
metrics = evaluateObjectDetection(detectionResultsTbl, groundTruthDataTbl);
  2 Comments
Torsten
Torsten 28 minuter ago
I attach the tables groundTruthData and detectionResults.
Where ?
Walter Roberson
Walter Roberson 10 minuter ago
Your code disagrees with your images.
Your code in untitled2 shows creation of detectionResultsVector (which is not used anywhere), and does so by extracting a field named Labels from detectionResultsTbl . But your images show the table has a field named Label instead of Labels

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!