Deep learning-based corrugated pipe inner wall multi-type flaw detection method

Through deep learning-based methods, the StyleGAN3 network and multi-scale adaptive deep network are improved, and combined with adaptive geometric embedding, the problems of low efficiency and insufficient adaptability in the detection of defects in the inner wall of bellows are solved, and efficient and accurate defect detection is achieved.

CN119444735AActive Publication Date: 2025-02-14HEFEI MITSUKOSHI SEMICON TECH CO LTD

Patent Information

Application Number
CN202510015369.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-02-14
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

The prior art has problems such as low efficiency, serious missed detection, and insufficient adaptability to complex lighting environments and geometric characteristics in the detection of defects in the inner wall of bellows.

Method used

Using a deep learning-based method, texture enhancement is performed through the improved StyleGAN3 network, combining multi-scale adaptive deep network and adaptive geometric embedding, multiple defect features are captured and geometric information is integrated, pseudo-defects are eliminated, and false detection rate is reduced.

Benefits of technology

It significantly improves the efficiency and accuracy of defect detection in the inner wall of the bellows, reduces the false detection and miss detection rates, and enhances the adaptability to complex lighting environments and geometric characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444735A_ABST
    Figure CN119444735A_ABST
Patent Text Reader

Abstract

The invention discloses a corrugated pipe inner wall multi-type flaw detection method based on deep learning, and the method comprises the following steps: S1, collecting an initial corrugated pipe inner wall image and corrugated pipe inner wall images in different illumination environments, and generating an original image; s2, preprocessing the original image to generate a preprocessed image; s3, extracting surface geometric overall features of the inner wall of the corrugated pipe from the preprocessed image through a pre-trained ResNet101 network; s4, inputting the preprocessed image and the surface geometric overall features into an improved StyleGAN3 network to generate an enhanced image; s5, inputting the enhanced image into the multi-scale adaptive deep network, and outputting a defect detection result; and S6, performing post-processing on the flaw detection result, and outputting a final flaw detection result. According to the method, deep learning and geometric characteristic embedding technologies are adopted, so that the defects of the inner wall of the corrugated pipe are accurately detected, and the method has the advantages of high precision, high robustness and comprehensive adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of corrugated pipe inner wall defect detection, and in particular to a method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning. Background Art

[0002] Bellows are widely used in industry, chemical industry, aerospace and other engineering fields. Their main functions include acting as compensation elements to absorb various stresses such as mechanical vibration, pressure fluctuations and thermal expansion. However, due to long-term exposure to complex environments, such as high temperature, high pressure, corrosive media and mechanical vibration, the inner wall of the bellows is prone to defects such as cracks, holes, corrosion and contamination. These defects will significantly reduce the strength and reliability of the bellows, and may even cause equipment failure or major safety accidents. Therefore, efficient detection of defects on the inner wall of bellows is of great engineering significance.

[0003] Traditional methods for detecting the inner wall of bellows mainly include visual inspection, ultrasonic inspection, and industrial endoscope inspection. These methods can detect significant defects on the inner wall of bellows to a certain extent, but there are many limitations in practical applications. Visual inspection relies on manual operation, which is not only inefficient but also limited by the experience of the inspectors, which can easily lead to missed inspections or false inspections; although the ultrasonic inspection method has a certain penetration ability, its detection resolution is low and it is difficult to accurately identify tiny cracks or contamination; although the industrial endoscope inspection can provide clear images, the operation is complicated and the detection range is limited, and it takes a lot of time to analyze the images. In addition, these traditional inspection methods are highly dependent on lighting conditions and material properties, and cannot adapt to the complex inner wall structure and changing use environment of the bellows, resulting in instability and limitations in the inspection results.

[0004] In recent years, with the development of artificial intelligence, especially deep learning technology, image-based automated defect detection technology has received widespread attention. Deep learning has shown great advantages in feature extraction, image enhancement and target detection, and can automatically identify subtle defects in images in complex environments. However, the current deep learning detection methods still face many challenges when applied to the detection of defects on the inner wall of corrugated pipes. First, the inner wall of the corrugated pipe has a complex geometric shape with periodic corrugations, which makes it difficult for traditional convolutional neural networks to accurately extract effective features. Secondly, the lighting conditions on the inner wall of the corrugated pipe are complex, including reflections, highlights and shadows, which often lead to insufficient adaptability of deep learning models to lighting changes, and are prone to pseudo defects or missed detection problems. In addition, the existing deep learning models have weak ability to simultaneously detect multi-scale defects (such as tiny cracks and large-scale contamination), and cannot take into account both detailed features and global features. Finally, most traditional methods ignore the influence of actual geometric characteristics in industrial scenarios, such as the curvature and periodic structure of the inner wall of the corrugated pipe, which further limits the accuracy and reliability of the detection model.

[0005] Therefore, how to provide a method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning is an urgent problem that needs to be solved by technicians in this field. Summary of the invention

[0006] One purpose of the present invention is to propose a method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning. The present invention performs texture enhancement through an improved StyleGAN3 network to improve the clarity and contrast of the defect area. It combines a multi-scale adaptive deep network and adaptive geometric embedding to capture multiple defect features and integrate geometric information, thereby enhancing the model's adaptability to complex scenes. It eliminates pseudo defects by modeling based on reflection laws and reduces the false detection rate.

[0007] A method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning according to an embodiment of the present invention comprises the following steps: S1. Use an industrial camera to collect an initial image of the inner wall of the bellows, adjust the illumination intensity and angle of the annular light source to simulate different lighting environments, collect images of the inner wall of the bellows under different lighting environments, and combine the initial image of the inner wall of the bellows with the images of the inner wall of the bellows under different lighting environments to generate an original image; S2, using Gaussian filtering to denoise the original image, using contrast stretching and edge enhancement to enhance the details of the original image, and correcting image distortion through a multi-view projection transformation algorithm to generate a preprocessed image; S3, extracting the overall surface geometric features of the inner wall of the bellows from the preprocessed image through the pre-trained ResNet101 network; S4, input the preprocessed image and the overall surface geometric features into the improved StyleGAN3 network, enhance the texture of the preprocessed image through the generator, and use the discriminator to enhance the texture consistency of the image to generate an enhanced image; S5. Input the enhanced image into a multi-scale adaptive deep network, extract multi-scale features through convolution kernels with different receptive fields, embed the geometric characteristics of the bellows into the multi-scale features, optimize the multi-scale features through dense connection layers, and output defect detection results; S6. Post-process the defect detection results, eliminate pseudo defects based on the geometric characteristics of the inner wall of the bellows, optimize the position of each detected defect area, output the final defect detection results, and generate a test report based on the final defect detection results.

[0008] Optionally, the annular light source is adjusted to different illumination intensity ranges and angles by a light source regulator to cover every area of ​​the inner wall of the corrugated tube.

[0009] Optionally, the S2 specifically includes: S21. Use Gaussian kernel function to denoise the original image: ; in, represents the Gaussian kernel function, and Indicates the offset of the image pixel. represents the standard deviation of the Gaussian function; S22, applying the Gaussian kernel function to each pixel of the image through a convolution operation to generate a denoised image; S23. Perform contrast stretching on the denoised image to enhance the details of defects in the image: ; in, represents the enhanced image pixel value, Indicates that the original image is at position The pixel value at and represents the minimum and maximum pixel values ​​in the image, and Represents the range of pixel values ​​after mapping; S24, performing edge enhancement on the image after denoising and contrast enhancement to highlight the defect edges in the image, wherein the edge enhancement uses a Laplace operator to perform convolution processing on the image: ; in, represents the enhanced image edge information, Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at ; S25. Perform image distortion correction on the edge-enhanced image using a multi-view projection transformation algorithm, use camera calibration technology to obtain the internal and external parameters of the industrial camera, use the internal parameters to form a calibration parameter matrix, and use the external parameters and the calibration parameter matrix to form a perspective transformation matrix. The internal parameters include focal length and principal point coordinates, and the external parameters include rotation matrix and translation vector: ; ; in, represents the calibration parameter matrix, and represents the focal length, and represents the principal point coordinates, represents the rotation matrix, represents the translation vector, Represents the perspective transformation matrix; S26, transform the edge-enhanced image to finally generate a preprocessed image: ; in, represents the coordinates in the original image, Represents the coordinates after distortion correction.

[0010] Optionally, the S4 specifically includes: S41, input the preprocessed image into the style mapping network of the generator, and map the input random noise and the overall surface geometric features into the latent space through the style mapping network, wherein the style mapping network is implemented by a multi-layer perceptron: ; in, represents the style vector in the latent space, represents random noise sampled from a standard normal distribution, represents a multi-layer perceptron, represents the standard normal distribution, Represents the overall geometric characteristics of the surface, Represents the weighting factor, which is used to balance the influence of global features and random noise; S42, through style vector Control the synthesis of image features, combine the geometric characteristics and position encoding information of the preprocessed image, perform texture enhancement on the preprocessed image, and inject vectors into each convolution layer of the generator , and output a generated image, the generated image has multi-scale texture features: ; in, Indicates the generated image, represents the number of convolutional layers in the generator, Indicates The convolution operation of the layer, Indicates The feature map of the layer, and Represent the style vectors The scaling factor and offset of each layer feature are used to adjust the amplitude and offset of the feature. Represents the dynamic geometric feature encoding based on the geometric characteristics of the inner wall of the bellows: ; in, and Respectively represent the preprocessed images in and The cycle length of the direction, Represents the coded information based on the spatial position of the image, which is the periodic geometric characteristics of the inner wall of the bellows. Represents geometric detail features; S43. Define the loss function of the discriminator feedback to optimize the consistency between the texture of the generated image and the preprocessed image: ; in, represents the loss function, represents the output of the discriminator, representing the authenticity score of the preprocessed image, Express expectations, represents the authenticity score of the generated image; S44. Define the regional contrast loss function to optimize the texture contrast between the defective area and the normal area of ​​the generated image: ; in, represents the region contrast loss function, represents the number of image regions, Represents the image feature extraction function, extracting local features of different receptive fields, and Represent the corresponding areas of the generated image and the preprocessed image, respectively. Represent the characteristics of different regions in the generated image; S45. The generator optimizes the style vector by combining the loss function fed back by the discriminator and the regional contrast loss function. and geometric feature encoding : ; ; in, represents the total loss function, represents the weight factor of contrast loss, represents the learning rate, represents the gradient of the total loss function with respect to the style vector and geometric feature encoding; S46. Output enhanced image , the enhanced image has enhanced texture features.

[0011] Optionally, the S5 specifically includes: S51, extracting multi-scale features from the enhanced image through a multi-scale adaptive deep network, and extracting multi-scale features through convolution kernels with different receptive fields, wherein the multi-scale adaptive deep network includes a multi-scale feature extraction layer, an adaptive geometric embedding layer, and a dense connection layer: ; in, Indicates at location The characteristic representation of represents the convolution kernel weight, Indicates bias, represents the input augmented image, Indicates the size of the convolution kernel; S52. Embed the geometric characteristics of the bellows into the feature representation through position encoding: ; ; in, and Respectively represent the bellows and The length of the cycle in the direction, and Represents the coordinate position of the feature map, Indicates the feature representation after fusing geometric information; S53, embedding the feature map of geometric characteristics Input dense connection layer, transfer and optimize feature representation, the dense connection layer connects all previous feature maps layer by layer: ; in, Indicates The feature output of the layer, represents the ReLU activation function, Indicates The weight matrix of the layer, Indicates The bias of the layer, Represents a cascade of features; S54, the feature map output by the densely connected layer Input the classification head, which consists of multiple convolutional layers and fully connected layers, to predict the defect category corresponding to each candidate region: ; in, Represents the classification result, which is a vector containing the probabilities of all defect categories. Indicates that the densely connected layer is at position Features, represents the weight matrix of the classification head, represents the bias vector, represents the normalization function, which is used to limit the classification probability to the interval [0,1]; S55. Output feature map of densely connected layer Enter the regression head and use The loss function optimizes the bounding box prediction results. The regression head consists of multiple convolutional layers and linear regression to predict the bounding box parameters of the defect area: ; ; in, represents the bounding box parameters, represents the weight matrix of the regression head, represents the bias vector of the regression head, represents the predicted bounding box, represents the ground-truth bounding box, represents the area of ​​the box, Represents the predicted position loss; S56. The outputs of the classification head and the regression head are jointly optimized through a multi-task loss function: ; ; in, represents the multi-task loss function, Represents the classification loss function, using cross entropy loss, and Represents the weight parameter, which is used to balance the classification and regression tasks. represents the distribution of true category labels, Represents the predicted class probability; S57, according to the category label output by the classification head And the bounding box output by the regression head , generating a defect detection result, wherein the defect detection result includes the defect area location and type.

[0012] Optionally, the S6 specifically includes: S61. According to the curvature and uneven shape of the surface of the bellows, the reflected light intensity of each defective area is calculated. If the reflected light intensity exceeds a preset threshold, the defective area is removed from the defect detection result: ; in, Represents the intensity of reflected light, represents the reflection coefficient, represents the angle between the light source and the normal line of the inner wall surface of the bellows, Indicates the light intensity of the area; S62, performing geometric characteristic analysis on each detected defect area position, combining the image gradient and the local curvature information of the bellows, and optimizing the defect area position: ; in, represents the curvature change, represents the Laplacian operator of the image, represents the local curvature of the bellows surface; S63: Output the final defect detection result, which includes the location, type, size and confidence information of the defect, and generate a detection report.

[0013] The beneficial effects of the present invention are: First, this method introduces dynamic illumination simulation in the image acquisition stage. By adjusting the illumination intensity and angle of the ring light source, the inner wall images of the bellows under different illumination conditions are collected, which effectively enhances the diversity and quality of the input data. This diversified data acquisition method improves the model's adaptability to complex lighting environments, solves the problem of false detection or missed detection in scenes such as highlights and shadows by traditional methods, and lays a solid foundation for subsequent image processing and deep learning model training.

[0014] Secondly, in the image preprocessing stage, this method uses Gaussian filtering to denoise, contrast stretching and edge enhancement operations to significantly improve the clarity of the image and the recognizability of the defect area. In addition, the image distortion is corrected by a multi-view projection transformation algorithm to solve the image distortion problem caused by the complex geometric structure of the inner wall of the bellows. These preprocessing steps ensure the geometric accuracy and detail richness of the image, providing high-quality input data for the subsequent feature extraction and detection process.

[0015] Again, by introducing the pre-trained ResNet101 network to extract the overall surface geometric features of the inner wall of the bellows, this method can better understand the periodic structure and local characteristics of the bellows. This feature extraction method enables the generative adversarial network to more accurately capture the texture features and geometric details of the bellows. Combined with the improved StyleGAN3 network, the present invention injects style vectors and dynamic geometric feature encoding into the generator, enhancing the detailed expression of image texture, while optimizing the texture consistency and realism of the image through the discriminator. In particular, the introduction of regional contrast loss makes the generated image have a more significant contrast between the defect area and the normal area, further improving the detectability of defects.

[0016] In addition, the application of multi-scale adaptive deep network enables this method to extract features of different scales at the same time, adapting to various types of defects such as large-scale pollution and tiny cracks in the inner wall of the bellows. Through adaptive geometric embedding, the geometric characteristics of the bellows are integrated into the feature representation, which greatly improves the detection ability of complex surface defects. In addition, the design of dense connection layer effectively avoids feature loss and optimizes the transmission and fusion of multi-scale features, thereby ensuring the accuracy and reliability of defect detection results.

[0017] Finally, in the post-processing stage, this method designs a pseudo-defect removal mechanism based on the geometric and optical properties of the bellows, and removes pseudo-defects caused by reflections or abnormal textures through reflected light intensity calculation and curvature analysis. The position of the defective area is further optimized by combining image gradients and local geometric characteristics, which improves the accuracy of the detection results. This post-processing method significantly reduces the false alarm rate and provides higher credibility for industrial detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 A flowchart of a method for detecting multiple types of defects on the inner wall of a bellows based on deep learning proposed by the present invention; Figure 2This is a structural diagram of a multi-scale adaptive deep network for a deep learning-based method for detecting multiple types of defects on the inner wall of a corrugated pipe proposed in the present invention. DETAILED DESCRIPTION

[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0020] refer to Figure 1 and Figure 2 , a method for detecting multiple types of defects on the inner wall of a bellows based on deep learning, comprising the following steps: S1. Use an industrial camera to collect an initial image of the inner wall of the bellows, adjust the illumination intensity and angle of the annular light source to simulate different lighting environments, collect images of the inner wall of the bellows under different lighting environments, and combine the initial image of the inner wall of the bellows with the images of the inner wall of the bellows under different lighting environments to generate an original image; S2, using Gaussian filtering to denoise the original image, using contrast stretching and edge enhancement to enhance the details of the original image, and correcting image distortion through a multi-view projection transformation algorithm to generate a preprocessed image; S3, extracting the overall surface geometric features of the inner wall of the bellows from the preprocessed image through the pre-trained ResNet101 network; S4, input the preprocessed image and the overall surface geometric features into the improved StyleGAN3 network, enhance the texture of the preprocessed image through the generator, and use the discriminator to enhance the texture consistency of the image to generate an enhanced image; S5. Input the enhanced image into a multi-scale adaptive deep network, extract multi-scale features through convolution kernels with different receptive fields, embed the geometric characteristics of the bellows into the multi-scale features, optimize the multi-scale features through dense connection layers, and output defect detection results; S6. Post-process the defect detection results, eliminate pseudo defects based on the geometric characteristics of the inner wall of the bellows, optimize the position of each detected defect area, output the final defect detection results, and generate a test report based on the final defect detection results.

[0021] In this embodiment, the annular light source is adjusted to different illumination intensity ranges and angles by a light source adjuster to cover every area of ​​the inner wall of the corrugated tube.

[0022] In this implementation, S2 specifically includes: S21. Use Gaussian kernel function to denoise the original image: ; in, represents the Gaussian kernel function, and Indicates the offset of the image pixel. represents the standard deviation of the Gaussian function; S22, applying the Gaussian kernel function to each pixel of the image through a convolution operation to generate a denoised image; S23. Perform contrast stretching on the denoised image to enhance the details of defects in the image: ; in, represents the enhanced image pixel value, Indicates that the original image is at position The pixel value at and represents the minimum and maximum pixel values ​​in the image, and Represents the range of pixel values ​​after mapping; S24, performing edge enhancement on the image after denoising and contrast enhancement to highlight the defect edges in the image, wherein the edge enhancement uses a Laplace operator to perform convolution processing on the image: ; in, represents the enhanced image edge information, Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at ; S25. Perform image distortion correction on the edge-enhanced image using a multi-view projection transformation algorithm, use camera calibration technology to obtain the internal and external parameters of the industrial camera, use the internal parameters to form a calibration parameter matrix, and use the external parameters and the calibration parameter matrix to form a perspective transformation matrix. The internal parameters include focal length and principal point coordinates, and the external parameters include rotation matrix and translation vector: ; ; in, represents the calibration parameter matrix, and represents the focal length, and represents the principal point coordinates, represents the rotation matrix, represents the translation vector, Represents the perspective transformation matrix; S26, transform the edge-enhanced image to finally generate a preprocessed image: ; in, represents the coordinates in the original image, Represents the coordinates after distortion correction.

[0023] In this implementation, S4 specifically includes: S41, input the preprocessed image into the style mapping network of the generator, and map the input random noise and the overall surface geometric features into the latent space through the style mapping network, wherein the style mapping network is implemented by a multi-layer perceptron: ; in, represents the style vector in the latent space, represents random noise sampled from a standard normal distribution, represents a multi-layer perceptron, represents the standard normal distribution, Represents the overall geometric characteristics of the surface, Represents the weighting factor, which is used to balance the influence of global features and random noise; S42, through style vector Control the synthesis of image features, combine the geometric characteristics and position encoding information of the preprocessed image, perform texture enhancement on the preprocessed image, and inject vectors into each convolution layer of the generator , and output a generated image, the generated image has multi-scale texture features: ; in, Indicates the generated image, represents the number of convolutional layers in the generator, Indicates The convolution operation of the layer, Indicates The feature map of the layer, and Represent the style vectors The scaling factor and offset of each layer feature are used to adjust the amplitude and offset of the feature. Represents the dynamic geometric feature encoding based on the geometric characteristics of the inner wall of the bellows: ; in, and Respectively represent the preprocessed images in and The length of the cycle in the direction, Represents the coded information based on the spatial position of the image, which is the periodic geometric characteristics of the inner wall of the bellows. Represents geometric detail features; S43. Define the loss function of the discriminator feedback to optimize the consistency between the texture of the generated image and the preprocessed image: ; in, represents the loss function, represents the output of the discriminator, representing the authenticity score of the preprocessed image, Express expectations, represents the authenticity score of the generated image; S44. Define the regional contrast loss function to optimize the texture contrast between the defective area and the normal area of ​​the generated image: ; in, represents the region contrast loss function, represents the number of image regions, Represents the image feature extraction function, extracting local features of different receptive fields, and Represent the corresponding areas of the generated image and the preprocessed image, respectively. Represent the characteristics of different regions in the generated image; S45. The generator optimizes the style vector by combining the loss function fed back by the discriminator and the regional contrast loss function. and geometric feature encoding : ; ; in, represents the total loss function, represents the weight factor of contrast loss, represents the learning rate, represents the gradient of the total loss function with respect to the style vector and geometric feature encoding; S46. Output enhanced image , the enhanced image has enhanced texture features.

[0024] In this implementation manner, S5 specifically includes: S51, extracting multi-scale features from the enhanced image through a multi-scale adaptive deep network, and extracting multi-scale features through convolution kernels with different receptive fields, wherein the multi-scale adaptive deep network includes a multi-scale feature extraction layer, an adaptive geometric embedding layer, and a dense connection layer: ; in, Indicates at location The characteristic representation of represents the convolution kernel weight, Indicates bias, represents the input augmented image, Indicates the size of the convolution kernel; S52. Embed the geometric characteristics of the bellows into the feature representation through position encoding: ; ; in, and Respectively represent the bellows and The length of the cycle in the direction, and Represents the coordinate position of the feature map, Indicates the feature representation after fusing geometric information; S53, embedding the feature map of geometric characteristics Input dense connection layer, transfer and optimize feature representation, the dense connection layer connects all previous feature maps layer by layer: ; in, Indicates The feature output of the layer, represents the ReLU activation function, Indicates The weight matrix of the layer, Indicates The bias of the layer, Represents a cascade of features; S54, the feature map output by the densely connected layer Input the classification head, which consists of multiple convolutional layers and fully connected layers, to predict the defect category corresponding to each candidate region: ; in, Represents the classification result, which is a vector containing the probabilities of all defect categories. Indicates that the densely connected layer is at position Features, represents the weight matrix of the classification head, represents the bias vector, represents the normalization function, which is used to limit the classification probability to the interval [0,1]; S55. Output feature map of densely connected layer Enter the regression head and use The loss function optimizes the bounding box prediction results. The regression head consists of multiple convolutional layers and linear regression to predict the bounding box parameters of the defect area: ; ; in, represents the bounding box parameters, represents the weight matrix of the regression head, represents the bias vector of the regression head, represents the predicted bounding box, represents the ground-truth bounding box, represents the area of ​​the box, Represents the predicted position loss; S56. The outputs of the classification head and the regression head are jointly optimized through a multi-task loss function: ; ; in, represents the multi-task loss function, Represents the classification loss function, using cross entropy loss, and Represents the weight parameter, which is used to balance the classification and regression tasks. represents the distribution of true category labels, Represents the predicted class probability; S57, according to the category label output by the classification head And the bounding box output by the regression head , generating a defect detection result, wherein the defect detection result includes the defect area location and type.

[0025] In this implementation manner, S6 specifically includes: S61. According to the curvature and uneven shape of the surface of the bellows, the reflected light intensity of each defective area is calculated. If the reflected light intensity exceeds a preset threshold, the defective area is removed from the defect detection result: ; in, Represents the intensity of reflected light, represents the reflection coefficient, represents the angle between the light source and the normal line of the inner wall surface of the bellows, Indicates the light intensity of the area; S62, performing geometric characteristic analysis on each detected defect area position, combining the image gradient and the local curvature information of the bellows, and optimizing the defect area position: ; in, represents the curvature change, represents the Laplacian operator of the image, represents the local curvature of the bellows surface; S63: Output the final defect detection result, which includes the location, type, size and confidence information of the defect, and generate a detection report.

[0026] Embodiment 1: In the production line of a high-end manufacturing company, a large number of bellows are used in high-pressure transmission systems, and the integrity of their inner walls directly affects the safe operation of the system. However, during long-term use, the inner wall of the bellows may produce cracks, holes, corrosion, pollution and other defects due to pressure fluctuations, chemical corrosion or mechanical damage. The detection of these defects requires not only high precision, but also adaptability to complex lighting environments and the geometric characteristics of the bellows. Traditional detection methods have problems such as low detection efficiency and serious false detection and missed detection, and cannot meet the needs of real-time quality control of production lines.

[0027] In this scenario, first, when the bellows is transported to the inspection area, the industrial camera captures the inner wall image at 4K resolution, and the ring light source dynamically adjusts the illumination angle and intensity to simulate different lighting environments to ensure that the inner wall feature details are clear. The rotating device rotates at an angle of 6° per second to achieve full coverage shooting, ensuring that the image of each section of the inner wall of the bellows is completely captured. In the data processing stage, the captured image is first denoised by Gaussian filtering to remove sensor noise and ambient light interference. Subsequently, the image is processed by contrast stretching and edge enhancement to further highlight the details of the defects. The improved StyleGAN3 network is used to enhance the texture of the preprocessed image. The generator enhances the texture clarity of the defect area, while the discriminator verifies the consistency between the generated image and the real image to ensure the authenticity of the enhanced result. The generated enhanced image is input into the multi-scale adaptive deep network. The network extracts the features of tiny cracks and large-scale pollution through convolution kernels with different receptive fields, and optimizes the detection results in combination with the geometric characteristics of the bellows. In actual operation, the pseudo-defects caused by lighting are accurately identified by analyzing the relationship between the light source and the reflection of the bellows surface to eliminate the pseudo-defects.

[0028] In order to verify the effect of the present invention, 1,000 corrugated tubes were selected for testing experiments in a batch of production tasks. The inner wall features of these bellows were complex, covering various types of defects, including cracks, holes, corrosion and pollution.

[0029] Table 1 Experimental comparison data of bellows inner wall detection method based on deep learning

[0030] In terms of detection time, the average detection time of the detection method of the present invention is only 3 seconds per piece, while the traditional detection method takes 30 seconds per piece, and the detection efficiency is improved by about 10 times. This means that the method of the present invention can detect 1,200 corrugated pipes per hour, while the traditional method can only detect 120, which greatly reduces the detection cost and improves efficiency.

[0031] In terms of detection accuracy, the detection accuracy of the present invention reaches 97.6%, which is 17.4 percentage points higher than 83.2% of the traditional method. Especially in terms of false detection rate and missed detection rate, the false detection rate of the present invention method is reduced to 3.2%, and the missed detection rate is reduced to 1.5%, which are reduced by 12.5 and 8.8 percentage points respectively. These improvements show that the present invention method can not only quickly detect defects on the inner wall of the bellows, but also significantly reduce detection errors and improve overall detection reliability.

[0032] The method of the present invention also performs excellently in the detection of different types of defects. Experimental results show that the crack detection accuracy is improved from 78.5% of the traditional method to 97.9%, the hole detection accuracy is improved from 80.2% to 97.3%, and the corrosion and pollution detection accuracy are also improved from 81.0% and 79.6% to 98.0% and 98.2%, respectively. These data indicate that the present invention is widely applicable in the detection of various types of defects, especially in the simultaneous detection of tiny cracks and large-scale pollution.

[0033] In addition, the robustness of the present invention under complex lighting conditions has also been verified. In high-light environments, the detection accuracy rate reaches 97.1%, and the false detection rate is only 3.5%. In shadow environments, the missed detection rate is only 2.2%, and the detection accuracy rate is 96.8%. In comparison, the false detection rate and missed detection rate of traditional methods under similar conditions are as high as 20.1% and 15.2%, respectively. In reflective environments, the detection accuracy rate of the present invention reaches 96.3%, which is 23.9 percentage points higher than the 72.4% of traditional methods, improving the system's adaptability under complex lighting conditions.

[0034] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning, characterized in that: The steps include: S1. Use an industrial camera to collect an initial image of the inner wall of the bellows, adjust the illumination intensity and angle of the annular light source to simulate different lighting environments, collect images of the inner wall of the bellows under different lighting environments, and combine the initial image of the inner wall of the bellows with the images of the inner wall of the bellows under different lighting environments to generate an original image; S2, using Gaussian filtering to denoise the original image, using contrast stretching and edge enhancement to enhance the details of the original image, and correcting image distortion through a multi-view projection transformation algorithm to generate a preprocessed image; S3, extracting the overall surface geometric features of the inner wall of the bellows from the preprocessed image through the pre-trained ResNet101 network; S4, input the preprocessed image and the overall surface geometric features into the improved StyleGAN3 network, enhance the texture of the preprocessed image through the generator, and use the discriminator to enhance the texture consistency of the image to generate an enhanced image; S5. Input the enhanced image into a multi-scale adaptive deep network, extract multi-scale features through convolution kernels with different receptive fields, embed the geometric characteristics of the bellows into the multi-scale features, optimize the multi-scale features through dense connection layers, and output defect detection results; S6. Post-process the defect detection results, eliminate pseudo defects based on the geometric characteristics of the inner wall of the bellows, optimize the position of each detected defect area, output the final defect detection results, and generate a test report based on the final defect detection results.

2. According to the method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning in claim 1, it is characterized in that: The annular light source is adjusted to different illumination intensity ranges and angles by a light source adjuster to cover every area of ​​the inner wall of the corrugated tube.

3. According to the method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning in claim 1, it is characterized in that: The S2 specifically includes: S21. Use Gaussian kernel function to denoise the original image: ; in, represents the Gaussian kernel function, and Indicates the offset of the image pixel. represents the standard deviation of the Gaussian function; S22, applying the Gaussian kernel function to each pixel of the image through a convolution operation to generate a denoised image; S23. Perform contrast stretching on the denoised image to enhance the details of defects in the image: ; in, represents the enhanced image pixel value, Indicates that the original image is at position The pixel value at and represents the minimum and maximum pixel values ​​in the image, and Represents the range of pixel values ​​after mapping; S24, performing edge enhancement on the image after denoising and contrast enhancement to highlight the defect edges in the image, wherein the edge enhancement uses a Laplace operator to perform convolution processing on the image: ; in, represents the enhanced image edge information, Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at Indicates that the image is at position The pixel value at ; S25. Perform image distortion correction on the edge-enhanced image using a multi-view projection transformation algorithm, use camera calibration technology to obtain the internal and external parameters of the industrial camera, use the internal parameters to form a calibration parameter matrix, and use the external parameters and the calibration parameter matrix to form a perspective transformation matrix. The internal parameters include focal length and principal point coordinates, and the external parameters include rotation matrix and translation vector: ; ; in, represents the calibration parameter matrix, and represents the focal length, and represents the principal point coordinates, represents the rotation matrix, represents the translation vector, Represents the perspective transformation matrix; S26, transform the edge-enhanced image to finally generate a preprocessed image: ; in, represents the coordinates in the original image, Represents the coordinates after distortion correction.

4. According to the method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning in claim 1, it is characterized in that: The S4 specifically includes: S41, input the preprocessed image into the style mapping network of the generator, and map the input random noise and the overall surface geometric features into the latent space through the style mapping network, wherein the style mapping network is implemented by a multi-layer perceptron: ; in, represents the style vector in the latent space, represents random noise sampled from a standard normal distribution, represents a multi-layer perceptron, represents the standard normal distribution, Represents the overall geometric characteristics of the surface, Represents the weighting factor, which is used to balance the influence of global features and random noise; S42, through style vector Control the synthesis of image features, combine the geometric characteristics and position encoding information of the preprocessed image, perform texture enhancement on the preprocessed image, and inject vectors into each convolution layer of the generator , and output a generated image, the generated image has multi-scale texture features: ; in, Indicates the generated image, represents the number of convolutional layers in the generator, Indicates The convolution operation of the layer, Indicates The feature map of the layer, and Represent the style vectors The scaling factor and offset of each layer feature are used to adjust the amplitude and offset of the feature. Represents the dynamic geometric feature encoding based on the geometric characteristics of the inner wall of the bellows: ; in, and Respectively represent the preprocessed images in and The cycle length of the direction, Represents the coded information based on the spatial position of the image, which is the periodic geometric characteristics of the inner wall of the bellows. Represents geometric detail features; S43. Define the loss function of the discriminator feedback to optimize the consistency between the texture of the generated image and the preprocessed image: ; in, represents the loss function, represents the output of the discriminator, representing the authenticity score of the preprocessed image, Express expectations, represents the authenticity score of the generated image; S44. Define the regional contrast loss function to optimize the texture contrast between the defective area and the normal area of ​​the generated image: ; in, represents the region contrast loss function, represents the number of image regions, Represents the image feature extraction function, extracting local features of different receptive fields, and Represent the corresponding areas of the generated image and the preprocessed image, respectively. Represent the characteristics of different regions in the generated image; S45. The generator optimizes the style vector by combining the loss function fed back by the discriminator and the regional contrast loss function. and geometric feature encoding : ; ; in, represents the total loss function, represents the weight factor of contrast loss, represents the learning rate, represents the gradient of the total loss function with respect to the style vector and geometric feature encoding; S46. Output enhanced image , the enhanced image has enhanced texture features.

5. The method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning according to claim 1, characterized in that: The S5 specifically includes: S51, extracting multi-scale features from the enhanced image through a multi-scale adaptive deep network, and extracting multi-scale features through convolution kernels with different receptive fields, wherein the multi-scale adaptive deep network includes a multi-scale feature extraction layer, an adaptive geometric embedding layer, and a dense connection layer: ; in, Indicates at location The characteristic representation of represents the convolution kernel weight, Indicates bias, represents the input augmented image, Indicates the size of the convolution kernel; S52. Embed the geometric characteristics of the bellows into the feature representation through position encoding: ; ; in, and Respectively represent the bellows and The cycle length of the direction, and Represents the coordinate position of the feature map, Indicates the feature representation after fusing geometric information; S53, embedding the feature map of geometric characteristics Input dense connection layer, transfer and optimize feature representation, the dense connection layer connects all previous feature maps layer by layer: ; in, Indicates The feature output of the layer, represents the ReLU activation function, Indicates The weight matrix of the layer, Indicates The bias of the layer, Represents a cascade of features; S54, the feature map output by the densely connected layer Input the classification head, which consists of multiple convolutional layers and fully connected layers, to predict the defect category corresponding to each candidate region: ; in, Represents the classification result, which is a vector containing the probabilities of all defect categories. Indicates that the densely connected layer is at position Features, represents the weight matrix of the classification head, represents the bias vector, represents the normalization function, which is used to limit the classification probability to the interval [0,1]; S55. Output feature map of densely connected layer Enter the regression head and use The loss function optimizes the bounding box prediction results. The regression head consists of multiple convolutional layers and linear regression to predict the bounding box parameters of the defect area: ; ; in, represents the bounding box parameters, represents the weight matrix of the regression head, represents the bias vector of the regression head, represents the predicted bounding box, represents the ground-truth bounding box, represents the area of ​​the box, Represents the predicted position loss; S56. The outputs of the classification head and the regression head are jointly optimized through a multi-task loss function: ; ; in, represents the multi-task loss function, Represents the classification loss function, using cross entropy loss, and Represents the weight parameter, which is used to balance the classification and regression tasks. represents the distribution of true category labels, Represents the predicted class probability; S57, according to the category label output by the classification head And the bounding box output by the regression head , generating a defect detection result, wherein the defect detection result includes a defect area location and type.

6. The method for detecting multiple types of defects on the inner wall of a corrugated pipe based on deep learning according to claim 1, characterized in that: The S6 specifically includes: S61. According to the curvature and uneven shape of the surface of the bellows, the reflected light intensity of each defective area is calculated. If the reflected light intensity exceeds a preset threshold, the defective area is removed from the defect detection result: ; in, Represents the intensity of reflected light, represents the reflection coefficient, represents the angle between the light source and the normal line of the inner wall surface of the bellows, Indicates the light intensity of the area; S62, performing geometric characteristic analysis on each detected defect area position, combining the image gradient and the local curvature information of the bellows, and optimizing the defect area position: ; in, represents the curvature change, represents the Laplacian operator of the image, represents the local curvature of the bellows surface; S63: Output the final defect detection result, which includes the location, type, size and confidence information of the defect, and generate a detection report.

Citation Information

Patent Citations

  • Corrugated pipe inner wall flaw detection model and detection method

    CN113689381A

  • Deep learning-based corrugated pipe inner wall multi-type flaw detection method and system

    CN114187273A

  • Optical cable surface flaw detection method and device

    CN116977334A

  • Automatic decision and classification system for each defects of building components using image information, and method for the same

    KR102254773B1

Cited By

  • Method for enhancing pipeline magnetic flux leakage data and detecting defect and abnormal signals

    CN120670821A

  • A method for pipeline magnetic flux leakage data enhancement and defect and anomaly signal detection

    CN120670821B

  • LED lamp tube quality detection method and system based on machine vision

    CN120876413A

  • High-precision chlorine online detector

    CN120908129A

  • High-precision chlorine on-line detector

    CN120908129B