# Medical Gesture Recognition Method Based on Improved Lightweight Network
## 2 Related Works  
In recent years, as more lightweight networks have been proposed, there has been an increasing interest on how to apply lightweight networks in real life. MobileNetv2 network, as a typical representative of lightweight networks, has the following outstanding features: (1) A depthwise separable convolution is introduced instead of ordinary convolution, which reduces the number of parameters of the model and improves the recognition speed. (2) An inverted residual structure is proposed, which enhances the feature expression ability and improves the gradient propagation efficiency compared with the ordinary residual structure. (3) A linear bottleneck structure is introduced to reduce the loss of low-dimensional features. Depthwise separable convolution is a structure composed of depthwise convolution (DW) and pointwise convolution (PW). Each depthwise separable convolution structure is followed by batch normalization (BN) [30] and ReLU6 activation function [31]. Depthwise separable convolution structure is shown in Figure 1. The depth convolution kernel is a 1D convolution kernel, which is responsible for extracting features for a channel, and the depth of the input feature matrix does not change after the depth convolution. Pointwise convolution is ordinary convolution, and its convolution kernel is 1 \(\times\) 1, which plays the role of dimensional enhancement here. Depthwise separable convolution works by extracting the channel information in-depth and associating the features of the channel point by point. We compare the computational cost of the depthwise separable convolution with that of the ordinary convolution (as in Figure 2). Where \(D_{k}\) is the size of the convolution kernel, \(D_{f}\) is the size of the input characteristic matrix, \(M\) is the number of input channels, and \(N\) is the number of output channels. The computational cost of the deep separable convolution is shown in Equation (1). \[D_{f}\times\ D_{f}\times\ N\times\ D_{k}\times\ D_{k}+D_{f}\times\ D_{f}\times\ M \times\ N \tag{1}\]  
The cost of ordinary convolution calculation is shown in Equation (2). \[D_{f}\times\ D_{f}\times\ D_{k}\times\ D_{k}\times\ M\times\ N \tag{2}\]  
Equation (3) shows the comparison of the computational costs of two kinds of convolutions. \[\frac{D_{f}\times\ D_{f}\times\ N\times\ D_{k}\times\ D_{k}+D_{f}\times\ D_{f} \times\ M\times\ N}{D_{f}\times\ D_{f}\times\ D_{k}\times\ D_{k}\times\ M\times\ N}=\frac{1}{N}+\frac{1}{D_{k}^{2}} \tag{3}\]  
As can be seen from the above calculation, \(N\) is generally large. When a 3 \(\times\) 3 convolution kernel is used, the result of Equation (3) is close to 1/9. Ordinary convolution is 8\(\sim\)9 times the computation cost of the depthwise separable convolution.MobileNet series, adding depthwise separable convolution to build a lightweight deep neural network layer by layer, which reduces computational complexity, reduces model size, and improves model recognition speed. The proposed two linear bottleneck structures in the MobileNetv2 network not only reduce the number of parameters but also optimize the network structure in time and space. The MobileNetv2 network is inspired by the ResNet residual network [32] and proposes an inverted residual structure. The residual structure of ResNet uses the first layer of pointwise convolution for dimensionality reduction, followed by depthwise convolution, and then pointwise convolution for the dimensionality increase, which results in the loss of feature information. The inverted residual structure uses the first layer of pointwise convolution to perform the up-dimensioning operation, the second layer of depthwise convolution to extract channel features, and the third layer of pointwise convolution to downscale, and then adds shortcut connections. The network layer connection is opposite to the ResNet residual structure, so it is called an inverted residual structure.