In a similar fashion to the previous script, image classification using the OpenCV CNN module using GoogLeNet and Caffe pre-trained models is performed in the image_classification_opencv_googlenet_caffe.py script.
The output of this script can be seen in the following screenshot:
As shown in the previous screenshot, the top prediction corresponds to a church with a probability of 0.9082632661.
The top 10 predictions are as follows:
- 1. label: church, probability: 0.9082632661
- 2. label: bell cote, probability: 0.06350905448
- 3. label: monastery, probability: 0.02046923898
- 4. label: dome, probability: 0.002624791814
- 5. label: mosque, probability: 0.001077500987
- 6. label: fountain, probability: 0.001011475339
- 7. label: palace, probability: 0.0007750992081
- 8. label: castle, probability: 0.0002349214483
- 9. label: pedestal, probability: 0.0002306570677
- 10. label: analog clock, probability: 0.0002107089822