1
votes

I am trying to do multi-class multi-label image classification using Convolutional Neural Network.

For the training process, I plan to use one-hot labelling to prep my labels. For example there's a total of 8 classes, and a sample image can be classified as classes 2, 4, and 6. Hence the label would look like

[0 1 0 1 0 1 0 0]

However, the input pipeline of the model I'm currently piggybacking on does not take in training data with multiple label. Instead of modifying the input pipeline for the model, my colleague suggested an alternative of duplicating the training data instead. Using the previous example, instead of feeding one training data with 3 labels, three duplicating training data with one label each will be fed instead. The three labels would look like

[0 1 0 0 0 0 0 0]

[0 0 0 1 0 0 0 0]

[0 0 0 0 0 1 0 0]

Given sufficient training data, would the model be able to learn to place more importance on the true values (ones) on the one-hot arrays instead of the false values (zeros)? Would the model be able to output proper multi-label data?

1

1 Answers

0
votes

You can train the network with multinominal logistic regression or sigmoid cross entropy loss instead of the usual softmax, without the need to duplicate the data and longer training. Here is a nice tutorial on multilabel image classification.