Clear Filters
Clear Filters

why I got very low IoU compaired with ssim?

2 views (last 30 days)
yasmin ismail
yasmin ismail on 19 Oct 2023
Edited: yasmin ismail on 19 Oct 2023
%%SSim
A = imread('new7027-157.png');
BW_groundTruth =imread('Label7027_157.png');
[ssimval,ssimmap] = ssim(A,BW_groundTruth);
imshow(ssimmap,[])
title("Local SSIM Map with Global SSIM Value: "+num2str(ssimval))
0.93
%%IoU
A = logical(imread('new7027-157.png'));
BW_groundTruth =logical(imread('Label7027_157.png'));
similarity = jaccard(A, BW_groundTruth)
similarity =
0.2822
I created GroundTuth by using Image segmenter App and export it to work space and i got high result 0.93 when I applied ssim , then i used jaccrad index(IoU) and I got 0.2822 , why I got very law result although both images seem same by eye vision, how to fix it, is it related to the way of creating groundtruth or I missed something to do after labeling before calculationg the similarity? can you help me to fix it please?
I attached the original image (70027-157.jpg) which used in Image segmenter App for labeling, the labeled image is(label7027-157), the the model output(new7027-157) which is needed to be evaluated

Answers (0)

Community Treasure Hunt

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

Start Hunting!