On the Wolfram Neural Net Repository, there are several models trained to identify the main object in an image. Here is one model trained on the ImageNet classification dataset:
In its original state, it is not good at differentiating a camel (two humps) from a dromedary (one hump) because only one animal is present in the ImageNet training data:
In[2]:=
net
,
,"TopProbabilities"
Out[2]=
dromedary
0.999999,
dromedary
0.980626
The model can be retrained to perform better on this specific task. To do the retraining, remove the final classification layers and replace them with a two-class classifier:
Using the same procedure, retrain three other classification architectures trained on ImageNet and compare the accuracy of classification.
Out[8]=
InceptionV1
InceptionV3
ResNet-50
ResNet-101
For a simple task like this, the accuracy is similar and there is no need for the more powerful and slower models. The small ResNet is a good tradeoff between accuracy and speed: