I want to use coco datasets for training ssd(single shot multibox detector) network in tensorflow 2.1
The paper said that they use image cropping for robustness so, I tried to use tf.image.sample_distorted_bounding_box()
However, I realized that this function only resizes bounding boxes, not preserving the corresponding labels.
How can I crop images with appropriate bboxes and labels preserved? Appropriate means that bbox coordinates are refined as the image changes and the bbox out of the cropped image to be removed.