Open ksd3 opened 1 year ago
Hi, do you want to save every segmented object?
Yes, I want to save every segmented object. I know this can be done (tediously) by inspecting each bbox
variable (that is the result of SamAutomaticMaskGenerator
from the original repository) and cropping the image based on the xywh
format but I wondered if there was a way to do it faster using metaseg.
I will add this feature but I am busy right now. It may take some time to add. If you want to add, I can help.
I can try and add it. Which subroutine uses the results of SamAutomaticMaskGenerator
? Presumably the method would just be a function that calls PIL.crop() based on the masks. That should be fairly easy to do.
I can't find this in the documentation. After running results = SegAutoMaskPredictor().image_predict( source="firststeve.png", model_type="vit_h", # vit_l, vit_h, vit_b points_per_side=4, points_per_batch=16, min_area=0, output_path="output.png", show=False, save=True, )
I can save the segmented image, but I can't pull out the individual segmented pieces. Does this package support doing something like this or do I have to use the original repository? I just want to know if something like this exists: