## 4 Experiments and Results
### Experimental Setup  
The hardware used in this experiment consisted of an NVIDIA GeForce RTX 4070 GPU (NVIDIA, Santa Clara, CA, USA), which provided sufficient computational power to efficiently train the model. The optimizer used during training was AdamW, which is well-suited for training deep learning models with weight decay. The learning rate was set to 0.0001, with a weight decay of 0.05, which helped regularize the model and prevent overfitting. Additionally, a Polynomial Learning Rate Decay (PolyLR) scheduler was employed to dynamically adjust the learning rate as training progressed, ensuring smooth convergence. The learning rate decayed according to a polynomial function with a decay exponent of 0.9, and training ran for a total of 400,000 iterations. The batch size was set to 4, which was determined through experimental comparison to be the optimal value, balancing computational efficiency and memory consumption. A batch size of four allowed for efficient processing without exceeding the GPU memory limits. During training, validation was performed every 800 iterations, and the model was evaluated based on the mIoU metric, with the best model being saved. To prevent overfitting, various regularization techniques were applied, including the use of dropout and a drop_path_rate of 0.3 in the backbone network, which helps regularize the model by randomly dropping paths during training. These measures contribute to improving the model's generalization ability and ensure that the model does not overly rely on specific paths within the network.  
In terms of the loss function, this experiment uses multiple loss functions to optimize the performance of the segmentation task. Specifically, these include the following:  
1. CrossEntropyLoss, used for classification tasks, with a loss weight of 2.0 and mean reduction.
2. DiceLoss, with a loss weight of 5.0, used to better handle class imbalance, especially when target objects are small or imbalanced.
3. MaskLoss, also based on CrossEntropyLoss, with a loss weight of 5.0, used for precise pixel classification.  
The training pipeline also incorporates several data augmentation techniques aimed at increasing the diversity of the training data and improving the model's robustness. These augmentation methods include random cropping, random flipping to introduce variations in the orientation of the input images, and photometric distortion to randomly adjust the brightness and color of the images, simulating different lighting conditions. These image transformations help the model encounter more diverse scenarios during training, thereby enhancing the model's ability to generalize to unseen data during testing and in practical applications.  
In addition, during the testing phase, we applied the Test-Time Augmentation (TTA) strategy, which involves applying different transformations (such as scaling, flipping, etc.) to the input images to further improve the model's performance on the test data. TTA helps enhance the model's robustness, making it more precise and stable in real-world applications.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Confusion Matrix**} & \multicolumn{3}{c}{**Predict**} \\ \cline{2-4}  & \multicolumn{2}{c}{**True**} & **False** \\ \hline \multirow{2}{*}{Real} & True & TP (True position) & FN (False negative) \\  & False & FP (False positive) & TN (True negative) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Binary confusion matrix.