## 4 Lightweight Crack Detection Model
### Lightweight Model Training and Validation  
Image-enhancing approaches, i.e., flip, rotation, random clipping, Gaussian fuzzy, etc., are applied on the training dataset. The pre-trained weights of the models on the COCO [35] dataset are transferred to our task. By transferring the pre-trained weights on the COCO dataset, the backbone network only needs fine-tuning, which greatly reduces the requirement for dataset volume in training the rest of the model. In Mask RCNN or Yolact, the anchor is a predefined bounding box of different scales and aspect ratios that are placed at regular intervals on the image to enable the network to detect objects of varying sizes and shapes. Depending on the statistics of the dataset, setting the anchor size to 50, 100, 200, 400 and 800 will cover most of the annotated instances. The length-to-width ratios of anchors are amended to 1/4, 1 and 4, respectively. In order to emphasize the importance \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Index** & **IOU** & **Area** & **Cont** & **ABS-BREAK** & **REL-BREAK** \\ \hline AP & 0.5:0.95 & all & 12.5 & 18 & 28.4 \\ AP50 & 0.5 & all & 30.9 & 40 & 67.1 \\ AP75 & 0.75 & all & 7.1 & 12.9 & 18.5 \\ AP & 0.5:0.95 & small & 9.2 & 13.9 & 13.7 \\ AP & 0.5:0.95 & medium & 26.8 & 30 & 35.2 \\ AP & 0.5:0.95 & large & 19 & 21.6 & 55.8 \\ AR & 0.5:0.95 & all & 34 & 27.9 & 37.9 \\ AR & 0.5:0.95 & small & 20.1 & 17.7 & 25.4 \\ AR & 0.5:0.95 & medium & 42.6 & 33.3 & 44.7 \\ AR & 0.5:0.95 & large & 50.8 & 44.4 & 56.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of three crack annotation methods. of crack alignment, the proportion of the five components among the original loss function is defined as \(rpn_{class_{loss}}:rpn_{bbox_{loss}}:class_{loss}:bbox_{loss}:mask_{loss}=1:1:1:1:3\). As given in Table 3, we first evaluated the performance of the model with different intersection exceedance associations with thresholds between 0.5 and 0.95 and intervals of 0.05. Results obtained with a 0.5 threshold are recorded as AP50. Similarly, AP75 represents the average precision when the threshold of IOU corresponds to 0.75. The intersection over union (IOU) is a metric used to evaluate the performance of object detection and image segmentation tasks [36]. IOU is calculated by dividing the area of intersection between the predicted and ground truth regions by the area of their union. The formula for IOU is as follows:  
\[\text{IOU}=\frac{\text{IntersectionArea}}{\text{UnionArea}} \tag{3}\]  
Figure 7: Crack labelling and sample preparation. (**a**) Labelling edges; (**b**) Saving annotation information as a binary graph; (**c**) Extracting edges using threshold method; (**d**) Visualization results of COCO format datasets using LabelMe. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Index**} & \multirow{2}{*}{**IOU**} & \multirow{2}{*}{**Area***} & \multicolumn{2}{c}{**Mask RCNN**} & \multicolumn{2}{c}{**Yolact**} \\  & & & **Bbox** & **Mask** & **BBox** & **Mask** \\ \hline AP & 0.5:0.95 & all & 46.5 & 14.7 & 30.1 & 21.1 \\ AP50 & 0.5 & all & 64.6 & 34.9 & 60.1 & 48.2 \\ AP75 & 0.75 & all & 50.6 & 11.4 & 30.4 & 13.9 \\ AP & 0.5:0.95 & small & 32.7 & 6.8 & 22.3 & 6.5 \\ AP & 0.5:0.95 & medium & 61.8 & 19.8 & 45.8 & 30.9 \\ AP & 0.5:0.95 & large & 59.5 & 24.2 & 17.4 & 38.5 \\ AR & 0.5:0.95 & all & 52.5 & 22.2 & 38.4 & 24.8 \\ AR & 0.5:0.95 & small & 33.8 & 14.8 & 24.3 & 9.9 \\ AR & 0.5:0.95 & medium & 65.4 & 25.5 & 48.8 & 34 \\ AR & 0.5:0.95 & large & 69.2 & 29.2 & 46.2 & 45.4 \\ \hline \multicolumn{5}{c}{Precision} & \multicolumn{2}{c}{76.9} & \multicolumn{2}{c}{89.2} & \multicolumn{2}{c}{88.42} & \multicolumn{2}{c}{63} \\ \multicolumn{5}{c}{(IOU = 0.5, threshold = 0.5)} & \multicolumn{2}{c}{76.9} & \multicolumn{2}{c}{89.2} & \multicolumn{2}{c}{88.42} & \multicolumn{2}{c}{63} \\ \hline \hline \end{tabular}  
* Area: the size or scale of the object instances within an image, including small, medium, and large.  
\end{table} 
Table 3: Crack-detection results using mask RCNN and YOLACT.