From 7fa17d78c45f4f642faa89f4c0e590c400f74225 Mon Sep 17 00:00:00 2001 From: Eric Mintun Date: Mon, 10 Apr 2023 12:02:02 -0700 Subject: [PATCH] Lint. --- segment_anything/automatic_mask_generator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/segment_anything/automatic_mask_generator.py b/segment_anything/automatic_mask_generator.py index d0f5a1bfe..d5a8c9692 100644 --- a/segment_anything/automatic_mask_generator.py +++ b/segment_anything/automatic_mask_generator.py @@ -214,7 +214,7 @@ def _generate_masks(self, image: np.ndarray) -> MaskData: keep_by_nms = batched_nms( data["boxes"].float(), scores, - torch.zeros_like(data["boxes"][:,0]), # categories + torch.zeros_like(data["boxes"][:, 0]), # categories iou_threshold=self.crop_nms_thresh, ) data.filter(keep_by_nms) @@ -251,7 +251,7 @@ def _process_crop( keep_by_nms = batched_nms( data["boxes"].float(), data["iou_preds"], - torch.zeros_like(data["boxes"][:,0]), # categories + torch.zeros_like(data["boxes"][:, 0]), # categories iou_threshold=self.box_nms_thresh, ) data.filter(keep_by_nms) @@ -357,7 +357,7 @@ def postprocess_small_regions( keep_by_nms = batched_nms( boxes.float(), torch.as_tensor(scores), - torch.zeros_like(boxes[:,0]), # categories + torch.zeros_like(boxes[:, 0]), # categories iou_threshold=nms_thresh, )