## 4 Performance Evaluation and Analysis
### Results and Discussion  
#### 4.3.1 Impact of Preprocessing on Model Performance  
Table 6 presents the defect detection performance of the selected deep learning models on the real thermographic image dataset when trained with the synthetic thermographic image dataset before and after preprocessing. Through Table 6, the impact of applying the transformation module to the synthetic thermographic image dataset on performance can be analyzed. Improvements in accuracy, NPV, and specificity were observed with ResNet-50 and ViT, whereas DenseNet-121 showed a decline in performance. The observed improvements with ResNet-50 and ViT were analyzed by examining changes in the feature maps generated at their respective layers. The real thermographic images in Figure 9a, Figure 10a, and Figure 11a represent cases where the Pre-models failed to classify correctly, but the Post-models successfully classified them. Figure 9 illustrates the feature maps produced by Pre-ResNet-50 and Post-ResNet-50 for the same real thermographic image, while Figure 10 presents those generated by Pre-ViT and Post-ViT. These differences in the feature maps \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Accuracy** & **Precision** & **Recall** & **NPV** & **Specificity** \\ \hline RID-ResNet-50 & 52.54\% & 30.06\% & 99.55\% & 99.71\% & 40.46\% \\ RID-DenseNet-121 & 39.64\% & 25.28\% & 99.81\% & 99.79\% & 24.18\% \\ RID-ViT & 56.68\% & 32.06\% & 99.94\% & 99.96\% & 45.56\% \\ \hline Pre-ResNet-50 & 34.30\% & 7.92\% & 1.59\% & 37.64\% & 76.32\% \\ Pre-DenseNet-121 & 37.38\% & 21.55\% & 4.31\% & 39.38\% & 79.86\% \\ Pre-ViT & 44.32\% & 57.34\% & 3.38\% & 43.82\% & 96.34\% \\ \hline Post-ResNet-50 & 37.84\% & 13.79\% & 2.01\% & 39.98\% & 83.85\% \\ Post-DenseNet-121 & 35.67\% & 31.26\% & 12.02\% & 36.89\% & 66.06\% \\ Post-ViT & 51.62\% & 94.57\% & 14.81\% & 47.48\% & 98.91\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Performance Metrics of Deep Learning Models Before and After Applying the Transformation Module on Synthetic Thermographic Image Datasets. suggest that the models effectively reduced the domain gap between real and synthetic data through the transformation module, thereby enhancing data similarity. Figure 10: Comparison of Real Thermographic Images and Feature Maps Generated by Pre-ViT and Post-ViT. Figure 9: Comparison of Real Thermographic Images and Feature Maps Generated by Pre-ResNet-50 and Post-ResNet-50. In contrast, DenseNet-121 appears to have struggled in learning the characteristics of the transformed data produced by the transformation module. The variations in performance metrics are likely due to differences in the classifier layer. Figure 11 shows the feature maps generated by Pre-DenseNet-121 and Post-DenseNet-121 for the same real thermographic image, which appear almost identical. A comparison of the weights and biases in the classifier layers revealed that the weight differences ranged from \(-0.04\) to \(0.03\), and the bias differences were \(0.04\) and \(0.03\), respectively. These findings indicate that, despite similar feature maps, the two models established distinct decision boundaries. These differences were further validated using cosine similarity and Euclidean distance metrics. The cosine similarity between the weight vectors of the two models was \(0.458\), indicating significantly different weight directions, while the Euclidean distance was \(1.16\), reflecting a notable disparity in weight magnitudes. Consequently, these differences in weights and biases were identified as the primary reasons for the divergent classification outcomes despite identical feature maps. The impact of these weight and bias differences on performance metrics shows that Post-DenseNet-121 achieved improved recall and precision compared to Pre-DenseNet-121. This suggests greater reliability in predicting the positive class. However, this improvement came at the expense of reduced accuracy and specificity, as predictions for the negative class became less reliable.