segment-anything
segment-anything copied to clipboard
The problem of Batch size!=1
When I set the batch size to 2, 3, or any number other than 1, I encounter the following error: RuntimeError: The size of tensor a (4) must match the size of tensor b (2) at non-singleton dimension 0. This occurs in segment_everything/modeling/mask_decoder.py on line 127 during the execution of predict_masks, specifically at src = src + dense_prompt_embeddings.
This version improves clarity and flow.
I'm also interested in batches of images