Skip to content

Fix LangSAM API: pass lists instead of bare string to predict()#38

Open
manolisfosteris wants to merge 1 commit intoActiveVisionLab:mainfrom
manolisfosteris:fix/langsam-api
Open

Fix LangSAM API: pass lists instead of bare string to predict()#38
manolisfosteris wants to merge 1 commit intoActiveVisionLab:mainfrom
manolisfosteris:fix/langsam-api

Conversation

@manolisfosteris
Copy link

The updated LangSAM API expects predict([image], [text]) with lists. Passing a bare string caused it to iterate over characters (e.g. "bear" -> ["b","e","a","r"]), breaking mask prediction entirely. Also handles the new list[dict] return format and guards against empty mask results.

The updated LangSAM API expects predict([image], [text]) with lists.
Passing a bare string caused it to iterate over characters (e.g.
"bear" -> ["b","e","a","r"]), breaking mask prediction entirely.
Also handles the new list[dict] return format and guards against
empty mask results.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant