Next Article in Journal
A High-Performance UVA Photodetector Based on Polycrystalline Perovskite MAPbCl3/TiO2 Nanorods Heterojunctions
Previous Article in Journal
Adaptive Optics Tip-Tilt Correction Based on Smith Predictor and Filter-Optimized Linear Active Disturbance Rejection Control Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Weld Seam Tracking and Detection Robot Based on Artificial Intelligence Technology

1
School of Science, Xi′an Polytechnic University, Xi′an 710048, China
2
School of Mechatronic Engineering and Automation, Shanghai University, Shanghai 200444, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Sensors 2023, 23(15), 6725; https://doi.org/10.3390/s23156725
Submission received: 20 June 2023 / Revised: 14 July 2023 / Accepted: 25 July 2023 / Published: 27 July 2023
(This article belongs to the Section Sensors and Robotics)

Abstract

:
The regular detection of weld seams in large-scale special equipment is crucial for improving safety and efficiency, and this can be achieved effectively through the use of weld seam tracking and detection robots. In this study, a wall-climbing robot with integrated seam tracking and detection was designed, and the wall climbing function was realized via a permanent magnet array and a Mecanum wheel. The function of weld seam tracking and detection was realized using a DeepLabv3+ semantic segmentation model. Several optimizations were implemented to enhance the deployment of the DeepLabv3+ semantic segmentation model on embedded devices. Mobilenetv2 was used to replace the feature extraction network of the original model, and the convolutional block attention module attention mechanism was introduced into the encoder module. All traditional 3×3 convolutions were substituted with depthwise separable dilated convolutions. Subsequently, the welding path was fitted using the least squares method based on the segmentation results. The experimental results showed that the volume of the improved model was reduced by 92.9%, only being 21.8 Mb. The average precision reached 98.5%, surpassing the original model by 1.4%. The reasoning speed was accelerated to 21 frames/s, satisfying the real-time requirements of industrial detection. The detection robot successfully realizes the autonomous identification and tracking of weld seams. This study remarkably contributes to the development of automatic and intelligent weld seam detection technologies.

1. Introduction

With the rapid development of industrial technology, large-scale welding devices, such as pressure vessels and conduits, have been widely used in the energy industry. However, these devices are susceptible to weld seam damages or cracks, which, if left undetected, can escalate into serious safety hazards [1]. Manual inspection, the current predominant method for weld seam detection, faces limitations in terms of reliability and safety in line with modern manufacturing standards. Therefore, the development of weld seam tracking robots has drawn considerable attention in the field of nondestructive detection [2].
Welding seam tracking and detection robots can complete the task of welding seam detection of bridges, pipelines and storage tanks in minutes [3,4,5], and welding seam tracking and detection robots can not only effectively avoid the working environment that may bring health problems to workers but also consistently ensure a high quality of weld tracking detection [6]. A weld-tracking robot based on the real-time measurement of different grades of welds is proposed. A combined structure with a laser rangefinder, light detection and ranging and depth camera is installed on the rolling platform, which can effectively improve the coverage of weld tracking detection [7]. Based on the six-axis robot arm seam tracking experimental platform, a seam tracking detection robot is designed, which can realize stable seam tracking detection under external interference [8]. A spherical tank inspection robot system is proposed, which can identify and track the weld on the shortest running route based on the visual sensor and artificial intelligence algorithm [9].
Large-scale welding devices often require high-altitude detection, posing technical challenges for weld seam tracking and detection robots, particularly in terms of wall-climbing functionality. Extensive research has been conducted in this area, focusing on magnetic wall-climbing robots [10,11,12] and negative-pressure wall-climbing robots [13,14,15]. Negative-pressure wall-climbing robots rely on flatness for effective adsorption, making them more suitable for smooth walls. However, large weldments exhibit diverse structures and weld seams, posing remarkable challenges to the adsorption capacity of negative-pressure wall-climbing robots. In addition, permanent magnet adsorption or electromagnetic adsorption methods offer more pronounced advantages over negative-pressure adsorption because large weldments primarily consist of ferromagnetic materials.
Weld seam tracking and detection robots must achieve a stable mobile platform in complex environments and possess accurate and efficient capabilities for weld seam feature and path extraction. Optical sensors and image processing algorithms are commonly utilized for this purpose [16]. A visual detection system based on structured light and an image processing algorithm employing laser contour feature points have been used to measure the sizes of different weld seams, enabling defect detection based on visual characteristics [17]. The Harris corner detector and the Canny operator have been applied to eliminate the influence of natural light on weld seam feature extraction, making them suitable for differently shaped weld seams [18]. The Gabor filtering algorithm has been adopted to extract weld seam features from images, followed by threshold segmentation to obtain weld seam contours and edges [19]. An image preprocessing method based on the Sobel filtering algorithm and a noise reduction method based on dilation and erosion operations are proposed to realize the autonomous detection of differently shaped welding paths, achieving an error rate within 2.6% [20]. The weld seam identification process is divided into two stages to enable the accurate identification of weld trajectories under varying lighting conditions. The first stage employs an image preprocessing algorithm based on illumination correction to eliminate the influence of illumination. In the second stage, an image extraction algorithm based on iterative threshold segmentation and morphological processing is proposed to obtain continuous binary images of weld seams. The central point extraction algorithm and polynomials based on the least squares method are then applied to obtain the fitted curve of the weld seam center [21].
Although the above methods partially capture the characteristics of weld seams, the complex environment surrounding weld seams, including surface rust and corrosion, can adversely affect the accuracy and speed of traditional algorithms. With the development of deep learning, neural networks have found widespread application in object detection [22,23,24]. A novel approach for automatic weld seam detection and identification based on the deep convolutional neural network (DCNN) model is proposed, involving the training of two network models. The generative adversarial network is used to generate high-quality training samples, and the DCNN network is utilized for weld seam identification and localization, achieving an average precision of 91.02% [25]. Given the insufficient weld seam training samples, a data augmentation method based on a deep semantic segmentation network is employed to expand the dataset, which is then used to train the lightweight YOLOv3 model, enabling the rapid localization of weld trajectories [26]. A weld seam detection and target recognition algorithm based on YOLOv5 is proposed for complex environments to ensure cost-effective computation, achieving a recognition accuracy exceeding 90% and improving operational efficiency by 12% [27]. A weld seam instance segmentation algorithm based on Mask R-CNN is proposed to address the influence of target detection on weld seam tracking accuracy, demonstrating a single-path planning time of 180 ms and an average precision of 67.6% [28].
Despite the progress made in the aforementioned studies toward achieving weld seam tracking and detection, certain issues persist. The algorithm’s recognition accuracy remains seriously affected by the complex environment of weld seam detection robots. Although the above research primarily focuses on seam tracking and detection functionality, several challenges remain, particularly regarding the complex environment’s influence on algorithmic recognition accuracy. Given that algorithms are executed on the robot’s hardware equipment, path planning algorithms should prioritize minimizing computational cost. Consequently, this study aims to address these concerns by (1) establishing comprehensive weld seam datasets through data augmentation and (2) enhancing the DeepLabv3+ semantic segmentation model to realize weld seam tracking and detection with low computational costs, minimal time delays, and high accuracy.

2. Implementation of the Weld Seam Tracking and Detection Robot System

2.1. Mechanical Design of the Robot

In this study, a weld seam detection and tracking robot was developed, as shown in Figure 1, to realize stable adsorption and movement performance for weld seam tracking and detection on the wall. The design of the wall-climbing robot’s adsorption and movement modes needed to meet higher requirements to accommodate wall corrosion and unevenness.
According to the measurement and functional requirements, a wall-climbing detection robot for seam identification and tracking is designed. The detection robot consists of four McNamham wheels, four DC motors, an adsorption module, a raspberry pie and a robot body frame. A camera is installed at the front of the robot to collect weld images in real time, an adsorption module is installed at the bottom for the robot to climb the wall, and a raspberry pie is installed at the top for the deployment and implementation of the neural network algorithm at the embedded end. Four motors are installed around the robot frame to control the four wheels of the car body, respectively, so as to control the movement speed and direction.
A wheeled movement mode was chosen to ensure the safety of the wall-climbing robot during movement on the wall and prevent slipping or falling hazards. This mode offered flexibility and strong obstacle crossing capabilities. The robot can move in different directions and steer at various angles by adjusting the wheel speeds on both sides, allowing it to adapt to different weld seam surfaces.
For safe crawling on vertical or angled wall surfaces, the wall-climbing robot required a stable adsorption force, necessitating the design and selection of an appropriate adsorption device. Existing wall-climbing robots employ three main adsorption methods: negative-pressure adsorption, magnet adsorption, and bionic adsorption. In this study, the permanent magnet adsorption method was adopted due to its simpler structural design and more reliable adsorption force compared to those of the other two methods.
The adsorption magnet used in this study was an industrial-grade permanent magnet, specifically a rubidium magnet made of rubidium iron boron, NdFeB. The performance parameters of the magnet are shown in Table 1. Both circular and rectangular permanent magnets were selected to ensure stable adsorption capacity.
In the process of weld seam detection and tracking, the detection robot operates in two states: the normal climbing state and obstacle-crossing state. Obstacle crossing ability is an important performance index of the robot because it needs to cross weld seams during operation. The height of the weld seam is approximately 3–4 mm. A magnetic array structure was designed in this study to enhance the robot’s ability to cross obstacles and maintain a self-adaptive adsorption force while turning. The structure was equipped with different numbers of adsorption magnets in front of the car body, behind the car body, and on the belly of the car body. Figure 2 depicts the permanent magnet array structure, which includes two permanent magnet structures at the front and rear. Inside, two circular magnets and a cuboid magnet were overlaid. The magnet modules in the belly of the car body were composed of four circular magnets. The front and rear ends of the car body were equipped with superposed magnets to increase the adsorption capacity by realizing the superposition of magnetic fields. The magnets in the belly of the car body were used to maintain stability during normal detection and obstacle-crossing.
In practical applications, achieving continuous changes in the magnetizing direction of permanent magnets is not feasible. This study employed discrete permanent magnets spliced together in an approximately sinusoidal magnetizing situation. Under this configuration, the magnetic induction intensity ( z > 0) on the strong magnetic field side of the linear permanent magnet array can be expressed by Formula (1),
{ B 0 = B r ( 1 e k d ) sin ( π / m ) / ( π / m ) B y = B 0 e k z sin k y B z = B 0 e k z cos k y
where m represents the number of magnetic blocks in each wavelength; B 0 denotes the surface magnetic induction intensity of the strong magnetic field side of the magnet, where the greater the value of m is, the closer B 0 is to the ideal value; B r is the magnetic induction intensity. B y and B z represent the components of the magnetic induction intensity in the y and z directions, respectively; k is the component of wave vector in z direction; d is the distance between the permanent magnet and the ground; y and z are the components of the relative position in the direction of y and z coordinate axes, respectively.
The magnetic field force of the magnet was obtained on the basis of the gap between the independent magnet and the wall surface. Assuming the magnet was magnetized in one direction along the long edge, the magnetic force can be approximated using Formula (2),
F = μ r 1 2 μ 0 μ r B 2 S
where μ r is the relative permeability; μ 0 is permeability of vacuum; B is the magnetic induction intensity; S is the area of the plane perpendicular to the magnetic field direction.
The performance parameters of the weld seam-tracking robot are displayed in Table 2. The robot had a dead weight ( M G ) of 1.70 kg and a maximum payload capacity ( M l ) of 1.96 kg. The robot obtained an adsorption force ( F ) of 366.12 N and an obstacle crossing height ( h m ) of 11 mm due to the improved wheeled movement mode and the design of the adsorption structure. Its maximum climbing speed ( V m a x ) was set to 0.2 m/s, and it had a maximum continuous working time ( T ) of approximately 100 min. The robot had a sufficient adsorption force, obstacle crossing height, and endurance capacity for wall movement as determined through the analysis of the performance parameters. Improving the performance of the weld seam-tracking robot can expand its application range and reduce operational risks.

2.2. System Composition

The weld seam recognition and tracking system of the seam-tracking and detection robot consisted of multiple components, including seam recognition, path fitting, motion control, and data transmission. As shown in Figure 3, the robot system included a visual system, a seam tracking and detection system, a motion control system, and a remote computer. The visual system comprised an industrial camera and a two-degrees-of-freedom steering platform, enabling the comprehensive acquisition of weld seam images. The motion control system consisted of the main controller (Raspberry Pi), a DC motor, a Mecanum wheel, and a remote-control unit, which facilitated motor functions and remote control in conjunction with the remote computer. The weld seam detection system was used to locate the position information of the weld seam, and the image preprocessing subsystem reduced the computational load of the system while enhancing image quality. The path fitting system was used to fit the centerline of discrete information points, enabling the robot to navigate along the weld path. The robot designed in this study addressed the following challenges:
(1)
Achieving stable operation on the steel plate wall surfaces using the Mecanum wheel in combination with the permanent magnet array;
(2)
Identifying and extracting weld seams through the weld seam recognition system;
(3)
Tracking weld seams by fitting the welding path.

3. Design of the Weld Recognition and Tracking Algorithm

3.1. Establishment of Weld Seam Datasets

3.1.1. Construction of Initial Weld Seam Datasets

The weld seam detection algorithm used in this study was the DeepLabv3+ semantic segmentation network model based on deep learning. The weld seams needed to be segmented from the background image through region segmentation to annotate the weld seam image datasets and meet the requirements of the semantic segmentation network model. A self-built dataset consisting of 776 weld seam images was used, which were obtained from three different datasets, as shown in Figure 4. First, 300 open-source datasets with consistency, a background, and environment were downloaded from the Kaggle data analysis platform [29]. Additionally, 300 real weld seam images, varying in environment, background, and size, were collected in the laboratory environment. Finally, 176 images were obtained via crawling online using Python-based crawler technology.

3.1.2. Augmentation of Weld Seam Data

Both offline and online data augmentation strategies are used in this study. Offline data augmentation strategies are carried out before network training, and online data augmentation strategies are carried out during data set reading after network training.
In deep learning, the task of semantic segmentation is to extract and segment the semantic information of the target image. When training samples, network models are prone to overfitting when the data set size is extremely small. Therefore, an offline data augmentation strategy was performed in this study using the copy paste [30] method. The original 776 weld seam images and their corresponding mask images were simultaneously subjected to data augmentation. The data augmentation results are shown in Figure 5. The 776 augmented new weld seam images were mixed with the original weld seam images, resulting in a new dataset containing 1552 weld images. The corresponding label dataset was also expanded to 1552 images, effectively preventing model overfitting during training and increasing the data size for model training. In addition, the online data expansion strategy adopts a new data enhancement strategy to randomly generate new data graphs during training, including brightness adjustment, image cropping, image flipping and filtering for denoising.
The dataset was divided into a 7:3 proportion to obtain the original image dataset. Subsequently, the dataset was annotated by segmenting the weld seam from the background image using region segmentation. In this study, the Labelme image annotation tool was employed to annotate the weld seam images and obtain labeled sample data for the dataset, as shown in Figure 6.

3.2. Establishment of a Semantic Segmentation Model

3.2.1. DeepLabv3+Basic Model

The DeepLab semantic segmentation network based on cavity convolution was proposed to address issues, such as the sharp decline in image resolution and the loss of original information caused by continuous pooling or downsampling operations in full convolutional segmentation networks. As the latest version of the DeepLab series, the DeepLabv3+ semantic segmentation network [31] has exhibited excellent performance in multiple datasets. As shown in Figure 7, the DeepLabv3+ network comprises two main components: Encode and Decode.
The fundamental principle behind the DeepLabv3+ semantic segmentation network model is to extract and fuse image features in the Encode phase, followed by feature map analysis in the Decode phase. The DeepLabv3+ network’s performance advantage lies in the ASPP module, which combines cavity convolution with feature pyramid pooling to extract and fuse multiscale image feature information.
In this study, the DeepLabv3+ model was improved from two aspects. On the one hand, an attention mechanism was introduced to improve the information extraction ability of low-resolution feature maps. On the other hand, the network model was optimized to reduce its complexity, resulting in the improved network structure shown in Figure 8.

3.2.2. Introduction of Lightweight Attention Mechanism Convolutional Block Attention Module

The CBAM is a modular hybrid attention mechanism that was first proposed by Woo et al. [32]. It calculates attention weights from two independent dimensions, channel and space, and then applies these weights to adjust the input feature map adaptively. The structure of CBAM is shown in Figure 9.
The channel and spatial attention modules of CBAM are responsible for filtering the extracted features, ensuring the retention of important information during the encoding stage to enhance segmentation. The channel attention mechanism focuses on learning channel-specific information that greatly influences the network, and the spatial attention mechanism captures position relationship information to improve the network’s learning ability. The network can effectively learn the characteristics of weld seam images and suppress redundant information by incorporating CBAM into the encoding module of the DeepLabv3+ model, thereby facilitating the extraction of edge features of weld seams.

3.2.3. Lightweight Improvement of the Model

Since semantic segmentation needs to deal with the classification of each pixel, it requires more comprehensive feature extraction and representation learning of the input image. This requires the use of more convolution operations to extract features in the image and to abstract and represent those features layer by layer in order to classify them at each pixel. In addition, semantic segmentation typically requires processing smaller input images, so the network typically requires deeper convolutional layers to extract sufficient high-level semantic features. The goal of lightweight network design is to reduce model parameters and complexity while maintaining accuracy. The DeepLabv3+ semantic segmentation network used in this study obviously improved detection accuracy, but it had a model weight of 308 M, making it unsuitable for deployment on the hardware platform of the wall-climbing robot. In this study, the backbone network and convolution module of the network model were lightweighted.
(1)
Structural design of the backbone network
The original DeepLabv3+ model employed Resnet [33] networks as the backbone network for feature map extraction. Although Resnet has the advantage of improving accuracy, it consists of stacked residual structures, resulting in an extremely deep network with a large number of parameters and computations. In this study, therefore, the original deep backbone network was replaced with Mobilenetv2 [34] which has a lighter network structure, as displayed in Figure 10.
(2)
Design of the convolution module
After Moblienetv2 replaced the original deep backbone network, the model was successfully lightened. However, its size still did not meet the requirements of the hardware platform for embedded devices. On the basis of the improved backbone network, cavity depthwise separable convolution was introduced. All the traditional 3 × 3 convolutions were replaced with cavity depthwise separable convolutions, effectively reducing the number of parameters and computations.
The cavity depthwise separable convolution involves separating the channel and spatial dimensions in the feature map using separable convolutions. Compared to the traditional convolution kernel, hole convolution can greatly reduce the number of network parameters. This is because the hole convolution uses zero padding arranged in intervals to replace the traditional continuous convolution operation, thus avoiding a lot of parameter calculation and storage. Because the convolution operation of hole convolution can be realized via interval filling, sparse convolution can be used to speed up the training and reasoning process of the network. This can greatly improve the computing efficiency and reduce the consumption of computing resources. Depthwise separable convolution consists of two parts: depthwise convolution and pointwise convolution. The input feature map size is set to D i × D i , the number of channels is N , the size of the standard convolution kernel is D j × D j , and the number of output feature map channels is K . The calculation process of the standard convolution kernel, Q 1 , is as follows:
Q 1 = D i × D i × N × K × D j × D j
The calculation process of the depthwise separable convolution kernel, Q 2 , is as follows:
Q 2 = D i × D i × N × D j × D j + N × K × D i × D i
The ratio of Q 2 to Q 1 is
Q 2 Q 1 = D i × D i × N × D j × D j + N × K × D i × D i D i × D i × N × K × D j × D j = 1 K + 1 D j 2
On the basis of the above formulas, the depthwise separable convolutions require fewer computations. The receptive field of the convolution kernel can be enlarged at the same computational cost by controlling the expansion rate, allowing for the extraction of multiscale contextual information as much as possible.

3.3. Welding Path Fitting

3.3.1. Weld Seam Edge Detection

After the weld seam was segmented and detected by the semantic segmentation network model, the foreground segmentation image of the weld seam was obtained. However, this image alone cannot provide sufficient information for weld seam tracking and tracing by the wall-climbing robot. Hence, further processing of the welding zone image is required. The Sobel operator edge detection algorithm is relatively simple and has high detection efficiency, which is a combination of Gaussian smoothing and differential operation. The principle of the Sobel operator edge detection algorithm is to use the discrete difference operator to calculate the gray approximation of the image brightness function. Although it is more efficient than the Canny edge detection operator in practical application, its accuracy is not as good as that of Canny detection. Weld detection requires high accuracy. In this study, the edge information of the weld seam was extracted using the Canny operator. The Canny algorithm performed denoising and smoothing of the weld seam image using an appropriate Gaussian function based on rows and columns as follows,
G ( x ) = 1 2 π σ e x 2 2 σ 2
where σ is the standard deviation of the Gaussian curve, controlling the smoothness of the result.
Next, the gradient amplitude, M ( x , y ) , and gradient direction, H ( x , y ) , of the image I ( x , y ) were calculated using the finite difference of the first-order partial derivatives of 2 × 2 adjacent areas, that is
M ( x , y ) = K x 2 ( x , y ) + K y 2 ( x , y )
H ( x , y ) = a r c t a n ( K x ( x , y ) K y ( x , y ) )
f x = [ 0.5 0.5 0.5 0.5 ] , f y = [ 0.5 0.5 0.5 0.5 ]
where K x is the derivative value of the image pixel in the x direction. Similarly, K y is the derivative value of the image pixel in the y direction; x , y is the image pixel; f x   and f y are matrices of partial derivatives of the image in the x and y directions, respectively.
Using the above formula, the Canny edge detection operator can be used to detect the edges of the weld seam image, thereby enriching the edge detail information of the weld seam.

3.3.2. Fitting of the Weld Centerline

After obtaining the weld edge information from edge detection, the least squares method is used to regress the weld edge curve and obtain the final weld center line. This centerline is then used for path planning by the wall-climbing robot.
The objective function for least square cubic polynomial fitting can be expressed as
A 1 ( x 1 , y 1 ) , A 2 ( x 2 , y 2 ) , , A n ( x n , y n )
where A is the coefficient matrix; x 1 , y 1 , , x n , and y n represent the independent and dependent variables, respectively.
Therefore, the cubic polynomial obtained through least squares can be expressed as
A 1 ( x 1 , y 1 ) A 2 ( x 2 , y 2 ) A n ( x n , y n ) = A 1 ( x 1 , y 1 ) + A 2 ( x 2 , y 2 ) + + A n ( x n , y n ) n + 1
where n + 1 represents the number of terms in the polynomial. The optimal solution was obtained using the least squares regression approach with A 1 ( x 1 , y 1 ) A 2 ( x 2 , y 2 ) A n ( x n , y n ) . The wall-climbing robot can obtain path information for the better tracking of weld seams by fitting the centerlines of weld seams to the set of continuous data points representing straight and curved weld seams.

4. Experimental Results and Analysis

The experimental scene in this study involved a metal welded wall surface with a diameter of 4000 mm, a height of 2800 mm, and a thickness of 10 mm, as shown in Figure 11. Weld seams were distributed on the wall surface for the robot to identify and track. This process was remotely controlled by a researcher using a computer, who started the robot and observed its movement trajectory and weld detection status in real time.

4.1. Feasibility Analysis of the Wall-Climbing Robot’s Tracking and Detection

In this study, the model was optimized using the stochastic gradient descent method (signal growth deposition) as the optimizer. The dichotomic cross-entropy loss function (CE_Loss) served as the loss function for model training. The initial learning rate (lr) was set to 1 × 10−2, the weight loss ratio (weight_decay) was set to 1 × 10−4, the batch size (Batchsize) was set to 16, and the momentum gradient descent (momentum) was set to 0.9. In total, 500 training iterations were performed in the experiment.
The input image size for model training was set to 380 × 380 × 3. During training, the model weights were saved every 100 iterations, and the model was verified after each training iteration. The number of early_stop rounds was set to 100. The loss curve is displayed in Figure 12.
As shown in Figure 12, the model converged quickly after 30 training iterations and then gradually descended toward the convergence edge until achieving stable convergence. This indicates that the model performed well on the validation set and gradually learned the weld seam characteristics on the training set. The accuracy of the model also improved rapidly and stabilized with training, manifesting good learning effects on the training set. The reduction in curve fluctuations during the training process suggests a reduced possibility of overfitting. In addition, the improved algorithm was used to detect weld seams of different shapes. The detection results are shown in Figure 13. The red regions in the figure represent the segmentation results obtained via the improved algorithm in this study. The detection results demonstrate the improved algorithm’s capability to achieve excellent results in various scenes, backgrounds, and types of weld seams.

4.2. Model Comparison

Three groups of comparative experiments were conducted to verify the performance advantages of the improved algorithm in weld seam detection. The improved DeepLabv3+ algorithm in this study was compared with the mainstream segmentation detection models a U-Net [35] and Pspnet [36] and the original Deeplabv3+ [31] model before improvement. The comparison focused on six key indexes: mIOU, pixel accuracy (PA), giga floating point operations per second (GFlops), weight file size (Weight), frames per second (FPS), and reasoning speed (Time). The results of the comparative experiments are listed in Table 3.
The two other semantic segmentation network models compared in Table 3 and the original DeepLabv3+ model all used CE_Loss as the loss function for model training, and other training parameters were kept consistent. Compared to the Pspnet network model, the improved model in this study achieved a 1.3% increase in accuracy, a 0.2% increase in mIOU, a 93.8% reduction in GFLOPs, an 87.5% reduction in model weight, a 23.5% increase in FPS, and a 20.3% reduction in single-image reasoning time. Compared to U-net semantic segmentation, the improved model demonstrated a 2.3% improvement in model accuracy, a 0.5% increase in mIOU, a 96.9% reduction in GFLOPs, a 90.5% reduction in model weight, a 50% increase in FPS, and a 32.8% reduction in single-image reasoning time. Compared to the original model DeepLabv3+, the improved model showcased a 3.2% increase in model accuracy, a 1.4% increase in mIOU, a 91.5% reduction in GFLOPs, a 92.9% reduction in model weight, a 16.7% increase in FPs, and an 11.3% reduction in single-image reasoning time.
On the basis of the above data analysis, the improved model in this study significantly reduced the computational requirements and greatly improved the calculation and reasoning speed while maintaining high accuracy. It exhibited clear advantages compared to the current mainstream semantic segmentation models in terms of weld seam detection speed.

4.3. Welding Path Fitting Results

Various complex scenes containing weld seams, such as inside pipelines, were selected as the experimental subjects to evaluate the performance of the welding path fitting algorithm in the weld seam tracking and detection model of this study. The original drawings of weld seams and their foreground segmentation results are displayed in Figure 14. The original images included straight and curved weld seams, and weld seams on the inner walls of pipelines. After reasoning by the improved DeepLabv3+ semantic segmentation model, the foreground segmentation image successfully separated the weld seam from the complex background, providing regional position information of the weld seam and the main part of the weld seam contour.
However, the foreground segmentation image did not clearly show the edge details of the weld seam. The weld seam foreground segmentation image was subjected to edge detection using the Canny operator to obtain clearer edge details for weld seam tracking. The detection results are displayed in Figure 15.
Once the contour map of the weld seam edge was obtained through edge detection, the centerlines of the weld seams were fitted to provide position information for weld seam tracking by a wall-climbing robot. In this study, the centerlines of weld seam edge contours were subjected to fitting using the least squares regression method, utilizing a quadratic polynomial for fitting. The fitting results are displayed in Figure 16.
The path fitting process shown in Figure 14, Figure 15 and Figure 16 demonstrated that the improved model in this study exhibited excellent performance from segmentation to path fitting. The single-image processing time was 71 ms, achieving a FPS of 14, meeting the real-time requirements of embedded devices. The test results in Table 4 indicate that the test dataset used to evaluate the model included 300 weld seam samples, out of which 30 had fitting errors, and 270 were fitted accurately. The fitting accuracy reached 90%. The improved model in this study demonstrated high recognition accuracy and a high reasoning speed for weld seams in complex scenes, including those with curved weld lines. The accuracy met the industrial requirements for weld seam quality inspection, and the reasoning speed satisfied the real-time performance requirements of industrial applications.

5. Discussion

5.1. Ablation Experiment

Four groups of experimental improvement schemes were designed to explore the influence of the improved model in this study on the performance of DeepLabv3+. The model training parameters for all four schemes were consistent. The influence of these schemes on model performance is shown in Table 5. Model 1 represents the original DeepLabv3+ model. Model 2 is the improved model after integrating the hybrid attention mechanism, CBAM. Model 3 replaces the feature extraction network of Model 2 with Mobilenetv2. In Model 4, all traditional 3 × 3 convolution modules are replaced by cavity depthwise separable convolution modules based on Model 3.
According to Table 5, Model 1 achieved a pixel accuracy of 97.1%, GFLOPs of 38.8, a model size of 308 Mb, a FPS of 18, and an average processing time per image of 54 ms. The original model exhibited a low calculation speed and had a model size that was unsuitable for mainstream embedded devices. The PA of Model 2 increased by 1.6% after integrating the hybrid attention mechanism, CBAM, indicating that the attention mechanism improved the model’s attention to weld seams. However, the reasoning speed decreased by 3 ms compared to that of the original model, and the FPS dropped from 18 to 17, reflecting that the introduction of the attention mechanism increased the computational load. Considering the lightweight nature of the network structure, Model 3 replaced the original Resnet34 deep network with a lighter Mobilenetv2 network as the backbone for feature extraction. The results showed that Model 3 reduced the computational complexity from 38.8 to 14.6, decreased the model size from 308 Mb to 44.6 Mb, accelerated the reasoning speed by 4 ms, and improved the FPS by 2. The pixel accuracy, PA, was maintained at 98.7% while reducing model and computational complexity. In the final model, Model 4, all traditional 3 × 3 convolution modules in the improved model were replaced by cavity depthwise separable convolution modules. The GFLOPs of the final model decreased to 3.3, the model size was 21.8 Mb, the FPS increased to 21, and the single-image reasoning time was reduced to 47 ms. This demonstrates that Model 4 achieved a balance between model accuracy and speed, resulting in optimal model performance.
The results of the ablation experiments proved that the process of the improved model in this study was reasonable. It met the requirements for seam tracking and detection while meeting the real-time requirements of embedded devices.

5.2. Data Augmentation Experiment

In this study, datasets were enriched using the copy and paste data augmentation strategy. This approach improved the segmentation accuracy of the model and augmented its generalization ability and robustness but also reduced the risk of overfitting during model training. A group of comparative experiments was designed to verify the effectiveness of data augmentation. Two scenarios were compared: training the model using the original image dataset without data augmentation and training the model using the augmented datasets; the results are shown in Table 6.
The improved network in this study was trained using both the data set with data augmentation and the data set without data augmentation. Table 5 shows the comparison results, considering three evaluation indexes, namely, pixel accuracy PA, average intersection ratio, mIOU, and verification loss. The augmented data set achieved a 0.4% improvement in pixel accuracy compared to that of the original data set, and the mIOU remained the same at 87.9%. The model in this study demonstrated high pixel accuracy and an average intersection ratio. Compared to the model trained without data augmentation, the model trained with data augmentation exhibited a greater decrease in verification loss, indicating better performance. This demonstrates that data augmentation aids in model convergence and effectively reduces the risk of overfitting.

6. Conclusions

This study focused on designing a weld seam-tracking robot that combines wall climbing capabilities with path planning using artificial intelligence technology. A welding seam-tracking detection robot was developed in this study, which consists of a permanent magnet array adsorption module, McNamun wheel and detection module. Through the uniquely designed permanent magnet adsorption module, the adsorption center of the car body can be adjusted adaptively when crossing obstacles, and the functions of climbing walls and crossing obstacles at high altitudes can be realized. This study also proposes an algorithm for seam identification and path planning based on artificial intelligence technology. Data augmentation techniques were employed to expand the dataset, enabling the trained weld segmentation model to handle a wider range of detection scenarios. The size of the Deeplabv3+ segmentation model was reduced by 92.9% after lightweight improvements, making it more suitable for embedding in hardware devices. In addition, the improved model achieved a 1.4% increase in accuracy compared to that of the original model. The application of least squares polynomials for fitting the weld segmentation results demonstrated excellent performance in accurately fitting various complex welds. The total reasoning time, from image segmentation to path fitting, was 71 ms per image, meeting the operational requirements of the weld seam tracking and detection robot. The development of this robot system has enabled intelligent detection capabilities. In future work, a broader range of weld seam types will be explored, and the application scope of the robot system will be expanded.

Author Contributions

Conceptualization, J.W.; data curation, D.L.; formal analysis, Y.D. and M.Z.; resources, Y.S.; software, L.H. and J.Y.; validation, M.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Natural Science Foundation of Shaanxi Province, China (grant no. 2022JM—033) and 2023 Graduate Innovation Fund Project of Xi′an Polytechnic University (grant no. chx2023026).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

All data included in this study are available upon request via contacting the corresponding author.

Acknowledgments

Yuanyuan Liu provided technical guidance and resource support for this study.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Ji, C.; Wang, H.; Li, H. Defects detection in weld joints based on visual attention and deep learning. NDT E Int. 2023, 133, 102764. [Google Scholar] [CrossRef]
  2. Kahnamouei, J.T.; Moallem, M. A comprehensive review of in-pipe robots. Ocean. Eng. 2023, 277, 114260. [Google Scholar] [CrossRef]
  3. Shen, H.Y.; Wu, J.; Lin, T.; Chen, S.B. Arc welding robot system with seam tracking and weld pool control based on passive vision. Int. J. Adv. Manuf. Technol. 2008, 39, 669–678. [Google Scholar] [CrossRef]
  4. Alkalla, M.G.; Fanni, M.A.; Mohamed, A.M. A novel propeller-type climbing robot for vessels inspection. In Proceedings of the 2015 IEEE International Conference on Advanced Intelligent Mechatronics (AIM), Busan, Republic of Korea, 7–11 July 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 1623–1628. [Google Scholar] [CrossRef]
  5. Guo, L.; Zhang, H. Autonomous mobile welding robot for discontinuous weld seam recognition and tracking. Int. J. Adv. Manuf. Technol. 2022, 119, 5497–5509. [Google Scholar] [CrossRef]
  6. Yu, S.; Guan, Y.; Yang, Z.; Liu, C.; Hu, J.; Hong, J.; Zhu, H.; Zhang, T. Multiseam tracking with a portable robotic welding system in unstructured environments. Int. J. Adv. Manuf. Technol. 2022, 122, 2077–2094. [Google Scholar] [CrossRef]
  7. Teixeira, M.A.S.; Santos, H.B.; Dalmedico, N.; de Arruda, L.V.R.; Neves-Jr, F.; de Oliveira, A.S. Intelligent environment recognition and prediction for NDT inspection through autonomous climbing robot. J. Intell. Robot. Syst. 2018, 92, 323–342. [Google Scholar] [CrossRef]
  8. Zou, Y.; Li, J.; Chen, X. Seam tracking investigation via striped line laser sensor. Ind. Robot. Int. J. 2017, 44, 609–617. [Google Scholar] [CrossRef]
  9. Li, J.; Jin, S.; Wang, C.; Xue, J.; Wang, X. Weld line recognition and path planning with spherical tank inspection robots. J. Field Robot. 2022, 39, 131–152. [Google Scholar] [CrossRef]
  10. Tian, Y.; Chen, C.; Sagoe-Crentsil, K.; Zhang, J.; Duan, W. Intelligent robotic systems for structural health monitoring: Applications and future trends. Autom. Constr. 2022, 139, 104273. [Google Scholar] [CrossRef]
  11. Hu, J.; Han, X.; Tao, Y.; Feng, S. A magnetic crawler wall-climbing robot with capacity of high payload on the convex surface. Robot. Auton. Syst. 2022, 148, 103907. [Google Scholar] [CrossRef]
  12. Zhu, H.; Lin, Z.; Yan, J.; Ye, P.; Zhang, W.; Mao, S.; Guan, Y. Compact lightweight magnetic gripper designed for biped climbing robots based on coaxial rotation of multiple magnets. Robot. Auton. Syst. 2022, 155, 104164. [Google Scholar] [CrossRef]
  13. Navaprakash, N.; Ramachandraiah, U.; Muthukumaran, G.; Rakesh, V.; Singh, A.P. Modeling and experimental analysis of suction pressure generated by active suction chamber based wall climbing robot with a novel bottom restrictor. Procedia Comput. Sci. 2018, 133, 847–854. [Google Scholar] [CrossRef]
  14. Guo, T.; Deng, Z.D.; Liu, X.; Song, D.; Yang, H. Development of a new hull adsorptive underwater climbing robot using the Bernoulli negative pressure effect. Ocean. Eng. 2022, 243, 110306. [Google Scholar] [CrossRef]
  15. Shi, X.; Xu, L.; Xu, H.; Jiang, C.; Zhao, Z.; Guo, Y.; Chen, X. A 6-DOF humanoid wall-climbing robot with flexible adsorption feet based on negative pressure suction. Mechatronics 2022, 87, 102889. [Google Scholar] [CrossRef]
  16. Fan, X.A.; Gao, X.; Liu, G.; Ma, N.; Zhang, Y. Research and prospect of welding monitoring technology based on machine vision. Int. J. Adv. Manuf. Technol. 2021, 115, 3365–3391. [Google Scholar] [CrossRef]
  17. Li, Y.; Li, Y.F.; Wang, Q.L.; Xu, D.; Tan, M. Measurement and Defect Detection of the Weld Bead Based on Online Vision Inspection. IEEE Trans. Instrum. Meas. 2010, 59, 1841–1849. [Google Scholar] [CrossRef]
  18. Shi, F.; Lin, T.; Chen, S. Efficient weld seam detection for robotic welding based on local image processing. Ind. Robot. Int. J. 2009, 36, 277–283. [Google Scholar] [CrossRef]
  19. He, Y.; Chen, H.; Huang, Y.; Wu, D.; Chen, S. Parameter Self-Optimizing Clustering for Autonomous Extraction of the Weld Seam Based on Orientation Saliency in Robotic MAG Welding. J. Intell. Robot. Syst. 2016, 83, 219–237. [Google Scholar] [CrossRef]
  20. Mohd Shah, H.N.; Sulaiman, M.; Shukor, A.Z. Autonomous detection and identification of weld seam path shape position. Int. J. Adv. Manuf. Technol. 2017, 92, 3739–3747. [Google Scholar] [CrossRef]
  21. Liang, D.; Wu, Y.; Hu, K.; Bu, J.J.; Liang, D.T.; Feng, Y.F.; Qiang, J. Weld seam track identification for industrial robot based on illumination correction and center point extraction. J. Adv. Mech. Des. Syst. Manuf. 2022, 16, JAMDSM0028. [Google Scholar] [CrossRef]
  22. LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [PubMed]
  23. Wu, F.; Yang, Z.; Mo, X.; Wu, Z.; Tang, W.; Duan, J.; Zou, X. Detection and counting of banana bunches by integrating deep learning and classic image-processing algorithms. Comput. Electron. Agric. 2023, 209, 107827. [Google Scholar] [CrossRef]
  24. Tang, Y.; Huang, Z.; Chen, Z.; Chen, M.; Zhou, H.; Zhang, H.; Sun, J. Novel visual crack width measurement based on backbone double-scale features for improved detection automation. Eng. Struct. 2023, 274, 115158. [Google Scholar] [CrossRef]
  25. Yang, L.; Liu, Y.; Peng, J. An Automatic Detection and Identification Method of Welded Joints Based on Deep Neural Network. IEEE Access 2019, 7, 164952–164961. [Google Scholar] [CrossRef]
  26. Yang, L.; Fan, J.; Liu, Y.; Li, E.; Peng, J.; Liang, Z. Automatic Detection and Location of Weld Beads with Deep Convolutional Neural Networks. IEEE Trans. Instrum. Meas. 2021, 70, 1–12. [Google Scholar] [CrossRef]
  27. Zhang, P.; Wang, J.; Zhang, F.; Xu, P.; Li, L.; Li, B. Design and analysis of welding inspection robot. Sci. Rep. 2022, 12, 22651. [Google Scholar] [CrossRef]
  28. Li, J.; Li, B.; Dong, L.; Wang, X.; Tian, M. Weld Seam Identification and Tracking of Inspection Robot Based on Deep Learning Network. Drones 2022, 6, 216. [Google Scholar] [CrossRef]
  29. Available online: https://www.kaggle.com/datasets/engineeringubu/fsw-aa5083-aa5061 (accessed on 20 May 2023).
  30. Ghiasi, G.; Cui, Y.; Srinivas, A.; Qian, R.; Lin, T.Y.; Cubuk, E.D.; Le, Q.V.; Zoph, B. Simple copy-paste is a strong data augmentation method for instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 20–25 June 2021; pp. 2918–2928. [Google Scholar] [CrossRef]
  31. Chen, L.C.; Zhu, Y.; Papandreou, G.; Schroff, F.; Adam, H. Encoder-decoder with atrous separable convolution for semantic image segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 801–818. [Google Scholar] [CrossRef]
  32. Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar] [CrossRef]
  33. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef] [Green Version]
  34. Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 4510–4520. [Google Scholar] [CrossRef]
  35. Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional networks for biomedical image segmentation. In Proceedings of the Medical Image Computing and Computer-Assisted Intervention, Lecture Notes in Computer Science, Munich, Germany, 5–9 October 2015; Volume 9351, pp. 234–241. [Google Scholar] [CrossRef] [Green Version]
  36. Zhao, H.; Shi, J.; Qi, X.; Wang, X.; Jia, J. Pyramid scene parsing network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2881–2890. [Google Scholar] [CrossRef] [Green Version]
Figure 1. Weld seam tracking and detection robot.
Figure 1. Weld seam tracking and detection robot.
Sensors 23 06725 g001
Figure 2. Permanent magnet array structure.
Figure 2. Permanent magnet array structure.
Sensors 23 06725 g002
Figure 3. Robot hardware diagram.
Figure 3. Robot hardware diagram.
Sensors 23 06725 g003
Figure 4. Examples of dataset samples.
Figure 4. Examples of dataset samples.
Sensors 23 06725 g004
Figure 5. Copy and paste data augmentation results.
Figure 5. Copy and paste data augmentation results.
Sensors 23 06725 g005
Figure 6. Label example.
Figure 6. Label example.
Sensors 23 06725 g006
Figure 7. DeepLabv3+network structure.
Figure 7. DeepLabv3+network structure.
Sensors 23 06725 g007
Figure 8. Improved DeepLabv3+ network structure.
Figure 8. Improved DeepLabv3+ network structure.
Sensors 23 06725 g008
Figure 9. CBAM structure diagram.
Figure 9. CBAM structure diagram.
Sensors 23 06725 g009
Figure 10. Network structure diagram of Moblienetv2.
Figure 10. Network structure diagram of Moblienetv2.
Sensors 23 06725 g010
Figure 11. Experimental environment of the wall-climbing robot.
Figure 11. Experimental environment of the wall-climbing robot.
Sensors 23 06725 g011
Figure 12. Training results.
Figure 12. Training results.
Sensors 23 06725 g012
Figure 13. Detection results of differently shaped weld seams under different scenes using the improved algorithm.
Figure 13. Detection results of differently shaped weld seams under different scenes using the improved algorithm.
Sensors 23 06725 g013
Figure 14. Original weld seam image and its foreground segmentation image.
Figure 14. Original weld seam image and its foreground segmentation image.
Sensors 23 06725 g014
Figure 15. Edge detection results of weld seams.
Figure 15. Edge detection results of weld seams.
Sensors 23 06725 g015
Figure 16. Fitting results of weld seam centerlines.
Figure 16. Fitting results of weld seam centerlines.
Sensors 23 06725 g016
Table 1. Performance parameters of permanent magnet.
Table 1. Performance parameters of permanent magnet.
MaterialsTrademarkRemanence Induction
Intensity (mT)
Shape Parameter
(mm)
Coercivity
(kA/m)
Innate Coercivity (kA/m)Maximum Magnetic Energy (kJ/m3)
NdFeBN521430–1480 30 2 × π × 5 >796>876398–422
NdFeBN521430–1480 60 × 40 × 10 >796>876398–422
Table 2. Robot performance parameters.
Table 2. Robot performance parameters.
SymbolsMeaningsUnitQuantitative Values
M G Self-weightKg1.70
M l Maximum payloadKg1.96
V m a x Maximum velocitym/s0.2
F Adsorption forceN366.12
h m Obstacle surmounting heightMm11
T Working timeMin100
Table 3. Comparison of different segmentation models.
Table 3. Comparison of different segmentation models.
ModelsmIOU/%PA/%GFLOPs/MWeight/MbFPSTime/ms
Pspnet89.8098.3053.61751759
U-net88.809888.12291470
DeepLabv3+87.9097.1038.83081853
Ours91.1098.503.321.82147
Table 4. Test results.
Table 4. Test results.
ModelDataMistake FittingCurrent FittingTimeFPS
Improve model3003027071 ms14
Table 5. Comparison of ablation experimental results.
Table 5. Comparison of ablation experimental results.
ModelsCBAMMobilenetv2ConvPAGFLOPsWeightFPSTime
model1 97.1%38.8308 Mb1854 ms
model2 98.7%38.8308 Mb1757 ms
model3 98.7%14.644.6 Mb1953 ms
model498.5%3.321.8 Mb2147 ms
Table 6. Comparison of data augmentation experiments.
Table 6. Comparison of data augmentation experiments.
ExperimentsPA/%mIOU/%Loss
Model trained using image data set without data augmentation96.787.90.096
Model trained using image data set with data augmentation97.187.90.092
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, J.; Huang, L.; Yao, J.; Liu, M.; Du, Y.; Zhao, M.; Su, Y.; Lu, D. Weld Seam Tracking and Detection Robot Based on Artificial Intelligence Technology. Sensors 2023, 23, 6725. https://doi.org/10.3390/s23156725

AMA Style

Wang J, Huang L, Yao J, Liu M, Du Y, Zhao M, Su Y, Lu D. Weld Seam Tracking and Detection Robot Based on Artificial Intelligence Technology. Sensors. 2023; 23(15):6725. https://doi.org/10.3390/s23156725

Chicago/Turabian Style

Wang, Jiuxin, Lei Huang, Jiahui Yao, Man Liu, Yurong Du, Minghu Zhao, Yaoheng Su, and Dingze Lu. 2023. "Weld Seam Tracking and Detection Robot Based on Artificial Intelligence Technology" Sensors 23, no. 15: 6725. https://doi.org/10.3390/s23156725

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop