0

I am newbie in ML and Deep Learning and am currently working on Jupyter notebook.

I have an image dataset in the form of a zip file containing nearly 28000 images downloaded on my desktop. However, I am not being able to find any code that will make Jupyter notebook unzip the file and read it, so I'm able to work with it and develop a model.

Any help is appreciated!

  • The best way to do this is with a generator that streams the images from the directory. That way you don't have to load them all into memory. Keras has some great tools for this. This is a good tutorial on how to do that : https://medium.com/@vijayabhaskar96/tutorial-image-classification-with-keras-flow-from-directory-and-generators-95f75ebe5720 – SimonR May 22 '20 at 15:38
  • Does this answer your question? [Unzipping files in Python](https://stackoverflow.com/questions/3451111/unzipping-files-in-python) – alift May 22 '20 at 16:26

1 Answers1

0

Are these threads from the past helpful?

If you go the directory route, a friendly reminder that you'll need to update the code in each example to match your directory structure. E.g. if you want to save images to and read images from a directory called "image_data", then change the code examples to unzip files into that directory and read images from that directory.

Lastly, for finding out what files are in a directory (so that you can read them into your program), see this thread answering the same question.

Joshua Koh
  • 90
  • 5