View source on GitHub |
Crops the image sequence of images.
tfm.vision.preprocess_ops_3d.crop_image(
frames: tf.Tensor,
target_height: int,
target_width: int,
random: bool = False,
num_crops: int = 1,
seed: Optional[int] = None
) -> tf.Tensor
If requested size is bigger than image size, image is padded with 0. If not random cropping, a central crop is performed if num_crops is 1.
Returns | |
---|---|
A Tensor of shape [timesteps, out_height, out_width, channels] of type uint8 with the cropped images. |