Ultralytics Code Refactor https://ultralytics.com/actions (#16047)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
95d54828bb
commit
ac2c2be8f3
12 changed files with 45 additions and 62 deletions
|
|
@ -93,7 +93,7 @@ class FastSAMPredictor(SegmentationPredictor):
|
|||
else torch.zeros(len(result), dtype=torch.bool, device=self.device)
|
||||
)
|
||||
for point, label in zip(points, labels):
|
||||
point_idx[torch.nonzero(masks[:, point[1], point[0]], as_tuple=True)[0]] = True if label else False
|
||||
point_idx[torch.nonzero(masks[:, point[1], point[0]], as_tuple=True)[0]] = bool(label)
|
||||
idx |= point_idx
|
||||
if texts is not None:
|
||||
if isinstance(texts, str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue