Skip to content

Commit

Permalink
Merge pull request #697 from roboflow/fix/sam2_producing_lines_as_seg…
Browse files Browse the repository at this point in the history
…mentation_masks

Fix issue with SAM2 producing segmentation masks as points and lines
  • Loading branch information
PawelPeczek-Roboflow authored Sep 30, 2024
2 parents 69bb0bc + 889ad6b commit dc9362b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inference/core/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.21.0"
__version__ = "0.21.1"


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def convert_sam2_segmentation_response_to_inference_instances_seg_response(
prompt_detection_ids,
):
for mask in prediction.masks:
if len(mask) == 0:
if len(mask) < 3:
# skipping empty masks
continue
if prediction.confidence < threshold:
Expand Down

0 comments on commit dc9362b

Please sign in to comment.