ByungKwanLee / Full-Segment-Anything

This is Pytorch Implementation Code for adding new features in code of Segment-Anything. Here, the features support batch-input on the full-grid prompt (automatic mask generation) with post-processing: removing duplicated or small regions and holes, under flexible input image size
MIT License
134 stars 9 forks source link

Questions regarding Automatic Mask generator #6

Closed sethuramanio closed 6 months ago

sethuramanio commented 7 months ago

Hi ,

Thanks for the code. I tried running it and the output seems good. I guess the current batch inference works for full grid prompting using sam.predict method which in your case is sam.individual_forward(). Does the same batch processing exists for sam automatic mask generator function? because we would like to get the masks along with the bounding box coordinates for the corresponding masks? or is there a way to get the same using the current sam.individual_forward().

Thank you so much.

ByungKwanLee commented 6 months ago

Sorry for the late reply due to paper submission :) In the current version, there is no way of inputting bounding box coordinates with full batch. However, in this case, I think proessing one by one in each image is more intuitive and efficient way.

sethuramanio commented 6 months ago

Hi, thanks for the reply. No problem. Got it. Thanks