From 7d6528a41ac181daee2ef33fcdde5be0d57b0be7 Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Thu, 3 Oct 2024 02:43:46 +0800 Subject: [PATCH] SAM: Fix labels not being used in predict mode. (#16642) Co-authored-by: Glenn Jocher --- ultralytics/models/sam/predict.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ultralytics/models/sam/predict.py b/ultralytics/models/sam/predict.py index 686ef70c..768d63d8 100644 --- a/ultralytics/models/sam/predict.py +++ b/ultralytics/models/sam/predict.py @@ -196,6 +196,7 @@ class Predictor(BasePredictor): bboxes = self.prompts.pop("bboxes", bboxes) points = self.prompts.pop("points", points) masks = self.prompts.pop("masks", masks) + labels = self.prompts.pop("labels", labels) if all(i is None for i in [bboxes, points, masks]): return self.generate(im, *args, **kwargs)