This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
ImageDataGenerator.flow_from_dataframe() with class_mode='binary' can be affected by classname unexpectedly #289
Labels
image
Related to images
In binary class mode,
the class values of ImageDataGenerator.flow_from_dataframe() are affected by class name because class names are sorted automatically unexpectedly.
https://github.com/keras-team/keras-preprocessing/blob/0494094a3b/keras_preprocessing/image/dataframe_iterator.py#L252
Sorting is OK in categorical because order is not important.
But it is not OK in binary. because DataFrameIterator requires 2 classes for binary class mode.
And it generates single values depends on index of classes.
I could not determine it is bug or not, but I think sorting seems unnecessary on binary mode.
I expected classes are not sorted when I passed classes to argument.
Actual
Expected
The text was updated successfully, but these errors were encountered: