# A Robust Lightweight Network for Pedestrian Detection Based on YOLOv5-x
## 3 Method
### Design of Backbone Network  
The efficient and lightweight GhostNet is chosen as the base network structure for the backbone network in this paper. The design philosophy behind the YOLOv5 backbone network shares similarities with YOLOv4, as both draw inspiration from the CSP network architecture. While the CSP network yields commendable performance, its intricate and redundant network parameters lead to sluggish detection speeds, underutilized hardware device capabilities, and demanding hardware specifications. Therefore, we chose the more efficient GhostNet instead. In many efficient neural network models, a large number of feature maps are generated, but many of these features are highly similar. Therefore, the concept of Ghost Module is proposed, which uses simple convolutional and linear operations to obtain more features at a smaller computational cost. This reduces the number of convolution filters used to generate the feature maps, resulting in better performance. Generally speaking, for the input data \(X\in R^{c\times h\times w}\), where c represents the number of input channels, the h and w denote the height and width of the input data, respectively, and the convolution operation at any layer can be described as Equation (1). \[Y=X\circ f+b \tag{1}\]  
where \({}^{\circ}\) represents the normal convolution operation, \(b\) is the bias term, \(Y\in R^{H^{\prime}\times w^{\prime}\times n}\) is the output feature map, \(n\) is the number of channels of the output feature, \(f\in R^{c\times k\times w\times n}\) is the convolution filter of this layer, and \(k\times k\) is the size of the convolution kernel. The output feature map usually contains a large number of repeated features and it is observed that some of the features are highly similar to another part, so a simpler convolution can be considered to generate intrinsic features. Then, cheap calculations can be performed on the intrinsic features to obtain more features and the convolution operation can be described as (2). \[Y^{\prime}=X\circ f^{\prime} \tag{2}\]  
\(f^{\prime}\in R^{c\times k\times w\times m}(m\leq n)\) in Equation (2). Compared with (1), (2) removes the bias term in order to reduce the computational effort and the number of channels by (2) becomes \(m\). In order to change the number of channels to \(n\), a linear operation with a smaller number  
Figure 2: RSTDet-Lite network framework. of parameters \(s\) is performed for each intrinsic feature obtained in \(Y^{\prime}\). The expression is shown in Equation (3). \[y_{ij}=\varphi_{ij}({y_{i}}^{\prime}),\forall i=1,\ldots,m,j=1,\ldots,s, \tag{3}\]  
where \(y_{i}^{\prime}\) denotes the \(i\) intrinsic features in \(Y^{\prime}\) and \(\varphi_{i,j}\) is the \(j\) (except the last one) linear operation, which aims to generate the \(j\) feature map. The ultimate linear operation aims to upsample the intrinsic feature map to preserve its features following the linear transformation map, as depicted in Figure 3. The final feature map obtained from Equation (3) is used as the output data of the Ghost module. The Ghost bottleneck layer is a critical component for enhancing network performance, as illustrated in Figure 4. Structurally, it bears resemblance to the base residual module in ResNet [23], featuring residual connections and Ghost modules that respectively expand and reduce the number of channels to match the number of channels in the residual connections. The above structure is suitable when the stride is set to 1. However, when the stride is set to 2, inserting a depth-wise separable convolution with a stride of 2 between two Ghost modules can effectively reduce the impact of geometric feature variations, thereby improving the results. Despite performing well in standard detection tasks, GhostNet faces challenges in complex detection scenarios, particularly with regards to pedestrian height overlap and object occlusion.