1
$\begingroup$

I have created 22 different Convolutional neural networks that all test for the presence of unique objects in an image (each one of the classifiers is unique).

Each sample in the test set has the output of a 22-long vector that looks something like this [0, 1, 1, 0, 0, 1, ..., 1], the binary nature of the vector representing the presence/absence of specific objects.

I have implemented this already in keras and reach around 97% accuracy avg for the 22 models. Is there any specific ensemble methods that can allow me to combine all 22 classifiers?

$\endgroup$
2
$\begingroup$

I am new to AI but this is something I can think of. There might be other much better ways. Or even functions in scikit learn to do it

1) create a list of all the 22 models

2) iterate over the models one by one and use model.predict() for each model and store the hotencoded output to another list or numpy array.

3) Take average of the output list or numpy array.

4) since the output is a vector of 0,1 it is possible to get decimals in the output after taking avg. Round it off using the basic rules to either 0 or 1.

5) If your CNNs are very deep like inception v3, densenet etc. You might run into memory issues while loading all the 22 model's weights​ into the memory at once. So you can iteratively load the models in small fixed batches and use model.predict() on each model in the batch append the outputs to a list. and then clear them off the memory before loading another batch of models.

This is just my idea. I might be completely wrong also.

$\endgroup$
2
$\begingroup$

I think it is not a very good idea because Im pretty sure you used for learning all these 22 CNN same images and even same way for giving them a batches of images. So basically in a result you would have almost the same 22 classifiers.

$\endgroup$
1
$\begingroup$

For this task, I think you shouldn't use 22 different networks. Use only one. The last layer of the network should be a fully connected with 22 unit, each unit represents the presence of a unique object. The activation function for this layer is sigmoid which output a real number between 0 and 1. Each of these outputs represents how confident the network about the presence of that unique object.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.