Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update visualization/plot_image_gallery.py to solve an error in the object_detection_keras_cv.py in the keras-team/keras-io Project #2019

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ImenMasmoudiEm
Copy link

@ImenMasmoudiEm ImenMasmoudiEm commented Aug 9, 2023

Update visualization/plot_image_gallery.py
The guide has an issue when calling the visualization.plot_image_gallery function with its input being a list, it has to be of type array because it will be calling for the shape of it later in the function. The error occurred in the second code cell in the Beginner section, Ligne 155 in the object_detection_keras_cv.py file. This update should solve it.

Fixes #2015

Update visualization/plot_image_gallery.py 
The guide has an issue when calling the visualization.plot_image_gallery function with its input being a list, it has to be of type array because it will be calling for the shape of it later in the function. The error occurred in the second code cell in the Beginner section, Ligne 155 in the object_detection_keras_cv.py file. This update should solve it.
@jbischof
Copy link
Contributor

jbischof commented Aug 9, 2023

Thank you @ImenMasmoudiEm! Have you tested this by any chance on the OD colab?

@sampathweb
Copy link
Collaborator

Thanks for the PR. Since the docstring says inputs should be a Tensor or Numpy Array, isn't this an incorrect use of the function in the tutorial?

@jbischof
Copy link
Contributor

jbischof commented Aug 9, 2023

We are definitely planning to update the tutorial @sampathweb

@sampathweb
Copy link
Collaborator

Alternatively, can we raise a ValueError if the images is not the expected type of Tensor or ndarray?. Something like - isinstance(images, (tf.Tensor, np.ndarray))?

@ImenMasmoudiEm
Copy link
Author

jbischof
I have started initially with fixing the tutorial, it was suggested that we add it here.
My pull request is still pending for a change in the keras-io respitory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dataset support plot_image_gallery breaks OD tutorial
3 participants