Detect multiple classes in an image? I have a deep neural network trained with data of different kinds of fruits (apples, oranges, guava, pear, etc.). In my testing data, I have multiple fruits in the same image. For example, an image may be both apple and oranges. Will my neural network be able to recognize that multiple fruits are in the image? Can it tell me which fruits are in the image? Also, can my neural network tell me that the image has apples and oranges? The number of fruits in each image also varies. Some images have two kinds of fruits, some have three. 
 A: This seems to be a case where the design of the network can make a big difference in how well it can solve a problem.
Consider this contrast of two networks. 
Network 1 has a softmax activation on the final layer. The softmax function returns a probability vector: all elements are non-negative and sum to 1. So one example of a softmax output is $[0.7, 0.1, 0.2]$, which strongly predicts the class indexed as 0. In this case, we're modeling mutually exclusive outcomes; the goal is to have the predictions match whatever single object is in the image.
By contrast, Network 2 has sigmoid activations in the final layer. Each element of the prediction vector is in the interval $[0,1]$, so each element is a probability. One example of a sigmoid output vector is $[0.7, 0.6, 0.01]$. This isn't a probability vector, because the sum of the elements exceeds 1. These also aren't mutually exclusive outcomes. However, we can interpret this as giving the probability that an element is in the image. So this example predicts that the image contains class 0 with probability 0.7 and class 1 with probability 0.6. 
My recommendation would be to use sigmoid activations in the final layer, since you can have 2 or more objects appear together in an image and you want to predict all of them in any combination.
A: Most likely, yes, a neural network can identify multiclass images. However, it might not be so straightforward. For example: say you have trained your NN to detect 3 possible fruits: passion fruit, pomegranate and guava. So you have 3 real-valued output neurons. If you show a picture with only one guava, the output can possibly be something like:
G: 0.7
P: 0.4
PF: 0.1
This indicates that there is at least one guava, and there isn't a passion fruit. But it's not clear as for the pomegranate. You have to set a detection threshold. 
