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
I am experiencing issues with bounding box visualization and predictions while working with a YOLO model trained using KerasCV. The bounding boxes displayed during data visualization or predictions do not align correctly with the objects in the images. Additionally, when I run predictions on test images, the results often contain arrays filled with -1 values, suggesting no valid detections are being made.
Attempts to use keras_cv.bounding_box.to_ragged during visualization fail with the following error: NotImplementedError: bounding_box.to_ragged was called using a backend which does not support ragged tensors. Current backend: tensorflow.
When I commented this line y_pred = bounding_box.to_ragged(y_pred) or change to to_danse(y_pred) I get only blue boxes for true not for predicted like in example https://keras.io/examples/vision/yolov8/#visualization.
When I want to predict one image its same error with to_ragged. When I use to_danse I get something like destroyed image.
The data was converted using a script that processes bounding boxes into Pascal VOC (XML) format.
Is there a way to validate the data format expected by KerasCV, especially for bounding boxes in the xyxy format?
Does the issue stem from saving and reloading the model using model.save() and tf.keras.models.load_model()?
How can I address the issue with bounding_box.to_ragged on a TensorFlow backend? Are there any alternative methods for handling ragged tensors in this context?
The text was updated successfully, but these errors were encountered:
I am experiencing issues with bounding box visualization and predictions while working with a YOLO model trained using KerasCV. The bounding boxes displayed during data visualization or predictions do not align correctly with the objects in the images. Additionally, when I run predictions on test images, the results often contain arrays filled with -1 values, suggesting no valid detections are being made.
`def visualize_detections(model, dataset, bounding_box_format):
images, y_true = next(iter(dataset.take(1)))
y_pred = model.predict(images)
y_pred = bounding_box.to_ragged(y_pred)
visualization.plot_bounding_box_gallery(
images,
value_range=(0, 255),
bounding_box_format=bounding_box_format,
y_true=y_true,
y_pred=y_pred,
scale=4,
rows=2,
cols=2,
show=True,
font_scale=0.7,
class_mapping=class_mapping,
)
visualize_detections(yolo, dataset=val_ds, bounding_box_format="xyxy"`
Attempts to use keras_cv.bounding_box.to_ragged during visualization fail with the following error:
NotImplementedError:
bounding_box.to_raggedwas called using a backend which does not support ragged tensors. Current backend: tensorflow.
When I commented this line y_pred = bounding_box.to_ragged(y_pred) or change to to_danse(y_pred) I get only blue boxes for true not for predicted like in example https://keras.io/examples/vision/yolov8/#visualization.
When I want to predict one image its same error with to_ragged. When I use to_danse I get something like destroyed image.
`def visualize_single_image(model, image_path, bounding_box_format):
visualize_single_image(yolo, "00078.jpg", bounding_box_format="xyxy")`
The data was converted using a script that processes bounding boxes into Pascal VOC (XML) format.
Is there a way to validate the data format expected by KerasCV, especially for bounding boxes in the xyxy format?
Does the issue stem from saving and reloading the model using model.save() and tf.keras.models.load_model()?
How can I address the issue with bounding_box.to_ragged on a TensorFlow backend? Are there any alternative methods for handling ragged tensors in this context?
The text was updated successfully, but these errors were encountered: