Not enough input arguments for plotting Precision-Recall curve

조회 수: 2 (최근 30일)
Greetings,
I want to evaluate my Yolov3 model by plotting the Precision-Recall curve. I tried to follow the example provided in the "Object Detection Using Yolo v3 Deep Learning' (https://www.mathworks.com/help/vision/ug/object-detection-using-yolo-v3-deep-learning.html). However the error displayed as follows:
Error using plot
Not enough input arguments.
Error in testyolo (line 41)
plot(recall, precision);
May I know what is the problem with my code? My code is
celldetector = load('trainedyolov3Detector-2022-11-04-00-30-56.mat');
testData = combine(imdsTest, bldsTest);
detector = celldetector.yolov3Detector;
results = detect(detector,testData,'MiniBatchSize',8);
[ap,recall, precision] = evaluateDetectionPrecision(results, testData);
figure;
plot(recall, precision);
xlabel('Recall')
ylabel('Precision')
grid on
title(sprintf('Average precision = %.1f', ap))

채택된 답변

Walter Roberson
Walter Roberson 2022년 11월 8일
"For a multiclass detector, recall and precision are cell arrays, where each cell contains the data points for each object class."
So it appears you have a multi-class situation, and your recall and precision are being returned as cell arrays. plot() cannot handle cell arrays
  댓글 수: 4
Fahmi Akmal Dzulkifli
Fahmi Akmal Dzulkifli 2022년 11월 11일
편집: Walter Roberson 2022년 11월 11일
Sir, I already tried with your code, but it seems the graph had two signals, which was different from the example provided in the example in ( https://www.mathworks.com/help/vision/ref/evaluatedetectionprecision.html ). May I know what is the different between these two codes
Walter Roberson
Walter Roberson 2022년 11월 11일
You would get one line for each class.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by