show the confusion metrics as figure?

2 ビュー (過去 30 日間)
mohd akmal masud
mohd akmal masud 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 件)

Community Treasure Hunt

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

Start Hunting!

Translated by