## 5 Discussion  
This study proposed an automated detection system that combines two CNN models to identify moisture within red walls. During model development, 5-fold cross-validation was employed to ensure the reliability and stability of the training and evaluation processes. The CNN model for red wall detection using visible images achieved an accuracy of 93.68%, while the model for moisture detection using thermal images reached a higher accuracy of 97.26%. To assess the overall performance of the proposed system, 100 pairs of visible and thermal images were input into the system, resulting in an average accuracy of 91.18%. This slightly lower accuracy could be attributed to certain cases where the red wall and non-red-wall regions occupied similar areas within the image, leading to occasional misclassification. Nevertheless, compared to manual assessment, the proposed system requires substantially less processing time, despite having slightly lower accuracy.  
Although the advancements demonstrated in this study are significant, there remains room for improvement. The current image alignment method is based on central point matching, followed by minor adjustments. While some local misalignments persist, the positional differences are minimal and do not significantly affect the overall recognition results. However, for future applications that require higher precision, further work will focus on optimizing the image preprocessing pipeline to minimize the misalignment between thermal and visible images. In addition, future work will incorporate the identification of various wall materials commonly found in heritage buildings, thereby enhancing the practical value and applicability of the proposed system. To achieve this, we plan to explore more advanced deep learning models, such as Faster R-CNN, You Only Look Once (YOLO),  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline Thermal Image & & & & \\ \hline Label & 1 & 2 & 3 & 4 \\ \hline Moisture & X & X & X & X \\ \hline Thermal Image & & & & \\ \hline Label & 5 & 6 & 7 & 8 \\ \hline Moisture & 64\% & 80\% & 63\% & 48\% \\ Moisture & Moisture & Moisture & Without moisture \\ \hline Thermal Image & & & & \\ \hline Label & 9 & 10 & 11 & 12 \\ \hline Moisture & 48\% & 90\% & 96\% & 97\% \\ Without moisture & Moisture & Moisture & Moisture \\ \hline \hline \end{tabular}
\end{table}
Table 11: The results from Figure 10b for detecting moisture in thermal images.  
and RetinaNet, to enable the accurate localization and classification of walls with diverse material compositions.  
The primary goal of this study as to improve the efficiency of heritage restoration. The proposed system was designed to support restoration professionals by enabling the automated analysis of visible and thermal images. Once the images are input, the system automatically identifies and highlights areas of moisture on red wall surfaces. This capability significantly accelerates the analysis process and enhances the effectiveness of moisture detection in heritage conservation efforts. Ultimately, the proposed system aims to streamline the diagnostic workflow and improve the reliability of moisture detection, thereby supporting more efficient and informed preservation strategies.