Bug in get_point_or_box_prompts()

#1
by Sidd-SQY - opened

In app.py, instead of appending to the box_prompts list, the code setting the box_prompts list to the most recent bounding box. This means that only the most recent bounding box is sent to the model and all others are ignored.

It can be found here: https://huggingface.co/spaces/naver-iv/ZIM_Zero-Shot-Image-Matting/blob/main/app.py#L190

Sidd-SQY changed discussion title from Bug in `get_point_or_box_prompts()` to Bug in get_point_or_box_prompts()
NAVER ImageVision org

It is not a bug. Like the original SAM, the model can task only one box prompt.
For multiple instances, we should prompt one box prompt per instance.

mask_inst_0 = ZIM(boxes[0])
mask_inst_1 = ZIM(boxes[1])
mask_inst_2 = ZIM(boxes[2])

Sign up or log in to comment