How to load images dataset from CSV with preprocess?

Viewed 23

I have a CSV file with images paths and associate classes. I would like to import them into a dataset (or a generator) to use it in a neural network. Everybody shows the flow_from_dataframe() function from Keras but I would like to apply transformations to some pictures (depending of their names).May I achieve this with the parameters ? Is it possible to achieve this after calling the function ? Is there another Keras function to do this ? So, what's the best way to achieve this ?

(the code with flow_from_dataframe() :)

datagen = ImageDataGenerator(rescale=1./255)
train_generator = datagen.flow_from_dataframe(
    pd.read_csv(dataset_file_path),
    x_col="filename",
    y_col="class")
0 Answers
Related