An AI-based automobile pipe fitting ring solder appearance detection system and method

The AI-based automotive pipe fitting ring weld appearance inspection system, by combining initial image acquisition and dynamic light source optimization with deep learning analysis, solves the problem of poor adaptability to complex lighting conditions and weld process fluctuations in traditional inspection methods, and achieves high-precision weld appearance defect identification.

CN121095244BActive Publication Date: 2026-02-24杭州映图智能科技有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511632640.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-24
Estimated Expiration
2045-11-10

AI Technical Summary

Technical Problem

Existing pipe fitting weld inspection technologies have shortcomings in areas such as identifying subtle appearance defects, intelligent analysis capabilities, and optimizing light sources and imaging conditions, resulting in high misjudgment rates and low detection accuracy.

Method used

An AI-based automotive pipe fitting ring weld appearance inspection system is adopted. Geometric feature modeling is performed through initial image acquisition, the illumination parameters of multi-zone light sources are dynamically optimized, and deep learning analysis is combined to achieve high-precision image acquisition and recognition.

Benefits of technology

It improves the detection rate and stability of small and low-contrast appearance defects, ensures the accuracy and repeatability of test results, and provides the automotive manufacturing industry with an efficient and reliable automated quality control solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121095244B_ABST
    Figure CN121095244B_ABST
Patent Text Reader

Abstract

The application discloses an AI-based automobile pipe joint annular solder appearance detection system and method, relates to the fields of artificial intelligence and industrial detection technology, and comprises a camera, an arch-shaped light source provided with a plurality of independently controllable light source units on the inner side, and modules such as annular image acquisition, initial feature extraction, light source self-adaption, image reconstruction and defect segmentation. The full circumferential image of the pipe under initial illumination is acquired, and a sequence with an angle label is generated. The weld area is extracted, the type is identified, and the geometric parameters are calculated. The candidate illumination combination is generated based on the parameters, the optimal parameters are selected through evaluation, the image is acquired under the optimal illumination, and the full circumferential image is spliced. The weld appearance defects are identified and quantified through a semantic segmentation neural network. Through self-adaptive optimization of illumination and AI analysis, the stable, accurate and efficient identification of the annular solder appearance defects is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence, machine vision and industrial inspection technology, and more specifically to an AI-based system and method for inspecting the appearance of annular welds on automotive pipe components. Background Technology

[0002] With the rapid development of the automotive industry, the inspection of pipe welding quality has become an important part of ensuring the reliability of automotive parts. Traditional weld appearance inspection methods mainly rely on manual visual inspection or automated inspection equipment based on image processing algorithms. However, these methods have low accuracy when dealing with minor weld quality issues and are easily affected by external environmental interference, resulting in a high misjudgment rate.

[0003] A search revealed a patent (CN110006998B) for a detection system and method for inspecting welds in hollow pipe fittings. This patent utilizes an ultrasonic transmitter and receiver combined with a rotating device to achieve non-contact flaw detection of welds. It eliminates the need to remove weld flash, is radiation-free, and requires no coupling agent, making it suitable for automated batch inspection of parts. However, this technical solution has the following shortcomings: First, its detection method primarily relies on ultrasonic signals, making it difficult to accurately identify subtle color changes, pinholes, or dents on the weld surface. Second, the system lacks intelligent analysis methods, making it unable to adapt to color variations caused by unstable solder processes, potentially leading to defective products being misclassified as defective. Finally, its light source and imaging conditions are relatively ordinary, which may affect the consistency of detection results under complex lighting conditions.

[0004] A search revealed a patent, CN118130617B, which discloses an intelligent mobile inspection method for the inner surface quality of pipe fitting welds. This patent uses a mobile inspection device to collect information about the inner surface of the weld and combines it with the apparent quality coefficient and the welding material quality coefficient for comprehensive evaluation, enabling automatic, efficient, and comprehensive inspection of weld quality. However, this technical solution also has certain limitations: Firstly, the method focuses on the quality inspection of the inner surface of the weld, lacking targeted analysis of the color, shape, and other characteristics of the weld material, thus failing to meet the needs of annular weld material appearance inspection. Secondly, although the method employs an intelligent evaluation model, its algorithm does not explicitly mention whether it is based on deep learning or AI technology, which may lead to insufficient accuracy when facing complex background noise and subtle defects. Furthermore, the image acquisition light source of this method is not specially optimized, and may not be able to effectively distinguish subtle appearance defects such as pinholes and dents.

[0005] The above problems indicate that existing pipe fitting weld inspection technologies still have significant shortcomings in areas such as the identification of subtle appearance defects, intelligent analysis capabilities, and optimization of light sources and imaging conditions. Summary of the Invention

[0006] In view of the shortcomings of the existing technology, the purpose of this invention is to overcome the problems of missed detection and high misjudgment rate of minor appearance defects caused by the poor adaptability of traditional detection methods to complex lighting conditions, the reflection characteristics of toroidal curved surfaces and the fluctuation of solder process.

[0007] Therefore, this invention provides an AI-based system and method for inspecting the appearance of annular welds in automotive pipe fittings. First, the weld is rapidly modeled using initial image acquisition. Then, the illumination parameters of the multi-zone light source are dynamically and adaptively optimized based on the established model. Under these optimized illumination conditions, high-precision image acquisition and deep learning analysis are performed, thereby achieving stable, accurate, and efficient identification of annular weld appearance defects.

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] An AI-based visual inspection system for annular weld metal in automotive components includes a camera and an arched light source. The inner side of the arched light source has several independently controllable light source units evenly arranged in a circumferential array. The system also includes:

[0010] The circumferential image acquisition module acquires circumferential images of the outer surface of the pipe when it rotates at a constant speed under initial lighting conditions, forming an initial image sequence containing precise angle labels.

[0011] The initial feature extraction module analyzes each frame of the image based on the initial image sequence using a target detection model to determine the weld area and identify its weld type. The weld type includes fillet welds and butt welds. The module calls the corresponding subroutine to calculate the geometric parameters of the weld based on the weld type. The geometric parameters include the weld equivalent diameter, weld width, and weld angle.

[0012] The light source adaptive module generates candidate lighting combinations based on the geometric parameters through a preset lighting physics model, performs heuristic search space pruning and evaluates the comprehensive performance score of the candidate lighting combinations, and selects the combination with the highest score as the optimal lighting parameters. The optimal lighting parameters include the independent on / off state of each light source unit in the arched light source.

[0013] The image reconstruction module acquires images of the outer surface of the pipe when it rotates at a constant speed under optimal lighting parameters, and stitches the images together to obtain a seamless and high-contrast full-circumference image of the weld.

[0014] The defect segmentation module analyzes the full-circumference unfolded image of the weld seam using a semantic segmentation neural network to classify each pixel in the weld seam image. The classification results are then post-processed and quantified to identify and quantify weld seam appearance defects. The defect information includes defect type, location coordinates, and size parameters.

[0015] Furthermore, the initial feature extraction module includes a fillet weld size calculation strategy. This strategy involves extracting the pipe base material and weld contour using an edge detection algorithm in image frames at the start, middle, and end angles of the weld. The least squares method is used to fit the straight lines of the two base material contours and calculate the intersection points as weld corner vertices. The radial distances from the three weld corner vertices to the outer circle contour of the pipe are calculated using calibrated camera parameters, and the average value is taken as the equivalent diameter of the weld. The Hough transform is then used to detect the straight line equation of the weld corner edge, and a sampling line is generated along the direction perpendicular to the edge direction. The distance between the intersection points of the sampling line and the two contours of the weld is calculated, and the maximum value is taken as the weld width. The average tangent direction of the weld surface is calculated by the angle between the weld corner edge and the horizontal direction of the image, and then the angle between its normal and the camera optical axis is calculated as the weld angle.

[0016] Furthermore, the initial feature extraction module includes a butt weld size calculation strategy. This strategy involves using the Hough circle transform algorithm to identify the outer contour of the pipe fitting in multiple frames of images and calculating the center coordinates and radius, taking the average value as the weld diameter; performing threshold segmentation on the weld area image to extract the fusion line contours on both sides; setting multiple vertical sampling lines at equal intervals along the weld centerline; calculating the distance between the fusion lines on both sides of each sampling line and taking the average value of all distances as the weld width; if the fusion line is locally irregular, using a cubic B-spline curve for fitting before calculating the width; and finally setting the weld angle to 0 degrees.

[0017] Furthermore, the light source adaptive module includes a combined generation strategy, which includes a lighting model construction step and a lighting combined generation step.

[0018] The lighting model construction step involves retrieving the actual luminous flux of each light source unit, as well as the straight-line distance between the light source unit and any point on the pipe surface, and the angle between the emitted light from the light source unit and the normal to the weld surface at that point. The illuminance model is then calculated using the actual luminous flux, straight-line distance, and angle.

[0019] In the lighting combination generation step, a heuristic search space pruning is performed based on the weld angle to generate a candidate set containing several potential effective light source unit on-state combinations. When the weld angle is close to 0 degrees, the light source unit combination located on both sides of the camera and symmetrically distributed is selected first. When the weld angle is greater than a preset threshold, the lateral light source unit combination with a smaller angle to the weld normal direction is selected first.

[0020] Furthermore, the adaptive light source module includes an evaluation and screening strategy. This strategy involves defining the weld area as a rectangle in a two-dimensional model unfolded on the pipe surface, calculating the overlap area between the total effective illumination area of ​​each combination in the candidate set and the rectangular area of ​​the weld, and using the ratio of the overlap area to the total weld area as the coverage score. Then, the illumination uniformity score is calculated by using the standard deviation of illuminance and the average illuminance of the sampling points in the weld area. Finally, a comprehensive performance score is obtained by weighting the illumination coverage score and the illumination uniformity score.

[0021] Furthermore, the adaptive light source module also includes a feedback correction strategy. The feedback correction strategy includes acquiring several test images of the arched light source under optimal illumination parameters using a camera, calculating the standard deviation of the actual gray value of the weld area in the test image, and if the standard deviation of the actual gray value is greater than a preset threshold, then reducing the luminance of the light source unit that causes the highest gray value area and increasing the luminance of the light source unit that causes the lowest gray value area, until the standard deviation of the actual gray value is less than the preset threshold or the maximum number of iterations is reached, and obtaining the final on / off state of the light source unit and its respective brightness level.

[0022] Furthermore, the image reconstruction module includes a stitching strategy, which includes extracting and matching feature point pairs in the overlapping area of ​​adjacent images using a scale-invariant feature transformation algorithm, calculating the transformation matrix between two frames of images using the matched feature point pairs, treating the camera pose of all images and the spatial position of all three-dimensional feature points as a whole using the global bundle adjustment method, minimizing the reprojection error of all feature points to obtain the globally optimal geometric registration, and decomposing and fusing the images to be stitched to obtain the full circumference image of the weld.

[0023] Furthermore, the defect types include linear defects and point-like or block-like defects. The defect segmentation module includes a defect analysis strategy, which includes predefined categories such as background, good weld, undercut, porosity, slag inclusion, incomplete penetration, and incomplete fusion. When the defect type is a linear defect, the total length, maximum depth, and continuity of the skeleton of the binary mask are calculated through the semantic segmentation neural network output. When the defect type is a point-like or block-like defect, the number of defects is counted and the equivalent diameter, area, and distribution density on the weld are calculated through connected component analysis.

[0024] Furthermore, it also includes a report generation module, which writes the unique identification code of the fitting, the inspection time, the geometric parameters of the weld, the final optimized lighting parameters, all defect information after segmentation and quantification, the original image sequence, and the storage path of the final panoramic unfolded image into the database to form a quality record. It also automatically generates a PDF inspection report based on a preset template. The report includes a summary table containing all key inspection results, a panoramic schematic diagram of the weld marked with the location, type, and size of all detected defects, and several magnified images of typical defect areas. The report also includes a QR code for authorized users to retrieve and replay all the original data and processing procedures related to this inspection from the database.

[0025] An AI-based method for visual inspection of annular weld metal in automotive tubular components includes the following steps:

[0026] The circumferential image acquisition step involves acquiring a full circumferential image of the outer surface of the pipe under initial lighting conditions as it rotates at a constant speed, forming an initial image sequence containing precise angle labels.

[0027] The initial feature extraction step involves analyzing each frame of the image based on the initial image sequence using a target detection model to determine the weld area and identify its weld type. The weld types include fillet welds and butt welds. The corresponding subroutine is called based on the weld type to calculate the geometric parameters of the weld, including the weld equivalent diameter, weld width, and weld angle.

[0028] The light source adaptation step generates candidate lighting combinations based on the geometric parameters through a preset lighting physics model, performs heuristic search space pruning and evaluates the comprehensive performance score of the candidate lighting combinations, and selects the combination with the highest score as the optimal lighting parameters. The optimal lighting parameters include the independent on / off state of each light source unit in the arched light source.

[0029] The image reconstruction step involves acquiring images of the outer surface of the pipe when it rotates at a constant speed under optimal lighting parameters, and then stitching these images together to obtain a seamless and high-contrast full-circumference image of the weld.

[0030] The defect segmentation step involves analyzing the full-circumference unfolded image of the weld using a semantic segmentation neural network to classify each pixel in the weld image. The classification results are then post-processed and quantified to identify and quantify weld appearance defects. The defect information includes defect type, location coordinates, and size parameters.

[0031] The beneficial effects of this invention are as follows: This invention, through the construction of intelligent detection based on initial geometric perception, dynamic light source optimization, and high-precision imaging analysis, deeply couples the macroscopic geometric features of the weld with the optimal imaging conditions required for microscopic defect detection. The system first acquires key geometric information such as the type, diameter, width, and angle of the weld through rapid scanning. Then, it uses this information to drive a physical model combined with a heuristic algorithm to dynamically calculate and configure an optimal multi-zone light source illumination scheme for the specific weld. On this basis, a deep learning model is used to perform pixel-level fine analysis on high-quality images, fundamentally solving the problem that fixed, non-adaptive light sources in traditional methods cannot cope with the variable reflection characteristics of complex annular welds. This greatly improves the detection rate and stability of small and low-contrast appearance defects, while ensuring the accuracy and repeatability of the detection results, providing an efficient and reliable automated quality control solution for the automotive manufacturing industry. Attached Figure Description

[0032] Figure 1 This is the overall flowchart of the present invention;

[0033] Figure 2 This is a flowchart of the initial feature extraction and weld geometry parameter calculation in this invention;

[0034] Figure 3 This is a flowchart of the adaptive optimization of the light source in this invention;

[0035] Figure 4 This is a schematic diagram showing defects in the fillet weld in this invention;

[0036] Figure 5 This is a schematic diagram showing that there are no defects in the fillet weld in this invention. Detailed Implementation

[0037] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Identical components are denoted by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the accompanying drawings, and the terms "bottom surface," "top surface," "inner," and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0038] Because existing pipe fitting weld inspection technologies still have significant shortcomings in areas such as identifying minute appearance defects, intelligent analysis capabilities, and optimizing light sources and imaging conditions, this invention designs an AI-based annular weld appearance inspection system for automotive pipe fittings. Figure 1As shown, it includes: a pipe fitting conveying and positioning module, a circumferential image acquisition module, and a central processing and controller that interacts with the pipe fitting conveying and positioning module and the circumferential image acquisition module for data and control commands. These three components physically support each other and are tightly coupled through an industrial bus at the data and control level. They work together to complete a complete closed-loop inspection process, from pipe fitting feeding, positioning, and rotation, to weld geometric feature perception, adaptive lighting optimization, and high-precision image acquisition and reconstruction, and finally to intelligent defect segmentation, quantification, and report generation.

[0039] Specifically, the pipe delivery and positioning module accurately delivers the automotive pipes to be inspected to the inspection station and achieves controllable circumferential rotation. There are various structures for achieving pipe rotation, such as rotating chucks or robotic arms.

[0040] The circumferential image acquisition module acquires circumferential image data of the pipe surface. Along the pipe axis determined by the pipe conveying and positioning module, the circumferential image acquisition module sets N groups of detection units at equal intervals, where N is an integer greater than or equal to 1 to accommodate pipes of different lengths. Each detection unit includes an industrial camera and an arched light source. The camera is fixed directly above the apex of the arched light source, and its optical axis is strictly perpendicular to the radial plane of the pipe at that position. The arched light source is a semi-annular structure with an inner diameter that matches or exceeds the nominal outer diameter of the pipe to be measured. M independently controllable LED light source units are evenly arranged in a circular array on the inner side. Each LED light source unit is connected to an independent pulse width modulation constant current drive circuit. The drive circuit receives control signals from the central processing and controller to achieve independent switching control and brightness adjustment of each LED light source unit.

[0041] The central processing unit and controller has a series of collaborative functional units built in to execute the complete inspection process. The central processing unit and controller integrates the following functional units: initial feature extraction module, light source adaptation module, image reconstruction module, defect segmentation module, and report generation module.

[0042] The initial feature extraction module performs rapid localization, classification, and preliminary calculation of three-dimensional geometric parameters of the weld, such as... Figure 2As shown, its workflow is as follows: First, the central processing unit and controller drive the servo motor through the motion controller to make the tube rotate 360 ​​degrees at a preset initial angular velocity. During this process, the central processing unit and controller sends instructions to all M LED light source units of the arch light source to simultaneously light up with a fixed, medium-intensity initial brightness, forming a uniform ring lighting field. At the same time, the central processing unit and controller triggers the industrial camera to perform image acquisition at fixed angular intervals, such as every 1 degree of rotation, and records the precise rotation angle fed back by the servo motor encoder corresponding to each frame of image in real time, forming an initial image sequence containing 360 frames of images with precise angle labels.

[0043] Subsequently, the initial feature extraction module processes the acquired initial image sequence. Internally, the module first calls a target detection model based on a convolutional neural network to analyze each frame of the image. Specifically, this model is a neural network based on the YOLOv8 architecture. This network has been pre-trained on a dataset containing tens of thousands of images of weld seams of various automotive pipe fittings. It can output the bounding box coordinates of the weld seam region in the image, the confidence score, and the classification results of the weld seam type, including fillet welds or butt welds. Through the processing of the entire image sequence, this unit determines the starting angle and ending angle of the weld seam on the circumference of the pipe fitting.

[0044] After determining the weld type, the initial feature extraction module calls the geometric parameter calculation subroutine corresponding to the weld type. If it is identified as a fillet weld, the fillet weld size is calculated. For the weld diameter, the module uses the Canny edge detection algorithm combined with morphological opening operation to extract the clear contours of the pipe base material and the weld in the image frames at the start, middle, and end angles of the weld. It then uses the least squares method to fit the contour lines of the base materials on both sides and calculates the intersection point of the two lines. This intersection point is the weld corner vertex. The radial distances from the three weld corner vertices to the outer circle contour of the pipe are calculated using the calibrated camera parameters, and the average value is taken as the equivalent diameter of the fillet weld. For the weld width, the module first uses Hough transform to detect the linear equation of the weld corner edge and determine its direction in the image. Then, along the direction perpendicular to the edge direction, a series of sampling lines are generated at fixed pixel intervals. On each sampling line, the intersection point with the contours on both sides of the weld is calculated, and the actual width is calculated based on the coordinates of the intersection point. The maximum value among all the width values ​​calculated by the sampling lines is taken as the weld width. For the weld angle, this angle Defined as the angle between the macroscopic normal direction of the weld surface at that location and the camera's optical axis, the module uses the measured angle between the weld bevel edge and the horizontal direction of the image. The average tangent direction of the weld surface is calculated, and then the normal direction is obtained. The angle between the normal direction and the angle perpendicular to the optical axis is calculated, which is the weld angle. .

[0045] If the weld is identified as a butt weld, the weld size is calculated. For the weld diameter, which is the outer diameter of the pipe fitting, the module uses the Hough circle transform algorithm to identify the outer circle contour of the pipe fitting in multiple frames of images, accurately calculates the center coordinates and radius, and takes the average of multiple measurements as the diameter. For weld width, the module first performs threshold segmentation on the weld area image to distinguish the weld from the base material. Then, it extracts the precise contours of the fusion lines on both sides through morphological erosion and dilation operations. Along the weld centerline, multiple vertical sampling lines are set at equal intervals. The distance between the fusion lines on both sides of each sampling line is calculated, and the average of all distances is taken as the weld width. If the fusion line is locally irregular, a cubic B-spline curve is used to fit the extracted contour points before width calculation to improve robustness; for weld angles Since the surface of the butt weld is approximately part of a cylindrical surface, its normal direction is radial and parallel to the camera's optical axis, therefore the angle... Set to 0 degrees, all calculated geometric parameters (weld type, diameter) ,width ,angle The data is stored and passed to the light source adaptive module.

[0046] For both fillet welds and butt welds, if weld irregularities are not considered and in order to improve the acquisition of weld geometric parameters, the line connecting two symmetrical points on the weld edge can be directly selected as the weld width.

[0047] The light source adaptive module receives the weld geometry parameters output by the initial feature extraction module. , , Based on these parameters, the module calculates the optimal LED lighting scheme for a specific weld area. The core of this module is a multi-objective optimization decision model, whose inputs are the weld geometry parameters. , , The model includes the physical parameters of the M LED light source units preset in the system, including the spatial coordinates, beam divergence angle and maximum luminous flux of each LED. The optimization goal of the model is to simultaneously maximize the illumination coverage and illumination uniformity of the weld area, while minimizing the number of LEDs turned on to save energy.

[0048] Specifically, such as Figure 3 As shown, this module performs the following calculation steps:

[0049] The first step is to establish a lighting physical model, specifically for the first arched light source. Each LED light source unit is located at any point on the surface of the pipe. Illuminance produced It is determined according to the following formula: ,in It is the first The actual luminous flux of each LED light source unit. It is the straight-line distance from the LED light source unit to the point light source unit. It is the emitted light beam and point of the LED light source unit The angle between the normals to the weld surface at the location, and the direction of the normals to the weld surface is determined by the global weld angle. It is determined together with the local surface geometry.

[0050] The second step is to generate candidate lighting combinations based on the weld angle. This module first performs heuristic pruning of the search space, for example, when For surfaces close to 0 degrees, such as butt welds or fillet welds in flat areas, a symmetrical combination of LED light source units located on both sides of the camera is preferred, as this "dual-sided low-angle" illumination best highlights minute surface irregularities; when For larger angles, such as fillet welds on the side of pipe fittings, prioritize combinations of lateral LED light source units with smaller angles to the weld normal. This method generates a candidate set containing several potentially effective combinations of LED light source unit on / off states. .

[0051] The third step is to evaluate the candidate combinations and the candidate set. For each combination in the data, this module performs a scoring calculation, first calculating the light coverage score. In the two-dimensional model unfolded on the surface of the pipe fitting, the weld area is abstracted as a region with a length of Width is The rectangle is defined, and the overlap area between the total effective illumination area of ​​the current LED light source unit combination and the rectangular area of ​​the weld seam is calculated. The ratio of the overlap area to the total area of ​​the weld seam is the coverage score. Next, calculate the illumination uniformity score. A virtual sampling point array is set up within the weld seam area. The total illuminance generated by the current LED light source unit combination at each sampling point is calculated, and then the standard deviation of the illuminance of the entire point array is calculated. and average illuminance The uniformity score is given by the formula Finally, a comprehensive performance score is calculated. The score is a weighted sum of coverage, uniformity, and energy efficiency: ,in M is the number of LED light source units currently activated in the combination, and M is the total number of LED light source units. These are preset weighting coefficients, for example, Their sum is 1.

[0052] The fourth step is to determine the optimal solution and adjust the light intensity. This module selects the comprehensive performance score. The highest-performing combination of LED light source units is selected as the optimal lighting scheme. Subsequently, the luminous intensity of each activated LED in this optimal combination is finely adjusted to the base value of the luminous intensity. With pipe diameter and weld width The luminance is positively correlated and finely adjusted according to the position of the LED relative to the center of the weld. The luminance of the edge LEDs that are farther from the center is appropriately enhanced to compensate for the increase in the incident angle of the light and ensure the final uniformity of illuminance.

[0053] The fifth step is feedback correction. After determining the optimal lighting scheme, the system controls the camera to acquire several test images and calculates the standard deviation of the actual grayscale values ​​of the weld area in the images. ,like If the value exceeds a preset threshold, the system enters a fine-tuning loop: reducing the luminance of LEDs causing the highest grayscale area by 5%, and increasing the luminance of LEDs causing the lowest grayscale area by 5%, until... If the value is less than the threshold or the maximum number of iterations is reached, feedback control based on the actual imaging effect is achieved, and the final determined LED switching state and its respective brightness level will be used as the final lighting parameters.

[0054] The image reconstruction module utilizes the optimal illumination parameters determined by the light source adaptation module to perform final high-quality image acquisition and stitching, generating a seamless and high-contrast full-circumference unfolded image of the weld. Its workflow is as follows: The central processing unit and controller first send the optimal illumination parameters to each drive circuit of the arched light source. Subsequently, the control tube rotates 360 degrees at a uniform speed. During this process, the camera acquires images at a higher frequency, for example, every 0.5 degrees of rotation, ensuring an overlap rate of no less than 50% between adjacent images. After acquisition, the module calls the image stitching algorithm. This algorithm first uses the Scale Invariant Feature Transform (SIFT) algorithm to extract and match feature point pairs within the overlapping area of ​​adjacent images. The SIFT algorithm is resistant to image rotation, scaling, and brightness changes, based on dozens or even hundreds of high-precision pairs of matched features. For the feature point pairs of the confidence level, the module uses a random sample consensus algorithm to eliminate mismatched points and robustly calculates the transformation matrix between two frames. To eliminate the accumulated error in the multi-frame stitching process, the module further adopts the global bundle adjustment method, which optimizes the camera pose of all images and the spatial position of all 3D feature points as a whole, minimizing the reprojection error of all feature points, thereby obtaining the globally optimal geometric registration. All images are accurately registered to a unified coordinate system. Finally, in order to achieve a visually seamless transition at the stitching seam, the module uses multi-band fusion technology to decompose the image to be stitched into Laplacian pyramids of different spatial frequencies. The overlapping areas are weighted and averaged on each layer, and then the fused pyramid is reconstructed to generate a visually seamless panoramic unfolded image with smooth detail transitions.

[0055] The defect segmentation module performs fine-grained defect detection and size quantization on the panoramic weld development image generated by the image reconstruction unit. The core of this module is a semantic segmentation neural network based on the U-Net architecture. This U-Net network has a symmetrical encoder-decoder structure. The encoder path progressively extracts deep features of the image and reduces its spatial dimension through a series of convolutional and max-pooling layers. The decoder path progressively restores the spatial resolution of the image through upsampling and convolutional operations, and integrates shallow high-resolution feature maps from corresponding layers in the encoder path through skip connections. This allows the network to simultaneously utilize deep semantic information and shallow detail information to achieve precise pixel-level segmentation of minute defects. In this invention, the encoder path of the network consists of five downsampling modules, each containing two 3x3 convolutional layers and one 2x2 max-pooling layer, used to progressively extract deep abstract features of the image. To reduce the spatial dimension, the decoder path is composed of five upsampling modules. The spatial resolution of the image is gradually restored through 2x2 upsampling convolutions or deconvolutions. The key skip connections directly stitch the feature maps of the corresponding layers in the encoder path, which retain high-resolution details, to the corresponding layers in the decoder path. This allows the network to utilize both deep semantic information, such as determining "what kind of defect this is," and shallow spatial details, such as accurately locating the "edge of the defect," thereby achieving precise pixel-level segmentation of small and blurry defects, such as microcracks or pores. This U-Net network, trained on a dataset containing several finely annotated panoramic weld seam unfolded images, can accurately classify each pixel in the input image into one of several predefined categories, such as: background, good weld seam, undercut, pore, slag inclusion, incomplete penetration, incomplete fusion, spatter, etc.

[0056] After the segmentation is completed, as follows Figure 4 and Figure 5As shown, the module performs post-processing and quantization on the pixel-level classification results output by the network, i.e., a multi-channel probability map. For each defect category, a confidence threshold is set to convert it into a binary mask image. Subsequently, these mask images are processed. For linear defects, such as undercut or lack of fusion, the total length and maximum width can be calculated by analyzing the connected component skeleton of the binary mask, and it can be determined whether the defect is continuous or discontinuous. The depth can be indirectly estimated by analyzing the gray-level concavity of the mask area relative to the reference surfaces of the base material on both sides. This gray-level and depth relationship is obtained by calibrating standard defect samples with known depths. For point or block defects, such as porosity or slag inclusions, the connected component analysis algorithm can count their number and calculate the area, equivalent diameter, aspect ratio, and spatial distribution density of each independent defect on the weld. All these quantified defect information, including their precise category, position coordinates on the panoramic image, and various key dimensional parameters, are recorded in a structured manner to form a detailed defect list.

[0057] The report generation module is designed to archive, store, and visualize data from the entire inspection process. After each inspection, the module writes the fitting's unique identifier, inspection time, calculated weld geometry parameters, optimized lighting parameters, quantified defect information, and the storage paths for the original image sequence and the final panoramic view into an SQL-based database, forming a complete and traceable quality record. Simultaneously, based on a preset template, the module automatically generates a PDF inspection report. This report includes a summary table of all key inspection results, a panoramic view of the weld annotated with the location, type, and size of all detected defects, and several magnified images of typical defect areas as supporting evidence. The report also includes a unique QR code. By scanning this code, authorized users can retrieve and replay all original data and processing procedures related to the inspection from the database, thus achieving full lifecycle management and traceability of product quality.

[0058] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principle of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. An AI-based visual inspection system for annular weld metal in automotive pipe fittings, characterized in that: The system includes a camera and an arched light source. The inner side of the arched light source has several independently controllable light source units evenly arranged in a circumferential array. It also includes: The circumferential image acquisition module acquires circumferential images of the outer surface of the pipe when it rotates at a constant speed under initial lighting conditions, forming an initial image sequence containing precise angle labels. The initial feature extraction module analyzes each frame of the image based on the initial image sequence using a target detection model to determine the weld area and identify its weld type. The weld type includes fillet welds and butt welds. The module calls the corresponding subroutine to calculate the geometric parameters of the weld based on the weld type. The geometric parameters include the weld equivalent diameter, weld width, and weld angle. The light source adaptive module generates candidate lighting combinations based on the geometric parameters through a preset lighting physics model, performs heuristic search space pruning and evaluates the comprehensive performance score of the candidate lighting combinations, and selects the combination with the highest score as the optimal lighting parameters. The optimal lighting parameters include the independent on / off state of each light source unit in the arched light source. The image reconstruction module acquires images of the outer surface of the pipe when it rotates at a constant speed under optimal lighting parameters, and stitches the images together to obtain a seamless and high-contrast full-circumference image of the weld. The defect segmentation module analyzes the full-circumference unfolded image of the weld seam using a semantic segmentation neural network to classify each pixel in the weld seam image. The classification results are then post-processed and quantified to identify and quantify weld seam appearance defects. The defect information includes defect type, location coordinates, and size parameters. The adaptive light source module includes an evaluation and screening strategy. This strategy involves defining the weld area as a rectangle in a two-dimensional model unfolded on the pipe surface, calculating the overlap area between the total effective illumination area of ​​each combination in the candidate set and the rectangular area of ​​the weld, and using the ratio of the overlap area to the total weld area as the coverage score. Then, the illumination uniformity score is calculated by using the standard deviation of illuminance and the average illuminance of the sampling points in the weld area. Finally, a comprehensive performance score is obtained by weighting the illumination coverage score and the illumination uniformity score.

2. The AI-based automotive pipe fitting ring weld appearance inspection system according to claim 1, characterized in that: The initial feature extraction module includes a fillet weld size calculation strategy. This strategy involves extracting the pipe base material and weld contour from image frames at the start, middle, and end angles of the weld using an edge detection algorithm. The least squares method is used to fit the straight lines of the two base material contours, and the intersection points are calculated as weld corner vertices. The radial distances from the three weld corner vertices to the outer contour of the pipe are calculated using calibrated camera parameters, and the average value is taken as the equivalent weld diameter. Then, the Hough transform is used to detect the straight line equation of the weld corner edge, and a sampling line is generated along the direction perpendicular to the edge direction. The distance between the intersection points of the sampling line and the two sides of the weld contour is calculated, and the maximum value is taken as the weld width. Finally, the average tangent direction of the weld surface is calculated using the angle between the weld corner edge and the horizontal direction of the image, and the angle between its normal and the camera optical axis is calculated as the weld angle.

3. The AI-based automotive pipe fitting annular weld appearance inspection system according to claim 2, characterized in that: The initial feature extraction module includes a butt weld size calculation strategy. This strategy involves using the Hough circle transform algorithm to identify the outer circle contour of the pipe fitting in multiple frames of images and calculating the center coordinates and radius, taking the average value as the weld diameter; performing threshold segmentation on the weld area image to extract the fusion line contours on both sides, setting multiple vertical sampling lines at equal intervals along the weld centerline, calculating the distance between the fusion lines on both sides of each sampling line and taking the average value of all distances as the weld width; if the fusion line is locally irregular, using a cubic B-spline curve for fitting before calculating the width; and finally setting the weld angle to 0 degrees.

4. The AI-based visual inspection system for annular welds in automotive pipe fittings according to claim 1 or 3, characterized in that: The adaptive light source module includes a combined generation strategy, which includes a lighting model construction step and a lighting combined generation step. The lighting model construction step involves retrieving the actual luminous flux of each light source unit, as well as the straight-line distance between the light source unit and any point on the pipe surface, and the angle between the emitted light from the light source unit and the normal to the weld surface at that point. The illuminance model is then calculated using the actual luminous flux, straight-line distance, and angle. In the lighting combination generation step, a heuristic search space pruning is performed based on the weld angle to generate a candidate set containing several potential effective light source unit on-state combinations. When the weld angle is close to 0 degrees, the light source unit combination located on both sides of the camera and symmetrically distributed is selected first. When the weld angle is greater than a preset threshold, the lateral light source unit combination with a smaller angle to the weld normal direction is selected first.

5. The AI-based automotive pipe fitting annular weld appearance inspection system according to claim 1, characterized in that: The adaptive light source module also includes a feedback correction strategy. The feedback correction strategy includes acquiring several test images of the arched light source under optimal illumination parameters using a camera, calculating the standard deviation of the actual gray value of the weld area in the test image, and if the standard deviation of the actual gray value is greater than a preset threshold, then reducing the luminance of the light source unit that causes the highest gray value area and increasing the luminance of the light source unit that causes the lowest gray value area, until the standard deviation of the actual gray value is less than the preset threshold or the maximum number of iterations is reached, and obtaining the final on / off state of the light source unit and its respective brightness level.

6. The AI-based visual inspection system for annular welds in automotive pipe fittings according to claim 1, characterized in that: The image reconstruction module includes a stitching strategy, which includes extracting and matching feature point pairs in the overlapping area of ​​adjacent images using a scale-invariant feature transformation algorithm, calculating the transformation matrix between two frames of images using the matched feature point pairs, treating the camera pose of all images and the spatial position of all three-dimensional feature points as a whole using the global bundle adjustment method, minimizing the reprojection error of all feature points to obtain the globally optimal geometric registration, and decomposing and fusing the images to be stitched to obtain the full circumference image of the weld.

7. The AI-based automotive pipe fitting annular weld appearance inspection system according to claim 6, characterized in that: The defect types include linear defects and point or block defects. The defect segmentation module includes a defect analysis strategy, which includes predefined categories such as background, good weld, undercut, porosity, slag inclusion, incomplete penetration, and incomplete fusion. When the defect type is a linear defect, the total length, maximum depth, and continuity of the skeleton of the binary mask are calculated through the semantic segmentation neural network output. When the defect type is a point or block defect, the number of defects is counted and the equivalent diameter, area, and distribution density of each defect on the weld are calculated through connected component analysis.

8. The AI-based visual inspection system for annular welds in automotive pipe fittings according to claim 7, characterized in that: It also includes a report generation module, which writes the unique identification code of the fitting, the inspection time, the geometric parameters of the weld, the final optimized lighting parameters, all defect information after segmentation and quantification, the original image sequence, and the storage path of the final panoramic unfolded image into the database to form a quality record. It also automatically generates a PDF inspection report based on a preset template. The report includes a summary table containing all key inspection results, a panoramic schematic diagram of the weld with the location, type and size of all detected defects marked, and several magnified images of typical defect areas. The report also includes a QR code for authorized users to retrieve and replay all the original data and processing procedures related to this inspection from the database.

9. An AI-based method for visual inspection of annular weld metal in automotive pipe fittings, characterized in that: Includes the following steps: The circumferential image acquisition step involves acquiring a full circumferential image of the outer surface of the pipe under initial lighting conditions as it rotates at a constant speed, forming an initial image sequence containing precise angle labels. The initial feature extraction step involves analyzing each frame of the image based on the initial image sequence using a target detection model to determine the weld area and identify its weld type. The weld types include fillet welds and butt welds. The corresponding subroutine is called based on the weld type to calculate the geometric parameters of the weld, including the weld equivalent diameter, weld width, and weld angle. The light source adaptation step generates candidate lighting combinations based on the geometric parameters through a preset lighting physics model, performs heuristic search space pruning and evaluates the comprehensive performance score of the candidate lighting combinations, and selects the combination with the highest score as the optimal lighting parameters. The optimal lighting parameters include the independent on / off state of each light source unit in the arched light source. The image reconstruction step involves acquiring images of the outer surface of the pipe when it rotates at a constant speed under optimal lighting parameters, and then stitching these images together to obtain a seamless and high-contrast full-circumference image of the weld. The defect segmentation step involves analyzing the full-circumference unfolded image of the weld seam using a semantic segmentation neural network to classify each pixel in the weld seam image. The classification results are then post-processed and quantified to identify and quantify weld seam appearance defects. The defect information includes defect type, location coordinates, and size parameters. The adaptive light source step includes an evaluation and screening strategy. This strategy involves defining the weld area as a rectangle in a two-dimensional model unfolded on the pipe surface, calculating the overlap area between the total effective illumination area of ​​each combination in the candidate set and the rectangular area of ​​the weld, and using the ratio of the overlap area to the total weld area as the coverage score. Then, the illumination uniformity score is calculated by using the standard deviation of illuminance and the average illuminance of the sampling points in the weld area. Finally, a comprehensive performance score is obtained by weighting the illumination coverage score and the illumination uniformity score.

Citation Information

Patent Citations

  • An inspection system and method for inspecting weld seams in hollow pipe fittings.

    CN110006998B

  • An intelligent mobile detection method for the inner surface quality of pipe welds

    CN118130617B

  • Intelligent welding seam detection platform based on artificial intelligence

    CN118691591A

  • Weld joint positioning and defect detection system and method based on deep learning

    CN119417800A

  • Full-appearance detection method and system for internal wire welding flux of automobile brake hose joint

    CN120507362A