How to create a Image Dataset just like MNIST dataset?
<p>I have 10000 BMP images of some handwritten digits. If i want to feed the datas to a neural network what do i need to do ? For MNIST dataset i just had to write</p>

<pre><code>(X_train, y_train), (X_test, y_test) = mnist.load_data()
</code></pre>

<p>I am using Keras library in python . How can i create such dataset ?</p>

<p>You can either write a function that loads all your images and stack them into a numpy array if all fits in RAM or use Keras ImageDataGenerator (<a href="https://keras.io/preprocessing/image/" rel="nofollow">https://keras.io/preprocessing/image/</a>) which includes a function <code>flow_from_directory</code>. You can find an example here <a href="https://gist.github.com/fchollet/0830affa1f7f19fd47b06d4cf89ed44d" rel="nofollow">https://gist.github.com/fchollet/0830affa1f7f19fd47b06d4cf89ed44d</a>.</p>

python image-processing dataset neural-network keras