nvidia.dali.fn.jitter#

nvidia.dali.fn.jitter(__input, /, *, bytes_per_sample_hint=[0], fill_value=0.0, interp_type=DALIInterpType.INTERP_NN, mask=1, nDegree=2, preserve=False, seed=-1, device=None, name=None)#

执行随机抖动增强。

输出图像的生成方式是将每个像素在 x 和 y 维度上移动随机量,并以 nDegree 参数的一半为界。

支持的后端
  • ‘gpu’

参数:

__input (TensorList ('HWC')) – 算子的输入。

关键字参数:
  • bytes_per_sample_hint (int 或 int 列表, 可选, 默认值 = [0]) –

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

    如果指定,则驻留在 GPU 或分页锁定主机内存中的算子输出将被预分配,以适应此大小的样本批次。

  • fill_value (float, 可选, 默认值 = 0.0) – 用于填充的颜色值。

  • interp_type (nvidia.dali.types.DALIInterpType, 可选, 默认值 = DALIInterpType.INTERP_NN) – 使用的插值类型。

  • mask (int 或 TensorList of int, 可选, 默认值 = 1) –

    确定是否将此增强应用于输入图像。

    以下是值

    • 0:不应用此变换。

    • 1:应用此变换。

  • nDegree (int, 可选, 默认值 = 2) – 每个像素在 [-nDegree/2, nDegree/2] 范围内移动随机量

  • preserve (bool, 可选, 默认值 = False) – 即使算子的输出未使用,也阻止从图中删除该算子。

  • seed (int, 可选, 默认值 = -1) – 随机种子;如果未设置,将自动分配一个。