- evaluateObjectDetection: https://www.mathworks.com/help/vision/ref/evaluateobjectdetection.html
- objectDetectionMetrics: https://www.mathworks.com/help/vision/ref/objectdetectionmetrics.html
How to get confusion matrix for faster r cnn?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sahik Ha.adi
am 12 Mär. 2024
Beantwortet: Kausthub
am 18 Mär. 2024
I was trying to get confusion matrix for the above example for object detction. But i didnt able to get. Can some one help me to get my answer?
0 Kommentare
Akzeptierte Antwort
Kausthub
am 18 Mär. 2024
Hi Sahik,
From the example that you are refering to: https://www.mathworks.com/help/vision/ug/object-detection-using-faster-r-cnn-deep-learning.html, we can get the confusion matrix by modifying the section which explains on how to evaluate the object detector using the average precision metric.
classID = 1;
metrics = evaluateObjectDetection(detectionResults,testData);
cf = metrics.ConfusionMatrix % add this line, cf is the confusion matrix
precision = metrics.ClassMetrics.Precision{classID};
recall = metrics.ClassMetrics.Recall{classID};
The function "evaluateObjectDetection" returns an object of type "objectDetectionMetrics" which has a property called "ConfusionMatrix" which returns the confusion matrix. For more information regarding "evaluateObjectDetection" and "objectDetectionMetrics" refer to:
The confusion matrix obtained for the example stated in the reference is:
Hope this helped and solved your query on how to obtain the confusion matrix!
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Feature Detection and Extraction finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!