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

Difference between the masks generated by Meta-demo v/s local

Open bsinghpratap opened this issue 1 year ago • 8 comments

Masks generated on the demo image (https://github.com/facebookresearch/segment-anything/blob/main/notebooks/images/dog.jpg) through the online demo (shown below) are different from the masks generated in the example notebook (https://github.com/facebookresearch/segment-anything/blob/main/notebooks/automatic_mask_generator_example.ipynb).

  • I noticed that the online demo performs some de-duplication of masks. Is that the reason the masks generated are different?
  • How can I achieve the same masks as the online demo? Would I have to tune/change some of the hyper-parameters?

bsinghpratap avatar May 05 '23 23:05 bsinghpratap

Masks generated through the everything functionality of demo

bsinghpratap avatar May 05 '23 23:05 bsinghpratap

I have the same question #346

githublqs avatar May 13 '23 01:05 githublqs

Any update on this? The results I get using the online demo are really good but can't get the same results with the mask_generator.

anlarro avatar Jun 06 '23 11:06 anlarro

Any update on this? The results I get using the online demo are really good but can't get the same results with the mask_generator.

image You can try to tune some parameters in the SamAutomaticMaskGenerator, such as pred_iou_thresh and stability_score_thresh.And I get better results after set lower values at them.

GuaGod avatar Jun 06 '23 14:06 GuaGod

Any update on this? The results I get using the online demo are really good but can't get the same results with the mask_generator.

image You can try to tune some parameters in the SamAutomaticMaskGenerator, such as pred_iou_thresh and stability_score_thresh.And I get better results after set lower values at them.

Thanks. I tried many different parameters already but nothing similar to what I get with the online demo. It would be nice if somebody can provide the parameters used for the online demo.

anlarro avatar Jun 06 '23 15:06 anlarro

Yeah.I think the largest model is the best model in the all three local models.But there is a performance gap bewteen it and the online model.

发自我的iPhone

------------------ Original ------------------ From: Andrés Larroza @.> Date: 周二,6月 6,2023 11:46 下午 To: facebookresearch/segment-anything @.> Cc: Liangjie @.>, Manual @.> Subject: Re: [facebookresearch/segment-anything] Difference between the masks generated by Meta-demo v/s local (Issue #330)

Any update on this? The results I get using the online demo are really good but can't get the same results with the mask_generator.

You can try to tune some parameters in the SamAutomaticMaskGenerator, such as pred_iou_thresh and stability_score_thresh.And I get better results after set lower values at them.

Thanks. I tried many different parameters already but nothing similar to what I get with the online demo. It would be nice if somebody can provide the parameters used for the online demo.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

GuaGod avatar Jun 10 '23 13:06 GuaGod

I met the same question, did anyone solve this problem?

PengyuanHAN avatar Nov 09 '23 07:11 PengyuanHAN

Even, I'm also facing the same issue. The Online demo is giving good results, whereas the colab notebook isn't. (Will update if I found any solutions.)

BalajiAI avatar May 03 '24 13:05 BalajiAI