tfm.vision.preprocess_ops.random_jpeg_quality

Randomly encode the image as jpeg and decode it.

image a uint8 'Tensor' of shape [height, width, 3] representing the input image.
min_quality minimum jpeg quality in range of [0, 100].
max_quality maximum jpeg quality in range of [0, 100].
prob_to_apply probability to apply this augmentation.

image with jpeg quality changed