luca-medeiros / lang-segment-anything

SAM with text prompt
Apache License 2.0
1.53k stars 167 forks source link

Option to return original prompts instead of phrases #57

Closed dolhasz closed 4 months ago

dolhasz commented 4 months ago

Describe your changes and approach used

Currently, LangSAM returns phrases which are not a 1-1 mapping back to the original text prompts specified by the caller.

This update adds a return_prompts:bool argument to the LangSAM constructor, which will allow this functionality.

By default, it keeps the original functionality.

Checklist before requesting a review