title: How to read all images in a folder efficiently?
body: <p>I have a folder. It contains approximately 30,000 images. I wish to read all these images, convert them to a 20×20×3 shape  and add them to a NumPy array. How do I do this in an efficient way without exhausting memory? Right now, I'm using a for loop to go through each image in the folder, read it with Sci-Kit Image and add it to an array. This is destroying my RAM and taking forever.</p>