title: Tensorflow object detection api: how to use imgaug for augmentation?
body: <p>I've been hand-rolling augmenters using <a href="https://github.com/aleju/imgaug" rel="nofollow noreferrer">imgaug</a>, as I really like some of the <a href="https://stackoverflow.com/questions/44906317/what-are-possible-values-for-data-augmentation-options-in-the-tensorflow-object">options that are not available in the tf object detection api</a>. For instance, I use motion blur because so much of my data has fast-moving, blurry objects.</p>
  <p>How can I best integrate my augmentation sequence with the api for on-the-fly training?</p>
  <p>E.g., say I have an augmenter:</p>
  <pre><code>aug = iaa.SomeOf((0, 2), 
                   [iaa.Fliplr(0.5), iaa.Flipud(0.5), iaa.Affine(rotate=(-10, 10))])
  </code></pre>
  <p>Is there some way to configure the object detection api to work with this?</p>
  <p>What I am currently doing is using <strong><code>imgaug</code></strong> to generate (augmented) training data, and then creating <strong><code>tfrecord</code></strong> files from each iteration of this augmentation pipeline. This is very inefficient as I am saving large amounts of data to disk rather than running augmentation on the fly, during training.</p>