Skip to content

Commit

Permalink
Merge pull request #26 from ksugar/dev
Browse files Browse the repository at this point in the history
v0.6.0 -> v0.6.1
  • Loading branch information
ksugar authored Sep 3, 2024
2 parents 3bad8a4 + 890bba8 commit 914703a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "samapi"
version = "0.6.0"
version = "0.6.1"
description = "Segment Anything Model (SAM) API"
authors = ["Ko Sugawara <[email protected]>"]
readme = "README.md"
Expand Down
23 changes: 12 additions & 11 deletions src/samapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,18 +758,19 @@ async def video_predictor(body: SAMVideoBody):
"t": frame_idx,
}
for obj_id, mask in masks.items():
geometry = mask_to_geometry(mask[0])
geometry["plane"] = plane
features.append(
Feature(
geometry=geometry,
properties={
"object_idx": obj_id,
"label": "object",
"sam_model": body.type,
},
if np.any(mask):
geometry = mask_to_geometry(mask[0])
geometry["plane"] = plane
features.append(
Feature(
geometry=geometry,
properties={
"object_idx": obj_id,
"label": "object",
"sam_model": body.type,
},
)
)
)
return features


Expand Down

0 comments on commit 914703a

Please sign in to comment.