

Box Prompting
You can also do box prompting in a similar fashion to point prompting. You can simply pass the input box in the format of a list
[x_min, y_min, x_max, y_max] format along with the image to the processor. Take the processor output and directly pass it 
to the model, then post-process the output again.
thon
bounding box around the bee
box = [2350, 1600, 2850, 2100]
inputs = processor(
        image,
        input_boxes=[[[box]]],
        return_tensors="pt"
    ).to("cuda")
with torch.no_grad():
    outputs = model(**inputs)
mask = processor.image_processor.post_process_masks(
    outputs.pred_masks.cpu(),
    inputs["original_sizes"].cpu(),
    inputs["reshaped_input_sizes"].cpu()
)[0][0][0].numpy()