How to deal with bboxes in preprocess/augmentation layer

Hi!

I want to compare the speed between augmenting images using dataset.map() and having the augmentation done in a preprocessing layer.
Using .map I can get to the bboxes to perform the augmentation on them also since I’m mapping the whole dataset, images, bboxes and more.
But how can I perform the augmentation on the bboxes when I’m using the preprocessing layer? Is it possible to get to the bboxes here also or does only the images go through here?

/Ola

I am facing the same problem. I’m trying to pull the dog parts of the images in “Stanford Dogs” and it has become clear that I need to make a variant of the Keras Resizing layer that receives two inputs (image, bbox) and does “crop and resize”.

If all goes well I will post it as my first PR.

We will start to collect something at:

https://github.com/keras-team/keras-cv/issues/115