def translate_x(image, pixels, replace):
  """Equivalent of PIL Translate in X dimension."""
  image = contrib_image.translate(wrap(image), [-pixels, 0])
  return unwrap(image, replace)
Equivalent of PIL Translate in X dimension.
inference_api/src/main/object_detection/utils/autoaugment_utils.py