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

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/16646/head
Mohammed Yasin 2 months ago committed by GitHub
parent c773f27653
commit 7d6528a41a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      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)

Loading…
Cancel
Save