Closed Bruce337f closed 5 months ago
This repo contains an example of hovering and getting a masked area, inside of the demo folder. It also uses the browser/javascript, but uses react, in case that's something you're familiar with.
In general that hover + masking effect will require some sort of UI library, and can be a lot of code to implement. If you wanted to do it directly from Python, then OpenCV actually contains enough UI support (through window callbacks) to do it, but it's a lot of fiddly code to set up. Using the browser for handling UI is likely the most popular option, and there are existing repos that do this (like sam-webui) which might be worth checking out.
Sorry I just saw your answer now,
Thanks for your suggestion, I will try it!!
When I use the demo for image segmentation: Demo url: [https://segment-anything.com/demo]() It shows very good results.
But when I use SamAutomaticMaskGenerator and SamPredictor, I need to enter each coordinate separately to obtain the mask map of the corresponding area.But this is too inefficient.
Is there any way to return the corresponding coordinates and mask map of the divided area, or can it only be achieved through the front end and Vue?
This is the best practice for image segmentation!