facebookresearch / facebookresearch/ImageBind

ImageBind with SAM Simple Demo: Segment with Different Modalities

Open
#53 4 comments 7 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
9.1k
Forks
842
PR merge metrics
No merged PRs in 30d

Description

Thanks a lot for release such an amazing work!

We implement a simple and interesting demo by combing ImageBind with SAM here: [ImageBind-SAM](https://github.com/IDEA-Research/Grounded-Segment-Anything/tree/main/playground/ImageBind_SAM) which can segment things with different modalities, and the project is still under develop

This basic idea is followed with [IEA: Image Editing Anything](https://github.com/feizc/IEA) and [CLIP-SAM](https://github.com/maxi-w/CLIP-SAM) which generate the referring mask with the following steps:

- Step 1: Generate auto masks with `SamAutomaticMaskGenerator`
- Step 2: Crop all the box region from the masks
- Step 3: Compute the similarity with cropped images and different modalities
- Step 4: Merge the highest similarity mask region

And the result is shown as:

| Input Model | Modality | Generate Mask |
|:----:|:----:|:----:|
| ![](https://github.com/IDEA-Research/Grounded-Segment-Anything/blob/main/playground/ImageBind_SAM/.assets/car_image.jpg?raw=true) | [car audio](https://github.com/IDEA-Research/Grounded-Segment-Anything/blob/main/playground/ImageBind_SAM/.assets/car_audio.wav) | ![](https://github.com/IDEA-Research/detrex-storage/blob/main/assets/grounded_sam/imagebind_sam/audio_sam_merged_mask_new.jpg?raw=true) |
| ![](https://github.com/IDEA-Research/Grounded-Segment-Anything/blob/main/playground/ImageBind_SAM/.assets/car_image.jpg?raw=true) | "A car" | ![](https://github.com/IDEA-Research/detrex-storage/blob/main/assets/grounded_sam/imagebind_sam/text_sam_merged_mask.jpg?raw=true) |

And the threshold for each box will influence a lot on the final result, we will do more test on it!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.