nvidia.dali.fn.experimental.erode#

nvidia.dali.fn.experimental.erode(__input, /, *, anchor=[-1, -1], border_mode='constant', bytes_per_sample_hint=[0], iterations=1, mask_size=[3, 3], preserve=False, device=None, name=None)#

对输入图像执行腐蚀操作。

此操作符允许序列输入。

支持的后端
  • ‘gpu’

参数:

__input (TensorList ('HW', 'HWC', 'FHWC', 'CHW', 'FCHW')) – 输入数据。必须是 HWC 或 CHW 布局的图像,或是这些图像的序列。

关键字参数:
  • anchor (int 或 int 列表或 int 的 TensorList, optional, default = [-1, -1]) –

    设置结构元素的锚点。默认值 (-1, -1) 使用元素的中心作为锚点。

    支持 per-frame 输入。

  • border_mode (str, optional, default = ‘constant’) – 访问输入图像外部元素时使用的边界模式。

  • bytes_per_sample_hint (int 或 int 列表, optional, default = [0]) –

    每个样本的输出大小提示(以字节为单位)。

    如果指定,则操作符驻留在 GPU 或分页锁定主机内存中的输出将被预先分配,以容纳此大小的样本批次。

  • iterations (int, optional, default = 1) – 执行操作的次数,通常设置为 1。设置为大于 1 的值等效于每次额外迭代将掩码大小增加 (mask_width - 1, mask_height -1)。

  • mask_size (int 或 int 列表或 int 的 TensorList, optional, default = [3, 3]) –

    结构元素的大小。

    支持 per-frame 输入。

  • preserve (bool, optional, default = False) – 阻止操作符即使在其输出未使用时也从图中移除。