ThereforeGames/unprompted

[Feature Request] Txt2mask w/ Segment Anything

aallcg opened this issue · 2 comments

Loving the extension. Want to put in a fr integrating SAM w/ the existing Txt2mask
https://github.com/facebookresearch/segment-anything
https://github.com/IDEA-Research/Grounded-Segment-Anything

Hi @aallcg,

The [txt2mask] shortcode has technically supported Segment Anything since v8.0.0. 🙂

I haven't advertised it much because the GroundingDINO library was a real chore to install and it was giving me suboptimal results (worse than clipseg.) However, it's been a few days so I'll see if the install process has improved.

Anyhow, if you manage to install GroundingDINO, you can switch to SAM mode as follows:

[txt2mask method="sam"]person[/txt2mask]

Hello again,

As of v8.2.0, Unprompted will attempt to install the required GroundingDINO package at runtime. Seems to work okay on my device.

Will run some tests to try and see if we can squeeze more quality out of the SAM masks :)