## 2 Materials and Methods
### Structure of the CER-YOLOv5s Model
#### 2.2.1 CGC3 Module  
As deep learning gradually advances towards edge computing, lightweight model structures have become a research focus in recent years. To meet the deployment requirements of object detection models on embedded hardware devices, this study utilized the Ghost [9] module and CBAM attention mechanism to reconstruct the C3 module, reducing the computational cost of standard convolutional layers. Unlike conventional convolution methods, the Ghost module enhances feature extraction from the perspective of feature redundancy while maintaining the same output as standard convolution. This approach  
Figure 3: CER-YOLOv5s network model. improves the comprehensive understanding of input images. As shown in Figure 4, for a given input feature map, the Ghost module divides the convolution operation into two parts. The first part generates partial intrinsic feature maps using conventional convolution to prevent excessive computational load. The second part employs group convolution operations, utilizing simple linear transformations to individually perform 3 \(\times\) 3 or 5 \(\times\) 5 convolutions on the feature maps obtained from the first part. Finally, these two parts are concatenated along the channel dimension through identity mapping to produce the final output. When outputting \(n\) feature maps, the parameter count of a regular convolutional layer is \(p_{1}\), the parameter count of the Ghost module is \(p_{2}\), and the ratio of their parameter counts is:  
\[\frac{p_{1}}{p_{2}}=\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{1}\]  
where \(c\) represents the number of channels; \(k\) represents the size of the convolution kernel; \(d\) represents the size of the linear operation convolution kernel; \(s\) represents the number of linear operations. When \(k\) and \(d\) are the same size, the parameter count of a regular convolutional layer is \(s\) times that of the Ghost module, and similarly, the computational complexity of a regular convolutional layer is \(s\) times that of the Ghost module. Similar to the residual structure, the Ghost bottleneck structure primarily consists of two cascaded Ghost modules. The first Ghost module expands the number of feature map channels to extract deeper information. The second Ghost module adjusts the channel count to match the residual path. Between the two Ghost modules, depthwise separable convolution with a stride of 2 is used for downsampling. Although the Ghost module significantly reduces the model's computational cost, it struggles to capture spatial features effectively, inevitably leading to some accuracy loss. To address this issue, this paper integrates a lightweight CBAM [10] attention module into the Ghost bottleneck structure. By learning weights to selectively focus on specific areas of the input image, this integration enhances the model's detection accuracy. The CBAM-Ghost structure is illustrated in Figure 5.  
Figure 4: Ghost module. Figure 5: Structure of CBAM–Ghost Bottleneck. Given an intermediate feature as input, CBAM performs adaptive feature refinement along both channel and spatial dimensions. Specifically, it first obtains the channel attention weights and multiplies them elementwise with the input features. Next, the spatial attention module generates spatial attention weights. Finally, these weights are multiplied elementwise with the refined feature map to produce the final output. Figure 6 shows a comparison of the output heatmaps before and after adding the CBAM module. The red areas indicate the regions with the highest saliency, which contribute the most to the prediction results. It can be observed that the heatmap after adding the CBAM module pays more attention to key target information, addressing the issue of the original model lacking attention preferences, and thus laying a foundation for accurate detection of engineering vehicles.