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 The visualization.plot_image_gallery object_detection_keras_cv.py #1469

Closed
wants to merge 2 commits into from

Conversation

ImenMasmoudiEm
Copy link

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.

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.
Update The visualization.plot_image_gallery object_detection_keras_cv.py
Copy link
Collaborator

@MarkDaoust MarkDaoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Thanks for the PR.

It might make sense to fix the viusualization tool as well.

would a numpy.asarray() make sense here:

https://github.com/keras-team/keras-cv/blob/v0.6.1/keras_cv/visualization/plot_image_gallery.py#L132-L133

Copy link
Collaborator

@MarkDaoust MarkDaoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you run the command to generate the ipynb and md files, and upload the result?

Should be:

cd scripts 
python autogen.py add_guide keras_cv/object_detection_keras_cv

@ImenMasmoudiEm
Copy link
Author

Can you run the command to generate the ipynb and md files, and upload the result?

Should be:

cd scripts 
python autogen.py add_guide keras_cv/object_detection_keras_cv

I am trying to do this but it's giving me this error:

Using TensorFlow backend
'black' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
'black' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
Using working_dir: tmp_3911446
'jupyter' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
Traceback (most recent call last):
File "C:\Users\Lenovo\Desktop\Keras-io\keras-io\scripts\autogen.py", line 1149, in
keras_io.add_guide(
File "C:\Users\Lenovo\Desktop\Keras-io\keras-io\scripts\autogen.py", line 305, in add_guide
tutobooks.py_to_md(py_path, nb_path, md_path, img_dir, working_dir=working_dir)
File "C:\Users\Lenovo\Desktop\Keras-io\keras-io\scripts\tutobooks.py", line 283, in py_to_md
nb_to_md(nb_path, md_path, img_dir, working_dir=working_dir)
File "C:\Users\Lenovo\Desktop\Keras-io\keras-io\scripts\tutobooks.py", line 275, in nb_to_md
raise RuntimeError(
RuntimeError: An error was encountered when attempting to run the notebook. See logs for details.

I usually work locally on my laptop on Pycharm, so I don't have a lot of experience with these errors, what can I do to generate the files and fix the error? Could you guide me through this, please?

@MarkDaoust
Copy link
Collaborator

Mainly it looks like your local environment is missing some of the packages that tool requires.

Try installing them first:

pip install black
pip install jupyter

If that doesn't work, since this is a small change, you could manually edit the guides/md/keras_cv/object_detection_keras_cv.md and guides/ipynb/keras_cv/object_detection_keras_cv.ipynb files.

@MarkDaoust
Copy link
Collaborator

Hi again, it looks like this was fixed by: #1478

I'm closing this, but thanks for taking the time to send a PR.

@MarkDaoust MarkDaoust closed this Aug 11, 2023
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.

2 participants