# CGT-YOLOv5n: A Precision Model for Detecting Mouse Holes Amid Complex Grassland Terrains
## 3 Experimental Results and Discussion
### Comparison Results for the Original Model and the Improved Model  
As depicted in Table 2, the improved model, CGT-YOLOv5n, exhibits a 3.3 percentage point improvement in mAP_0.5 and a 4.3 percentage point improvement in mAP_0.5:0.95 compared with YOLOv5n. Model enhancements were applied stepwise to evaluate the effects of each module in enhancing the original model. Integrating the CAM module into the YOLOv5n model enhances the model's ability to distinguish targets from shadow interferences by incorporating contextual information related to mouse holes. This enhancement is achieved using an adaptive fusion method to minimize semantic disparities, thereby improving the model's recognition of smaller mouse holes in images. As a result, the mean average precision (mAP) at the 0.5 threshold increased by 2.3 percentage points, and the mAP over the range of 0.5 to 0.9 thresholds increased by 1.2 percentage points. Additionally, the model's accuracy in object boundary regression was improved by segregating the classification and localization tasks and utilizing semantically rich feature maps for classification paired with high-resolution maps for localization. Further advancements include replacing the coupled head of CAM-YOLOv5n with a TSCODE decoupled head, which led to an increase of 0.4 and 0.7 percentage points in mAP_0.5 and mAP_0.5:0.95, respectively. Finally, the model's ability to recognize differently shaped mouse holes is enhanced by assigning four-dimensional weights to convolutional layers based on varying input images. Replacing the C3 module of the CAM-TSCODE-YOLOv5n with the OD_C3 module resulted in increases of 0.6 and 2.4 percentage points in mAP_0.5 and mAP_0.5:0.95, respectively. Because of the increased model complexity, the model size increased by 11.7 M, reaching 15.7 M. The inference speed increased by 1.9 ms, resulting in a speed of 161.3 FPS and a decrease of 56.1 frames. Although there is a slight increase in the processing time, considering the specificity of detecting mouse holes, a higher accuracy rate is required for identifying these holes. Given the significant improvement in the model's accuracy, this minor extension in inference time is acceptable. The stability of the original YOLOv5n model notably differed from that of the improved model CGT-YOLOv5n during the training process, as observed from the loss values of the validation set (Figure 6a). The blue curve represents the loss values (val/box_loss, val/obj_loss) of the original YOLOv5n model, indicating significant fluctuations and a lack of convergence. By contrast, the red curves represent the loss values (val/box_loss, val/obj_loss) of the improved model, which appear smooth and consistently lower than those of the original model. Eventually, the loss values of the improved model stabilize at approximately 0.04, indicating a superior convergence. Figure 6b presents the comparison curves for precision, recall, mAP_0.5, and mAP_0.5:0.95. The improved model, CGT-YOLOv5n, exhibits a gradual and converging increase in all four indices. The curves representing the improved model indicate improvements over the original model, demonstrating that the performance of the improved model surpasses that of the original model. Even under the conditions of non-complex grassland backgrounds, the detection process can be affected by various factors. In Figure 7, the top row displays the detection results of the original model, while the bottom row exhibits the outcomes from the improved model. As depicted in Figure 7a,b, due to the black area in the center of the mouse hole targets, the original model mistakenly detects the shadows of the cola bottle and stone as mouse holes. In contrast, the improved model avoids such misclassification, as shown in Figure 7b,d. Furthermore, as seen in Figure 7e, the improved model successfully detects irregular-shaped mouse holes that the original model fails to identify.