Open zxj7b80 opened 1 year ago
I also have this question https://github.com/facebookresearch/segment-anything/issues/346
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), :, :]
I'm confused too!! The later is the demo result.
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. It seems like less point bright better results??
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!
following
following
@AlexLee1235
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), :, :]
Hi friend, thank you very much for your guidance and advice. However, I have a few questions I'd like to ask:
Are the samPoints something you customized? If they are customized, how should I modify the code to iteratively feed the points into the model? I'd appreciate your guidance, and I would be very grateful if you could provide it.
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.