[英]Keras not finding images through 'flow_from_dataframe'
I'm trying run a ImageDataGenerator using the code below but I keep running into the error;我正在尝试使用下面的代码运行 ImageDataGenerator,但我一直遇到错误;
"Found 0 validated image filenames." “找到 0 个经过验证的图像文件名。”
The most obvious point would be an error in the paths (directory and x_col) but I'm able to read the files using imageio/pydicom with the corresponding paths from the code below.最明显的一点是路径(目录和 x_col)中的错误,但我可以使用 imageio/pydicom 和下面代码中的相应路径读取文件。 Another point could be the fact that I am trying to read Dicom (DCM) images but I cannot find a source to substantiate this probability.另一点可能是我正在尝试读取 Dicom (DCM) 图像,但我找不到证实这种可能性的来源。
I have been trying solutions for the last hour and am starting to get slightly frustrated.过去一个小时我一直在尝试解决方案,但开始有点沮丧。 What am I missing?我错过了什么?
train_data = train_data_generator.flow_from_dataframe(
dataframe = data_input,
directory = input_dir_im,
x_col = 'path',
y_col = class_list,
target_size = input_tensor,
color_mode = 'grayscale',
batch_size = batch_size,
shuffle = False,
class_mode = 'raw',
)
就像@Dr.Snoopy 指出的那样,Keras 仅支持标准图像文件格式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.