I am really new to using tensorflow and working with CNNs. I'm trying to load my image dataset and resize and grayscale each image. I was reading documentation on TensorFlow Keras.preprocessing.image.directoryIterator. I tried it (code below) and it finds all my images but it doesn't actually save them or make any modifications to the images? Am I doing something wrong? I have this code by itself, so I'm not sure if I have to set anything else up to make this work. Any help is appreciated!! There is not much documentation or help on the internet unfortunately :(
Note: I have excluded my local file path where the images are contained - but I do actually have a legit path in my code. Also, the save_to_dir argument, Im not sure if it is just the directory name or a complete file path but I have tried both ways and they do not work.
image.DirectoryIterator(
'LOCAL FILE PATH', image_data_generator, target_size=(170, 170),
color_mode ='grayscale', classes =['Face', 'NonFace'], class_mode ="categorical",
batch_size=5, shuffle=True, seed=None, data_format ='channels_first',
save_to_dir = 'Test', save_prefix='Test_', save_format ='jpg',
follow_links=False, subset=None, interpolation='nearest', dtype=None)