Skip to content

Commit

Permalink
Fix masks merging
Browse files Browse the repository at this point in the history
  • Loading branch information
sovrasov committed Sep 19, 2024
1 parent 9535dee commit d778af8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model_api/python/model_api/models/visual_prompting.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def learn(
masks = _polygon_to_mask(inputs_decoder["polygon"], *original_shape)
else:
raise RuntimeError("Unsupported type of prompt")
ref_mask[masks] += 1
ref_mask = np.where(masks, 1, ref_mask)
ref_mask = np.clip(ref_mask, 0, 1)

ref_feat: np.ndarray | None = None
Expand Down

0 comments on commit d778af8

Please sign in to comment.