HOW TO CALCULATE RECALL, PRECISION AND IoU test data deep learning

4 ビュー (過去 30 日間)
mohd akmal masud
mohd akmal masud 2022 年 6 月 25 日
コメント済み: mohd akmal masud 2022 年 9 月 27 日
Dear all,
I want to calculate precision and recall for my test data. But I gor Error. Because my data is 3D. (as attached)
[precision,recall] = bboxPrecisionRecall(volMask1,tempSeg1)
ERROR
Error using bboxPrecisionRecall
Expected boundingBoxes to be two-dimensional.
Error in bboxPrecisionRecall>validateNonTableInput (line 153)
validateattributes(bbox, {'numeric'},...
Error in bboxPrecisionRecall (line 110)
validateNonTableInput(boundingBoxes, 'boundingBoxes');

採用された回答

Anusha
Anusha 2022 年 8 月 25 日
Hi,
I understand that you are trying to calculate the precision, recall and IoU metrics on the deep learning predicted output and groundtruth. I also see from the .mat files attached that your volumetric groundtruth (volMask1) and predicted output (tempSeg1) are of the size 128x128x64.
The bboxPrecisionRecall() function currently supports only 2-D inputs for bboxes and groundTruthBboxes. Therefore, convert the 3-D volumes into 2-D images and you can refer to the following code that does this:
% Access 2-D images from 3-D volume and find the metric average
avgPrecision=0; totPrecision=0;
avgRecall=0;totRecall=0;
for i= 1:size(volmask1,3)
[precision,recall] = bboxPrecisionRecall(volMask1(:,:,i),tempSeg1(:,:,i));
totPrecision=totPrecision+precision
totRecall=totRecall+recall
end
avgPrecision = totalPrecision/size(volmask1,3);
avgRecall = totalRecall/size(volmask1,3);
Please refer to the following documentation for more details regarding precision recall computation on the data:
Thanks,
Anusha
  1 件のコメント
mohd akmal masud
mohd akmal masud 2022 年 9 月 27 日
but I got problems
Error using bboxPrecisionRecall
Expected boundingBoxes to be of size Mx4, but it is of size 128x128.
Error in bboxPrecisionRecall>validateNonTableInput (line 153)
validateattributes(bbox, {'numeric'},...
Error in bboxPrecisionRecall (line 110)
validateNonTableInput(boundingBoxes, 'boundingBoxes');

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Statistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by