1 Introduction

The world is beginning a new technological revolution based on industry 4.0 technologies such as artificial intelligence, robotics, and the internet of things. As an essential part of product quality control, NDT&E will become NDE 4.0 to connect with Industry 4.0 effortlessly. Therefore, it is essential to develop innovative NDT&E methods and techniques for NDE 4.0 [1, 2]. Although there are many facets of NDE 4.0, intelligent thermal nondestructive testing and evaluation (iTNDT&E) can be considered a technical core of NDE 4.0. TNDT&E is crucial in many industries to guarantee the quality of the manufactured component. It contributes to dependable system performance and evaluates the component’s health monitoring, preventing catastrophic failure. Typically, production or in-service manufacturing flaws will impair the operation of the components. Thus, to maintain its integrity, a thorough testing and evaluation procedure is required, preferably using a particular iTNDT&E process. It allows for inspecting, assessing, or examining a test structure without compromising its continued serviceability. It is essential in various industries, including the electrical, mechanical, civil, aerospace, automotive, and building sectors [3, 4]. Therefore, we propose developing the iTNDT&E technique to detect voids or hidden flaws in the Glass Fiber Reinforced Polymer (GFRP) composite material.

Due to the adequate specific strength, lightweight, resistance to corrosion, longevity, and ease of servicing as a building material for aircraft structures, GFRP composites have grown in popularity. Defects can change the structure’s toughness, so NDT&E plays an integral role in monitoring and determining the condition of material components. Timely monitoring and inspection of the components are required using a rapid and easy inspection technique to limit costs. Therefore, it is essential to construct automatic, fast, remote practices and procedures to analyze the recorded data to obtain the quantitative characterization of defects. TNDT&E provides attributes suitable for investigating almost all types of materials irrespective of their physical properties [5,6,7,8,9,10,11]. It is a remote, easily automatable method, and the testing time is shorter than other traditional, well-established NDT techniques such as X-Ray, Ultrasound, etc. Both passive and active TNDT&E techniques are possible. Without applying any induced thermal stimulus, the thermal response over the test structure is observed with a thermal camera under ambient conditions in passive TNDT&E. However, inexpensive, straightforward, extrinsic influences such as surface emissivity variations and environmental thermal reflections impact the measured heat distribution over the test sample. Due to these variables, the passive technique is unreliable in terms of its usefulness for TNDT&E. Also, it is difficult to detect the voids with smaller sizes and those found more profound in the test sample with better resolution. Thus, to find minor and deeper flaws, active thermography is preferred. Actively maps the temperature distribution over the test component while being influenced by a predetermined, controlled external thermal source [5,6,7,8,9,10,11,12,13,14,15]. It aids in turning it into a quantitative method of locating the test sample’s lesser and deeper flaws. The relevant active TNDT&E technique classifies as either pulse-based (pulse thermography (PT) [6] and pulse phase thermography (PPT) [11] or modulated thermography (lock-In thermography (LT) [12], linear frequency modulated thermal wave imaging (LFMTWI) [16,17,18], digitized frequency modulated thermal wave imaging (DFMTWI) [19, 20], depending on the shape of the external thermal signal. These techniques use a volumetric heat source to stimulate the testing sample’s surface and analyze the thermal data response over the component’s surface. The common feature, standard with all the TNDT&E techniques, is that the defect in the material inducing different thermophysical properties will also yield a flaw during thermal diffusion of the thermal waves and temperature gradients over the component’s surface. These techniques identify areas of varying thermal responses related to the flaw. This work is based on thermal-physical properties involved in thermal wave diffusions, such as the density of the material, the specific heat at constant pressure, and thermal conductivity.

The proposed work presents an advantageous DFMTWI with high-depth-resolved pulse compression for GFRP material defect detection. The high peak-power heat source requirement in pulsed thermography and limited depth resolution of lock-in thermography due to the fixed modulating frequency of sources are overcome by the proposed technique using appropriately digitally modulated excitation signal, limited both in time duration and frequency bandwidth. Using relatively low peak power heat sources with adequate experimentation time, DFMTWI confirms improved detection resolution and sensitivity. DFMTWI utilizes a digitized frequency-modulated evoking signal imposed over the test structure with frequencies and harmonics varying within a pre-defined band with almost equivalent energies [19,20,21]. Resultant thermal waves diffuse into the sample structure and produce a similar time-varying thermal distribution. Defects inside the sample alter the heat flow resulting in thermal gradients over the surface. This resultant thermal response over the sample surface is recorded and further processed using pulse compression analysis to construct pulse-compressed thermograms. Pulse compression concentrates the total supplied energy into a localized instant, improving depth resolution [22,23,24,25]. Additionally, this work proposed an algorithm for the automated detection of subsurface defects in GFRP composite material using pulse-compressed (PC) thermograms.

Further, the PC thermogram is convolved with Gabor filters by multiplying the thermogram by Gabor filters in the frequency domain. To save time, they have been saved in the frequency domain. Features are a cell array containing the result of the convolution of the thermogram with each of the forty Gabor filters [26,27,28]. This work aims to implement a classifier based on neural networks (Multi-layer Perceptron) for defect detection. The ANN is used to classify defect and non-defect patterns [29, 30]. The effectiveness of the proposed method is validated using the experimental GFRP sample with voids as the defects. The obtained findings unmistakably demonstrate the suggested scheme’s potential for automatically detecting sub-surface defects. At last, in order to quantify the defects detectability of materials, mean of defective and non-defective area as well as standard deviation of non-defective region are calculated and further signal to noise ratio of each defect is compared with respect to depth and diameter.

2 Theory

This section describes the theoretical analysis of the DFMTWI and the various post-processing methods adopted in this work for automated detection of the defects present in the GFRP sample structure.

2.1 Digitized Frequency Modulated Thermal Wave Imaging

Theoretically, the one-dimensional (1-D) heat equation to the homogeneous and semi-infinite medium with no heat sink or source present is examined to determine the thermal gradient profile over the test structure’s region. Equation (1) represents the 1-D thermal equation [19,20,21]:

$$\frac{{\partial }^{2}Th\left(z,t\right)}{{\partial }^{2}z}=\frac{1}{{T}_{D}}\frac{\partial Th\left(z,t\right)}{\partial t}$$
(1)

where TD stands for thermal diffusivity, (TD= λ/ρ⋅cp); ρ, cp., λ are the test structure’s density, specific heat, and thermal conductivity, respectively, and Th(z,t) denotes the surface’s thermal distribution profile. ‘z’ stands for diffusion direction, and ‘t’ stands for time.

Equation (2) represents the Digitized Frequency Modulated (DFM) heat flux (S):

$$S={S}_{0}\left(\frac{2}{\pi }{\int }_{{k}^{{\prime }{\prime }}=-\infty }^{\infty }{(-1)}^{{k}^{{\prime }{\prime }}}\frac{1}{2{k}^{{\prime }{\prime }}+1}{e}^{j\phi }\right)$$
(2)

where \( \varphi = 2\pi \left( {2k^{\prime\prime} + 1} \right)\left( {f_{i} t^{\prime} + \frac{{BWt^{\prime 2} }}{{2\tau }}} \right) \), S0 is the initial temperature, τ is the duration of excitation, fi is the base frequency, BW is the bandwidth, k″ is an arbitrary constant. On solving Eq. (1) for DFM heat flux (Eq. 2), the temperature distribution over the surface is given as in Eq. (3):

$$Th(z,t)={S}_{0}\left({e}^{-z\sqrt{\frac{2\left({f}_{i}+\frac{BWt}{\tau }\right){\sum }_{{k}^{{\prime\prime }}=-\infty }^{\infty }{(-1)}^{{k}^{{\prime\prime }}}{e}^{j2\pi \left(2{k}^{{\prime\prime }}+1\right)\left({f}_{i}t+\frac{BW{t}^{2}}{2}\right)}}{{T}_{D}g\left(t\right)}}}\right)\frac{2}{\pi }\left({\sum }_{{k}^{{\prime }{\prime }}=-\infty }^{\infty }{(-1)}^{{k}^{{\prime\prime }}}\frac{1}{2{k}^{{\prime }{\prime }}+1}{e}^{j\left(\phi -z\sqrt{{s}_{1}/2}\right)}\right)-\frac{2{S}_{0}}{\sqrt{\pi }}\times \frac{2}{\pi }\left({\sum }_{{k}^{{\prime\prime }}=-\infty }^{\infty }{(-1)}^{{k}^{{\prime\prime }}}\frac{1}{2{k}^{{\prime\prime }}+1}{e}^{j\phi }{\int }_{0}^{\frac{z}{2\sqrt{{T}_{D}t}}}{e}^{-\left[\frac{j\pi {z}^{2}}{2{T}_{D}{\mu }^{2}}\left({f}_{i}+\frac{BWt}{\tau }\right)(1+2{k}^{{\prime\prime }})\right]}{e}^{-{\mu }^{2}}d\mu \right)$$
(3)

where µ is the thermal diffusion length.

2.2 Signal Processing Using Pulse Compression

The recorded thermal response over the test sample’s surface is pre-processed to feature the zero-mean response (Thzeromean(x,y,t)) using an appropriate fitting polynomial. Further, the zero mean thermal distribution data is processed using pulse-compression. Pulse-compression data (TPC(τ)) is obtained using:

$${\text{T}}_{\text{P}\text{C}}\left({\uptau }\right)={Th}_{zeromean}\left({x}_{i},{y}_{j},t\right)\odot { T}_{Ref}\left(x,y,t\right)$$
(4)

where ‘\(\odot\)’ denotes the circular convolution operator, and TRef(x,y,t) is a chosen reference zero mean thermal signal. It is computed using complex multiplication in the frequency domain [24, 25, 31,32,33].

2.3 Gabor Feature Extraction

When the input data is too large or suspected to be redundant, the input data will be transformed into a reduced representation set (features). The process to obtain this vector of features is feature extraction. Consider that we have different defect images of different defects. In defect detection, we mainly highlight those parts of the defects common for all the defects. We need features that can successfully distinguish different defects from each other. Gabor features are generally used for both purposes. Gabor features are simply the coefficients of the response of Gabor filters. Gabor filters are related to Gabor wavelets; Each Gabor wavelet is formed from two components; a complex sinusoidal carrier placed under a Gaussian envelope. Thus, apart from the Gaussian envelope in each 2D Gabor wavelet, the sinusoidal carrier has a frequency and orientation of its own, and the system is similar to those of the human visual system, known as the Visual cortex. Gabor filtering is done by convolving images with Gabor kernels. Each window containing a Gabor wavelet is a Gabor kernel, and the size of the kernel are always odd pixels. After creating all the required kernels, which are about 40, each kernel convolves with the window. Gabor filters, modeling the responses of simple cells in the primary visual cortex, are simply plane waves restricted by a Gaussian envelope function [11]. The Gabor wavelet can represent a thermogram transform allowing the description of both the spatial frequency structure and spatial relations. Convolving the PC thermogram with complex, Gabor filters with five spatial frequency (v = 0,…,4) and eight orientation (ϕ = 0,…,7) captures the whole frequency spectrum, both amplitude, and phase [26,27,28, 31]. Once the image has been convolved with the Gabor filter bank, various statistical and mathematical operations can be applied to the filtered images to extract relevant features. The extracted features from all the filtered images are often concatenated to form a feature vector. The feature vector represents the thermal characteristics at various orientations and scales. This feature vector can be used for defect detection.

2.4 Artificial Neural Network (ANN): Multi-layer Feed-Forward Neural Network

The Artificial Neural Network (ANN) has been widely used to classify information regarding subsurface characteristics qualitatively. This contribution focuses on qualitatively assessing the subsurface anomalies using classification-based modality using ANN. The simplest form of the neural network is called perceptron. In Multi-layer feed-forward neural network, it is just several layers of single-layer perceptron neurons bonded to one another. The term ‘feed-forward’ means that any neuron’s output will be recurrent to the previous layers of the network. The input to the neural network is always a vector, even if it is as simple as a single-layer perceptron. For the proposed system, multi-layer perceptron (MLP) with feed-forward learning algorithms is chosen because of its simplicity and capability in supervised pattern matching [34, 35]. Our problem is suitable with the supervised rule since the input-output pairs are available.

In multi-layer feed-forward neural networks, we can change the transfer functions and set them for each layer separately and independently of the other layers. In the proposed network, we can be sure that no matter what the input, the output of the neural network is bounded between 1 and − 1 and can be as close as to them but can only be 1 and − 1 in the infinity or–infinity. Since it can hardly reach 1 or − 1, it is better to choose our desired outputs as 0.9 and − 0.9 for defect and non-defect. Because we will have better and faster convergence in the training phase, we can see 0 as our training error. However, if we choose our desired output, for instance, as 1, then it means the input of the transfer function should go as far as infinity to meet our desired output, which is problematic in some cases, and in other cases, it may never be feasible. Further, once we have created a neural network, we should initialize all its weights and bias values to random real numbers because the first moment we create a network, every weight is zero. So, no matter what the input, to help the training with the input, to help the training value of the weights should be uniformly spread. So, after creating the neural network, we should always randomize the weights.

2.5 Training the Network

The Multi-layer perceptron with the training algorithm of feed propagation is a universal mapper, which can, in theory, approximate any continuous decision region arbitrarily well. However, the convergence of feed-forward algorithms is still an open problem. It is well known that the time cost of feed-forward training often exhibits remarkable variability. It is, in most cases, the rapid restart method can prominently suppress the heavy-tailed nature of training instances and improve the computation efficiency. For training the network, we used the classical feed-forward algorithm. The training phases are like changing the weights and bias of the neural network and testing it on our training set. Then it adds small corrections to the initialized weights and again tests it. This work applies ‘scaled conjugate gradient back propagation (trainscg)’. It is the best and fastest training method for our purpose. It is an iterative training algorithm and uses much less memory than other training methods. The learning rate is fixed at 0.8, and the correction amount to weights from each iteration to the next. The maximum number of training iterations (also called epochs) is 400. After that, the training phase stops. Another parameter is the ‘goal’ parameter. Here, we kept it as 1e−3. It means that the training stops whenever the value of our choice falls below this value. Further, we have chosen mean square error (MSE) as the performance function. Furthermore, we have chosen 1e−7 for the goal. It means that after the network has been trained, if we test each pattern of our training set and compute the MSE between the desired output and the actual output for each pattern and get the absolute value of the results in a way that none of the parameters have negative, the average absolute error becomes less than 1e−7. Figure 1. shows the training of the neural network. Figure 2. illustrates the flowchart showing the training and testing procedure.

2.6 Generating the Train Sets

To generate the train sets, we created two folders (‘defect’ and ‘non-defect’). There are several images with PNG format in each of them. These images are the training sets that we have generated. All the image dimensions are 27 × 18. We got some of the defect images and put them in the folder. We added some more defect images to the folder. Finding defects was not the hard part. Finding non-defect images was usually strange because a defect is defined, but a non-defect can be anything. To do this, we started with 5 or 6 random non-defect images. Initially, we trained the neural network for the first time and tested it over an image without any defects. Tested means to cut every possible 27 × 18 patch from the thermogram and converted them into a vector format. Then we gave each vector to the input of the trained neural network. We got a high response for some of them during testing patches, let us say over 0.9. In those cases, we got them and put them in the non-defect folder. Then we trained the network the second time and did the same procedure again. Our training set should always have a balance between the number of defects and the number of non-defects. Every non-defect image we add to the training set will lower the effect of detecting defect images. So it can be considered a challenging task.

Fig. 1
figure 1

Training neural network

Fig. 2
figure 2

Flowchart illustrating the training and testing procedure

2.7 Defect Detection System

This section discusses the proposed approach to detect defects from a PC thermogram using a multi-layer feed forward neural networks and Gabor wavelets as its feature extraction method.

2.8 Experimentation

Consider a rectangular shaped (35 mm × 36.5 mm) GFRP sample with thickness 6.95 mm having 9 flat bottom holes corresponding to three different diameters (2 mm, 4 and 6 mm). Each row has 3defects that are spaced at different depths from the top surface of the material. Figure 3 show the schematic detail of the test material.

Fig. 3
figure 3

Schematic detail of the experimental GFRP test material

The material front surface is exposed to a digitized frequency modulated heat flux with fundamental frequencies varying from 0.01 to 0.1 Hz for duration of 100 s using two halogen lamps of 1 kW each. The lamps are kept at a distance of 1 m from the test material and at an inclination angle of 45° normal to the surface. The resultant thermal distribution on the surface of the material is thus monitored and recorded using an mid-infrared camera (3–5 μm range) with a spatial resolution of 320 × 240 at a frame rate of 25 (frames per sec). Figure 4 shows the experimental setup.

Fig. 4
figure 4

Experimental setup

2.9 Results and Discussions

The flowchart showing the steps followed is as shown in Fig. 5. The mean rise in temperature during active heating has been removed by fitting the captured thermal data using an appropriate polynomial fit. Further, the pulse compression is applied onto the mean zero thermal profile and the corresponding single pixel thermal distribution profile.

Fig. 5
figure 5

Flow chart representing the steps used

The 3-D representation of reconstructed pulse compressed thermogram obtained at a time instant of 13.2 s is as shown in Fig. 6.

Fig. 6
figure 6

3-D representation of a pulse-compressed thermogram obtained at a time instant of 13.2 s

2.10 Pre-selection

To have the initial guess of the location of the defects or to avoid inspecting every location, spatially cross-correlate a defect-like sub-image (template) of size 27 × 18 with the input pulse-compressed thermogram. In this work, we use two template defects, one with a bright background and the second with a dark (black) background.

2.11 Defects Searching

In the pre-selection stage, we recorded the location of all the pixels that should be checked in an image-like matrix called cell.state. The word ‘state’ comes from each pixel containing a 1 or a 0 as its value. The ON pixels, which have 1 as their value, are the location of the center of the 27 × 18 windows that should be checked. Now we should ensure that when the algorithm finishes, the values of all the pixels are − 1. During this phase, the value of some pixels may change. According to defined rules, some pixels may change their values from − 1 to 1. Other pixels may change their values to − 1.

If the result of the neural network is less than − 0.95 (it is pretty much near − 1), it means that according to our trained network, there is no way for a defect near this location. To save some time, we made sure that none of the pixels in the neighborhood of 3 city blocks needed to get checked. We deliberately delete all the ones around them and put − 1 in cell.state. This region we consider a black dot region.

If the result of the neural network is over − 0.95 but is still a negative value less than a pre-specified threshold (− 0.5), it still does not contain any defect, but we do not change anything around. This region we consider a pink dot region.

According to our network, if the returned value is over 0.95, that location definitely contains a defect. So, if the prophecy is true, any window around this location cannot contain any other defect. So, we ensure that in the area equal to 27 × 18, there will not be another pixel with state 1. This region we consider a blue dot region.

Suppose the returned value is between 0.5 and 0.95. It probably contains a defect, but it is better to search around it for a better match and consider it a green dot region. Suppose the returned value is between − 0.5 and 0.5, this area probably does not contain a defect, considered a red dot region. After that, we do the same procedure for all the 9 adjacent pixels, but with one difference. If the pixel was already checked, we leave it alone. If the pixel was in the blue zone, we mark all the 27 × 18 pixels around as checked, so that we are never going to check it again by changing their states to − 1. If the pixel was in the green zone, we mark it for the next iteration by changing its state to 1. All these steps make sure that we check every single pixel around our original candidate points to the extent that the neural network cannot find any other defects around the region.

2.12 Defect Marking

From this point forward, we have the neural network responses for most of the candidate locations. There is only a matter of deciding which locations to choose as defects. We first threshold it, with our pre-defined threshold value of 0.85. Then we dilate a disc structure element to avoid discontinuity. It sometimes happens and forces duplicate rectangles around the defect area. Figure 7 shows the marked defects.

Fig. 7
figure 7

Marked defects

2.13 Quantitative Analysis

Further, to quantify the defects detectability of materials, mean of defective and non defective area as well as standard deviation of non defective region are calculated and further signal to noise ratio of each defect is compared with respect to depth and diameter. For each detected defect, the Signal to Noise Ratio is calculated. It helps us assess how distinct and reliable the identified defects are compared to the surrounding material properties. A higher SNR indicates a stronger and clearer defect signal relative to the background variations. A lower SNR suggests that the defect signal may be less distinguishable from background variations. SNR is calculated considering 3 × 3 matrix across the centre of each defect using the equation described as [36, 37]

$$\varvec{S}\varvec{N}\varvec{R}=20Log \left(\frac{mean\;of\;defective\;area-mean\;of\;nondefective\;area}{standard\;deviation\;of\;nondefective\;area}\right)$$

Figures 8 and 9 shows the plot of SNR (dB) of defects varying with diameter (φ) for fixed depths and varying with depths for fixed diameter respectively.

Fig. 8
figure 8

SNR (dB) versus diameter for at three fixed depths (1.5 mm, 1.25 mm, 1 mm)

Fig. 9
figure 9

SNR (dB) versus depth for three fixed diameters (6 mm, 4 mm, 2 mm)

3 Conclusion

This paper proposed an ANN-based defect detection method for exploring subsurface defects using Gabor filter features with improved resolution and enhanced detectability. The classification network based on the improved hierarchical residual module with a simplified network structure can reduce the training parameters, shorten the training time, and improve the training stability. The effectiveness of the proposed method is demonstrated by the experimental results on GFRP composite sample using digitized frequency modulated thermal wave imaging. Further, pulse-compressed thermogram analysis improved testing sensitivity and depth resolution. For quantification, SNR is considered a figure of merit. Variation of SNR with depth and diameter is shown. The graphs show that as depth increases, SNR decreases, and SNR increases as diameter increases.