clip_to_image
functionkeras_cv.bounding_box.clip_to_image(
bounding_boxes, bounding_box_format, images=None, image_shape=None
)
clips bounding boxes to image boundaries.
clip_to_image()
clips bounding boxes that have coordinates out of bounds
of an image down to the boundaries of the image. This is done by converting
the bounding box to relative formats, then clipping them to the [0, 1]
range. Additionally, bounding boxes that end up with a zero area have their
class ID set to -1, indicating that there is no object present in them.
Arguments