From 6ee79c7320d11eb93535b886b85f6746b90deb40 Mon Sep 17 00:00:00 2001 From: vahidrezanezhad Date: Wed, 17 Dec 2025 13:28:02 +0100 Subject: [PATCH] evaluation with a given GT is only possible for segmentation tasks --- src/eynollah/training/inference.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/eynollah/training/inference.py b/src/eynollah/training/inference.py index 3fa8fd6..f739438 100644 --- a/src/eynollah/training/inference.py +++ b/src/eynollah/training/inference.py @@ -576,9 +576,9 @@ class sbb_predict: if self.save_layout: cv2.imwrite(self.save_layout, only_layout) - if self.ground_truth: - gt_img=cv2.imread(self.ground_truth) - self.IoU(gt_img[:,:,0],res[:,:,0]) + if self.ground_truth: + gt_img=cv2.imread(self.ground_truth) + self.IoU(gt_img[:,:,0],res[:,:,0]) else: ls_images = os.listdir(self.dir_in) @@ -599,9 +599,9 @@ class sbb_predict: self.save_layout = os.path.join(self.out, f_name+'_layout.png') cv2.imwrite(self.save_layout, only_layout) - if self.ground_truth: - gt_img=cv2.imread(self.ground_truth) - self.IoU(gt_img[:,:,0],res[:,:,0]) + if self.ground_truth: + gt_img=cv2.imread(self.ground_truth) + self.IoU(gt_img[:,:,0],res[:,:,0])