show the confusion metrics as figure?

조회 수: 7 (최근 30일)
mohd akmal masud
mohd akmal masud 2023년 7월 27일
댓글: Mrutyunjaya Hiremath 2023년 7월 27일
Dear All,
I was evaluate the segmentation result deep learning method as below.
>> %Evaluate the prediction results against the ground truth.
metrics = evaluateSemanticSegmentation(pxdsResults,pxdsTest);
%Display the properties of the semanticSegmentationMetrics object.
metrics
%Display the classification accuracy, the intersection over union, and the boundary F-1 score for each class. These values are stored in the ClassMetrics property.
metrics.ClassMetrics
%Display the normalized confusion matrix that is stored in the NormalizedConfusionMatrix property.
metrics.ConfusionMatrix
Evaluating semantic segmentation results
----------------------------------------
* Selected metrics: global accuracy, class accuracy, IoU, weighted IoU, BF score.
* Processed 1 images.
* Finalizing... Done.
* Data set metrics:
GlobalAccuracy MeanAccuracy MeanIoU WeightedIoU MeanBFScore
______________ ____________ _______ ___________ ___________
0.99961 0.75114 0.74253 0.99923 0.9087
metrics =
semanticSegmentationMetrics with properties:
ConfusionMatrix: [2×2 table]
NormalizedConfusionMatrix: [2×2 table]
DataSetMetrics: [1×5 table]
ClassMetrics: [2×3 table]
ImageMetrics: [1×5 table]
ans =
2×3 table
Accuracy IoU MeanBFScore
________ _______ ___________
background 0.99997 0.99961 0.99867
tumor 0.50231 0.48546 0.81873
ans =
2×2 table
background tumor
__________ _____
background 5.8938e+05 15
tumor 215 217
Anyone know how to show the confusion metrics as figure?
  댓글 수: 3
mohd akmal masud
mohd akmal masud 2023년 7월 27일
?
Chunru
Chunru 2023년 7월 27일
???

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

채택된 답변

Mrutyunjaya Hiremath
Mrutyunjaya Hiremath 2023년 7월 27일
After Evaluating semantic segmentation results, add the below code:
% Get the confusion matrix from the 'metrics' object
confusion_matrix = table2array(metrics.ConfusionMatrix);
classLabels = categorical({'background','tumor'})
cm = confusionchart(confusion_matrix, classLabels,...
'Title','Confusion Matrix',...
'ColumnSummary','column-normalized', ...
'RowSummary','row-normalized');
  댓글 수: 2
mohd akmal masud
mohd akmal masud 2023년 7월 27일
Thank you sir. Its work!
Mrutyunjaya Hiremath
Mrutyunjaya Hiremath 2023년 7월 27일
Most Welcome Sir.. :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Visualization and Interpretability에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by