## 3 Materials and Methods
### Data Augmentation
#### 3.2.2 Image Data Augmentation  
Image data augmentation is a crucial preprocessing technique designed to diversify training data by applying various transformations to the original samples. This enhances the generalization capability of models, mitigating overfitting issues and improving adaptability to real-world complexities. For the image data in this study, particularly under limited sample conditions, advanced augmentation methods such as Random Erase, GridMask, and CutMix were employed. These techniques perturb or combine local image information to enhance model robustness and generalization to diverse transformations.  
Random Erase involves randomly occluding a portion of the image to simulate real-world scenarios where objects may be partially obscured. Let \(\mathbf{I}\in\mathbb{R}^{H\times W\times C}\) denote an input image with height \(H\), width \(W\), and \(C\) channels. The process selects a random rectangular region and replaces it with fixed values or random noise. The operation is defined as:  
\[\mathbf{I}(x:x+l_{h},y:y+l_{w},:)=v, \tag{11}\]  
where \((x,y)\) represents the occluded region, \(l_{h}\) and \(l_{w}\) are the height and width, and \(v\) is the replacement value, typically set to constants or random noise. This method forces the model to rely on global context rather than local features, improving its robustness. GridMask augments images by applying a periodic grid structure for occlusion, which increases spatial feature diversity. For an input image \(\mathbf{I}\), the grid mask \(\mathbf{M}\) is defined as:  
\[\mathbf{M}(x,y)=\begin{cases}0,&\text{if }(x\mod L_{x})<d_{x}\text{ or }(y\mod L_{y})<d_{y},\\ 1,&\text{otherwise},\end{cases} \tag{12}\]  
where \(L_{x}\) and \(L_{y}\) represent the grid periods and \(d_{x}\) and \(d_{y}\) are the occlusion widths within each period. The augmented image \(\mathbf{I^{\prime}}\) is obtained by element-wise multiplication:  
\[\mathbf{I^{\prime}}=\mathbf{I}\odot\mathbf{M}, \tag{13}\]  
This approach enhances the model's ability to learn global structural features even with missing local information. CutMix creates augmented samples by mixing two images and their corresponding labels. Given two input images, \(\mathbf{I}_{A}\) and \(\mathbf{I}_{B}\), with labels \(y_{A}\) and \(y_{B}\), a rectangular region is cut from \(\mathbf{I}_{A}\) and replaced with the corresponding region from \(\mathbf{I}_{B}\). The region's position and dimensions are determined as:  
\[r_{x}=\text{Uniform}(0,W),\quad r_{y}=\text{Uniform}(0,H), \tag{14}\]  
\[r_{w}=W\sqrt{1-\lambda},\quad r_{h}=H\sqrt{1-\lambda}, \tag{15}\]  
where \((r_{x},r_{y})\) specifies the top-left corner of the rectangle and \(r_{w}\) and \(r_{h}\) are its width and height, respectively. The augmented image \(\mathbf{I^{\prime}}\) is defined as:  
\[\mathbf{I^{\prime}}(x,y)=\begin{cases}\mathbf{I}_{A}(x,y),&\text{if }(x,y)\
otin\text{cut region},\\ \mathbf{I}_{B}(x,y),&\text{otherwise}.\end{cases} \tag{16}\]  
The labels are mixed linearly as:  
\[y^{\prime}=\lambda y_{A}+(1-\lambda)y_{B}. \tag{17}\]  
These augmentation methods collectively enhance data diversity and robustness, reducing overfitting risks and improving model performance across diverse tasks.