tf.image.random_flip_left_right()

tf.image.random_flip_left_right(image, seed=None) Randomly flip an image horizontally (left to right). With a 1 in 2 chance, outputs the contents of image flipped along the second dimension, which is width. Otherwise output the image as-is. Args: image: A 3-D tensor of shape [height, width, channels]. seed: A Python integer. Used to create a random seed. See set_random_seed for behavior. Returns: A 3-D tensor of the same type and shape as image. Raises: ValueError: if the shape of image

tf.image.random_contrast()

tf.image.random_contrast(image, lower, upper, seed=None) Adjust the contrast of an image by a random factor. Equivalent to adjust_contrast() but uses a contrast_factor randomly picked in the interval [lower, upper]. Args: image: An image tensor with 3 or more dimensions. lower: float. Lower bound for the random contrast factor. upper: float. Upper bound for the random contrast factor. seed: A Python integer. Used to create a random seed. See set_random_seed for behavior. Returns: The con

tf.image.random_brightness()

tf.image.random_brightness(image, max_delta, seed=None) Adjust the brightness of images by a random factor. Equivalent to adjust_brightness() using a delta randomly picked in the interval [-max_delta, max_delta). Args: image: An image. max_delta: float, must be non-negative. seed: A Python integer. Used to create a random seed. See set_random_seed for behavior. Returns: The brightness-adjusted image. Raises: ValueError: if max_delta is negative.

tf.image.per_image_whitening()

tf.image.per_image_whitening(image) Linearly scales image to have zero mean and unit norm. This op computes (x - mean) / adjusted_stddev, where mean is the average of all values in image, and adjusted_stddev = max(stddev, 1.0/sqrt(image.NumElements())). stddev is the standard deviation of all values in image. It is capped away from zero to protect against division by 0 when handling uniform images. Note that this implementation is limited: * It only whitens based on the statistics of an indivi

tf.image.pad_to_bounding_box()

tf.image.pad_to_bounding_box(image, offset_height, offset_width, target_height, target_width) Pad image with zeros to the specified height and width. Adds offset_height rows of zeros on top, offset_width columns of zeros on the left, and then pads the image on the bottom and right with zeros until it has dimensions target_height, target_width. This op does nothing if offset_* is zero and the image already has size target_height by target_width. Args: image: 3-D tensor with shape [height, widt

tf.image.non_max_suppression()

tf.image.non_max_suppression(boxes, scores, max_output_size, iou_threshold=None, name=None) Greedily selects a subset of bounding boxes in descending order of score, pruning away boxes that have high intersection-over-union (IOU) overlap with previously selected boxes. Bounding boxes are supplied as [y1, x1, y2, x2], where (y1, x1) and (y2, x2) are the coordinates of any diagonal pair of box corners and the coordinates can be provided as normalized (i.e., lying in the interval [0, 1]) or absol

tf.image.hsv_to_rgb()

tf.image.hsv_to_rgb(images, name=None) Convert one or more images from HSV to RGB. Outputs a tensor of the same shape as the images tensor, containing the RGB value of the pixels. The output is only well defined if the value in images are in [0,1]. See rgb_to_hsv for a description of the HSV encoding. Args: images: A Tensor. Must be one of the following types: float32, float64. 1-D or higher rank. HSV data to convert. Last dimension must be size 3. name: A name for the operation (optional).

tf.image.grayscale_to_rgb()

tf.image.grayscale_to_rgb(images, name=None) Converts one or more images from Grayscale to RGB. Outputs a tensor of the same DType and rank as images. The size of the last dimension of the output is 3, containing the RGB value of the pixels. Args: images: The Grayscale tensor to convert. Last dimension must be size 1. name: A name for the operation (optional). Returns: The converted grayscale image(s).

tf.image.flip_up_down()

tf.image.flip_up_down(image) Flip an image horizontally (upside down). Outputs the contents of image flipped along the first dimension, which is height. See also reverse(). Args: image: A 3-D tensor of shape [height, width, channels]. Returns: A 3-D tensor of the same type and shape as image. Raises: ValueError: if the shape of image not supported.

tf.image.flip_left_right()

tf.image.flip_left_right(image) Flip an image horizontally (left to right). Outputs the contents of image flipped along the second dimension, which is width. See also reverse(). Args: image: A 3-D tensor of shape [height, width, channels]. Returns: A 3-D tensor of the same type and shape as image. Raises: ValueError: if the shape of image not supported.