facebookresearch / facebookresearch/sam2
bug in sam2_image_predictor:masks_np = masks.squeeze(0).float().detach().cpu().numpy()?
Open
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
if I input a single box and point_label, the squeeze(0) will remove the first dimenson,just like:
input_box_all = [[1]]
input_label_all = np.array([[1300,600,1400,1200]])
masks, scores, logits = predictor.predict(
box=input_box_all,
point_labels=input_label_all,
multimask_output=False
)
masks.shape is [1,H,W]
this should be [1,1,H,W],but squeeze(0) remove the first 1
Contributor guide
Assessment
This issue has not been assessed yet.