# GAN-Based Image Dehazing for Intelligent Weld Shape Classification and Tracing Using Deep Learning
###### Abstract  
Weld seam identification with industrial robots is a difficult task since it requires manual edge recognition and traditional image processing approaches, which take time. Furthermore, noises such as arc light, weld fumes, and different backgrounds have a significant impact on traditional weld seam identification. To solve these issues, deep learning-based object detection is used to distinguish distinct weld seam shapes in the presence of weld fumes, simulating real-world industrial welding settings. Genetic algorithm-based state-of-the-art object detection models such as Scaled YOLOv4 (You Only Look Once), YOLO DarkNet, and YOLOv5 are used in this work. To support actual welding, the aforementioned architecture is trained with 2286 real weld pieces made of mild steel and aluminum plates. To improve weld detection, the welding fumes are denoised using the generative adversarial network (GAN) and compared with dark channel prior (DCP) approach. Then, to discover the distinct weld seams, a contour detection method was applied, and an artificial neural network (ANN) was used to convert the pixel values into robot coordinates. Finally, distinct weld shape coordinates are provided to the TAL BRABO manipulator for tracing the shapes recognized using an eye-to-hand robotic camera setup. Peak signal-to-noise ratio, the structural similarity index, mean square error, and the naturalness image quality evaluation score are the dehazing metrics utilized for evaluation. For each test scenario, detection parameters such as precision, recall, mean average precision (mAP), loss, and inference speed values are compared. Weld shapes are recognized with 95% accuracy using YOLOv5 in both normal and post-fume removal settings. It was observed that the robot is able to trace the weld seam more precisely. robotic welding; GAN; Scaled YOLOv4; TAL BRABO robotic manipulator; PSNR; SSIM; recall; mean average precision +
Footnote †: journal: Applied  
0000-0001-9993-3227]A.S.S. learning models have better generalisation and regularisation ability, in this work, the generalisation ability of a YOLO-based detector is tested in different backgrounds with non-homogenous weld fumes. Weld seam detection can be divided into two categories: active vision and passive vision approaches [3]. The passive vision method using a 2D camera is used in this research, which decreases the cost and complexity of the experimental setup [4]. In the past few decades, research in robotic welding has been performed using conventional and deep learning methods for seam identification and tracking. [PERSON] et al. have successfully detected autonomous weld seams and tested tracking of straight, zigzag, and half-moon shapes. The authors calculated accuracy in terms of position and distance error, which was calculated between the obtained output and actual weld seam path shape [5]. [PERSON] et al. used the optical triangulation method for detecting the position of weld seams using a structured light vision sensor [6]. [PERSON] et al. performed calibration using a CCD camera and calculated the measurement error for arc-welding robots. The particle filter and Hough transform were used to detect the weld seam without any error between the welding position and the seam position. They were able to achieve a detection accuracy of 0.08 mm with 0.1 mm width for a narrow butt joint [7]. [PERSON] et al. calculated the welding position using a vision sensor by implementing camera calibration and performed conventional image processing for circular weld seam detection. The image was found to dynamically change, which could be improved by machine learning techniques [8]. [PERSON] et al. proposed two step calibration approaches, namely, camera calibration and light plane calibration for the autonomous detection of the weld seam and quality control. The authors were able to achieve a 0.2 mm tracking error [9]. [PERSON] et al. proposed automatic weld seam detection using a deep convolutional neural network (CNN) to improve the tracking accuracy.