# SC-YOLOv8 Network with Soft-Pooling and Attention for Elevator Passenger Detection
## 3 Method
### Spatial and Channel Reconstruction Convolution
\[X_{1}^{w}=W_{1}\otimes X,X_{2}^{w}=W_{2}\otimes X, \tag{4}\]  
where, \(\otimes\) represents element-wise multiplication. The reconstruction operation involves using a cross-reconstruction method to obtain features maps \(X^{w1}\) and \(X^{w2}\) by combining an information-rich feature map \(X_{1}^{w}\) with an information-poor feature map \(X_{2}^{w}\). Then, the feature maps \(X_{1}^{w}\) and \(X_{2}^{w}\) are concatenated to obtain the spatially refined feature map \(X^{w}\). The specific calculations for the reconstruction operation are as shown in Equation (5). \[\left\{ \begin{array}{l}X_{1}^{w}=[X_{11}^{w},X_{12}^{w}]\\ X_{2}^{w}=[X_{21}^{w},X_{22}^{w}]\\ X_{11}^{w}\oplus X_{22}^{w}=X^{w1}\\ X_{21}^{w}\oplus X_{12}^{w}=X^{w2}\\ X^{w1}\cup X^{w2}=X^{w}\end{array} \right. \tag{5}\]  
where, \([.,. ]\) represents the split operation along the channel. \(\oplus\) represents element-wise summation. \(\cup\) represents concatenation. \(X_{11}^{w}\) and \(X_{112}^{w}\) are the feature maps obtained  
Figure 3: The architecture of the spatial reconstruction unit. by splitting \(X_{1}^{w}\) along the channels, while \(X_{21}^{w}\) and \(X_{21}^{w}\) are the feature maps obtained by splitting \(X_{2}^{w}\) along the channels. As shown in Figure 4, the CRU is implemented through three operations: split, transform, and fuse. For the feature map \(X^{w}\) processed by SRU, the channels of \(X^{w}\) are first divided into two parts, namely, the \(\alpha C\) channel and the \((1-\alpha)C\) channel, where \(0\leq\alpha\leq 1\). Then, a \(1\times 1\) convolution is applied to compress the channels of the feature map. At this point, the feature map \(X^{w}\) is divided into the feature map \(X_{up}\) and the feature map \(X_{low}\). For \(X_{up}\), group convolution and pointwise convolution are employed, and the outputs are summed to obtain the feature map \(Y_{1}\). The specific calculations are as in Equation (6). \[Y_{1}=GWC(X_{up})+PWC(X_{up}), \tag{6}\]  
where \(GWC\) represents the group convolution, and \(PWC\) represents the pointwise convolution. Group convolution can significantly reduce the number of model parameters and the amount of computation [20], but it will cut off the flow of information between channel groups. The cutting off of channel groups causes the network to lose some context information when learning features. To compensate for this loss of information, pointwise convolution is introduced to promote the flow of information between feature channels [21]. Pointwise convolution performs convolution operations on feature channels at each location, which is conducive to the global information transmission between features. For the feature map \(X_{low}\), a \(1\times 1\) pointwise convolution is applied to generate a feature map with shallow hidden details. Subsequently, the generated feature map is concatenated with the feature map \(X_{low}\) to obtain the feature map \(Y_{2}\). The specific calculations are as Equation (7). \[Y_{2}=X_{low}\cup PWC(X_{low}) \tag{7}\]  
Next, global average-pooling is used to process \(Y_{1}\) and \(Y_{2}\) to collect global spatial information \(S_{m}\) with channel statistics. The calculation method is as Equation (8). \[S_{m}=AvgPooling(Y_{m})=\frac{1}{H\times W}\sum_{i=1}^{H}\sum_{j=1}^{W}Y_{m}(i, j),m=1,2, \tag{8}\]  
where \(H\) represents the length of the feature maps \(Y_{1}\) and \(Y_{2}\), and \(W\) represents the width of the feature maps \(Y_{1}\) and \(Y_{2}\). Then, \(S_{1}\) is stacked with \(S_{2}\), and a channel-wise soft attention operation is applied to generate the feature importance vectors \(\beta_{1}\) and \(\beta_{2}\). Finally, feature \(Y_{1}\) and \(Y_{2}\) features are  
Figure 4: The architecture of the channel reconstruction unit. combined to obtain the channel refinement feature \(Y\), guided by the feature importance vectors \(\beta_{1}\) and \(\beta_{2}\). The calculation method is as Equation (9). \[Y=\beta_{1}Y_{1}+\beta_{2}Y_{2} \tag{9}\]