## 3 Methodology
### Model Training and Testing  
To evaluate the impact of incorporating rainy images into the training dataset on object detection performance, this study designed four distinct training datasets: (1) original images combined with augmented images, (2) original images combined with augmented images and rainy images generated using the analytical method, (3) original images combined with augmented images and rainy images generated using the CycleGAN method, and (4) original images combined with augmented images and rainy images generated using the neural style transfer method. Regarding pre-trained models, RTDETR-x and YOLOv8-x were chosen, as they have the largest number of parameters and thus the best feature extraction capability. Therefore, a total of 8 detection models were trained, representing different combinations of the aforementioned data and pre-trained models as outlined in Table 1. During model training, 80% of the data was used for training and 20% for validation. The training process consisted of 100 epochs with a batch size of 16, and AdamW was employed as the optimizer. The hardware configuration for the experiment includes an Intel(R) Core(TM) i7-14700 KF processor, Microsoft Windows 11 Pro, 64.0 GB of memory, and an NVIDIA GeForce RTX 4060 Ti 16 GB GPU.  
For independent testing, real rainy images were used to evaluate the detection capability. The DAWN [53] (Detection in Adverse Weather Nature) dataset was selected for this purpose, which is well-known and commonly used for testing. This dataset contains approximately 1000 images captured under adverse weather conditions, including rain, fog, snow, and sand. It encompasses diverse traffic environments such as urban, highway, and freeway, and provides annotations for both images and object bounding boxes. Hence, it is frequently utilized for evaluating the performance of detection models in autonomous driving vehicles and intelligent visual surveillance systems, especially under adverse weather conditions. Given this study's focus on addressing the deterioration of object detection capability under rainy weather conditions, images under rainy weather from DAWN dataset were chosen for testing.  
Four object detection evaluation metrics, namely Precision (P), Recall (R), mAP50, and mAP50-95, were utilized to assess the detection accuracy of different models. Precision indicates the accuracy of detected objects, Recall measures the model's ability to identify all instances of objects in the images, mAP50 calculates the mean average precision at an IoU threshold of 0.50, and mAP50-95 computes the average of mean average precision across IoU thresholds ranging from 0.50 to 0.95. These metrics not only evaluate the model's ability to correctly detect object categories, but also assess the localization accuracy of detection boxes. Frame per second (FPS), giga floating point operations (GFLOPs), and parameters are metrics used to evaluate the inference speed and computational efficiency of models, which are particularly useful for considering the deployment of real-time detection models.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline
**Image Dataset Name** & **Quantity of Images** & \multicolumn{2}{c}{**Model**} \\ \hline Original + Augmentation & 21,325 & RTDETR\_non & YOLOv8\_non \\ Original + Augmentation + Analytical & 42,650 & RTDETR\_A & YOLOv8\_A \\ Original + Augmentation + CycleGAN & 42,650 & RTDETR\_CG & YOLOv8\_CG \\ Original + Augmentation + Neural & 42,650 & RTDETR\_NST & YOLOv8\_NST \\ \hline \hline \end{tabular}
\end{table}
Table 1: The trained object detection models.