1 Introduction

The past few years have witnessed the rapid development of deep learning techniques owing to their practical application insights [45, 47, 48, 51]. Serving as a popular deep learning algorithm, the generative adversarial network (GAN) has been successfully applied to a wide range of applications (e.g., image processing, image super-resolution, and image synthesis) because of its strong abilities in data generation and feature extraction [23, 42]. The training process of a GAN can be regarded as a minimax two-player game, where the generator aims to produce samples as real as possible and the discriminator aims to distinguish the generated sample and the real sample. Although it has been widely applied to various real-world applications, the original GAN suffers from the collapse problem.

To improve the generalization ability of the GAN and alleviate the collapse problem, considerable effort has been devoted to developing GAN variants [3, 8, 43, 44, 54]. Some representative GAN variants have been proposed by introducing regularization terms into the loss function, such as the information maximizing GAN (InfoGAN) [3], and the latent optimization for GAN (LOGAN) [44]. For example, the InfoGAN has been proposed in [3] where the mutual information has been utilized for learning hidden representations. In addition, a designed regularization term has been added in the loss function of the InfoGAN for improving the convergence rate of the algorithm. The pix2pix tool has been developed in [8] to handle the image-to-image translation task, where a designed regularization term has been introduced in the conditional GAN (CGAN) to improve the quality of the generated image. As a follow-up study, the pix2pixHD method has been presented in [43] where the feature matching loss has been utilized in the CGAN for high-resolution image synthesis and semantic manipulation. Motivated by the above discussions, a seemingly natural idea is to deploy a specific regularization term into the loss function of the GAN with hope to improve the generalization ability of the GAN for real world applications.

It is worth pointing out that the performance of deep learning algorithms is highly dependent on the hyperparameters which are generally selected according to experimental experience. During the past few decades, the selection of the hyperparameters has attracted an ever-increasing research interest, which can be treated as an optimization problem [35]. Due to their strong abilities in discovering the global optimum, the evolutionary computation approaches (such as the particle swarm optimization (PSO) algorithm, the simulated annealing algorithm, and the genetic algorithm) are popular for tackling the hyperparameter optimization problem. Among the evolutionary computation approaches, the PSO algorithm has received much research attention because of its easy implementation and competitiveness in finding a satisfactory solution with a reasonable convergence rate, see e.g., [21, 24].

Recently, the PSO algorithms have been successfully employed in optimizing the parameters of deep learning algorithms [11, 22, 30, 35, 40]. Unfortunately, the standard PSO algorithm suffers from the premature convergence problem and may easily be trapped in the local optimal solutions. To overcome the premature convergence problem, it is of practical significance to develop PSO variants with improved search capability. During the evolution process, all the particles are forced to explore around their own best positions and the global best position searched by the whole swarm. It seems natural to develop a new PSO algorithm which utilizes the neighborhood information to update the global best position according to the currently global best position and a certain number of particles that are close to the currently global best position. By exploiting the neighborhood of the global best position, the possibility of being trapped in the local optima could be decreased, which alleviates the premature convergence problem. In this paper, the developed neighborhood-based PSO algorithm is adopted to optimize the hyperparameters of the GAN for further crack detection on the non-destructive testing (NDT) data [5, 9, 41]. The developed parameterized GAN can be utilized for fault detection and structural health management of the oil pipeline, the gas pipeline and the aircraft.

The main contributions can be highlighted as follows: (1) a neighborhood-based PSO algorithm is utilized to optimize the hyperparameters of the GAN; (2) a specific regularization term is designed to improve the generalization performance of the GAN, which could enhance the contrast ratio of the images; and (3) the proposed PSO-based GAN method is applied to crack detection by using the eddy current pulsed thermography (ECPT) technique on the thermal data for the first time.

The rest of this paper is organized as follows. Section 2 introduces the background of the GAN. The framework of the proposed method is also provided. Main results are presented in Sect. 3, in which the experiment data is also discussed. Finally, conclusions are drawn and future research directions are discussed in Sect. 4.

2 Method

In this paper, the GAN is adopted to deal with the thermal data for crack detection by using the ECPT technique. The ECPT is a popular NDT method, in which the specimen is heated by using the eddy current. The ECPT process is recorded by a thermal imager. The spatial features (such as the crack, and the distance between the specimen and the thermal imager) are analyzed to construct the thermal images so as to justify whether the detecting point is a crack or not. In this section, the background information of the original GAN is provided. Then, the objective function of the modified GAN is introduced. The developed PSO-based hyperparameter optimization strategy and the training procedure of the modified GAN are also presented.

2.1 The background of the GAN

The original GAN consists of a generative network (also known as the generator) and a discriminative network (which is also called as the discriminator). The generator aims to produce the samples as real as possible, and the purpose of the discriminator is to distinguish the real samples and the so-called fake samples obtained by the generator.

The objective function of the conventional GAN is given as follows:

$$\begin{aligned} \begin{aligned} J(D,G)&= {\mathbb {E}}_{x \sim {\mathbb {P}}_{data}(x)}[\log D(x)] \\&\quad +{\mathbb {E}}_{{z} \sim {\mathbb {P}}_{z}(z)}[\log (1-D(G(z)))] \end{aligned} \end{aligned}$$
(1)

where z is random noise; x represents the reference sample; \(G(\cdot )\) is the generator; \(D(\cdot )\) is the discriminator; \({\mathbb {P}}_{data}(x)\) indicates that the x is selected from the distribution \({\mathbb {P}}_{data}\); and \({\mathbb {P}}_{z}(z)\) indicates that z is selected from the distribution \({\mathbb {P}}_{z}\). The main purpose of the conventional GAN is to pursue:

$$\begin{aligned} \begin{aligned} \min _{G} \max _{D}J(D,G). \end{aligned} \end{aligned}$$
(2)

2.2 The modified GAN

In the original GAN, the input of the generator is random noise (which obeys the Gaussian distribution), and the input of the discriminator is the real sample and the so called fake sample generated by the generator. In this paper, the GAN is applied to the crack detection on the thermal data obtained by using the ECPT technique. The temperature of the specimen for each spatial point is a data flow when the specimen is heated by the pulsed eddy current in an ECPT system [55]. The input of the generator is the detected thermal signal of one spatial point in the specimen. To be specific, the thermal signal utilized in this paper represents the temperature of the corresponding spatial point in the specimen during the NDT process. The output of the generator is a single pixel value, which is utilized to reconstruct the thermal image of the specimen. The input of the discriminator is the fake sample and the real sample (which is the corresponding pixel value in the detected thermal image). An example of the detected thermal information of a spatial point is shown in Fig. 1.

Fig. 1
figure 1

The thermal information of a spatial point in the specimen

To enhance the contrast ratio of the reconstructed image, a designed regularization term is added in the objective function of the modified GAN. The objective function of the modified GAN is shown in Eq. (3):

$$\begin{aligned} \begin{aligned}&V(D,G,\lambda _{1},\lambda _{2},\lambda _{3}) \\&\quad = J(D,G)+ \lambda _{1}\frac{G(z)}{\frac{1}{1+e^{-\lambda _{2}[var(z)-\lambda _{3}]}} + \delta } \end{aligned} \end{aligned}$$
(3)

where \(\lambda _{1}\) is the penalty factor of the objective function (1); \(\lambda _{2}\) and \(\lambda _{3}\) are the parameters of a sigmoid function which is used to adjust the output value of the generator; var(z) is the variance of z; \(\delta \) is a constant value; and J(DG) indicates the objective function (1).

As shown in Fig. 1, the temperature of the spatial point changes during the heating process. In fact, the heating energy of the crack area is higher than that of normal areas due to the excitation of the eddy current. In this case, the temperature curve of the spatial points that belongs to the crack area is different from that of the normal area. In this paper, the temperature curve of each spatial point is utilized to extract the features of the acquired thermal data. In the developed GAN, a designed penalty term is introduced in the loss function to enhance the temperature curve features of the crack information. Furthermore, the term \(\frac{1}{1+e^{-\lambda _{2}[var(z)-\lambda _{3}]}}\) is a sigmoid function, which contains two hyperparameters: \(\lambda _{2}\) and \(\lambda _{3}\). The characteristics of nonlinear and monotonicity of the sigmoid function could benefit the training process of the modified GAN by adjusting the hyperparameters.

In this paper, we aim to develop a new PSO algorithm that automates the optimal selection of the hyperparameters \(\lambda _{i}\) \((i=1,2,3)\) so as to solve:

$$\begin{aligned} \begin{aligned} \min _{\lambda _{1},\lambda _{2},\lambda _{3}}\min _{G} \max _{D}V(D,G,\lambda _{1},\lambda _{2},\lambda _{3}). \end{aligned} \end{aligned}$$
(4)

2.3 PSO-based hyperparameter optimization

In the designed objective function equation (3), the weights and biases of the generator and the discriminator are denoted by \(\theta _{g}\) and \(\theta _{d}\), respectively. \(\theta _{g}\) and \(\theta _{d}\) are optimized by using the Adam optimization algorithm. In this paper, three hyperparameters (\(\lambda _{1}\), \(\lambda _{2}\) and \(\lambda _{3}\)) of the GAN are chosen by using our developed PSO algorithm instead of manually selecting the parameters according to experimental experience.

The optimization process of the proposed objective function is depicted in Fig. 2, where each curve indicates a set of parameters. It can be seen in Fig. 2 that suitable parameters should lead to the minimal fitness value for the weights of the network (\(\theta _{g}\)) and the penalty factors (\(\lambda \)).

Fig. 2
figure 2

The optimization process of the proposed objective function

2.3.1 The PSO algorithm

Inspired by a metaphor of social interaction (such as fish schooling and birds flocking), the PSO algorithm has been developed for solving various optimization problems owing to its easy implementation and relatively fast convergence rate. In recent years, the PSO algorithm has received an ever-increasing interest due to its wide application potential. Each particle represents a candidate solution of the optimization problem.

Note that all the particles move at a certain speed in a D-dimensional search space. The velocity and position of the ith particle at the kth iteration are denoted by two vectors, which are the velocity vector \(v_i(k) = (v_{i1}(k), v_{i2}(k), \cdots , v_{iD}(k))\) and the position vector \(s_i(k) = (s_{i1}(k), s_{i2}(k), \cdots , s_{iD}(k))\), respectively. According to swarm intelligence, the position of each particle is automatically updated towards two positions, where one position is the personal best position found by the particle itself (pbest) denoted by \(p_i = (p_{i1},p_{i2},\cdots , p_{iD})\), and the other one is the global best position among the whole swarm (gbest) represented by \(p_g = (p_{g1},p_{g2},\cdots , p_{gD})\). The velocity and the position of the ith particle at the (\(k+1\))th iteration are updated as follows:

$$\begin{aligned} \begin{aligned} v_i(k+1)&= w v_i (k) + c_1 r_1 (p_i(k) - s_i(k)) \\&\quad + c_2 r_2 (p_g(k) - s_i(k)), \\ s_i(k+1)&= s_i(k) + v_i(k+1), \end{aligned} \end{aligned}$$
(5)

where k is the current iteration number; w is the inertia weight; \(c_1\) and \(c_2\) are the acceleration coefficients called as the cognitive parameter and the social parameter, respectively; and \(r_1\) and \(r_2\) are two random numbers which are uniformly distributed over the interval [0, 1].

2.3.2 The neighborhood-based PSO algorithm

As a powerful evolutionary computation algorithm, the PSO algorithm has been successfully applied to a variety of optimization problems. To alleviate the premature convergence problem, some variant PSO algorithms focus on the modification of the parameters, such as the PSO algorithm with linear decreasing inertia weight and the PSO algorithm with time-varying acceleration coefficients. Despite adjusting the parameters, some PSO variants have been proposed by designing topological structures [10, 34, 37]. For example, the widely used topological structures (consisting of all, ring, and clusters) have been adopted in [10] to update the velocity of the particles. In [34], a fully informed PSO algorithm has been put forward where each particle is adjusted according to its neighborhood information. In the standard PSO algorithm, all the particles are motivated to explore the search space based on personal best position of each particle and the global best position searched by the entire swarm. Motivated by variant PSO algorithms that utilize the neighborhood information, a seemingly natural idea is to explore around the discovered global best position based on the nearby particles.

In recent years, the neighbourhood information has been adopted to enhance the search capability of the PSO algorithms [16, 34, 37]. For example, a fully informed PSO algorithm has been proposed in [34], where the neighbourhood information of each particle is employed in the velocity updating model. In [16, 37], the particles are updated using the information of local best positions. To summarize, the aforementioned variant PSO algorithms employ the neighbourhood of all the particles, which makes it time-consuming to update the personal best particle and the global best particle during the population evolution process. As such, there is a need to put forward a new PSO algorithm which not only utilizes the neighbourhood information of the particle but also has relatively fast convergence rate.

In this paper, a neighborhood-based PSO algorithm is put forward where the neighborhood information of the global best position is employed for updating the velocity of the particles. In the proposed algorithm, a certain number of particles (which are close to the global best position) and the currently global best position are employed for updating the global best position. The designed neighborhood-based PSO algorithm has the capability of searching around the global best position at each iteration, which contributes to a thorough exploration of the problem space and may increase the possibility of escaping from the local optima.

Assume that there are several particles near the global optimal position and these particles are randomly distributed in the solution space. Based on this assumption, the neighborhood information around the currently global best position is employed to search for a candidate solution through the solution space. The neighborhood-based searching process of the introduced PSO algorithm is displayed in Fig. 3.

Fig. 3
figure 3

The neighborhood-based searching process

In this paper, \(p_g\) in equation (5) is updated as follows:

$$\begin{aligned} \begin{aligned} p_{g}(k)=\left\{ \begin{array}{ll} p_{g}(k), &{}\quad A \le B \\ \\ \frac{1}{n+1}\sum _{i=1}^{n}(p_g(k)+{\hat{s}}_i(k)), &{}\quad A \&{}gt;B \end{array} \right. \end{aligned} \end{aligned}$$
(6)

where \(A=F(p_{g}(k))\); \(B=F(\frac{1}{n+1}\sum _{i=1}^{n}(p_g(k)+{\hat{s}}_i(k)))\); \({\hat{s}}_i(k)\) is a neighborhood point of \(p_g(k)\) where the distance is determined by \(L_2\) norm; and n is the number of the neighborhood points; \(F(*)\) is the objective function of the corresponding optimization problem:

$$\begin{aligned} \begin{aligned} F(\lambda _{1}, \lambda _{2}, \lambda _{3}) = \lambda _{1}\frac{G(z)}{\frac{1}{1+e^{-\lambda _{2}[var(z)-\lambda _{3}]}} + c}. \end{aligned} \end{aligned}$$
(7)

Comparing with the velocity updating strategy of the standard PSO, the neighborhood-based updating strategy is capable of approaching the optimal solution with a faster convergence rate, which could benefit the hyperparameter optimization for deep learning techniques. It should be noted that the \(L_2\) norm has the ability of searching the solutions evenly in the target region compared with other norms, such as \(L_1\) norm or \(L_\infty \) norm. In this case, the \(L_2\) norm is employed to measure the distance between \(p_g(k)\) and its neighborhood points.

2.3.3 The hyperparameter optimization of the modified GAN

In this paper, the proposed neighborhood-based PSO algorithm is employed to optimize the hyperparameters (\(\lambda _{1}\), \(\lambda _{2}\) and \(\lambda _{3}\)) of the modified GAN. By using the optimized hyperparameters, the parameters of the modified GAN are then updated by employing the gradient descent method. The flowchart of the training process is depicted in Fig. 4.

Fig. 4
figure 4

The flowchart of the training process of the modified GAN

In Fig. 4, after the initialization process, the neighborhood-based PSO algorithm is first implemented for a certain number of iterations to obtain a proper set of hyperparameters. Then, the gradient-descent-based optimization algorithm is employed to optimize the parameters of the modified GAN for a certain number of epochs with the chosen hyperparameters. The whole process stops when the value of the objective function reaches the threshold and the pseudo-code is shown as Algorithm 1. In the training process of the modified GAN, the neighborhood-based PSO algorithm operates first to initialize the hyperparameters of the modified GAN. Then, the parameters of the modified GAN are tuned by using the Adam optimizer. Note that the parameters of the GAN remain the same when updating the loss function. In this case, the neighborhood-based PSO algorithm can be applied to optimize the parameters of other GAN variants, such as the Wasserstein GAN and the least squares GAN.

figure a

3 Experimental results

In this paper, the developed PSO-based GAN is exploited for the crack detection of the ECPT NDT images. In this section, experiment setup is first introduced and experimental results are then presented.

3.1 Experiment setup

In NDT, the thermography technique is widely used for crack detection. Particularly, the ECPT approach is one of the most popular NDT methods for subsurface crack detection. In the ECPT technique, the eddy current is excited in the specimen and the temperature of the crack area will be increased because the density of the eddy current is higher than that of the normal area. The heating process is recorded by using a thermal imager, which is shown in Fig. 5. It should be pointed out that it is difficult to identify the shape of the cracks by using the ECPT technique because the thermal energy in the material is transferred during the heating process.

Fig. 5
figure 5

The ECPT crack detection theory

The ECPT detection system is depicted in Fig. 6. The alternating current is generated by a power device to drive the heating coil, which excites the eddy current in the specimen. The thermal imager is employed to record the heating process with a high sampling rate. It should be noted that the specimen could be placed under or on the heating coil. Fig. 6 (b) shows the experimental specimen with the cracks with different sizes, which is made of stainless steel. Some of the cracks with big size are through-hole.

Fig. 6
figure 6

The ECPT detection system and the specimen

3.2 Experiment data

In the experiment, the through-hole crack and the general crack are used for the crack detection. A typical frame of the thermal image used for the training of the GAN is shown in Fig. 7. It can be seen that the crack with a bigger size is the through-hole crack and the smaller one is a general crack.

Fig. 7
figure 7

The typical thermal image of the training data

The pre-processing process is adopted to produce the real sample for training the discriminator. Notice that it is difficult to obtain a high-quality thermal image during the ECPT process. To obtain a relatively satisfactory thermal image of the specimen, the pre-processing process is adopted where the pro-processed image is utilized as the real sample for training the discriminator. In this paper, the real sample is the binarized thermal image where the pixel value of a crack point is “1” and the other non-crack points are with the pixel value of “0”. An example of the real samples is depicted in Fig. 8. In order to extract the features of the crack in the thermal data, a series of the thermal signal is utilized as the input of the generator. Each thermal signal corresponds to a pixel point in the thermal image. The thermal signal and its corresponding real sample constitute a pair of training data. As shown in Fig. 7, the size of an acquired thermal image is \(480~\times ~640\), and the total number of pixel points in this image is 307200. In total, there are 307200 pairs of training data.

Fig. 8
figure 8

The “real data” of the training data

The testing data (which includes three general cracks) is extracted from other area of the specimen. A typical thermal image of the testing data is shown in Fig. 9. We can see in Fig. 9 that the pixel value of crack area is small by comparing with the normal area. In addition, the obtained thermal image is corrupted by the noise, which makes it difficult to use a threshold to extract the crack area. In such a case, it is very hard to accurately extract the shape of the crack.

Fig. 9
figure 9

The typical thermal image of the test data

In the experiment of training the conventional GAN, the parameters \(\lambda _1\), \(\lambda _2\) and \(\lambda _3\) are manually selected. In the experiment that employs the PSO-based method, \(\lambda _1\), \(\lambda _2\) and \(\lambda _3\) are randomly initialized in the range of [-10, 10]. The parameters of PSO are set up as follows: the inertia weight is set to be \(w=0.7298\); the acceleration coefficients are \(c_1=1.4962\) and \(c_2=1.4962\); \(r_i(i=1,2)\) are random numbers which are uniformly distributed in [0, 1]; the number of neighborhood points corresponding to the global point is \(n=3\); the search range of hyperparameters \(\lambda _i (i=1,2,3)\) is in the range of (0, 2]; the number of the particles is set to be 30. These parameters are selected depending on experimental experience.

In this paper, the architecture of the GAN is a fully connected neural network. The detailed information of the modified GAN is listed as follows:

  • Information:

    Layers : 12;

    Learning rate: 0.01;

    Batch size: 100;

    Optimizer: Adam;

  • Generator:

    Input: 201;

    Hidden: 10, 30, 40, 50, 40;

    Output: 1;

  • Discriminator:

    Input: 1;

    Hidden: 20, 3, 12;

    Output: 1.

3.3 Results and discussions

To verify the effectiveness of the proposed PSO-based GAN method for crack detection, the original GAN is utilized for comparison. It should be noted that all the experiments are conducted with the same initial parameters. The size of each thermal image is \(480~\times ~640\). In total, 307200 thermal samples (signals) can be used as the input of the generator during the training process. For each iteration, 100 signals are randomly selected from the training dataset.

The experiment results of the original GAN for crack detection by using the ECPT NDT technique are shown in Fig. 10. It can be seen that the background noise is reduced which indicates the effectiveness of the original GAN. Nevertheless, it can be observed that there are still some corrupted areas around the cracks, which are produced by the excited eddy current in the non-crack areas. Additionally, the shape of the real crack area cannot be accurately extracted due to the heat transfer in the material. To conclude, the produced result by using the original cannot be used to accurately detect the cracks.

Fig. 10
figure 10

The result without the regularization term

The second experiment is conducted by using the modified GAN with a newly designed loss function, and results are shown in Fig. 11. In this experiment, the hyperparameters of the modified GAN are chosen as \(\lambda _1=0.4\), \(\lambda _2=1.4\) and \(\lambda _3=0.6\).

Fig. 11
figure 11

Experiment results by using modified GAN

In Fig. 11, the pixels of the crack area are enhanced prominently. It should be noted that the pixel values of the noise around the crack are relatively large comparing with that of other non-crack areas. To sum up, the introduced regularization term in the loss function contribute to the enhancement of the contrast ratio.

In the second experiment, the hyperparameters are determined depending on the experimental experience. Notice that the hyperparameters selected for the second experiment are not the optimal ones. To further improve the performance of the modified GAN, the fine-tuned hyperparameters of the network are determined, and the results are shown in Fig. 12. Here, the hyperparameters are set up as \(\lambda _1=0.01\), \(\lambda _2=0.1\) and \(\lambda _3=0.05\). It can be seen in Fig. 12 that the background noise is almost reduced and the pixel values of the cracks are enhanced. In addition, the shapes of the three cracks are very clear.

Fig. 12
figure 12

Experiment results of the modified GAN with manually fine-tuned hyperparameters

The experiment results of the proposed PSO-based GAN approach are shown in Fig. 13. In this experiment, the hyperparameters optimized by the developed neighborhood-based PSO algorithm are \(\lambda _1=0.5\), \(\lambda _2=0.75\) and \(\lambda _3=0.1\). We can see that the noise around the crack area is largely reduced by comparing with the results in Fig. 12. The shape of the crack is accurately extracted in Fig. 13. Furthermore, Fig. 13 presents a more accurate crack shape comparing with the real crack in the specimen shown in Fig. 6. Results shown that the proposed neighborhood PSO algorithm is capable of discovering the optimal hyperparameters for training the GAN. Comparing with the manually hyperparameter selection method, the proposed algorithm is capable of searching the optimal solution in a fast and accurate way. The updating process of the hyperparameters is shown in Fig. 14. Notice that the hyperparameters are updated once for every 100 iterations in Fig. 14. In addition, the perturbation of each parameter becomes small, which indicates that the result approaches the optimal solution.

Fig. 13
figure 13

The result by using the Adam algorithm and the improved PSO algorithm

Fig. 14
figure 14

The hyperparameters at each iteration

The error between the generated sample and the real sample is shown in Fig. 15. The sigmoid function is employed as the activation function for the output layer of the discriminator. It can be seen in Fig. 15 that the training error of the network converges very fast by using the hyperparameters optimized by the PSO algorithm. The running time comparison of the conventional GAN and the PSO-based GAN is shown in Fig. 16. In the experiment, the network is trained by 26 epochs with the batch size of 1000. It can be seen in Fig. 16 that there is little difference between the conventional GAN and the PSO-based GAN at each epoch. According to the CPU timer, the running time of the conventional GAN is 517.238s, and the running time of the PSO-based GAN is 635.439s. The training process becomes stable after running 1500 iterations as shown in Fig. 15. In this case, the employment of the PSO algorithm will not cause the time-consuming problem in training the GAN.

Fig. 15
figure 15

The cross entropy result

Fig. 16
figure 16

Comparison of running time

To summarize, we can draw the conclusion that the PSO-based GAN performs well for the crack detection on the ECPT NDT data. The shortcomings of the proposed GAN-based crack-detection method are listed as follows:

  1. 1.

    the labels of the data should be manually provided; and

  2. 2.

    a large amount of data is required to train an effective network.

The proposed GAN-based crack detection algorithm enhances the contrast ratio of the thermal images which benefits the crack detection on ECPT data. Actually, the proposed method can be applied to other data that have same features as the ECPT data. Specifically, the features of the crack area are different from that of the normal area. For example, the developed method can be employed for crack detection on magnetic optical imaging data and ultrasonic testing data.

4 Conclusion

In this paper, a novel PSO-based GAN approach has been put forward for ECPT crack detection. A designed regulation term has been introduced in the objective function of the modified GAN so as to enhance the contrast ratio of the reconstructed image. The neighborhood-based PSO algorithm has been developed to automatically select the hyperparameters of the modified GAN, where a neighborhood updating strategy has been proposed to make full use of the neighborhood information of the global best position. Finally, experiments have been conducted to verify the effectiveness of the PSO-based GAN approach. Experimental results have demonstrated the superiority of the proposed method over the original GAN and the modified GAN (with manually selected hyperparameter) for crack detection on the ECPT NDT data. In the future, we aim to: (1) employ other GAN variants (e.g. the Wasserstein GAN, the least squares GAN) and machine learning algorithms for crack detection on NDT data [2, 31, 32]; (2) improve the search ability of the neighbourhood-PSO algorithm by designing a novel strategy to assign appropriate weights to each individual particle in the neighbourhood [1, 13, 25, 26, 46]; (3) design an adaptive control strategy to developed GAN-based crack detection algorithm [4, 14, 18, 27,28,29, 33, 39, 49, 52, 53, 58]; (4) study the stability of the ECPT system [6, 7, 15, 17, 19, 20, 36, 38, 50, 56, 57]; and (5) apply the proposed algorithm to other applications, such as thermal-to-visible image translation and image super-resolution [8, 12].