instance_to_semantic_mask
最后更新
depthai_nodes.node.instance_to_semantic_mask类
InstanceToSemanticMask
dai.ImgDetections 消息。当掩码和检测都存在时,会发出一个复制的消息;其掩码会被替换。类别标签必须可以用 uint8 表示,其中 255 保留给背景。缺失或空的掩码会在复制的消息上不变地通过。方法
init
Python
1def __init__(self):ValueError: 如果管道设备平台没有配置图像帧格式。
build
Python
1def build(detections: dai.Node.Output) -> InstanceToSemanticMask:detections(dai.Node.Output): 生成dai.ImgDetections的输出。
InstanceToSemanticMask: 此节点。
process
Python
1def process(msg: dai.Buffer):msg(dai.Buffer): 带有非负实例索引掩码的检测。值为 255 或超出检测列表的索引将成为背景。
TypeError: 如果输入不是dai.ImgDetections。