sd-webui-segment-anything icon indicating copy to clipboard operation
sd-webui-segment-anything copied to clipboard

[Feature]: API endpoint for points?

Open aluhrs13 opened this issue 2 years ago • 4 comments

Maybe I’m misunderstanding the API, but it seems like it only works with groundingDINO right now.

Would it be possible to add a field to the API endpoint that takes in a series of points that are the equivalent of where you would click in the UI? Or maybe a mask of green and/or red that gets translated into include/exclude points?

aluhrs13 avatar Apr 16 '23 18:04 aluhrs13

Yes, I have already discussed this with @jordan-barrett-jm . He is the main contributor of API and he has been helping me a lot while I’m working on other features. When he has time, he will improve API support.

continue-revolution avatar Apr 16 '23 18:04 continue-revolution

I can work on this soon @continue-revolution. I wanted to be clear though that the intended field would accept an array of tuples?

jordan-barrett-jm avatar Apr 16 '23 18:04 jordan-barrett-jm

In my code, it is two N*2 arrays. Not sure whether tuple can work.

continue-revolution avatar Apr 16 '23 18:04 continue-revolution

Awesome! From my perspective as the asker for this - I have two lists of X,Y coordinates. Translating that to some other structure to match the API shape probably shouldn’t be a problem.

aluhrs13 avatar Apr 16 '23 18:04 aluhrs13