text_html_output_1.png
import tensorflow as tf

training_data_gen = tf.keras.preprocessing.image.ImageDataGenerator(rescale=1 / 255.0, rotation_range=40, zoom_range=0.2, width_shift_range=0.2, height_shift_range=0.2, shear_range=0.2, horizontal_flip=True, vertical_flip=True)
training_generator = training_data_gen.flow_from_dataframe(dataframe=train, x_col='images', y_col='labels', target_size=(224, 224), color_mode='rgb', class_mode='categorical', batch_size=64)
val_data_gen = tf.keras.preprocessing.image.ImageDataGenerator(rescale=1 / 255.0)
validation_generator = val_data_gen.flow_from_dataframe(dataframe=val, x_col='images', y_col='labels', target_size=(224, 224), color_mode='rgb', class_mode='categorical', batch_size=64)
test_data_gen = tf.keras.preprocessing.image.ImageDataGenerator(rescale=1 / 255.0)
test_generator = test_data_gen.flow_from_dataframe(dataframe=test, x_col='images', y_col='labels', target_size=(224, 224), color_mode='rgb', class_mode='categorical', batch_size=64)