SHI-Labs / Matting-Anything

Matting Anything Model (MAM), an efficient and versatile framework for estimating the alpha matte of any instance in an image with flexible and interactive visual or linguistic user prompt guidance.
https://arxiv.org/abs/2306.05399
MIT License
618 stars 49 forks source link

Thanks for wonderful word .Question about text prompt #2

Closed baibizhe closed 1 year ago

baibizhe commented 1 year ago

Thanks for your wonderful word. The SAM model in your work seems to be acceptable for text prompt as shown in Figure2 .But SAM model seems not to be fit with text prompt according to https://github.com/facebookresearch/segment-anything/issues/322 https://github.com/facebookresearch/segment-anything/issues/93 Do I misunderstand something here?

chrisjuniorli commented 1 year ago

Yes, SAM model didn't release the text prompt feature in their repo. We adopt the text prompt feature from Grounded-SAM: https://github.com/IDEA-Research/Grounded-Segment-Anything

baibizhe commented 1 year ago

Thanks

baibizhe commented 1 year ago

Hello. I want adopt the text prompt feature from Grounded-SAM to my SAM as well. It would really appreciate if you could give some suggestions on how to implementing adopt the text prompt feature from Grounded-SAM.

chrisjuniorli commented 1 year ago

The general idea is to send text prompt to GroundedDINO and it returns multiple boxes, then use them as box prompts for SAM. You may check the implementation here: https://github.com/SHI-Labs/Matting-Anything/blob/main/gradio_app.py

baibizhe commented 1 year ago

Thanks for you help .Hope you have a good weekend.