keras-team / autokeras

AutoML library for deep learning
http://autokeras.com/
Apache License 2.0
9.12k stars 1.4k forks source link

Feature: image_dataset_from_directory support one_hot/categorical labels #1872

Open skyetomez opened 1 year ago

skyetomez commented 1 year ago

tensorflow keras has this built in but it not available currently.

Code Example

ak.keras.utils.image_dataset_from_directory(
    directory,
    labels='inferred',
    label_mode='int',
    class_names=None,
    color_mode='rgb',
    batch_size=32,
    image_size=(256, 256),
    shuffle=True,
    seed=None,
    validation_split=None,
    subset=None,
    interpolation='bilinear',
    follow_links=False,
    crop_to_aspect_ratio=False,
    **kwargs
)

Reason

This would make using he ak generator of image datasets from a directory more convenient