Open bisnoisk opened 1 year ago
without bbox or point cords , like i want to segment one particular coco class so what should i do ?
I'm not sure if I understand you correctly but if you don't want to provide a prompt for the predictor I think the only option you have is to generate masks for the entire image and then choose the one you want somehow.
As explained in the readme...
from segment_anything import SamAutomaticMaskGenerator, sam_model_registry
sam = sam_model_registry["<model_type>"](checkpoint="<path/to/checkpoint>")
mask_generator = SamAutomaticMaskGenerator(sam)
masks = mask_generator.generate(<your_image>)
without bbox or point cords , like i want to segment one particular coco class so what should i do ?
@bisnoisk I think you should collaborate with other models or devices, ie. object detection models which can provide bboxes. Use the bboxes from there you can then feed into the SAM. Find out through the return masks.
This is what I have understood, unsure I was right or wrong, either.
This might be what you're looking for?
Something like this perhaps?
Mouse Location or known x,y coordinates
Or bounding box...