图层遮罩:Florence2 Ultra(高级)
节点功能:基于 Florence-2 视觉基础模型识别并分割图像中的各种物体区域。LayerMask: Florence2 Ultra(Advance)-
节点中英文对比
图层遮罩:Florence2 Ultra(高级)
task
text_input
detail_method
detail_erode
detail_dilate
black_point
white_point
process_detail
device
max_megapixels
LayerMask: Florence2 Ultra(Advance)
task
text_input
detail_method
detail_erode
detail_dilate
black_point
white_point
process_detail
device
max_megapixels
图层遮罩:Florence2 Ultra(高级) - 参数说明
输入参数
florence2_model
已加载的 Florence2 模型结构。
image
输入图像,支持批量。
输出参数
image
带透明背景的 RGBA 图像。
mask
灰度遮罩蒙版,代表目标区域掩码。
控件参数
task
指定语义分割任务类型。可选:
① region to segmentation 区域分割适合常规区域标注
② referring expression segmentation 指代表达式分割适合以自然语言描述物体
③ open vocabulary detection 开放词汇检测可实现广义物体识别。根据需求选择。
text_input
用于指导模型的提示文本。
detail_method
蒙版细化方法。
VITMatte:基于视觉 Transformer 架构,效果精细但依赖模型文件的边缘细化算法。
VITMatte(local):本地化的 VITMatte,同样精细且在本地运行,对设备要求高。
PyMatting:基于 Python,灵活开源,在复杂场景精细度稍逊的边缘处理算法。
GuidedFilter:轻量级,计算量小,适合在设备性能有限时保留细节的边缘细化算法。
推荐使用 VITMatte(local) 避免联网下载;GuidedFilter 效果简单快速;PyMatting 更柔和;VITMatte 效果最好但依赖大模型。
detail_erode
蒙版腐蚀半径,收缩边缘。值越大,遮罩边缘越紧凑。常用范围 4~12。与 detail_dilate 一起控制 trimap 大小。
detail_dilate
蒙版膨胀半径,扩展边缘。值越大,遮罩边缘越宽松。通常与腐蚀配合使用。
black_point
遮罩黑点值,用于映射最小透明度。建议保留默认值 0.01,调节透明范围时可以适当调整。
white_point
遮罩白点值,用于映射最大透明度。默认 0.99,影响 alpha 蒙版的最大亮度。
process_detail
是否执行边缘细化处理。建议启用,可获得更高质量的遮罩边缘。若仅用于粗略分割可关闭以提速。
device
推理设备选择。可选:cuda、cpu。
max_megapixels
用于细化时的最大图像大小(百万像素)。
暂无节点说明