How to Plot precision recall curve for semantic segmenttaion
이전 댓글 표시
I have done training and testing for semantic segmentation. I want to make a graph of my precision recall. I have got precision and recall values when validating images. but i don't know how to plot percurve charts. The following is the code that I made
pic = 8;
I = readimage(imdsTest, pic); %ib
Ib = readimage(pxdsTest,pic);
BC = labeloverlay(I, Ib,'Colormap',cmap,'Transparency',0.5);
C = semanticseg(I, net);
B = labeloverlay(I,C,'Colormap',cmap,'Transparency',0.5);%cb
imshowpair (B, BC,'montage')
pixelLabelColorbar(cmap, classes)
title ('prediction vs groundtruth')
expectedResult = readimage(pxdsTest,pic);
actual = uint8(C);
expected = uint8(expectedResult);
imshowpair(actual,expected)
iou = bfscore(C,expectedResult);
[recall,precision,prediction]=bfscore(C,expectedResult)
table(classes',recall ,precision, iou)
the results of this program are as follows
ans =
Var1 recall precision iou
____________ _______ _________ _______
"crack" 0.34446 0.25696 0.34446
"background" 0.53501 0.60656 0.53501
to be able to make precision recall plots. What should I do? Please help me
댓글 수: 1
Ismat Mohd Sulaiman
2021년 8월 9일
I'm studying this shared script. Hope it will help yours.
답변 (1개)
Chinmay Budhiraja
2020년 6월 18일
Hi,
According to my understanding, you want to study the precision recall curve for a task. We use ROC curve (Receiver Operating Characteristic Curve) for the same. Consider the following example:
load simplecluster_dataset
net = patternnet(20);
net = train(net,simpleclusterInputs,simpleclusterTargets);
simpleclusterOutputs = sim(net,simpleclusterInputs);
plotroc(simpleclusterTargets,simpleclusterOutputs)
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!