IDEA-Research / Grounded-Segment-Anything

Grounded SAM: Marrying Grounding DINO with Segment Anything & Stable Diffusion & Recognize Anything - Automatically Detect , Segment and Generate Anything
https://arxiv.org/abs/2401.14159
Apache License 2.0
15.16k stars 1.4k forks source link

分割结果有时会把前景作为背景,背景作为前景,不知道为什么 #424

Open fiy-fiy opened 10 months ago

fiy-fiy commented 10 months ago

我使用grounded_sam_simple_demo.py进行测试,配置如下 GROUNDING_DINO_CONFIG_PATH = "GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py" GROUNDING_DINO_CHECKPOINT_PATH = "./groundingdino_swint_ogc.pth" SAM_ENCODER_VERSION = "vit_l" SAM_CHECKPOINT_PATH = "./models/sam_vit_l_0b3195.pth" CLASSES = ["people"] BOX_THRESHOLD = 0.25 TEXT_THRESHOLD = 0.25 NMS_THRESHOLD = 0.8 第一步,检测出people,并标记,没有问题 image

然而第二步,人物分割的mask和背景的mask正好弄反 image

原图是这个,可以拿来测试 1703598568 1223187_raw_image

numb89757 commented 8 months ago

是的,我也遇到同样的问题