Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
datagen = ImageDataGenerator(rescale=1./255, validation_split=0.1)
train_generator = datagen.flow_from_dataframe(
reduced_df,
directory="Indian Number Plates/",
x_col="image_name",
y_col=["top_x", "top_y", "bottom_x", "bottom_y"],
target_size=(WIDTH, HEIGHT),
batch_size=32,
class_mode="other",
subset="training")
validation_generator = datagen.flow_from_dataframe(
reduced_df,
directory="Indian Number Plates/",
x_col="image_name",
y_col=["top_x", "top_y", "bottom_x", "bottom_y"],
target_size=(WIDTH, HEIGHT),
batch_size=32,
class_mode="other",
subset="validation")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment