Question about setting up image lable

image_dataset_from_directory is powerful,
Folders name alpaca and not alpaca, image_dataset_from_directory will set the label of the image according to the name? Am I correct?

When in doubt, it never hurts to read the documentation. By default it uses labels from 0 to n - 1 mapping those to the directory names in alphabetical order. But you can also explicitly specify the labels if you prefer, as described on the doc page.

1 Like