facebookresearch / facebookresearch/sam2
Artefacts when segmenting an image using bbox xyxy
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
I've been stuck of figuring out the reason of why this is happening.
I'm segmenting by passing the SAM a xyxy format bbox.
bbox: [tensor(689.), tensor(29.), tensor(3728.), tensor(2915.)]
Can anyone confirm the artifacts by running the segmentation ?
What could have done wrong and is there any way to fix it ?
How I get the mask
```
mask_predictor = SAM2ImagePredictor(sam_model)
mask_predictor.set_image(im_rgb)
masks, scores, logits = mask_predictor.predict(
box=xyxy,
multimask_output=True,
)
```
Input image

Segmentation mask resulting from input image of dtype uint8

Segmentation mask resulting from input image of dtype float32
Even if it does not male much sense i tried passing the image with dtype=np.float32

Contributor guide
Assessment
This issue has not been assessed yet.