title: Keras iterator with augmented images and other features
body: <p>Say you have a dataset that has images and some data in a <code>.csv</code> for each image.
  Your goal is to create a NN that has a convolution branch and another one (in my case an MLP).</p>
  <p>Now, there are plenty of guides (<a href="https://heartbeat.fritz.ai/building-a-mixed-data-neural-network-in-keras-to-predict-accident-locations-d51a63b738cf" rel="nofollow noreferrer">one here</a>, <a href="https://www.pyimagesearch.com/2019/02/04/keras-multiple-inputs-and-mixed-data/" rel="nofollow noreferrer">another one</a>) on how to create the network, that's not the problem.</p>
  <p>The issue here is how do I create an iterator in the form of <code>[[convolution_input, other_features], target]</code> when the <code>convolution_input</code> is from a Keras <a href="https://keras.io/preprocessing/image/" rel="nofollow noreferrer"><code>ImageDataGenerator</code></a> <a href="https://keras.io/preprocessing/image/#flow" rel="nofollow noreferrer">flow</a> that adds augmented images.</p>
  <p>More specifically, when the nth image (that may be an augmented one or not) is fed to the NN, I want its original features inside <code>other_features</code>.</p>
  <p>I found a few attempts (<a href="https://gist.github.com/L-Lewis/a34845b596c15dbb41ed34b9f3ff729b#file-traffic-model3-preparing-data-py" rel="nofollow noreferrer">here</a> and <a href="https://github.com/keras-team/keras/issues/3386" rel="nofollow noreferrer">here</a>, the second one looked promising but I wasn't able to figure out how to handle augmented images) in doing exactly that but they do not seem to take into account the possible dataset manipulation that the Keras generator does.</p>