i want to read all images from the folder to compare the mask 632 images, which i created with the given 632 mask to find precision, recall and f-measure. this code works for two images to find precision, recall and f-measure.
1 次查看(过去 30 天)
显示 更早的评论
clear all;
clc;
close all;
im_GroundTruth = imread('Mask1.png'); % object=1; backgroud = 0;
im_GroundTruth(im_GroundTruth>0)=255;
im_segmentaion = im2uint8(imread('1(1).png')); % object=1; backgroud = 0;
Conf = confusionmat(im_GroundTruth(:),im_segmentaion(:));
recall = Conf(2,2)/sum(Conf(2,:))*100;
precision = Conf(2,2)/sum(Conf(:,2))*100;
f_measure = 2*recall*precision/(recall+precision);
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Denoising and Compression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!