Issue with download_and_resize_image

Hello

I have a question regrading the C3_W2_Lab_2_Object_Detection.ipynb.

I can run the code with the images specified in the code. However, when I try to use different images, I will get the following error after running the download_and_resize_image. The error is:

UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x79620133b420>

How i can fix the error?
Thank you for your help in advance,
Behnam

1 Like

Hi,

This error is typical when you have images with 0 bytes or in a bad format. Are you sure the images you are using are in a compatible format?

I have no other idea, sorry, if you want share the images you want to upload, and I will check if I’having the same problem.

Regards,

1 Like

The assignment setup files will have metadata related to selected images programmes to this assignment. Using different images or your own images will always create such error as one would need to check other files to update accordingly for you to run the model algorithm based on the image detection you want to do on the files other than required by the assignment files.

Hello,
Thank you for your response.

I used this image which can found in this url:

https://commons.wikimedia.org/wiki/Category:1908_SAML_catalogo#/media/File:SAML_catalogo_1908.jpg

1 Like

Hi I put the link for the image that I used here:

I was wondering if there is a way to solve this issue.

Thank you.

1 Like

What format are these images?? Memory?

Here is the information for the image:

Original file ‎(555 × 786 pixels, file size: 42 KB, MIME type: image/jpeg

Can you share the screenshot of the cell where you getting this error with the error output.