segment-anything
segment-anything copied to clipboard
segment multiple objects at the same time, the model is invalid
Great job! Works fine when I enter an object box. But when I input multiple bboxes at one time, corresponding to different labels, and I want to segment these multiple objects at the same time, it seems that the model is invalid! Does it mean that only one object can be processed at a time, or is my way of chu wrong?
input the object boxes and labels as follows:
onnx_coord = np.array(boxes).reshape(-1, 2)[None, :, :]
onnx_label = np.repeat(np.arange(1,len(boxes)+1), 2)[None, :].astype(np.float32)
Thank you, batch reasoning with torch has been solved, I didn't look at the code example carefully, but I still don't know how to reason with multiple boxes when using onnx reasoning, thank you very much!
https://github.com/ByungKwanLee/Full-Segment-Anything addresses the ciritical issues of SAM, which supports 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