## 4 Results and Analysis
### Validity Experiments
By using this combination of techniques, including careful adjustment of training epochs, learning rate scheduling, and optimization strategies, the models were trained effectively, striking a balance between underfitting and overfitting, ensuring good generalization to new data. Regular validation and testing on separate datasets further ensured the robustness of the models and their ability to adapt to unseen scenarios. From Figure 8, it is evident that the YOLO, FasterRCNN, TTA-YOLO, TTA-FasterRCNN, Transfer-YOLO, and Transfer-FasterRCNN models exhibit a gradual decrease in their total loss function values. As the number of iterations approaches 100 epochs, the loss function values converge, while simultaneously, the models' detection results steadily improve. Additionally, comparing the changes in loss functions during the training processes of the YOLO model and the TTA-YOLO model reveals that initially, the TTA-YOLO model incurs a higher loss function on the test data. This is primarily because during the early stages of training, the TTA-YOLO model attempts to adapt to the test data. Due to the significant differences between the test and training datasets, the TTA-YOLO model requires larger adjustments on the test dataset early on, resulting in poorer performance. However, as the training epochs increase, the TTA-YOLO model's loss function on the test dataset becomes closer to that on the training dataset. This phenomenon is also observed in Transfer-YOLO. During the training process of Transfer-YOLO, the loss function on the test data becomes increasingly closer to that on the training data, indicating that the Transfer-YOLO model is gradually adapting from the training data to the test data. As shown in Figure 8, the loss function values on the test data for both TTA-YOLO and Transfer-YOLO ultimately align with those on the training data, demonstrating that these two models are eventually able to effectively adapt to the distribution of the test data. In contrast, the loss function of the YOLO model on the test data consistently remains discrepant from that on the training data, indicating an inability to adapt well to the test data. A similar trend is observed in the training process of the FasterRCNN, TTA-FasterRCNN, and Transfer-FasterRCNN models. In order to quantitatively evaluate the test-time adaptation framework for pavement distress detection, this study utilized the pre-trained YOLO, FasterRCNN, TTA-YOLO, TTA-FasterRCNN, Transfer-YOLO and Transfer-FasterRCNN models to assess and calculate detection accuracy on the test dataset, as depicted in Table 4. From the table, it is evident that Transfer-YOLO outperforms the original YOLO object detection results across various metrics in the target domain. This improvement is because transfer learning involves further training with annotated data from the target domain, building upon the source domain. The transfer learning model not only encounters various pavement distress data from the target domain but also learns how to identify and detect these distresses from the target domain annotations. However, obtaining labels for pavement distress in the target domain is not always easy or inexpensive. Annotating pavement distress requires substantial human and material resources, especially since data must be labeled for each different target domain. The framework proposed in this paper effectively addresses this issue. The test-time adaptation framework for pavement distress detection proposed in this paper has improved all aspects of indicators compared with the original pavement distress detection models in Table 4. Particularly noteworthy is the nearly 20% increase in AP for pothole identification. The research indicates that due to the relatively small volume of potholes in the data, they are susceptible to disturbances from perspectives, backgrounds, and other factors, resulting in compromised detection accuracy during migration.