Low accuracy but overfitting?

That is exactly what I’ve been doing to generate preprocessed images to inspect. I’m just not sure how to get the summary statistics from the generator. You can see my code below - the shuffle=True is temporary, so I get most of the plankton types in the first 3 batches.

def get_batches(dirname, temp_dir=None, augment=True, shuffle=True):
    if augment:
        gen = image.ImageDataGenerator(rotation_range=360,
                                       width_shift_range=0.05,
                                       height_shift_range=0.05,
                                       shear_range=0.10,
                                       zoom_range=0.3,
                                       rescale=1./255,
                                       horizontal_flip=True,
                                       vertical_flip=True)
    else:
        gen = image.ImageDataGenerator(rescale=1./255)

    return gen.flow_from_directory(dirname,
                                  target_size=(224,224),
                                  class_mode='categorical',
                                  color_mode='grayscale',
                                  shuffle=shuffle,
                                  save_to_dir=temp_dir,
                                  batch_size=batch_size)

batches = get_batches(train_path, temp_dir=temp_path)
val_batches = get_batches(valid_path, temp_dir=temp_path2, shuffle=True, augment=False)

for i in range(3):
    batch = batches.next() # save 3 batches of images
    val_batch = val_batches.next()


plots([image.load_img(os.path.join(temp_path, img)) for img in random.sample(os.listdir(temp_path), 8)])
plots([image.load_img(os.path.join(temp_path2, img)) for img in random.sample(os.listdir(temp_path2), 8)])