tf.keras.utils.bounding_boxes.pad

Pads bounding boxes by adding top and left offsets.

This function adds padding to the bounding boxes by increasing the 'top' and 'left' coordinates by the specified amounts. The method assume the input bounding_box_format is xyxy.

boxes Bounding boxes to pad. Shape (N, 4) or (batch, N, 4).
top Vertical padding to add.
left Horizontal padding to add.
height Image height. Defaults to None.
width Image width. Defaults to None.
bounding_box_format The format of the input bounding boxes. Defaults to "xyxy".

Padded bounding boxes in the original format.