keras-cv icon indicating copy to clipboard operation
keras-cv copied to clipboard

RandomResizedCrop bounding box support

Open LukeWood opened this issue 3 years ago • 4 comments

LukeWood avatar Aug 05 '22 16:08 LukeWood

@AdityaKane2001 will tackle this

LukeWood avatar Sep 22 '22 21:09 LukeWood

Yup, on it.

AdityaKane2001 avatar Sep 22 '22 21:09 AdityaKane2001

@LukeWood do we assume the bounding boxes to be of a specific type? Like xyxy or rel_xyxy?

AdityaKane2001 avatar Sep 22 '22 21:09 AdityaKane2001

@LukeWood do we assume the bounding boxes to be of a specific type? Like xyxy or rel_xyxy?

You’ll need to accept a bounding_box_format argument and convert internally. After conversion you can perform the transformation, then convert back to the user’s specified format. Check out how shear does this.

LukeWood avatar Sep 22 '22 21:09 LukeWood

I was wondering if this layer was renamed to RandomCropAndResize.

If yes, the layer already supports bounding boxes and we can safely close this issue. https://github.com/keras-team/keras-cv/blob/46e27acd40edcd9486e67ca3adfbd315ae6406fb/keras_cv/layers/preprocessing/random_crop_and_resize.py#L144

(Apologies if I misread something)

ariG23498 avatar Jul 31 '23 11:07 ariG23498