I wanted to change label from multi class to binary class (0,1) eg. class 1 or the rest. Is there any way to change the label with tf.keras.utils.image_dataset_from_directory
My image are in structure like this
class 1
image1
image2
…
class 2
image1
image2
…
…
class 100
image1
image2
…
my code:
train_dataset = tf.keras.utils.image_dataset_from_directory(train_dir,
shuffle=False,
batch_size=batch_size,
image_size=imgage_size,
labels = ‘inferred’,
seed = 1
)