keras same image augmentation to both X and Y

484 views
Skip to first unread message

yarin0...@gmail.com

unread,
Mar 30, 2017, 12:25:57 PM3/30/17
to Keras-users
Hello everybody,
The problem i wanna solve include image segmentation. Therefore, the same augmentation that randomed for an original image must be the same for the image-target.

For example, when generating new instance of image with vertical-flip the same operation should be done for the target image which consists with the true segmentation pixel-wise.

Is there an easy way to make that with keras?

Much thanks!

james.g...@gmail.com

unread,
Mar 31, 2017, 8:35:35 AM3/31/17
to Keras-users, yarin0...@gmail.com
Keras does have the functionality to do what you are looking for.

You can have an imagedatagenerator for both the original image and the segmented mask.
If you go that way, I would suggest writing the files to disk in a test run to confirm that you are doing what you think you are doing.

I found that it is best it to write your own generator and have complete control.
You can look in to the keras source code for an example.

Joe

unread,
Apr 5, 2017, 5:31:21 AM4/5/17
to Keras-users, yarin0...@gmail.com
Reply all
Reply to author
Forward
0 new messages