Closed james77777778 closed 1 year ago
This bug should influence #1439 @soma2000-lang
The unit test should fail at VectorizedBaseImageAugmentationLayer
part
https://github.com/keras-team/keras-cv/blob/4fd3a84cb84666644ee52bcc0625f0e4416564dd/keras_cv/layers/preprocessing/random_crop_and_resize_test.py#L191-L205
@james77777778 thanks for flagging ,yes some of the tests are failing due to this.
Go ahead @james77777778 - thanks for filing!
I find that current implementation of
VectorizedBaseImageAugmentationLayer
fails to correctly process unbatchedbounding_boxes
Here is a standalone script:
Reason:
VectorizedBaseImageAugmentationLayer
tries totf.expand_dims
(tf.squeeze
) all values ofinputs
(outputs
) includingbounding_boxes
which is a dicthttps://github.com/keras-team/keras-cv/blob/4fd3a84cb84666644ee52bcc0625f0e4416564dd/keras_cv/layers/preprocessing/vectorized_base_image_augmentation_layer.py#L368-L370
https://github.com/keras-team/keras-cv/blob/4fd3a84cb84666644ee52bcc0625f0e4416564dd/keras_cv/layers/preprocessing/vectorized_base_image_augmentation_layer.py#L392-L394
The possible solution:
It needs to be fixed if we want to implement
augment_bounding_boxes
for vectorized layers.I can open the PR once approved.