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

Did the official demo use better model than vit_h model?

Open zxj7b80 opened this issue 2 years ago • 9 comments

When I provide multiply points for the model sam_vit_h_4b8939.pth, bad result occurs. It's different from the official demo 'https://segment-anything.com/demo'. In official demo, better segment result occurs with more points prompt. So I wonder whether the official demo used better model than sam_vit_h_4b8939.pth.

zxj7b80 avatar May 11 '23 07:05 zxj7b80

I also have this question https://github.com/facebookresearch/segment-anything/issues/346

githublqs avatar May 12 '23 01:05 githublqs

In my case, when I prompt it iteratively (add one point a time and use old mask as prompt), it's result is more like the web demo.

for i in range(1,len(samPoints)): masks, scores, logits = predictor.predict( point_coords = np.array(samPoints[0:i]), point_labels = np.array(pointFlag[0:i]), mask_input = prev[None, :, :] if i > 1 else None, multimask_output = False, ) prev = logits[np.argmax(scores), :, :]

AlexLee1235 avatar Nov 02 '23 14:11 AlexLee1235

I'm confused too!! The later is the demo result. image image

sunsunnyshine avatar Nov 03 '23 03:11 sunsunnyshine

I use the iterative prompt,and got this. The result has improved slightly, but it still doesn't meet the requirements compared to the demo. image It seems like less point bright better results?? image

sunsunnyshine avatar Nov 03 '23 08:11 sunsunnyshine

In my case, when I prompt it iteratively (add one point a time and use old mask as prompt), it's result is more like the web demo.

for i in range(1,len(samPoints)): masks, scores, logits = predictor.predict( point_coords = np.array(samPoints[0:i]), point_labels = np.array(pointFlag[0:i]), mask_input = prev[None, :, :] if i > 1 else None, multimask_output = False, ) prev = logits[np.argmax(scores), :, :]

Hello, may I ask how the result looks after this processing? If you could provide a visual representation, I would greatly appreciate it!

sunsunnyshine avatar Nov 03 '23 08:11 sunsunnyshine

following

JI4JUN avatar Nov 29 '23 13:11 JI4JUN

following

315386775 avatar Jan 10 '24 00:01 315386775