Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Keras ImageDataGenerator #48

Open
jakeret opened this issue May 8, 2017 · 0 comments
Open

Add support for Keras ImageDataGenerator #48

jakeret opened this issue May 8, 2017 · 0 comments

Comments

@jakeret
Copy link
Owner

jakeret commented May 8, 2017

Keras provides a nice API for loading and also transforming training and validation data. Maybe with a few tweaks this could be supported by tf_unet.

Example:

train_datagen = image.ImageDataGenerator(
    preprocessing_function=preprocess_input,
    rotation_range=30,
    width_shift_range=0.2,
    height_shift_range=0.2,
    shear_range=0.2,
    zoom_range=0.2,
    horizontal_flip=True,
    vertical_flip=True
)

train_generator = train_datagen.flow_from_directory(
  './data/food-101/train/',
  target_size=target_size,
  batch_size=32,
)

Afterwards the generator can be iterated indefinitely e.g. data, mask = next(train_generator).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant