I’m pretty new so sorry if my question is elementary.
I am trying to basally replicate the Fashion MNIST tutorial but with my own images. My own images are only in two classes: ‘candle’ and ‘no candle’.
I load my data using the following:
ds_train = tf.keras.preprocessing.image_dataset_from_directory(
‘C:/Users/Eric/Desktop/Candle Data’,
labels=‘inferred’,
label_mode=“int”,
color_mode=‘grayscale’,
batch_size=4,
image_size=(256, 256),
shuffle=True,
seed=123,
)
I think that this is an ok as far as how to load my images although I am not certain.
The image files are on my computer in two folders named: ‘Candle’ and ‘No Candle’ at the location above.
In the tutorial they define the following:
train_images and train_labels
Then the images and labels are used to make the model:
model.fit(train_images, train_labels, epochs=10)
I think that I have loaded the images to ‘ds_train’ but I don’t have the labels. When I created ‘ds_train’ I used the ‘infered’ labels but I don’t know if that created the necessary labels or not.
How should I define the labels for my images, or have I done this already?
Thank you for any help