## 3 Materials and Methods
### Detection of Dry Beach Area of Tailing Ponds  
#### 3.2.1 YOLOv5-Seg  
YOLOv5-seg has extra segmentation in the header and is intended for object detection [35]. The network architecture includes input, Backbone, neck, and head components, as depicted in Figure 5[36]. The input performs the image preprocessing by means of mosaic data augmentation, adaptive image scaling, and adaptive anchor box computation. The modules for extracting features from the images that make up the Backbone are CBS, CSP, and SPPF. The neck consists of the Feature Pyramid Network (FPN) layer and the Pyramid Attention Network (PAN) layer, which combine features retrieved by the Backbone at many scales to achieve a comprehensive set of feature information. A target detection head and an instance segmentation head are both part of the head. The multi-scale feature fusion method of the regular YOLOv5 is passed down to the target detection head of the network model. This allows for the detection of objects at various feature scales. The instance segmentation head adds an extra output to the target detection of the prototypical network, which performs pixel-by-pixel classification prediction by means of a small Fully Convolutional Neural Network (FCN) and generates binary masks for the objects. YOLOv5 loss functions include three types: classification loss (L\({}_{\text{CLS}}\)), box loss (L\({}_{\text{BOX}}\)) and objectness loss (L\({}_{\text{OB}}\)). The box represents the size and exact position of the target. Objectness represents the reliability of the predicted rectangle. Classification represents the category of the target. The characteristic of the loss function is a gap between the predicted information and the expected information (label) of the neural network. The closer the predicted information is to the expected information, the smaller the value of  
Figure 4: Annotated diagram example. (**a**) original image; (**b**) annotation labels; (**c**) annotation results. Figure 3: Picture enhancement. (**a**) original image; (**b**) darkening; (**c**) mirroring; (**d**) rotating; (**e**) adding noise. loss function is. The total loss function is weighted first and then \(\lambda_{1}\), \(\lambda_{2}\), and \(\lambda_{3}\), which are the weights of the three losses, respectively, are added as shown in Equation (1) [37]. \[\text{Loss}=\lambda_{1}\text{L}_{\text{CLS}}+\lambda_{2}\text{L}_{\text{BOX}}+ \lambda_{3}\text{L}_{\text{OBJ}} \tag{1}\]  
Conv (convolution), BN (batch normalization), and SiLU (activation function) are all contained in the CBS module of YOLOv5. Conv is responsible for dimensionality reduction on the feature graph, while BN performs batch normalization on each batch of data [38]. A function called SiLU is used to increase the nonlinearity of data, expressed as Equation (2). The SiLU function is defined as the product of X and sigmoid(x), X is the input value, and the sigmoid(x) function expression is \(1/(1+\text{e}^{-x})\). The SiLU function combines the advantages of linear transformation and sigmoid function, which can improve the nonlinear expression ability of the model and alleviate the gradient disappearance problem, so as to improve the training efficiency of the model [39]. CSP plays a significant role in feature extraction. Whereas the CSP2_X structure is applied to the neck, the CSP1_X structure is particularly applied to the trunk. SPPF uses the CBS layer to modify feature dimensions, undergoes three maximum pooling layers, connects their output feature maps using Concat operation, and eventually obtains the output feature maps through the CBS layer [40]. \[\text{SiLU}(\text{X})=\text{x}*\text{Sigmoid}(\text{x})=\text{x}\cdot\frac{1 }{1+\text{e}^{-\text{x}}} \tag{2}\]  
YOLOv5s is a smaller version of YOLOv5, with a relatively small model size and fewer parameters, which allows it to run efficiently in environments with limited computing resources.