This chapter introduces a family of machine learning models called artificial neural networks (ANNs), or sometimes just neural networks. A key characteristic of these models is that they attempt to learn relationships among variables in a multi-layered fashion; they learn multiple functions to predict intermediate results before combining these into a single function to predict something meaningful (such as the class of an object). Recent versions of OpenCV contain an increasing amount of functionality related to ANNs – and, in particular, ANNs with many layers, called deep neural networks (DNNs). We will experiment with both shallower ANNs and DNNs in this chapter.
We have already gained some exposure to machine learning in other chapters – especially in Chapter 7, Building Custom Object Detectors, where we developed a...