Multiple labels to one image

I want to predict, on the same image, number of people present and state of the weather (sunny, cloudy, raining).
The dual output should be easy to implement. What I do not know is how to input labels for the training set. In other words, how to associate two (or more) labels to an image on input.
I have a training set of images, and the corresponding labels (# of people, state of the weather) in a numpy array with two columns. How to associate them on input? Can tf.keras image_dataset_from_directory be used?
Or??
Thanks for helping

I think this is a good starting point. You can specify multiple input/output as follows.

Manipulate complex graph topologies

Models with multiple inputs and outputs

For model.compile

model.compile(
    optimizer=keras.optimizers.RMSprop(1e-3),
    loss=[
        keras.losses.BinaryCrossentropy(from_logits=True),
        keras.losses.CategoricalCrossentropy(from_logits=True),
    ],
    loss_weights=[1.0, 0.2],
)

For model.fit

# Dummy input data
title_data = np.random.randint(num_words, size=(1280, 10))
body_data = np.random.randint(num_words, size=(1280, 100))
tags_data = np.random.randint(2, size=(1280, num_tags)).astype("float32")

# Dummy target data
priority_targets = np.random.random(size=(1280, 1))
dept_targets = np.random.randint(2, size=(1280, num_departments))

model.fit(
    {"title": title_data, "body": body_data, "tags": tags_data},
    {"priority": priority_targets, "department": dept_targets},
    epochs=2,
    batch_size=32,
)

Thanks Nobu. Right. I was reading the tf documentation and thinking how to input my targets. I believe I can do it with loadtxt. Working on it…