image_dataset_from_directory

18 views
Skip to first unread message

Felix Neutatz

unread,
Sep 2, 2021, 3:49:21 AMSep 2
to Discuss
Dear all,

I have a question regarding the function image_dataset_from_directory():

valid = tf.keras.preprocessing.image_dataset_from_directory(
                    'path',
                    labels="inferred",
                    label_mode="categorical",
                    class_names=["i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix", "x"],
                    shuffle=False,
                    seed=123,
                    batch_size=100000,
                    image_size=(32, 32),
                )

predictions = model.predict(valid)

Is there a way to trace back from the prediction to the original image name? For instance, the prediction in row 2 belongs to path/i/image5.png.

Thank you for your help.

Best regards,
Felix
Reply all
Reply to author
Forward
0 new messages