How many images can be trained in Google Colab?
The real problem is that you should not try to fit all your images in memory. Instead, you should small groups of images, normally called &quot;minibatches&quot;, which can fit in the GPU/CPU memory.
For that, tensorflow offers the function tf.keras.preprocessing.image_dataset_from_directory that loads images from a directory. I suggest you take a look at Tensorflow's tutorial for image loading, which guides you to the image loading process, as well as the training of a model with those images.