tensorflow/models · error · ValueError

Unknown augmentation name: {augmentation_name!r}

Error message

Unknown augmentation name: {augmentation_name!r}

What it means

Error "Unknown augmentation name: {augmentation_name!r}" thrown in tensorflow/models.

Source

Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/augment_train_split.py:191

  if augmentation_name == "vflip":
    return apply_vertical_flip(image)
  if augmentation_name == "hflip":
    return apply_horizontal_flip(image)
  if augmentation_name == "rot45":
    return apply_fixed_rotation(image, 45, rotation_fill_color)
  if augmentation_name == "rot65":
    return apply_fixed_rotation(image, 65, rotation_fill_color)
  if augmentation_name == "rot90":
    return apply_fixed_rotation(image, 90, rotation_fill_color)
  if augmentation_name == "blur":
    return apply_gaussian_blur(image)
  if augmentation_name == "noise03":
    return apply_add_noise(image, 0.3)
  if augmentation_name == "noise06":
    return apply_add_noise(image, 0.6)
  if augmentation_name == "cjitter":
    return apply_color_jitter(image)
  raise ValueError(f"Unknown augmentation name: {augmentation_name!r}")


def build_augmented_images(
    image: PIL.Image.Image,
    augmentations_to_apply: tuple[str, ...],
    rotation_fill_color: tuple[int, int, int],
) -> dict[str, PIL.Image.Image]:
  """Creates a dictionary of augmented images keyed by suffix.

  The loader has already reordered ``augmentations_to_apply`` into
  canonical order, so iterating over it directly is enough to make the
  on-disk output deterministic.

  Args:
      image: Original PIL Image.
      augmentations_to_apply: Sequence of augmentation names to apply,
        already in canonical order.
      rotation_fill_color: RGB fill color used to pad rotated images.

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/augment_train_split.py:191 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/2b8bff846fdae00a. Report an issue: GitHub.