facebookresearch / facebookresearch/sam3
Can sam3 deal with multiple points and boxes at the same time?
- Dominant language
- Python
- Stars
- 11.7k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
I find an example for " Combining points and boxes", but it only allow to input one point and one box. Is it possible to use multiple points and boxes at a same time?
The function is as follows:
masks, scores, logits = model.predict_inst(
inference_state,
point_coords=input_point,
point_labels=input_label,
box=input_box,
multimask_output=False,
)
An error occurred when I input multiple points and boxes. Detail info is as follows:
concat_coords = torch.cat([box_coords, concat_points[0]], dim=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 2 but got size 1 for tensor number 1 in the list.
Contributor guide
Assessment
This issue has not been assessed yet.