tf.image.rgb_to_grayscale()

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

tf.image.resize_nearest_neighbor()

tf.image.resize_nearest_neighbor(images, size, align_corners=None, name=None) Resize images to size using nearest neighbor interpolation. Args: images: A Tensor. Must be one of the following types: uint8, int8, int16, int32, int64, half, float32, float64. 4-D with shape [batch, height, width, channels]. size: A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images. align_corners: An optional bool. Defaults to False. If true, rescale input by (new_height - 1) / (

tf.image.resize_image_with_crop_or_pad()

tf.image.resize_image_with_crop_or_pad(image, target_height, target_width) Crops and/or pads an image to a target width and height. Resizes an image to a target width and height by either centrally cropping the image or padding it evenly with zeros. If width or height is greater than the specified target_width or target_height respectively, this op centrally crops along that dimension. If width or height is smaller than the specified target_width or target_height respectively, this op centrall

tf.image.resize_images()

tf.image.resize_images(images, size, method=0, align_corners=False) Resize images to size using the specified method. Resized images will be distorted if their original aspect ratio is not the same as size. To avoid distortions see resize_image_with_crop_or_pad. method can be one of: ResizeMethod.BILINEAR: Bilinear interpolation. ResizeMethod.NEAREST_NEIGHBOR: Nearest neighbor interpolation. ResizeMethod.BICUBIC: Bicubic interpolation. ResizeMethod.AREA: Area interpolation. Args: ima

tf.image.resize_bilinear()

tf.image.resize_bilinear(images, size, align_corners=None, name=None) Resize images to size using bilinear interpolation. Input images can be of different types but output images are always float. Args: images: A Tensor. Must be one of the following types: uint8, int8, int16, int32, int64, half, float32, float64. 4-D with shape [batch, height, width, channels]. size: A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images. align_corners: An optional bool. Defaul

tf.image.resize_bicubic()

tf.image.resize_bicubic(images, size, align_corners=None, name=None) Resize images to size using bicubic interpolation. Input images can be of different types but output images are always float. Args: images: A Tensor. Must be one of the following types: uint8, int8, int16, int32, int64, half, float32, float64. 4-D with shape [batch, height, width, channels]. size: A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images. align_corners: An optional bool. Defaults

tf.image.resize_area()

tf.image.resize_area(images, size, align_corners=None, name=None) Resize images to size using area interpolation. Input images can be of different types but output images are always float. Args: images: A Tensor. Must be one of the following types: uint8, int8, int16, int32, int64, half, float32, float64. 4-D with shape [batch, height, width, channels]. size: A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images. align_corners: An optional bool. Defaults to Fa

tf.image.random_saturation()

tf.image.random_saturation(image, lower, upper, seed=None) Adjust the saturation of an RGB image by a random factor. Equivalent to adjust_saturation() but uses a saturation_factor randomly picked in the interval [lower, upper]. Args: image: RGB image or images. Size of the last dimension must be 3. lower: float. Lower bound for the random saturation factor. upper: float. Upper bound for the random saturation factor. seed: An operation-specific seed. It will be used in conjunction with the

tf.image.random_hue()

tf.image.random_hue(image, max_delta, seed=None) Adjust the hue of an RGB image by a random factor. Equivalent to adjust_hue() but uses a delta randomly picked in the interval [-max_delta, max_delta]. max_delta must be in the interval [0, 0.5]. Args: image: RGB image or images. Size of the last dimension must be 3. max_delta: float. Maximum value for the random delta. seed: An operation-specific seed. It will be used in conjunction with the graph-level seed to determine the real seeds that

tf.image.random_flip_up_down()

tf.image.random_flip_up_down(image, seed=None) Randomly flips an image vertically (upside down). With a 1 in 2 chance, outputs the contents of image flipped along the first dimension, which is height. 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 not su