# Human Pose Estimation Based on Lightweight Multi-Scale Coordinate Attention
## 3 The Proposed Method
### Lightweight Network--GhostNet  
To address the problem of lightweight network architecture, previous research has proposed numerous compression methods, such as pruning, quantification, knowledge distillation, and so on. Other approaches have focused on efficient network design, such as MobileNet [27], ShuffleNet [28], and so on. Considering the redundancy of the feature map of the neural network, GhostNet designed a phased operation calculation module similar to depthwise separable convolution. The specific idea was to perform a general convolution (convolution batch normalization non-linear activation), output only a few feature maps to save computational resources, and then output intrinsic and other ghost feature maps through a linear transformation (convolution operation) on this basis. The process is shown in Figure 2 below.  
Figure 1: Lightweight Multi-scale Coordinate Attention Structure.  
Figure 2: GhostNet Module.  
The details of this process can be described below.  
M intrinsic feature maps \(Y^{\prime}\in R^{h^{\prime}\times x^{\prime\prime}\times m}\) can be obtained by the convolution operation:  
\[Y^{\prime}=X*f^{\prime} \tag{1}\]  
where \(f^{\prime}\in R^{c\times k\times k\times m}\) refers to the kernel and \(m\leq n\). To further obtain the required \(n\) feature maps and generate ghost feature maps, a series of low-cost linear operations were applied to each original feature in \(Y^{\prime}\):  
\[y_{ij}=\Phi_{i,j}(y^{\prime}_{i}),\ \forall i=1,\ldots m,\ j=1,\ldots s \tag{2}\]  
where \(y^{\prime}_{i}\) is the \(i^{th}\) original characteristic graph in \(Y^{\prime}\), and \(\Phi_{i,j}\) is the \(j^{th}\) linear operation used to generate the \(j^{th}\) ghost feature map \(y_{ij}\), that is, \(y^{\prime}_{i}\) can have one or more ghost feature maps \(\left\{y_{ij}\right\}_{j}^{s}=1\). The final \(\Phi_{i,s}\) was used to preserve the identity mapping of the intrinsic feature maps. By using cheap operations, we could obtain \(n=m\cdot s\) characteristic graphs \(Y=[y_{11},y_{12},\ldots,y_{ms}]\) as the ghost module's output. The computation cost of a linear operation \(\Phi\) running on each channel was much lower than that of an ordinary convolution.  
Specifically, this module contained \(m\cdot(s-1)=ns\cdot(s-1)\) linear operations and identity mapping, with an average kernel size \(d\times d\) for each linear operation. Supposedly, utilizing the ghost module to enhance ordinary convolution would result in a speedup ratio of \(r_{s}\).  
\[r_{s}=\frac{n\cdot h^{\prime}\cdot w^{\prime}\cdot c\cdot k\cdot k}{\frac{n}{s }\cdot h^{\prime}\cdot w^{\prime}\cdot c\cdot k\cdot k+(s-1)\cdot\frac{n}{s} \cdot h^{\prime}\cdot w^{\prime}\cdot d\cdot d}=\frac{c\cdot k\cdot k}{\frac{ s-1}{s}\cdot c\cdot k+\frac{s-1}{s}\cdot d\cdot d}\approx s \tag{3}\]  
where the amplitude of \(d\times d\) is comparable to \(k\times k\) and \(s<<c\). Similarly, the parametric compression ratio \(r_{c}\), which is roughly equivalent to the acceleration ratio, can be calculated as follows [29]:  
\[r_{c}=\frac{n\cdot c\cdot k\cdot k}{\frac{n}{s}\cdot c\cdot k\cdot k+(s-1) \cdot\frac{n}{s}\cdot d\cdot d}\approx\frac{s\cdot c}{s+c-1}\approx s. \tag{4}\]  
As seen in Figure 3 below, by taking the advantage of the ghost module, our network selected the ghost bottleneck (G-bneck) module, which is provided for tiny CNNs. The G-bneck was primarily made up of two stacked ghost modules. The first ghost module acted as an extension layer, thus increasing the total number of channels. To match the shortcut path, the second ghost module decreased the number of channels. Finally, the inputs and outputs of the two ghost modules were connected using a shortcut. According to the characteristics of the network structure of our work, the initial network's convolution module was substituted by a G-bneck with two stages [30].