GroundingDinoSAMSegment (segment anything)
节点功能:本节点使用 Grounding DINO 根据文字提示在图像中定位区域(产生边框),然后用 SAM 对这些区域进行精确分割,返回对应的图像切块与掩码(mask)。下图为在ComfyUI中常见的蒙版分割模型以及相应的效果区别。GroundingDinoSAMSegment (segment anything)-
节点中英文对比
GroundingDinoSAMSegment (segment anything)
prompt
threshold
GroundingDinoSAMSegment (segment anything)
prompt
threshold
GroundingDinoSAMSegment (segment anything) - 参数说明
输入参数
sam_model
已加载的 SAM 模型
grounding_dino_model
已加载的 Grounding DINO 模型
image
输入图像,支持批量
输出参数
IMAGE
SAM 分割出的图像区域(按 box 分割)
MASK
每个分割图像对应的遮罩(二值图)
控件参数
prompt
文本提示词(如 "a dog"、"one girl" 等)
threshold
Grounding DINO 的置信度阈值,默认 0.3,Grounding DINO 对每个文本匹配的目标区域会给出一个置信度分数。只有分数 ≥ threshold 的候选框,才会被保留下来作为有效目标进行后续的 SAM 分割。
暂无节点说明