tf.image.random_jpeg_quality

View source on GitHub

Randomly changes jpeg encoding quality for inducing jpeg noise.

tf.image.random_jpeg_quality(
    image, min_jpeg_quality, max_jpeg_quality, seed=None
)

min_jpeg_quality must be in the interval [0, 100] and less than max_jpeg_quality. max_jpeg_quality must be in the interval [0, 100].

Args:

Returns:

Adjusted image(s), same shape and DType as image.

Raises: