SAM: Fix labels not being used in predict mode. (#16642)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Mohammed Yasin 2024-10-03 02:43:46 +08:00 committed by GitHub
parent c773f27653
commit 7d6528a41a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)