Apply Ruff 0.9.0 (#18622)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
cc1e77138c
commit
3902e740cf
22 changed files with 69 additions and 65 deletions
|
|
@ -87,9 +87,9 @@ class FastSAMPredictor(SegmentationPredictor):
|
|||
if labels is None:
|
||||
labels = torch.ones(points.shape[0])
|
||||
labels = torch.as_tensor(labels, dtype=torch.int32, device=self.device)
|
||||
assert len(labels) == len(
|
||||
points
|
||||
), f"Excepted `labels` got same size as `point`, but got {len(labels)} and {len(points)}"
|
||||
assert len(labels) == len(points), (
|
||||
f"Excepted `labels` got same size as `point`, but got {len(labels)} and {len(points)}"
|
||||
)
|
||||
point_idx = (
|
||||
torch.ones(len(result), dtype=torch.bool, device=self.device)
|
||||
if labels.sum() == 0 # all negative points
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue