facebookresearch / facebookresearch/sam2
how to segment the objects without background
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
In my images, there're mobile and others. I just want to segment the mobile from the image.
`
> mask_generator = SamAutomaticMaskGenerator(
> model=sam,
> points_per_side=32,
> pred_iou_thresh=0.86,
> stability_score_thresh=0.92,
> crop_n_layers=1,
> crop_n_points_downscale_factor=2,
> min_mask_region_area=100, # Requires open-cv to run post-processing
> )
> masks = mask_generator.generate(image)
`
but some masks only includes the background, such as Mask 1, Mask 2,Mask 5 in blow picture, and some masks includes mobile with background, Mask 6 in below picture.
how the only generate the masks with mobile?

Contributor guide
Assessment
This issue has not been assessed yet.