nvidia.dali.fn.ssd_random_crop#

nvidia.dali.fn.ssd_random_crop(__input_0, __input_1, __input_2, /, *, bytes_per_sample_hint=[0], num_attempts=1, preserve=False, seed=-1, device=None, name=None)#

警告

此操作符现已弃用。请使用 random_bbox_crop() 代替。

执行带有边界框的随机裁剪,其中交并比 (IoU) 满足 0-1 之间的随机选择的阈值。

当 IoU 低于阈值时,会生成新的随机裁剪,最多尝试 num_attempts 次。作为输入,此操作符接受图像、边界框和标签。在输出中,返回裁剪后的图像、裁剪后的有效边界框和有效标签。

支持的后端
  • ‘cpu’

参数:
  • __input_0 (TensorList) – 操作符的输入。

  • __input_1 (TensorList) – 操作符的输入。

  • __input_2 (TensorList) – 操作符的输入。

关键字参数:
  • bytes_per_sample_hint (int 或 list of int, optional, default = [0]) –

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

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

  • num_attempts (int, optional, default = 1) – 尝试次数。

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

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