Precision-recall curve problem

3 visualizaciones (últimos 30 días)
ahmad
ahmad el 27 de Nov. de 2023
Respondida: Drew el 27 de Nov. de 2023

Respuestas (1)

Drew
Drew el 27 de Nov. de 2023
The example that you pointed to can be run using:
openExample('deeplearning_shared/DeepLearningFasterRCNNObjectDetectionExample')
If you have access to MATLAB online, you can try running there if you like. More details about your setup and the error you encountered would be needed to diagnose further.
Here are a couple of ideas:
(1) Perhaps you have a namespace conflict resulting in a workspace variable shadowing a built-in function?
(2) Perhaps you are trying to use 23b functions or objects with 23a or earlier? Note that the evaluateObjectDetection (https://www.mathworks.com/help/vision/ref/evaluateobjectdetection.html) function and the objectDetectionMetrics object (https://www.mathworks.com/help/vision/ref/objectdetectionmetrics.html) were released in R2023b. The 23b version of this example uses an objectDetectionMetrics object in the line that you mentioned in your question.
% R2023b
classID = 1;
metrics = evaluateObjectDetection(detectionResults,testData);
precision = metrics.ClassMetrics.Precision{classID};
recall = metrics.ClassMetrics.Recall{classID};
>> metrics
metrics =
objectDetectionMetrics with properties:
ConfusionMatrix: 77
NormalizedConfusionMatrix: 1
ImageMetrics: [88×3 table]
ClassMetrics: [1×5 table]
DatasetMetrics: [1×3 table]
ClassNames: {'vehicle'}
OverlapThreshold: 0.5000
In contrast, the 23a version of this example uses the evaluateDetectionPrecision function to calculate precision:
% R2023a
[ap, recall, precision] = evaluateDetectionPrecision(detectionResults,testData);
If this answer helps you, please remember to accept the answer.

Community Treasure Hunt

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

Start Hunting!

Translated by