## 4 Results and Analysis
### Validity Experiments  
To assess the efficacy of the proposed test-time adaptation framework, some validation experiments were conducted. We compiled the high-quality pavement distress data from CHN_C, collected by ourselves, into a standard dataset, which is also our source domain. We selected the images from CRDDC as a more complex comprehensive dataset, which is also the target domain we need to transfer. We further divided the comprehensive dataset into a comprehensive train dataset and a comprehensive test dataset in an 8:2 ratio. Initially, the YOLOv8 and FasterRCNN models were trained on the standard dataset and subsequently tested on the comprehensive dataset to evaluate the detection accuracy of the control group. Thereafter, both the unlabeled standard dataset and the comprehensive dataset were employed to train the domain prior knowledge generator. Following the convergence of the domain prior knowledge generator's training, the adaptive pavement distress detection models, specifically TTA-YOLO and TTA-FasterRCNN, were trained using the standard dataset. These models were then tested on the comprehensive test dataset to evaluate the experimental group's accuracy. Additionally, transfer learning was implemented with the trained YOLOv8 and Faster R-CNN models using a comprehensive training set. The resulting models, Transfer-YOLO and Transfer-Faster R-CNN, were tested on the comprehensive test dataset to compare the target domain adaptation effect provided by the TTA module. Both the comprehensive training set and the test set included data from the target domain, ensuring consistent data distribution across these datasets. The datasets used for model training and testing are detailed in Table 3. In this way, YOLO/FasterRCNN represents a model trained on the source domain and evaluated for its performance in the target domain; Transfer-YOLO/Transfer-FasterRCNN represents a model trained on both the source and target domains and evaluated for its performance in the target domain. TTA-YOLO/TTA-FasterRCNN represents our proposed framework, which only requires image data in the target domain without labels. The experimental platform was based on the Ubuntu 22.04 operating system and conducted on two NVIDIA GeForce GTX 4090 GPU servers. The experiments utilized the PyTorch deep learning framework, with CUDA and CUDNN libraries employed to accelerate model training. To ensure robust model performance and avoid overfitting or underfitting, several strategies were incorporated throughout the training process. Specifically, the training epochs for the YOLOv8 model, FasterRCNN model, Transfer-YOLO model, and Transfer-FasterRCNN model were set to 100 epochs, while the self-supervised training for the domain prior knowledge generator was set to 200 epochs. During the training of the adaptive pavement distress detection models using the trained domain prior knowledge generator, the training epochs were again set to 100 epochs. The model training weights were updated using the Adam optimizer and the cosine annealing learning rate decay algorithm, with an initial learning rate set to 0.01. To mitigate the risk of overfitting, a combination of techniques was applied. First, the model weights were updated using the Adam optimizer, known for its adaptive learning rate capabilities, which helped to stabilize training and prevent both overfitting and underfitting. Second, a cosine annealing learning rate decay algorithm was used to gradually decrease the learning rate over time, promoting smoother convergence and avoiding sharp updates that could lead to overfitting. The initial learning rate was set to 0.01, which was optimized through empirical testing. Additionally, the model performance was closely monitored during training by observing the changes in loss function values, as shown in Figure 8, for all models: YOLO, FasterRCNN, TTA-YOLO, TTA-FasterRCNN, Transfer-YOLO, and Transfer-FasterRCNN.