## 3 Improved Gangue Recognition Model Based on YOLOv5
### Improvement of YOLOv5 Algorithm  
#### 3.2.1 Lightweighting of the Backbone Network  
This study takes the processing capacity of 120 t/h of the sorting equipment in Table 1 as an example. It was calculated that the time for the one-tonne coal gangue mixture to pass through the recognition system would only be 26-27 ms, which means that the task of detecting the target of gangue precisely and efficiently must be completed in this period. To enhance precision, it is necessary to utilize more intricate network models. However, this can be challenging for embedded devices with limited memory and computational power. To satisfy the demand for real-time handling, there is a need for lightweight object detection frameworks. While CSPDarknet has excellent feature extraction capabilities, its network  
Figure 4: YOLOv5-S model structure. (The * sign in the figure indicates the multiplication sign).  
parameters and computational complexity can heavily burden hardware devices, leading to challenges in multi-scale analysis, feature representation, computational efficiency, and generalization performance in object detection. To tackle this problem, this study proposes combining the lightweight network EfficientNetV2 with YOLOv5 as the backbone network to improve both computational efficiency and precision.  
EfficientNetV2, first proposed by [PERSON] et al. [26] in 2021, is a lightweight convolutional neural network designed to improve model training speed and parameter efficiency. It was designed with the goal of obtaining optimal performance with limited computational resources by balancing the depth, width, and resolution of the network. Compared with EfficientNetV1, EfficientNetV2 introduces a new module, Fused-MBConv, which combines multiple residual blocks into a single convolutional layer, thus reducing the number of parameters and calculations in the model. The authors of the article used the training-aware NAS method to determine the correct combination of MBConv and Fused-MBConv, using Fused-MBConv for shallow convolution and MBConv for deep convolution, which allowed the EfficientNetV2 model to have a faster training speed under the same hardware conditions and parameters. Experiments conducted by the authors of the article showed that EfficientNetV2 had an 11-fold faster training speed compared with EfficientNet, and the number of parameters were reduced to 1/6.8 of the original. An improved incremental learning strategy was proposed that introduced adaptive convolution and multi-scale feature extraction, and adjusted the regular approach dynamically to accommodate objects of different scales through the size of the training images. It also employed pre-trained modeling. The use of a pre-trained model enabled it to learn generic features from large-scale data and then adapt them to specific tasks through fine-tuning, thus, EfficientNetV2 is more advantageous in terms of computational efficiency and is suitable for mobile or resource-limited devices.  
EfficientNetV2 is primarily comprised of two modules, namely, Fused-MBConv and MBConv. The structure of the MBConv module consists of several components. It starts with a Conv 1 \(\times\) 1 layer that plays an ascending role, followed by a depthwise conv k \(\times\) k layer with two main cases: 3 \(\times\) 3 and 5 \(\times\) 5. Additionally, there is an SE module, a Conv 1 \(\times\) 1 layer with a descending role, and a Dropout layer. In the Fused-MBConv module, the main branch of the MBConv structure replaces the Conv 1 \(\times\) 1 and depthwise conv 3 \(\times\) 3 layers with a regular Conv 3 \(\times\) 3 layer. Figure 5 illustrates a detailed comparison of the specific structure.  
Figure 5: Comparison of MBConv and Fused-MBConv modules: (**a**) MBConv module; (**b**) fused-MBConv module.