Update inference.py to check if save_layout was passed as argument otherwise can give an cv2 error

This commit is contained in:
johnlockejrr 2024-10-19 13:21:29 -07:00 committed by GitHub
parent 3f354e1c34
commit a524f8b1a7

View file

@ -566,6 +566,7 @@ class sbb_predict:
img_seg_overlayed, only_layout = self.visualize_model_output(res, self.img_org, self.task)
if self.save:
cv2.imwrite(self.save,img_seg_overlayed)
if self.save_layout:
cv2.imwrite(self.save_layout, only_layout)
if self.ground_truth: