# Deep Learning-Based Crack Detection on Cultural Heritage Surfaces
## 4 Discussion
### Number of Images
#### 4.2.2 Impact of Image Quantity on SegNet  
This section examines the impact of varying image quantities on the performance of the SegNet model for wall crack detection. The original dataset comprised 50 images, including 17 images of cracks on plain walls, 17 on mottled walls, and 16 on brick walls. To enhance model stability and adaptability, data augmentation techniques (such as rotation, flipping, cropping, and scaling) were applied to generate additional training samples and expand the training dataset. Additionally, an independent set of 15 images (five images each of cracks on plain walls, mottled walls, and brick walls) was used for application analysis. The model's performance was evaluated using the Intersection over Union (IoU) metric.  
Based on the findings in Section 4.1.2, the optimal iteration count of 45,000 was used for training. The accuracy, loss, and IoU values were recorded across five different image quantities: 50, 100, 150, 200, and 300 images. The dataset was split into 70% for training and 30% for validation. Figures 14 and 15 illustrate the training/validation results and analysis of SegNet performance under different image quantities.  
When trained and validated with 50 images, the model achieved training and validation accuracies of 99.58% and 96.59%, respectively, with training and validation losses of 0.155 and 0.2393. While the accuracy demonstrated strong performance, the relatively high loss values indicated room for improvement. The IoU value was 0.678, suggesting suboptimal segmentation performance. With 100 training images, the model's training and validation accuracies were 99.35% and 97.71%, with losses reduced to 0.049 and 0.133. The IoU value increased to 0.772, indicating a notable improvement in segmentation capability.  
For 150 training images, the model achieved training and validation accuracies of 99.05% and 98.30%, with losses of 0.043 and 0.08. The further reduction in loss values indicated improved stability, and the IoU value increased to 0.798, reflecting enhanced segmentation performance. With 200 training images, the training and validation accuracies were 99.21% and 98.32%, while the loss values further declined to 0.024 and 0.76. Also, the IoU value increased to 0.82. This continued reduction in loss suggests improved generalization ability. When trained with 300 images, the model achieved its highest accuracy, with training and validation accuracies of 99.13% and 98.62%, respectively. The loss values were at their lowest (0.019 and 0.052), and the IoU value reached its peak at 0.832, demonstrating the best overall segmentation performance.  
Figure 14: Training and validation results of different image quantities using SegNet for (**a**) accuracy and (**b**) loss coefficient.  
Figure 15: IoU results for different image quantities using SegNet.  
A comparison of SegNet's performance across different image quantities indicates that increasing the number of images leads to consistent improvements in model performance for both training and validation datasets. Training with 300 images yielded the highest accuracy, the lowest loss, and the best IoU score. This finding aligns with [PERSON] et al. [56], who reported that increasing dataset size enhances model generalization and accuracy by providing richer feature learning. However, larger datasets also introduce higher computational costs and longer training times. Additionally, the diversity of image types plays a crucial role in model performance. Training on a diverse dataset improves the model's adaptability and accuracy across different image types, reducing misclassification rates.