Prediction: different results with ImageDataGenerator and single image

Hello,
I have trained a CNN and tried to make predictions. I used ImageDataGenerator to create a prediction-iterator. Then I used probabilities = model.predict(prediction_iterator) and got the following results, which seem to be correct:

image

However, this method processes an entire subdirectory filled with images. Therefore I tried to process a single image. But then I always get the same value when executing probabilitiy = model.predigt(single_image).

image

Does anyone have any suggestions why this could be?

Thanks in advance.
Jonathan

@Jonathan_Seidel,

Welcome to the Tensorflow Forum!

How did you preprocess the images?

Please share a minimum reproducible code to reproduce your problem.

Thank you!

1 Like