Skip to content

Commit

Permalink
ultralytics 8.3.34 FastSAM non-detection fix (ultralytics#17628)
Browse files Browse the repository at this point in the history
Co-authored-by: Francesco Mattioli <[email protected]>
Co-authored-by: Laughing <[email protected]>
Co-authored-by: Glenn Jocher <[email protected]>
  • Loading branch information
4 people authored Nov 19, 2024
1 parent bde3105 commit 1c6bfd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ultralytics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license

__version__ = "8.3.33"
__version__ = "8.3.34"

import os

Expand Down
3 changes: 3 additions & 0 deletions ultralytics/models/fastsam/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def prompt(self, results, bboxes=None, points=None, labels=None, texts=None):
if not isinstance(results, list):
results = [results]
for result in results:
if len(result) == 0:
prompt_results.append(result)
continue
masks = result.masks.data
if masks.shape[1:] != result.orig_shape:
masks = scale_masks(masks[None], result.orig_shape)[0]
Expand Down

0 comments on commit 1c6bfd3

Please sign in to comment.