facebookresearch / facebookresearch/sam2
Multiple bounding box as prompt
Open
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hi. Thank you for great work!
I was wondering if it is possible to give multiple bounding boxes as a prompt.
In the demo code, it just give only 1 box as prompt and uses **predictor.add_new_points_or_box**
to add the box.
Is it possible to give two boxes at once like below code?
```
boxes = np.array([[300, 0, 500, 400],
[180, 140,290,400]], dtype=np.float32)
_, out_obj_ids, out_mask_logits = predictor.add_new_points_or_box(
inference_state=inference_state,
frame_idx=ann_frame_idx,
obj_id=ann_obj_id,
box=boxes,
)
```
Thanks in advance.
Contributor guide
Assessment
This issue has not been assessed yet.