tfm.vision.spatial_transform_ops.bilinear_resize_to_bbox

Bilinear resizes the images to fit into the bounding boxes in the output.

images A tensor in shape (batch_size, input_h, input_w, ...) with arbitrary numbers of channel dimensions.
bbox A tensor in shape (batch_size, 4), representing the absolute coordinates (ymin, xmin, ymax, xmax) for each bounding box.
output_size The size of the output images in (output_h, output_w).

A tensor in shape (batch_size, output_h, output_w, ...).