ultralytics 8.3.34 FastSAM non-detection fix (#17628)
Co-authored-by: Francesco Mattioli <francesco.mttl@gmail.com> Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
bde3105813
commit
1c6bfd3039
2 changed files with 4 additions and 1 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue