# Deep Learning-Based Crack Detection on Cultural Heritage Surfaces
## 4 Discussion
### Image Categories
#### 4.3.2 Impact of Image Categories on SegNet  
This section investigates the influence of different crack image categories on the performance of the SegNet model. Four distinct datasets were used for model training. (1) General crack image model: This dataset includes all crack image types, consisting of 17 plain wall crack images, 17 mottled wall crack images, and 16 brick wall crack images, expanded to 300 images through data augmentation. (2) Plain wall crack model: This dataset includes only plain wall crack images, originally 17 images, expanded to 300 through data augmentation. (3) Mottled wall crack model: This dataset includes only mottled wall crack images, originally 17 images, expanded to 300 through data augmentation. (4) Brick wall crack model: This dataset includes only brick wall crack images, originally 16 images, expanded to 300 through data augmentation. Each model was trained and validated over 45,000 iterations. Following training and validation, an additional 15 images (five plain wall crack images, five mottled wall crack images, and five brick wall crack images) were used for IoU analysis (see Figures 18-21). Figure 22 presents the training and validation results for SegNet models trained on different image categories, while Figure 23 shows the IoU results for application analysis. Among the four SegNet models, the general crack image model achieved the best performance, with training and validation accuracies of 99.13% and 98.62%, respectively. Training and validation losses were 0.019 and 0.052, with an IoU of 0.832. These results indicate high accuracy and stability in processing various crack image types. The plain wall crack model achieved training and validation accuracies of 98.93% and 98.07%, respectively, with training and validation losses of 0.079 and 0.096, and an IoU of 0.656. While the model demonstrated high accuracy and stability, the relatively high loss values suggest room for improvement in precision for this image type. The mottled wall crack model showed training and validation accuracies of 98.98% and 98.21%, respectively, with training and validation losses of 0.021 and 0.063, and an IoU of 0.563. Despite high accuracy and relatively low loss values, its IoU performance was suboptimal. The brick wall crack model achieved training and validation accuracies of 99.1% and 98.26%, respectively, with training and validation losses of 0.024 and 0.064, and an IoU of 0.48. Although the model exhibited high accuracy, the lowest IoU value among all models indicates weaker segmentation performance for this category. Overall, the general crack image model provided the best results, achieving the highest training and validation accuracies with the lowest losses and the best IoU score in application analysis. The three category-specific models, while maintaining over 98% accuracy and loss values below 0.1, exhibited weaker generalization, as reflected in their IoU scores of 0.656, 0.563, and 0.48 for the plain wall, mottled wall, and brick wall models, respectively. Figure 18: SegNet model trained on general crack images for analyzing three different types of crack images. Figure 19: SegNet model trained on plain wall crack images for analyzing three different types of crack images. Figure 20: SegNet model trained on mottled wall crack images for analyzing three different types of crack images. Figure 21: SegNet model trained on brick wall crack images for analyzing three different types of crack images. Figures 18-21 illustrate the analysis of 15 crack images using different models. The general crack image model effectively identified crack locations and regions across various image types (Figure 18). In contrast, models trained on a single image category performed well only on images with similar characteristics to their training data. For instance, the plain wall crack model performed well on five plain wall crack images (Figure 19), accurately identifying crack regions in four images, with only one misclassification.