我尝试使用keras.ImageDataGenerator.flow_from_dataframe,但它无法检测到验证图像,我得到了这个
找到 162770 个经过验证的图像文件名。
找到 0 个经过验证的图像文件名。
谁能帮帮我
我的代码在这里:
traindf=pd.read_csv('E:/color.csv')
columns=["Black", "White", "Red", "Blue", "Green", "Brown", "Yellow"]
datagen=ImageDataGenerator()
train_generator=datagen.flow_from_dataframe(
dataframe=traindf,
directory="E:/Experimental_Data",
x_col="image_id",
y_col=columns,
subset="training",
batch_size=32,
seed=42,
shuffle=True,
class_mode="raw",
target_size=(178,218))
test_datagen=ImageDataGenerator()
valid_generator=test_datagen.flow_from_dataframe(
dataframe=traindf,
directory="E:/Experimental_Data",
x_col="image_id",
y_col=columns,
subset="validation",
batch_size=32,
seed=42,
shuffle=True,
class_mode="raw",
target_size=(178,218))