segment-anything icon indicating copy to clipboard operation
segment-anything copied to clipboard

bad results with multiple point prompts

Open lujiazho opened this issue 1 year ago • 5 comments

The segmentation looks perfect for the first point. But the result looks not reasonable if added more points as prompts. But the demo website seems work better. Is there any "tricks" with the prompts? Or mask_input of SamPredictor?

lujiazho avatar Apr 08 '23 06:04 lujiazho

The first piont always gives perfect result, because this point is set under preview mode, which avoids confusing position. If the online demo support previewing for every single point, I think we can get perfect cuts for all objects.

cy810557 avatar Apr 10 '23 07:04 cy810557

I am experiencing the same issue. Using a single foreground point gives good results, however, adding background points messes everything up to the point where results are unusable. In the demo gui, negative clicks won't have the same effect.

One foreground click (quite accurate but doesn't handle overlaps well in my data with some objects): image

One foreground + multiple background clicks (distributed on remaining objects, some of which are quite small): image

Point labels are passed correctly as 1 for foreground and 0 for background clicks (int). I pass all clicks simultaneously with multimask_output=False. Doing a single positive click first and then additionally passing the mask within a second iteration changes results but they're still very much unusable.

pzmr avatar Apr 18 '23 10:04 pzmr

Also interested in this question...

joshuagruenstein avatar Apr 18 '23 14:04 joshuagruenstein

Same, I experience the same issue

theodu avatar May 04 '23 15:05 theodu

me to

jiachen0212 avatar May 06 '23 04:05 jiachen0212

Same, I have tried to reduce the number of background points, and to some extent, it helps, but I still got unsatisfied results.

kesixu avatar May 12 '23 18:05 kesixu

Same issue.

rawalkhirodkar avatar Jun 08 '23 18:06 rawalkhirodkar

Same issue. I tried randomly sampling points from the foreground as point prompt outputs. The results of 200 sampled points look worse than those of 10 sampled points. image

Estia-xmy avatar Aug 04 '23 09:08 Estia-xmy

I experience the same issue as well. :disappointed:

lefos99 avatar Nov 21 '23 17:11 lefos99

Same thing. I'm also interested in solution.

vladhc avatar Nov 22 '23 08:11 vladhc