tensorflowkerasdeep-learningconv-neural-networkmultilabel-classification

How to implement Multi label classification with train, validation and test images with Densenet/ResNet


I am working on Multi-Label Image classification using a dataset having 14,720 training images. I need to implement it using ResNet/DenseNet. I trying to work on it. Could you please suggest me a reference to move forward.


Solution

  • For creating a multi-label classification problem, you have to bear in mind two different crucial aspects:

    1. The activation function to be used is sigmoid, not softmax (like in the multi-class classification problem).
    2. A correct label would be of the form [1,0,1,0,0]; practically, since we have a multi-label, we do not have the mutual exclusiveness case (in fact, that is the explanation, a more mathematically complex one for choosing sigmoid and not softmax, with regard to Bernoulli Distributions).

    You can have a look here on how to create a multi-label classification problem in Keras:

    https://www.pyimagesearch.com/2018/05/07/multi-label-classification-with-keras/