Deep Learning: when the solution is a neural network

Deep Learning aims to replicate the human learning process within a computer system. The software tool designed to achieve this ambitious goal is called a neural network, analogous to the biology of the human brain. The latter is composed of a set of artificial neurons, each of which is specialized in the study of certain characteristics of the input (for example the various directions of the edges, particular recurring shapes…).

Neurons are divided into successive layers. Within each layer, each neuron works individually, receiving the processing carried out in the previous layer. Once their analysis has been carried out, the neurons transfer the output to the components of the next layer. The method of information exchange and processing within each layer is determined by a mathematical operation.

The subsequent processing of the data allows the analysis of increasingly complex characteristics as the information progresses through the layers, thus allowing different information to be assembled together and returning an answer to the user.

The first fundamental step is the choice between the multiple neural network models, which takes place on the basis on the type and difficulty of the task at hand. Once the type of software has been determined, it is necessary to study the most correct form of presenting the data to the neural network. Consequently, it is possible to proceed with the acquisition of the images, bearing in mind that the generalization capacity of the neural network is greater the more the data represent a broad spectrum of all possible cases.

The final phase for the preparation of the material is the assignment to each image of the “truth“, that is, the response we would like to receive from the neural network. This procedure is also called “labelling” and the new data is called “labelled images“.

The first phase is dedicated to the training; in this stage the neural network exploits all the information present in the labelled data to learn concepts useful for solving the task.
Learning evolves thanks to the modification of the processing that occurs in each neuron and this variation is aimed at minimizing errors.
The duration of this phase can vary from a few hours, to days or weeks.

The next step is dedicated to verifying what the network has learned. It is possible to judge the neural network by viewing the results it presents following the processing of new images. During this phase, the passage of data along the network occurs very quickly, as the neurons apply what they have already learned without having to investigate new aspects.
If it is decided to improve its performance, it is necessary to perform an analysis of the most frequent errors in order to highlight the characteristics and particularities that mislead the neural network. Based on what is found, it is possible to introduce adequate improvement strategies.

One of the main advantages of Deep Learning is having developed techniques that make learning possible for the machines. By learning the basic idea of the concepts, the machine is able to manage the various sub-cases that arise. This leads to an exponential decrease in the code that needs to be written.

The training of a neural network requires a large number of images that must be labelled, i.e. associated with the information that the network must learn. For example, images of defective products must be labelled with the class of non-compliance or with the coordinates of regions in the image that highlight the defect.

Another obstacle is the user’s inability to intervene during the training. This feature leads neural network programmers to gain specific experience in optimizing the training phases and times of the networks they implement.

In the research aimed at industrial application and oriented to a real performance on the customers’ production lines, Specialvideo has also created vision systems that include both neural networks and traditional algorithms. The resulting hybrid vision systems have capabilities based on the strengths of both types of software: reliability, precision and generalization.

The choice of hardware with a good performance is a key step in the design of a vision system based on neural networks.

During the training of any neural network, the use of a video card is preferable and sometimes necessary. However, it should be emphasized that this phase corresponds to the creation and preparation of the neural network that usually takes place at our headquarters.

No specific hardware is usually required for runtime execution, but the choice is made based on the desired performance.