ultralytics 8.2.69 FastSAM prompt inference refactor (#14724)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Laughing 2024-07-30 07:17:23 +08:00 committed by GitHub
parent 82c4bdad10
commit 9532ad7cae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 187 additions and 427 deletions

View file

@ -363,7 +363,7 @@ def scale_image(masks, im0_shape, ratio_pad=None):
ratio_pad (tuple): the ratio of the padding to the original image.
Returns:
masks (torch.Tensor): The masks that are being returned.
masks (np.ndarray): The masks that are being returned with shape [h, w, num].
"""
# Rescale coordinates (xyxy) from im1_shape to im0_shape
im1_shape = masks.shape