You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The closest issue I found about the problem I mention in this issue is the following. However I use a tf.data pipeline, as recommended in the provided answer.
I have several questions, regarding the description of the issue :
May I miss something in my minimal provided code example ?
May I miss something in the versions of keras-cv and tf and their cross compatibilities ?
Should I upgrade to keras 3 (keras-hub), but I read that ragged tensor are not supported ?
Current Behavior:
I try to follow the tutorial in keras 2 to train a Yolov8 here, but it seems that a ValueError is encountered during the preprocessing layer when I add augmentation. Without augmentation the data pipeline seems to run well. It does raise the error with other preprocessing layer keras_cv.layers.RandomShear or keras_cv.layers.JitteredResize.
ValueError: Expected len(boxes.shape)=2, or len(boxes.shape)=3, got len(boxes.shape)=4
which comes from the following lines keras_cv/src/bounding_box/utils.py", line 158, in _format_inputs * raise ValueError
It seems that the keras_cv preprocessing layer is adding a dimension in the ragged_tensor of bboxes.
Expected Behavior:
pipeline running without error
Steps To Reproduce:
Here is a minimal exemple to reproduce the error I get
Additional information : I tried many combination with more recent packages (keras-cv 0.9, tf 2.17, tf2.14, ...), this is one of them, I never managed to solve the error.
Anything else:
I find it difficult to find documentation about keras-cv layers as the documentation always redirect to keras-hub, but it may be normal as the migration is ongoing ? Is there a specific documentation page that is maintained during migration ?
Anyway, thank you for this amazing work and futur contributions,
The text was updated successfully, but these errors were encountered:
jaytwoCaribou
changed the title
Object detection preprocessing layer raise ValueError with lenght of boxes
Object detection preprocessing layer raise ValueError with length of boxes
Feb 7, 2025
Hi,
The closest issue I found about the problem I mention in this issue is the following. However I use a tf.data pipeline, as recommended in the provided answer.
I have several questions, regarding the description of the issue :
Current Behavior:
I try to follow the tutorial in keras 2 to train a Yolov8 here, but it seems that a ValueError is encountered during the preprocessing layer when I add augmentation. Without augmentation the data pipeline seems to run well. It does raise the error with other preprocessing layer keras_cv.layers.RandomShear or keras_cv.layers.JitteredResize.
ValueError: Expected len(boxes.shape)=2, or len(boxes.shape)=3, got len(boxes.shape)=4
which comes from the following lines
keras_cv/src/bounding_box/utils.py", line 158, in _format_inputs * raise ValueError
It seems that the keras_cv preprocessing layer is adding a dimension in the ragged_tensor of bboxes.
Expected Behavior:
Steps To Reproduce:
Here is a minimal exemple to reproduce the error I get
Version:
Here is the package I add in the pyproject.toml:
Additional information : I tried many combination with more recent packages (keras-cv 0.9, tf 2.17, tf2.14, ...), this is one of them, I never managed to solve the error.
Anything else:
I find it difficult to find documentation about keras-cv layers as the documentation always redirect to keras-hub, but it may be normal as the migration is ongoing ? Is there a specific documentation page that is maintained during migration ?
Anyway, thank you for this amazing work and futur contributions,
The text was updated successfully, but these errors were encountered: