How do I process a set of images for a neural network? : <p>So this is my first time branching away from the mnist data set so i'm wondering how I should go about processing the images. </p>

<p>Currently, I have a folder filled with images and a list of labels. I'd like to read the images into an array that will be fed into my CNN. </p>

<p>Here is how I think this should be done:</p>

<pre><code>from PIL import Image
from numpy import array
for i in image_list:
  img = Image.open("i")
  training_set.append(array(img))
</code></pre>

<p>I'm not sure if this is the most effective way to do this. Any feedback would be much appreciated. </p>
