# Data augmentation from directory and oriented features with Keras

Let this, be a dataset labeling the head pose for each photo:

image_path, head_pose
---------------------
michael/01-right.png, right
donie/01-right.png, right
lea/01-left.png, left
jack/01-up.png, up
(...)


The dataset is too big to be load at once but a data frame containing the above information is manageable (ie, not loading the images). Using Keras, I was thinking of creating my own DataGenerator in order to load the images batch by batch.

Then using ImageDataGenerator I can augment each batch. But I'd like to know when a horizontal flip is done because I want to change the associated prediction. Like if the person was facing her left, the expected class should be right and left if the image is flipped. Maybe extending the ImageDataGenerator ?

What's the best way to handle that with Keras ?