data_dir = '/home/silverlight/Projects/signs_dataset'
class_names = ['alert_100', 'alert_120', 'alert_50', 'alert_60', 'alert_70', 'alert_80', 'end_speed']
img_height = 180
img_width = 180
3. Convert data into 2 type of data. 80% for training and 20% for validation
train_ds = tf.keras.preprocessing.image_dataset_from_directory(
data_dir,
validation_split=0.2,
subset='training',
seed=123,
image_size=(img_width, img_height),
batch_size=batch_size
)
val_ds = tf.keras.preprocessing.image_dataset_from_directory(
data_dir,
validation_split=0.2,
subset="validation",
seed=123,
image_size=(img_width, img_height),
batch_size=batch_size)
You need to login in order to like this post: click here
YOU MIGHT ALSO LIKE