2

I am new to ML and image classification. I am working on a multi-label image classification problem. My model has 3 inputs and 3 outputs. I am using Keras functional API and cifar100 data set to test the model.

Note: my model takes both the image and labels as inputs.

Input image(x) has a shape of (50000, 32, 32, 3) y_label_fine is the binary class matrix of the fine classes (100 classes) of the CIFAT100 dataset. y_label_coarse is the binary class matrix of the coarse classes (100 classes) of the CIFAT100 dataset.

model = keras.Model(
    inputs= [x_input, y_label_fine, y_label_coarse],
    outputs= [predict_label_fine, predict_label_coarse, resonstructed_image],
    name='model')
model.summary()

I can train the model and predict using model.fit.

history = model.fit(x=[x, y1, y2],
                    y=[y1, y2, x],
                    batch_size = 50,
                    epochs = 100,
                    validation_data=([x_test, y1_test, y2_tets],
                                    [y1_test, y2_tets, x_test]),
                    callbacks = [tb, log, checkpoint, lr_decay],
                    verbose=1,)

PROBLEM:

  1. I want to use Keras ImageDataGenerator for this model. I tried looking for tutorials and examples but all I have found is for single input/output.
  2. Also I want to apply Mixup and CutMix for this model.

It will be a great help if anyone can guide me through the process or share a similar solution. Thanks.

tasrif
  • 78
  • 8

0 Answers0