Hi, I am trying to create a CNN to classify images with multiple labels.
Labels are of the form:
[0., 0., 0., 0., 0., 0., 0., 0., 0.5000, 0., 0., 0., 0., 0., 1., 0., 0., 0.,1., 0.]
where 0 represents no appearance of the category, 0.5 represents an appearance that is hard to identify and 1 represents a clear appearance of the category in the image.
The data is imbalanced:
image_2020-11-04_110316957×454 15.3 KB
I have tried training with all categories and also with the ‘person’ category removed but in both examples the model performs fairly poorly either by nearly always placing the highest probability on ‘person’ or if person is removed it tends to place the highest probability on the same few categories regardless of image:
image_2020-11-04_111831647×778 118 KB
I semi adapted the network layers from a tutorial for binary classification but I think the design is not optimal, I am hoping someone can give me some advice on a better network design. This is what I am currently using:
image_2020-11-04_111139847×603 27.9 KB
and this is my training loop:
image_2020-11-04_111254664×890 28 KB
I am also unsure of the best way to evaluate the model on the validation set. Currently I am calculating the euclidean distance between the output and label vector and calculating the total mean distance but I feel like there should be a better way for multi-label data.