How can I crop an image to the bounding box in Tensorflow? I am using the Python API.
From the documentation,
tf.image.crop_to_bounding_box(image, offset
Since we consider x as horizontal and y as vertical, following would crop the image with specified box.
x
y
cropped_image = tf.image.crop_to_bounding_box(image, yminn, xminn, ymaxx - yminn, xmaxx - xminn)