Weld Defect Detection and Image Defect Recognition
Weld Defect Detection and Image Defect Recognition
Abstract—Welding defects not only bring several economic [5]. The quality of the steel plate determines the quality of
losses to enterprises and individuals but also threatens peoples downstream products. However, while producing the steel
lives. We propose a deep learning model, where the data-trained plates, impurities, scratches, and cracks often appear on the
deep learning algorithm is employed to detect the weld defects,
and the Convolutional Neural Networks (CNNs) are utilized to surface of the steel plates due to raw materials, production
recognize the image features. The Transfer Learning (TL) is equipment, and production processes [6]. Usually, welding
adopted to reduce the training time via simple adjustments and technology is utilized for connection and repair. However, if
hyperparameter regulations. The designed deep learning-based the welding is under qualifying, welding cracks will occur,
model is compared with other classic models to prove its effective- leading to severe accidents, such as steel plate rupture and
ness in weld defect detection and image recognition further. The
results show this model can accurately identify weld defects and boiler explosion, which not only brings economic losses to
eliminates the complexity of manually extracting features, reach- enterprises and individuals but also threatens peoples lives [7].
ing a recognition accuracy of 92.54%. Hence, the reliability and Therefore, the defect detection for steel welds is particularly
automation of detection and recognition is improved significantly. important.
Actual application also verifies the effectiveness of TL in weld At present, steel welds are usually detected by non-
defect detection and image defect recognition. Therefore, our
research results can provide theoretical and practical references destructive methods, in which X-ray is the common most
for efficient automatic detection of steel plates, cost reduction, method [8]. X-ray weld detection is divided into radiographic
and the high-quality development of iron and steel enterprises. film detection and digital detection according to the images.
Index Terms—convolutional neural network,deep learn- The former is highly subjective and prone to misjudgments
ing,image detect recognition,transfer learning,weld defect detec- [9], while the latter utilizes computer algorithms for image
tion recognition and detection [10]. The weld defect detection
methods have been researched extensively. Hou et al. (2019)
developed a model based on Deep Convolutional Network
I. I NTRODUCTION
(DCN) to extract deep features from X-ray images directly;
S the economy and society develop speedily, China has the classification capabilities of traditional methods and this
A entered industrial modernization, and its Gross Domestic
Product (GDP) has been continuously increasing [1]. The
model were compared using different datasets; the model had
an accuracy of 97.2%, which was much higher than traditional
steel industry is vital in industrial modernization. Steel exists feature extraction methods [11].Shevchik et al. (2020) pro-
in every corner of society, and the advancement of steel posed a method that could detect defects in process instability
technology can indicate the level of industrialization of a in real-time based on a deep Artificial Neural Network (ANN);
country [2]. However, the recent development of steel tech- finally, the quality classification confidence was between 71%
nology in China is slow because most steel enterprises are and 99%, revealing excellent application values [12].Ajmi et
at the stage of exchanging output for development; hence, al. (2020) provided a comparative evaluation method of deep
the investment in technological innovation is little, which learning network performance for different combinations of
significantly hinders Chinas steel industry [3]. Chinas iron parameters and hyperparameters and added an enhanced learn-
and steel products are gradually being eliminated due to the ing method to the dataset, which increased the model accuracy
continuous optimization of iron and steel technologies in de- by approximately 3% [13].Ajmi et al. (2020) also applied Ma-
veloped countries, causing losses of the iron and steel industry. chine Learning (ML) and image processing tools to traditional
Given the current development model, emphasizing ecological crack detection and proposed a novel classification method
and environmental protection, the production capacity of the based on deep learning network using data enhancement for
iron and steel industry is surplus, the demand declines, and random image transformation on the data; it turned out that
the competition within the industry becomes severe; therefore, the model had the best performance in a short time [14].
high-quality growth of steel enterprises has become the only Hence, current studies mostly focus on using deep learning for
way to develop the iron and steel industry [4]. Steel plate, the weld defect detection.However, a stable and efficient automatic
primary steel material, is widely utilized in various industries, detection system is never established. Most steel enterprises
such as aviation, shipbuilding, chemicals, and automobile still adopt traditional manual sampling methods, which have
2
many subjective factors and a low detection efficiency, causing Scars Holes Bubbles
quality problems of steel plates.
Therefore, the previous studies are summarized, and the
current problems in steel plate production are analyzing using
the production line status of a steel mills workshop as an
example. The five major weld defects are explored, including
inclusions, scratches, scars, roll marks, and bubbles. The deep
learning algorithm recognizes and detects weld defects; the Inclusions Iron oxide scale Roll printing
images of weld defects are processed, whose features are
extracted via Convolutional Neural Networks (CNNs). Then,
Transfer Learning (TL) is adopted to shorten the training time
via simple adjustments and hyperparameter regulations. The
results can lay a foundation for efficient automatic detection
of steel plates, eliminating technology constraints, reducing Edge cracking Scratches Scrapes
the operation costs, and high-quality development of iron and
steel enterprises.
Convolution
Pooling
Convolution
Pooling Flatten
Fully
Softmax
Traditional Machine Learing Transfer Learning
+Relu +Relu connected
Different Tasks Source Tasks Target Tasks
...
...
...
...
Learning Learning Learning Learning
Knowledge System
System System System
speed of the model [30]. Figure 3 shows the structure of CNN. Convolution,
pooling
Softmax classification
regression
In CNN, first, the cross-entropy loss function for the clas- High-dimensional
Target domain Data
sification error of the i-th sample(xi , yi )is defined as: dataset enhancement
Fully connected
features of target
prediction set
∑
Recognition result
output
Li = − ln esyi + ln esi (4)
Fig. 5: Deep learning-based image defect-recognition model
The output of a single sample(xi , yi )after passing the net-
work isf (x),and the corresponding sample loss value is:
E. Deep learning-based image defect-recognition model
Li (f (x), y) = − ln f (x)y (5)
For the recognition of welding images, the neuron struc-
The backpropagation rule of CNN updates the weight of ture of multiple hidden layers in the Deep Neural Networks
each neuron, making the overall error function of the model (DNNs) can be adopted to analyze, decode, aggregate, abstract,
continuously decrease. The convolution process is defined as and improve the input features according to the relevance
follows: of the iterative update of the training experience, thereby
∑ reducing the weight of the variable parts and increasing that
xlj = f ( xl−1
i × kij
l
+ blj ) (6) of the constant parts in the data distribution. In different
i∈Mj recognition tasks, some of the underlying features (such as
color, texture, edges, and corners) in the data have common
In (6),l is the number of convolutional layers in the
l visual patterns. Therefore, a deep learning-based image defect-
model,kij is the number of convolution kernels,blj is the
recognition model is built. The specific structure is shown in
additive bias,f is the activation function, and Mj is the input
Figure 5. The first step is to pre-train the model via large
image. The convolutional collection layer is defined as:
challenging image datasets in relevant fields. The publicly
xlj = f (βjl down(xl−1 l
i ) + bj ) (7) trained model parameters can be utilized directly to save time
cost and computing resources. Then, the model is transferred.
In (7),down(·)represents the data collection function,βjl and Parameters of the convolutional layer and the pooling layer are
blj represent the product bias and additive bias, respectively,f retained as the frozen layer based on the model pre-training.
is the activation function. The fully connected layer of the model and the size of the
2) Transfer Learning: TL can meet the end-to-end needs input image are changed to meet the model input requirements
in practical applications, with more expressive features. It and defect-recognition types. The data are retained; finally,
is a deep learning method that uses existing knowledge to the classification and recognition tasks are completed. The
solve the problems in different but related domains. TL has last step is fine-tuning the model. After fine-tuning, the model
become another popular research direction in deep learning can fit excellently and extract image features during training.
[31]. Compared with traditional machine learning methods, The model is initialized while the target domain is trained.
TL directly improves the learning effect on different tasks, The Backpropagation Neural Network (BPNN) and Stochastic
focuses on applying good source domain task knowledge to Gradient Descent (SGD) algorithm are employed to fine-tune
different but related target problems, and enables computers the model and correct the parameters. Afterward, a model with
to learn by analogy without relying on big data for initial excellent generalization ability is obtained until the training is
learning in every field. The training of traditional machine completed or the condition of terminating model training is
learning models requires labeled data from various fields, reached. Finally, the Softmax classifier is used to classify and
while data in different fields do not have TL performance on output the recognition results.
the same model. TL can utilize existing knowledge to learn
new knowledge. Figure 4 shows the comparison of the two
III. R ESULTS AND DISCUSSION
learning models. TL can organically utilize the knowledge in
the source domain to better model the target domain under the A. Experimental data and performance evaluation
condition of changes in data distribution, feature dimensions, 1) Experimental environment and data: This experiment
and model output conditions [32]. is based on Linux Ubuntu 16.04 operating system, Inter(R)
5
6000
Histogram
14000
5000 CDF
12000
4000
10000
3000 8000
6000
2000
Fig. 6: Some images in the ImageNet database 4000
1000
2000
0 0
100 120 140 160 180 200
Core(TM) I5-2400 Central Processing Unit (CPU) @3.10GHz, Original image grayscale histogram
4000 4000
is adopted. The momentum parameter is 0.9, the Batch- 3000
3000
Size is 20, and the learning rate is 1e-4. Table I shows the 2000
2000
configuration of the experimental environment. 1000
1000 0
0 -1000
TABLE I: Experimental environment 100 120 140 160 180 200
Gray histogram enhanced by Sin
Software and hardware Specific configuration information
Central Processing Unit Inter(R)-Core (TM) I5-2400
RAM DDR4 16G Fig. 8: Weld image and grayscale histogram before and after
CPU Hertz 3.10 GHz Sin function transformation
Operating system Ubuntu 16.04
Programming environment Python 3.5
1 2 3 4 5
41.84
D. Comparative experiment of industrial weld defect images
Figure 10 shows the experimental results of comparisons
Fig. 7: Image effects and the quantization results processed among industrial weld defect images. As the number of
by the filtering methods convolutional layers increases, the performance of the model
decreases. The proposed model presents higher ACC than
6
Forecast number(piece)
20
SSP-Net
0.9 19
SSD B2
18
0.8
17
ACC()%
RCNN
B3
0.7 16
BP
0.6
15
B4
RNN 14
0.5 13
CNN
B5
0.4 12
0 50 100 150 200 250 300 350 400 450 11
Different training data AC TD A1 A2 A3 A4
Different Methods
Testing data set
1
SSP-Net 1 0.9875 0.9768
0.9125 0.8875 DL
0.9 0.8625
SSD
0.8 TD
0.8
ACC(%)
RCNN
0.7 0.6
ACC(%)
BP
0.6
RNN
0.4
0.4 0.35 0.35
0.5 0.3
CNN 0.25
0.4 0.2
0 50 100 150 200 250 300 350 400 450
Different testing data 0
B1 B2 B3 B4 B5
Fig. 9: Performance comparison of different training models
Fig. 10: Comparative experiment of industrial weld defect
images. Note: AC represents the original number of steel
traditional machine learning algorithms under different defect plates; TD represents the results of using traditional machine
types, showing excellent robustness. The performance of the learning algorithms; A1-A4 represent the results using the
proposed weld detection algorithm is significantly improved. VGG16 model for sufficient training, 12-layer training,
The highest defect detection ACC reaches 98.75%, which 123-layer training, and 1234-layer training, respectively;
effectively improves the automation degree of industrial weld B1-B5 represent practical problems such as scratches, scars,
detection and recognition. roll marks, bubbles and inclusion.
IV. C ONCLUSIONS
A deep learning-based weld defect detection and image defect samples can be utilized to build a high-quality database,
defect recognition system is established based on summarizing the accuracy of the model can be improved effectively. Second,
previous research. This system aims to recognize five major given the increasing number of industrial datasets, building
weld defects: inclusions, scratches, scars, roll marks, and more complex neural network models is necessary. This re-
bubbles. The fitting problem during weld defect detection is quires using the Graphic Processing Unit (GPU) distributed
solved by image segmentation using image denoising and optimization algorithms to improve the efficiency of algorithm
enhancement. The problem of insufficient training data in operation. Finally, although the content of TL is introduced,
DNNs is solved by applying an improved activation function it is an addition to CNNs. Therefore, the problem of sample
adaptive pooling method to the model. The recognition prob- appearance caused by TL needs to be solved. In the future,
lem of DNNs on the image dataset of weld defect detection these aspects will be researched and analyzed more deeply,
is solved by TL, which reduces the model training time in an effort to help steel enterprises master the automatic
through simple adjustment and hyperparameter regulations. detection technology of weld defects, get rid of technology
The established system can effectively overcome the short- monopoly, and truly realize the high-quality development.
comings of traditional methods and has strong robustness
V. R EFERENCES
and high recognition accuracy in detecting weld defects from
images. The research results can provide a theoretical basis R EFERENCES
for the automatic detection and recognition of weld defects [1] Heng, Q. “Navigating Chinas Economic Development in the New
in steel processing enterprises. CNNs are utilized to break Era: From High-Speed to High-Quality Growth”. China Quarterly of
International Strategic Studies. 2018, 4(02), pp. 177-192.
through the bottleneck of manual extraction of defect features, [2] Wang, S., Y. Ma. “Influencing factors and regional discrepancies of the
effectively improve the automation of defect recognition, and efficiency of carbon dioxide emissions in Jiangsu, China”. Ecological
achieve a high recognition accuracy. Nevertheless, several Indicators. 2018, 90, pp. 460-468.
[3] Lyu, X., Shi, A., Wang, X. “Research on the impact of carbon emission
shortcomings are found. First, since there are no high-precision trading system on low-carbon technology innovation”. Carbon Manage-
industrial sample datasets, if the images of industrial weld ment. 2020, 11(2), pp. 183-193.
7
[4] Zhang, F., Yang, Z. “Development of and perspective on high- [26] Yang, M., Ma, H.H., Shen, Z.W., Xu, J.F. “Application of Colloid Water
performance nanostructured bainitic bearing steel”. Engineering. 2019, Covering on Explosive Welding of AA1060 Foil to Q235 Steel Plate”.
5(2), pp. 319-328. Propellants, Explosives, Pyrotechnics. 2020, 45(3), pp. 453-462.
[5] Woloszyk, K., ”Garbatov, Y. Random field modelling of mechanical be- [27] Elhoseny, M., Shankar, K. “Optimal bilateral filter and convolutional
haviour of corroded thin steel plate specimens”. Engineering Structures. neural network based denoising method of medical image measure-
2020, 212, pp. 110544-110551. ments”. Measurement. 2019, 143, pp. 125-135.
[6] Narawa, Y., Ishihara, S., Yamaguchi, R., Bessho, T., Liu, X., Kato, T., [28] Xiao, B., Tang, H., Jiang, Y., Li, W., Wang, G. “Brightness and contrast
Ikeda, K., Endo, A., Narita, T., Kato, H. “A study on shape of elec- controllable image enhancement based on histogram specification”.
tromagnetic guideway for continuous steel plates by analysis of multi- Neurocomputing. 2018, 275, pp. 2798-809.
body dynamics”. International Journal of Applied Electromagnetics and [29] Yao, P., Wu, H., Gao, B., Tang, J., Zhang, Q., Zhang, W., Yang, J.J.,
Mechanics. 2020, (Preprint), pp. 1-9. Qian, H. “Fully hardware-implemented memristor convolutional neural
[7] Trávnı́ček, P., Kotek, L., Junga, P., Koutný, T., Novotná, J., Vı́těz, T. network”. Nature. 2020, 577(7792), pp. 641-646.
“Prevention of accidents to storage tanks for liquid products used in [30] Fu, Y., Aldrich, C. “Flotation froth image recognition with convolutional
agriculture”. Process Safety and Environmental Protection. 2019, 128, neural networks”. Minerals Engineering. 2019, 132, pp. 183-190.
pp. 193-202. [31] Choi, E., Jo, H., Kim, J. “A Comparative Study of Transfer Learn-
[8] Guilherme, L., Benedetti, A., Fugivara, C. “A portable electrochemical ingCbased Methods for Inspection of Mobile Camera Modules”. IEIE
microcell for weld inspection of duplex stainless steel tanks”. Corrosion. Transactions on Smart Processing and Computing. 2018, 7(1), pp. 70-
2019, 75(4), pp. 340-348. 74.
[9] Ricketts, J. “Film-Screen Radiography in Bachelors Degree Program [32] Ferguson, M.K., Ak, R., Lee, Y.-T.T. Law, K.H. “Detection and segmen-
Curriculum”. Radiologic technology. 2016, 88(2), pp. 234-236. tation of manufacturing defects with convolutional neural networks and
[10] Vorobeychikov, S.E., Chakhlov, S.V., Udod, V.A. “A Cumulative sums transfer learning”. Smart and sustainable manufacturing systems. 2018,
algorithm for segmentation of digital X-ray images”. Journal of Nonde- 2, pp. 256-261.
structive Evaluation . 2019, 38(3), pp. 78-82. [33] Chrabaszcz, P., Loshchilov, I., Hutter, F. “A downsampled variant
[11] Hou, W., Wei, Y., Jin, Y., Zhu, C. “Deep features based on a DCNN of imagenet as an alternative to the cifar datasets”. arXiv preprint
model for classifying imbalanced weld flaw types”. Measurement. 2019, arXiv:170708819 . 2017, pp. 335-341.
131, pp. 482-489. [34] Luo, X., Lam, K.P., Chen, Y., Hong, T. “Performance evaluation of an
[12] Shevchik, S., Le, T., Meylan, Q.B., Farahani, F.V., Olbinado, M.P., Rack, agent-based occupancy simulation model”. Building and Environment.
A., Masinelli, G., Leinenbach, C., Wasmer, K. “Supervised deep learning 2017, 115, pp. 42-53.
for real-time quality monitoring of laser welding with X-ray radiographic
guidance”. Scientific reports. 2020, 10(1), pp. 1-12.
[13] Ajmi, C., Zapata, J., Martı́nez-Álvarez, J.J., Doménech, G., Ruiz, R.
“Using Deep Learning for Defect Classification on a Small Weld X-ray
Image Dataset”. Journal of Nondestructive Evaluation. 2020, 39(3), pp.
1-13.
[14] Ajmi, C., Zapata, J., Elferchichi, S., Zaafouri, A., Laabidi, K. “Deep
Learning Technology for Weld Defects Classification Based on Transfer
Learning and Activation Features”. Advances in Materials Science and
Engineering. 2020, 2020, pp. 25-31.
[15] Chu, M., Zhao, J., Liu, X., Gong, R. “Multi-class classification for steel
surface defects based on machine learning with quantile hyper-spheres”.
Chemometrics and Intelligent Laboratory Systems. 2017, 168, pp. 15-27.
[16] Zhou, S., Chen, Y., Zhang, D., Xie, J., Zhou, Y. “Classification of
surface defects on steel sheet using convolutional neural networks”.
Mater Technol. 2017, 51(1), pp. 123-131.
[17] Gong, R., Wu, C., Chu, M. “Steel surface defect classification using
multiple hyper-spheres support vector machine with additional informa-
tion”. Chemometrics and Intelligent Laboratory Systems. 2018, 172, pp.
109-117.
[18] Chu, M., Liu, X., Gong, R., Liu, L. “Multi-class classification method
using twin support vector machines with multi-information for steel
surface defects”. Chemometrics and Intelligent Laboratory Systems.
2018, 176, pp. 108-118.
[19] Li, J., Su, Z., Geng, J., Yin, Y. “Real-time detection of steel strip
surface defects based on improved yolo detection network”. IFAC-
PapersOnLine. 2018, 51(21), pp. 76-81.
[20] AbdAlla, A.N., Faraj, M.A., Samsuri, F., Rifai, D., Ali, K., Al-Douri,
Y. “Challenges in improving the performance of eddy current testing”.
Measurement and Control. 2019, 52(1-2), pp. 46-64.
[21] Wu, P., Chen, Z., Jile, H., Zhang, C., Xu, D., Lv, L. “An infrared
perfect absorber based on metal-dielectric-metal multi-layer films with
nanocircle holes arrays”. Results in Physics. 2020, 16, pp. 102952-
102959.
[22] Wu, D., Liu, Z., Wang, X., Su, L. “Composite magnetic flux leakage de-
tection method for pipelines using alternating magnetic field excitation”.
NDT and E International. 2017, 91, pp. 148-155.
[23] Yoo, Y., Baek, J.-G. “A novel image feature for the remaining useful
lifetime prediction of bearings based on continuous wavelet transform
and convolutional neural network”. Applied Sciences. 2018, 8(7), pp.
1102-1110.
[24] Dung, C.V., Sekiya, H., Hirano, S., Okatani, T., Miki, C. “A vision-based
method for crack detection in gusset plate welded joints of steel bridges
using deep convolutional neural networks”. Automation in Construction.
2019, 102, pp. 217-229.
[25] Shin, S., Jin, C., Yu, J., Rhee, S. “Real-time detection of weld defects
for automated welding process base on deep neural network”. Metals.
2020, 10(3), pp. 389-394.