Skip to content

Commit

Permalink
fix resize
Browse files Browse the repository at this point in the history
  • Loading branch information
hangzhaomit committed Jul 8, 2016
1 parent 24bee13 commit 1e49ded
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demoEvaluation.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
if size(imPred, 3) ~= 1
fprintf('Label image [%s] should be a gray-scale image!\n', fileLab); continue;
end
if size(imPred)~=size(imAnno)
if size(imPred, 1)~=size(imAnno, 1) || size(imPred, 2)~=size(imAnno, 2)
fprintf('Label image [%s] should have the same size as label image! Resizing...\n', fileLab);
imPred = imresize(imPred, size(imAnno));
end
Expand Down Expand Up @@ -84,4 +84,4 @@
fprintf('%3d %16s: %.4f\n', i, objectNames{i}, IoU(i));
end
fprintf('Mean IoU over %d classes: %.4f\n', numClass, mean_IoU);
fprintf('Pixel-wise Accuracy: %2.2f%%\n', accuracy*100.);
fprintf('Pixel-wise Accuracy: %2.2f%%\n', accuracy*100.);

0 comments on commit 1e49ded

Please sign in to comment.