5 Machine Learning for IoT
305
1
1
1
-1
-1
-1
0
0
0
0
30 30
30
30
30
30
30
30
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
*
=
Fig. 5.58 Convolution computation
function/value. In the convolution layer, several pixels are convoluted to form a
representative new value. The convolution layer takes two inputs, namely, input
(image) matrix and a filter (kernel). As an example, consider a 6 ∗ 6 image matrix
and a 3 ∗ 3 filter as shown in Fig. 5.58. Behind the scene, convolution is a dot product
of the filter with a local zone of the image matrix. Note that we need to slide/move
the filter across the whole matrix to be able to compute the output. The output
matrix is so-called feature map. It should also be noted that convolutional layers
are usually stacked on top of each other to detect more complex patterns and get indepth information. To make an analogy, the brain combines low-level features such
as basic shapes and curves and builds more complex shapes out of it. It first identifies
low-level features and then learns to recognize and combine these features to learn
more complicated patterns. These different levels of features come from different
layers of the network.
Convolution and filters are not a new concept, and indeed it was used in image
and signal processing for many years. Filters can be applied to extract features or
perform operations such as edge detection or image blurring (image smoothing).
In traditional image processing and signal processing, filters were mainly handengineered. However, CNN and deep learning technologies largely overcome the
need for prior knowledge and human effort in feature design, since they can learn
these filters/characteristics automatically [11, 16]. Let us take a closer look at edge
detection filters. To detect different types of edge, we apply different filters; some
are used to detect horizontal lines, and some are detecting vertical or diagonal lines
(Figs. 5.59 and 5.60). To be more mathematical, we will study how the vertical
filter works. We would like to utilize a filter to detect vertical edges from a 2D
image. Take Fig. 5.58 as an example. The left side of this figure represents a 6 × 6
grayscale image. The left side of this 6 ∗ 6 image is white and its right side is gray.
Therefore, we have a vertical line in the middle (between white and gray). The
convolution operation computes a dot product of the filter with a local region of the
Précédent

- 311/647

Suivant