0

I use tf.keras.utils.image_dataset_from_directory to create an Import Lane to my NN. Importing the image using the right split and lable works without any issues as long as I only have either portrait-images or langscape-images.

image_dataset_from_directory automatically scales the images to the specified image_size = (widht,height), which is nice if all images have the same orientation. Not so if some are landscape and some are portrait.

How can I use image_dataset_from_directory with mixed image orientations?

Currently I use a separate folder for portrait and landscape generating different batchdata and switching by chance between landscape and portrait during training loop. Yet I hope there is somehow a better solution.

I am open for all proposals

Florian
  • 11
  • 1
  • 3

0 Answers0