Open YangJae96 opened 1 month ago
Yes it is possible.
if you do something like this
boxes = np.array([[300, 0, 500, 400],
[180, 140,290,400]])
masks, scores, logits = predictor.predict(
box=boxes,
multimask_output=False,
)
print("Masks: ", masks.shape)
the output will be something like this.
Masks: (2, 1, 512, 512)
basically (n, 1, image width, image height) where n is the number of boxes.
That works for me, and im going off of the example image notebook
They explain it in the "Batched prompt inputs" section
Hi. Thank you for great work!
I was wondering if it is possible to give multiple bounding boxes as a prompt.
In the demo code, it just give only 1 box as prompt and uses predictor.add_new_points_or_box to add the box.
Is it possible to give two boxes at once like below code?
Thanks in advance.