## 3 Methods and Materials
### Application Logic Unit Layer
#### 3.4.1 YOLO Deep Neural Network  
In this paper, we use the _YOLOv2_ convolutional neural network to realize the conceptual _Object Recognizer_, which permits identifying multiple objects and tracking them over different frames. _YOLOv2_ belongs to a broader class of algorithms note in literature as _Artificial Intelligence_ algorithms. The latter are used to extract particular features from images to trace an area of interest on different frames [13]. Generally, the most common AI approach for image recognition are based on the use of _Convolutional Neural Networks_ (CNNs) followed by a _Fully-Connected Feed-forward Neural Network_ (FCFNN). CNNs are networks used to extract features from images by performing the convolution among some trainable filter kernels, with fixed geometric sizes, and the given image. The outputs of a CNN layer are K features maps, where K is the number of the filters in that layer. The dimension of the output depends on the image size, the stride value and the size of the filter. The FCFNN is another topology of neural network composed by several layers, containing neurons. Each neuron of a layer is connected with all those that belong to the next one. A FCFNN is mainly used to take the final decisions or to assign a specific label to the output. Furthermore, the neurons execute an activation function over the sum of the linear combination of the inputs. For multi-class classification problems, the activation function of FCFNN layers is generally a _ReLU_[14]. The _Softmax_ layer is generally used to obtain the probability for each class of the output of the network. This probability is estimated as described by Equation (1):  
\[p(j)=\frac{e^{o(j)}}{\sum\limits_{i=0}^{N-1}e^{o(i)}} \tag{1}\]  
where \(p(j)\) is the probability for the input to contain the class \(j\) and \(o(j)\) is the \(j\)th element of the output layer. Each layer needs a training phase to tune its weights in order to classify the input features. This is made by a supervised approach, which uses a set of ordinate input/output couples, called _training set_. The network training is performed by executing some algorithms as _Descendent Gradient_[15] or Back Propagation_[16]. Such algorithms compare the training set outputs with the one generated by the network with the correspondent inputs. The comparison produces an error calculated by using a particular _loss function_. The error value is used to update the weights at each step. For our aims, the AI algorithm shall provide the coordinates of the recognized objects in the camera frame. To do that, different approaches exist. _R-CNNs_[17] offer the best accuracy on the positioning and the recognition of the objects. The major problem of _R-CNN_ is the necessary depth of the network. In fact, to reach high accuracy, deep networks are necessary with reduction of the frame rate [18]. To overcome the problem of the low number of frame rates, there are some solutions: the _fast R-CNNs_[19] and _faster R-CNNs_[20]. Despite the improvement offered by the networks, the performances provided are not sufficient for our purposes, because the neural network shall act as objects recognizer and tracker. Indeed, the _faster R-CNNs_, which reach 17 Frames Per Second (FPS), also do not allow controlling the manipulator in a smooth way, introducing some non-predictable movements that affect the functionality of the _IBVS_ and the _Kalman_ filter. We also considered the possibility of a machine learning approach, as described in our previous papers [8; 9]. Nevertheless, the execution time required by algorithms such as _SIFT_[21] on _Raspberry PI 3_ is higher than a CNN approach. For the same reason, some other approaches based on CNNs, such as _key-points_ network [22], are not feasible. Indeed, they require more computational power owing to the complexity of the network. Furthermore, the difficulties to reconstruct some objects shape, such as a lift button, starting from their key-points are higher than using a simpler bounding box approach.