FastSAM icon indicating copy to clipboard operation
FastSAM copied to clipboard

prompt process for initial mask

Open profesanti opened this issue 2 years ago • 4 comments

Is possible to create a prompt_process.general_mask(mask), in which mask can be an initial mask and not only points or bounding box(es)?

Currently, the prompt_process only supports points and bounding boxes. However, it would be highly beneficial to extend its functionality to accept an initial mask as well. This would enable users to provide a more flexible and comprehensive mask, allowing for a broader range of use cases.

profesanti avatar Aug 06 '23 07:08 profesanti

We have also though about this. Maybe converting the mask to multiple points or using the minimum bounding rectangle of the mask are two of the feasible ways. If you have better strategies, we welcome your furthur detailed suggestions.

zxDeepDiver avatar Aug 06 '23 12:08 zxDeepDiver

Thank you for your quick reply. I need to further study the FastSAM process to provide more insightful suggestions. One potential approach could involve identifying key points within the masked regions of the original image, similar to the SIFT method, and using them as reference points for further analysis.

profesanti avatar Aug 06 '23 16:08 profesanti

Thank you for the discussion. Current FastSAM use the location matching method to get the masks from the "everything" masks. Your method seems works better for the SAM-like methods.

zxDeepDiver avatar Aug 06 '23 17:08 zxDeepDiver

When entering a prompt box, fastsam outputs a mask; May I ask if a prompt box can be used as input to output multiple masks within the box area?

xiyangyang99 avatar Aug 10 '23 01:08 xiyangyang99