Stay organized with collections Save and categorize content based on your preferences.

Center crop a square shape slice from the input image.

It crops a square shape slice from the image. The side of the actual crop is 224 / 256 = 0.875 of the short side of the original image. References: [1] Very Deep Convolutional Networks for Large-Scale Image Recognition [2] Deep Residual Learning for Image Recognition

This is a faster version of center_crop_image which takes the original image bytes and image size as the inputs, and partially decode the JPEG bytes according to the center crop.

image_bytes a Tensor of type string representing the raw image bytes.
image_shape a Tensor specifying the shape of the raw image.

cropped_image a Tensor representing the center cropped image.