API - Utils

Augmentation

augmentation.is_factor_working(not_working_value=0.0)

Check whether factor is working or not.

Parameters:
  • factor (int|float|Sequence[int|float]|keras_aug.FactorSampler) – The factor to check whether it is working or not.

  • not_working_value (float, optional) – The value indicating not working status. Defaults to 0.0.

augmentation.get_images_shape(dtype=tf.int32)

Get heights and widths of the input images.

Input images can be tf.Tensor or tf.RaggedTensor with the shape of [B, H|None, W|None, C].

Parameters:
  • images (tf.Tensor|tf.RaggedTensor) – The input images.

  • dtype (tf.dtypes.DType, optional) – The dtype of the outputs. Defaults to tf.int32.

Bounding Box