Good model but bad confusion matrix?
I found the answer in https://stackoverflow.com/questions/55868975/keras-how-to-evaluate-model-accuracy-evaluate-generator-vs-predict-generator/57630536#57630536
I just had to add shuffle = False in the test_datagen.flow_from_dataframe, and the confusion matrix was good