我正在尝试使用 Keras 进行语义分割,并且在尝试加载图像时,我使用flow_from_directory
方法得到了这个错误。
Found 0 images belonging to 0 classes.
Found 0 images belonging to 0 classes.
这是我的代码。
from tensorflow.keras.applications.resnet50 import preprocess_input
from tensorflow.keras.preprocessing.image import ImageDataGenerator
data_generator = ImageDataGenerator()
train_generator = data_generator.flow_from_directory(
directory="../input/Training_dataset/Images",
target_size=(IMG_SIZE, IMG_SIZE),
batch_size=16,
class_mode=None,
classes=None
)
mask_generator = data_generator.flow_from_directory(
directory="../input/Training_dataset/Masks/all",
class_mode=None,
classes=None,
batch_size = 1,
)
我已阅读此问题,但解决方案对 Keras 的语义分割不起作用,flow_from_directory() 错误