From 1c6bfd3039d0456c18611f475ace661111413c85 Mon Sep 17 00:00:00 2001 From: HJH_Chenhe <3765653+petercham@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:45:47 +0800 Subject: [PATCH] `ultralytics 8.3.34` FastSAM non-detection fix (#17628) Co-authored-by: Francesco Mattioli Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Glenn Jocher --- ultralytics/__init__.py | 2 +- ultralytics/models/fastsam/predict.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index a8283a253d..839ac6216c 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.3.33" +__version__ = "8.3.34" import os diff --git a/ultralytics/models/fastsam/predict.py b/ultralytics/models/fastsam/predict.py index 9910237b0f..0fbe16ffe9 100644 --- a/ultralytics/models/fastsam/predict.py +++ b/ultralytics/models/fastsam/predict.py @@ -64,6 +64,9 @@ class FastSAMPredictor(SegmentationPredictor): 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]