# A Method of Defect Depth Estimation for Simulated Infrared Thermography Data with Deep Learning
## 4 Experimental Validation and Results
### Depth Estimation Results and Validation  
Result Analysis--Mean Absolute Error (MAE)  
In statistics, the mean absolute error (MAE) [18] is one of the metrics to evaluate how close the forecasts are to the eventual outcomes. In the machine learning field, it can indirectly reflect the accuracy and performance of the machine learning model (GRU). In this work, we adapted the MAE to assess the performance of the GRU for depth estimation with infrared thermography. As we can see from Figure 9(a), we trained the GRU to estimate the data from testing before the data normalization. The obtained training loss was 0.055. The MAE converged to 0.0165 mm. The error between the predictive value and actual value was within the range of \([-0.17\ mm,\ 0.17\ mm]\). After the standard deviation normalization for all the distributed data in Figure 9(b), the predictive value tended to approach the actual depth for the defect. The MAE error shrank to the range of \([-0.11\ mm,\ 0.11\ mm]\) and the training loss converged to 0.0295. This showed an acceptable performance with an improved estimate of the depth by the GRU model with standard deviation normalization. Figure 10: The mean absolute error and the training loss with GRU before (**a**) and after (**b**) standard deviation normalization. In Table 4, the estimated output 1 and the MAE 1 were obtained from raw data without normalization (average values over the two estimated outputs from CFRP specimen groups: (A, C); (B, D)). Then, the estimated output 2 and the MAE 2 resulted from raw data of the same procedure but with normalization. Based on Table 2, the calculated accuracy in the GRU model for the depth estimation reached 90% before data normalization (standard deviation). After normalization, the results provided an accuracy greater than 95%. This performance demonstrated that the GRU enabled a high performance for accurate depth estimation. This estimation is attributed to the ideal environment without experimental issues (noise; defective pixels). As shown in the Figure 11 below, the thermal data distribution from training (before; after) normalization has been indicated. In the data distribution (a), each group of color data curves (yellow; red; green) represents a different specific depth from defects. The thermal data were normalized by Equation (10) in Figure 10b. The distinguishable features of difference between the depths were recognized by the following principle: shallow defects had greater maximum thermal contrasts that occur earlier than deep defects. These results outperformed the previous works obtained from [7] for depth estimation in automated infrared thermography with regular neural networks. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Sample**} & **Expected** & **Estimated** & **MAE1 * & **Estimated** & **MAE2 * \\  & **Output (mm)** & **Output 1 (mm)** & **(mm)** & **Output 2 (mm)** & **(mm)** \\ \hline A C & 0.5 & 0.522 & 0.022 & 0.507 & 0.007 \\ A C & 0.6 & 0.604 & 0.004 & 0.603 & 0.003 \\ A C & 0.7 & 0.708 & 0.008 & 0.706 & 0.006 \\ A C & 0.8 & 0.814 & 0.014 & 0.807 & 0.007 \\ A C & 0.9 & 0.912 & 0.012 & 0.913 & 0.013 \\ A C & 1.0 & 1.041 & 0.041 & 1.025 & 0.025 \\ A C & 1.1 & 1.109 & 0.009 & 1.011 & 0.011 \\ A C & 1.2 & 1.222 & 0.022 & 1.218 & 0.018 \\ A C & 1.3 & 1.318 & 0.018 & 1.314 & 0.014 \\ B D & 1.4 & 1.420 & 0.020 & 1.418 & 0.018 \\ B D & 1.5 & 1.514 & 0.014 & 1.509 & 0.009 \\ B D & 1.6 & 1.630 & 0.030 & 1.619 & 0.019 \\ B D & 1.7 & 1.718 & 0.018 & 1.715 & 0.015 \\ B D & 1.8 & 1.820 & 0.020 & 1.817 & 0.017 \\ B D & 1.9 & 1.918 & 0.018 & 1.920 & 0.020 \\ B D & 2.0 & 2.013 & 0.013 & 2.005 & 0.005 \\ B D & 2.1 & 2.112 & 0.012 & 2.010 & 0.010 \\ B D & 2.2 & 2.225 & 0.025 & 2.222 & 0.022 \\ \hline \hline \end{tabular}  
* MAE means mean square error. An average over sample for absolute different between actual and predicted observation.  
\end{table} 
Table 4: The results of depth estimation of defects located in the designated specimen.