Hi Vijayabhaskar, I have modified the code like you suggested but now I am getting ‘Found 0 images’ message while for training and validation set getting ‘Found 4655 images belonging to 2 classes’ and ‘Found 1551 images belonging to 2 classes.’ respectively.

Could you please suggest what I wrong with this code. I am sure that directory is correct because C:/Users/chetan/images_train/ is working fine train and validation.

test_datagen = ImageDataGenerator(rescale=1./255.)

test_generator = test_datagen.flow_from_dataframe(dataframe=test_df,
directory=’C:/Users/chetan/images_test/’,
x_col=”id”,
y_col=None,
has_ext=False,
subset=’validation’,
batch_size=32,
seed=42,
shuffle=False,
class_mode=None,
target_size=(64,64))

Image for post
Image for post

Thanks a lot !

Data Science | Machine Learning | Python. Visit https://pythonsimplified.com/ for interesting articles on Python and Machine Learning

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store