belos is my code to ensure that the folder has images, but tf.keras.preprocessing.image_dataset_from_directory returns no images found. What did I do wrong? Thanks.
DATASET_PATH = pathlib.Path('C:\\Users\\xxx\\Documents\\images')
image_count = len(list(DATASET_PATH.glob('.\\*.jpg')))
print(image_count)
output = 2715
batch_size = 4
img_height = 32
img_width = 32
train_ds = tf.keras.preprocessing.image_dataset_from_directory(
DATASET_PATH.name,
validation_split=0.8,
subset="training",
seed=123,
image_size=(img_height, img_width),
batch_size=batch_size)
output:
Found 0 files belonging to 0 classes.
Using 0 files for training.
Traceback (most recent call last):
File ".\tensorDataPreProcessed.py", line 23, in <module>
batch_size=batch_size)
File "C:\Users\xxx\Anaconda3\envs\xxx\lib\site-packages\tensorflow\python\keras\preprocessing\image_dataset.py", line 200, in image_dataset_from_directory
raise ValueError('No images found.')
ValueError: No images found.