# An Improved Lightweight Model for Defect Detection on Paths in Images
## 3 Results and Analysis
### Dataset and Evaluation Metrics  
This study employed the open-source dataset RDD2022 [27], which is composed of road images collected from multiple countries. For experimental validation [28], a total of 4378 road images from China were selected. The dataset comprises 2401 images captured by drones and 1977 images taken using vehicle-mounted cameras. This research considered five types of road defects: longitudinal cracks (D00), transverse cracks (D10), mesh cracks (D20), potholes (D40), and road repairs (Repair). As certain photos in the training set lack the five types of road defects analyzed in this study, the dataset must be processed and filtered to exclude images unrelated to the detection targets. After processing, the dataset contains 4373 images, with 2396 images in China Drone and 1977 images in China MotorBike. Table 4 illustrates the distribution of road defect types within the dataset. The dataset was split into training, validation, and testing sets with a ratio of 7:2:1. This paper employs the mean Average Precision at 50% overlap (mAP50) and the mean Average Precision at 50-95% overlap (mAP50:95) as metrics to measure detection accuracy. The parameter count (Params) and frames per second (FPS) are used as key metrics for evaluating efficiency and real-time performance. Moreover, the F1-score is utilized to assess the model's overall performance and stability; The F1-score represents a combination that \begin{table}
\begin{tabular}{c c c} \hline \hline
**Pavement Distress** & **Distress Class** & **Quantity** \\ \hline longitudinal cracks & D00 & 4104 \\ transverse cracks & D10 & 2359 \\ alligator cracks & D20 & 934 \\ potholes & D40 & 321 \\ road repairs & Repair & 1046 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Defect types and their corresponding quantities in the dataset. \begin{table}
\begin{tabular}{c c} \hline \hline
**Environmental Parameter** & **Value** \\ \hline Operating system & Ubuntu22.04 \\ Deep learning framework & Pytorch1.7.1 \\ Programming language & Python3.9.7 \\ CPU & Intel(R) Xeon(R) Platinum 8255C \\ GPU & Quadro RTX 8000 (48568 MiB) \\ RAM & 1.0 TiB \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Configuration and training environment. \begin{table}
\begin{tabular}{c c} \hline \hline
**Hyperparameters** & **Value** \\ \hline Learning Rate & 0.01 \\ Image Size & 640 \(\times\) 640 \\ Momentum & 0.937 \\ Batch Size & 16 \\ Epoch & 150 \\ Weight Decay & 0.0005 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The same hyperparameters were applied across all experiments during the training process. The specific hyperparameters used are provided in Table 3.  
balances precision and recall rates, with higher values indicating stronger performance and robustness of the model. The calculation formula for the F1-score is shown in Equation (5). Furthermore, model size is used to assess the suitability for deployment on edge devices. \[\text{F1}=\frac{2\times\text{Precision}\times\text{Recall}}{\text{Precision}+ \text{Recall}} \tag{5}\]  
Precision (P) represents the proportion of correctly predicted positive samples out of all predicted positive samples, while Recall (R) denotes the proportion of accurately identified positive samples relative to all actual positive samples. True Positives (TP) are positive samples correctly classified, False Positives (FP) are negative cases incorrectly classified as positive, and False Negatives (FN) are positive cases that the model fails to detect. The formulas for precision and recall are provided below:  
\[\text{Precision}=\frac{\text{TP}}{\text{TP}+\text{FP}} \tag{6}\]  
\[\text{Recall}=\frac{\text{TP}}{\text{TP}+\text{FN}} \tag{7}\]  
mAP (mean Average Precision) indicates the average precision across multiple classes. [EMAIL_ADDRESS] represents the average precision at a threshold of 0.5. [EMAIL_ADDRESS]:0.95 is a more stringent evaluation metric, which calculates the mAP values across the 50-95% IoU threshold range and averages the results.