## 5 Discussion  
In this paper, the application of the convolutional neural network (CNN) in geomagnetic flaw detection of pressed rigging is discussed, especially the detection optimization based on the YOLOv5 algorithm. This technique solves the deficiency of the traditional method in detection accuracy and efficiency and provides a more efficient and reliable detection means. Although traditional detection methods can provide effective detection information in some aspects, it is often difficult to identify small and potential early defects, especially in the dynamic stress environment, as traditional detection techniques often lag behind the actual damage. Therefore, to improve the detection accuracy of the suppression rigging, this paper adopts the suppression rigging flaw detection equipment of CM-801, uses the magnetic induction signal to collect defect information, effectively eliminates the noise interference through a Kalman filter, displays the denoised data in the form of cloud image, and uses convolutional neural network for analysis. For convolutional neural networks, each image and each labeled defect instance in the data set will affect the model's learning process of features. If the labeling is inaccurate or biased, it may cause the model to learn the wrong features during training, ultimately affecting the accuracy and recall rate of the detection. Therefore, we have also constructed  
Figure 8: Comparison of visual results between the original model and the improved model. (**a**,**b**) the image defects are relatively dispersed; (**c**,**d**) images have the problem of overlapping stress concentration defects. a dedicated data set of clamped rigging defects. The data set contains a variety of common clamped rigging defect signals, such as broken wire, the location of stress concentration, etc. The defect region of each sample in the data set has been accurately calibrated to ensure that the model can correctly learn the defect features during the training process. In the process of improving YOLOv5, the scale detection layer, a key component of the network, is deeply optimized in this paper, aiming to improve the accuracy and real-time feature extraction. In the original YOLOv5 architecture, the network uses deep-level feature maps to carry out multi-scale target detection. However, although the deep-level feature maps can capture more high-level semantic information, they are relatively weak in expressing details and small targets, especially in the detection of small targets or subtle defects, which is prone to missing detection or positioning bias. To solve this problem, a new optimization strategy is proposed, which is to replace the original deep feature map with a larger shallow feature map. The core purpose of this adjustment is to use the rich spatial information of shallow feature maps to better capture the features of small targets, especially small defects. Shallow feature maps usually retain more edge and texture information, so they perform better in small object detection and can greatly improve the performance of models in fine detection tasks. For pressed rigging defect detection tasks common in the industry, the introduction of shallow feature maps allows the model to capture subtle defects and irregularities, significantly reducing the rate of missed detection. In addition to the feature layer optimization, a new loss function, NGWD, is introduced to replace the traditional IOU loss function. Traditional IOU has some limitations when dealing with object overlap and small object detection, especially when the object overlap is low or the displacement is large, as IOU is relatively poor in describing the position deviation. To measure the positioning deviation of small objects more accurately, NGWD is proposed as a new loss measurement method. The Wasserstein distance can be seen as a measure of the difference between two distributions, capturing the geometric difference between the predicted box and the real box more accurately than the IOU.