A polyethylene gas pipeline welded joint defect analysis method and device

By constructing a defect image database and a convolutional neural network model, and combining welding process and environmental parameters for feature fusion, the problem of instability in existing weld joint defect identification models has been solved. This enables automated and reliable defect identification and continuous optimization, adapts to dynamic changes, and reduces reliance on maintenance experience.

CN122175906APending Publication Date: 2026-06-09GANSU SPECIAL EQUIP INSPECTION & TESTING RES INST (GANSU SPECIAL EQUIP INSPECTION & TESTING GRP)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GANSU SPECIAL EQUIP INSPECTION & TESTING RES INST (GANSU SPECIAL EQUIP INSPECTION & TESTING GRP)
Filing Date
2026-03-04
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing technologies, the defect identification model for welded joints of polyethylene gas pipelines based on deep learning is easily affected by changes in welding process parameters and construction environment, resulting in unstable identification results and the inability to be updated online. This leads to identification bias and reliance on experience for maintenance, resulting in poor adaptability.

Method used

A defect image database was constructed, and a convolutional neural network model was used for image preprocessing and recognition. The results were compared and incrementally learned and optimized through a hardware and software platform. Feature fusion was performed by combining welding process and environmental parameters to generate a comprehensive diagnostic report.

Benefits of technology

It achieves automation, reliability, and stability in defect identification, provides standard references, supports continuous model optimization, adapts to dynamic changes, reduces reliance on maintenance experience, and facilitates operation for new personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175906A_ABST
    Figure CN122175906A_ABST
Patent Text Reader

Abstract

The application discloses a kind of polyethylene gas pipeline welded joint's defect analysis method and device, it is related to gas pipeline welding technical field.The application is extracted and classified by convolutional neural network model, so that the recognition result of defect category can be automatically and efficiently output;Through software and hardware platform, and the recognition result is compared with standard sample image set automatically, so that the whole recognition, comparison and data storage process can be systematized and automatically operated;The automatic recognition result is confirmed by setting the defect review module, and the confirmed data is stored in the formal sample library, which ensures the data quality and reliability for model optimization;Through the periodic trigger of software and hardware platform, the incremental learning and training of convolutional neural network model parameters based on new data are set, so that the convolutional neural network model can be continuously optimized using new data, thereby realizing the continuous improvement of recognition performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas pipeline welding technology, specifically to a defect analysis method and apparatus for polyethylene gas pipeline welded joints. Background Technology

[0002] Polyethylene (PE) pipes are made of organic polymer materials and possess unique properties such as corrosion resistance and high pressure resistance. With a service life of up to 50 years, they have been widely used in various fields both domestically and internationally, particularly in the gas transmission sector, where they have attracted considerable attention. In my country, PE pipes have been used in the trial of manufactured gas pipelines for over 40 years since the 1980s. Years of testing, promotion, application, and research have shown that buried PE gas pipelines offer advantages such as convenient operation and management, reliable quality, and low cost. With the continuous improvement of PE pipe material performance and the rapid increase in gas pipeline mileage, PE pipes have demonstrated a trend of replacing traditional metal pipes in medium and low-pressure gas pipeline networks, and have become the preferred pipe material for medium and low-pressure gas pipeline networks in the national standard GB 50028-2020 "Code for Design of Urban Gas Pipelines".

[0003] Welded joints are weak points in polyethylene (PE) piping systems and a decisive factor affecting the integrity of the system. PE pipes develop defects during long-term operation under certain pressures, but these internal defects cannot be observed through visual inspection or pressure testing, making it impossible to determine their impact on joint strength and service life. To reduce unnecessary economic losses, the detection and identification of welded joint defects in PE pipes has become a hot research topic both domestically and internationally. In recent years, deep learning, with its strong learning ability, wide coverage, and adaptability, has been widely applied in image recognition. Among them, Convolutional Neural Networks (CNNs) in deep learning have strong image recognition capabilities and high accuracy, and have been widely used in image recognition and classification. This algorithm utilizes its "end-to-end" advantage to solve some problems previously considered difficult to solve in joint image defect identification, and has broad application prospects.

[0004] In the field of defect identification technology for welded joints in polyethylene gas pipelines, existing research and practice mainly revolve around detection models based on deep learning. These methods typically rely on the defect classification results output by the model to directly judge the welding quality, but lack a mechanism for continuous comparison and verification between the identification results and standard samples. Because welding process parameters, construction environment, and the status of detection equipment dynamically change in actual engineering projects, the model is susceptible to interference from these factors, leading to identification biases. Furthermore, existing technologies struggle to monitor and correct these biases in a timely manner, thus affecting the reliability and long-term stability of the identification results. Simultaneously, most currently widely used defect identification models are static structures, fixed in use once trained, and cannot be updated and optimized online based on continuously accumulated new sample data from the engineering site. This makes it difficult to adapt to the dynamic evolution of welding processes, environmental conditions, and defect morphologies, resulting in a gradual decline in the model's generalization ability over time. When repairing defects, the repair quality highly depends on the repair technician's experience, which is unfriendly to industry novices.

[0005] To address the above issues, there is an urgent need for a defect analysis method and apparatus for welded joints in polyethylene gas pipelines. Summary of the Invention

[0006] Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a defect analysis method and apparatus for welded joints of polyethylene gas pipelines. This addresses the issue that current research and practice primarily revolve around deep learning-based detection models. These methods typically rely on the defect classification results output by the model to directly determine welding quality, but lack a mechanism for continuous comparison and verification between the identification results and standard samples. Because welding process parameters, construction environment, and the status of detection equipment dynamically change in actual engineering projects, models are susceptible to interference from these factors, leading to identification biases. Furthermore, existing technologies struggle to monitor and correct these biases in a timely manner, thus affecting the reliability and long-term stability of the identification results. Simultaneously, currently widely used defect identification models are mostly static structures, fixed once trained, unable to be updated and optimized online based on continuously accumulated new sample data from engineering sites. This makes it difficult to adapt to the dynamic evolution of welding processes, environmental conditions, and defect morphologies, resulting in a gradual decline in model generalization ability over time. When repairing defects, the quality of repairs highly depends on the repair technician's experience, which is unfriendly to industry novices.

[0007] Technical solution To achieve the above objectives, the present invention provides a defect analysis method for welded joints of polyethylene gas pipelines, comprising the following steps: S1. Construct a database of defective images of polyethylene pipe welded joints: Obtain images of polyethylene pipe welded joints containing different defect types and form a standard sample image set; S2. Preprocess the welded joint image to be analyzed: acquire the image of the joint to be analyzed, and perform image filtering, image enhancement and edge detection processing in sequence; S3. Defect recognition based on convolutional neural network model: The preprocessed image is input into a pre-trained convolutional neural network model, which automatically extracts image features and outputs the recognition result of the defect category; S4. Platform Validation and Model Optimization: Build a hardware and software platform, use a convolutional neural network model to identify joint images, compare and analyze the recognition results with a standard sample image set, and store the recognition results and corresponding joint images in a defect image database. Based on the new data, use an incremental learning mechanism to optimize and train the convolutional neural network model.

[0008] Furthermore, in step S1, the construction of the defect image database includes: acquiring original images of polyethylene pipe welded joints containing different defect types based on at least one of high-resolution industrial CT scanning technology, infrared imaging technology, and laser scanning technology; extracting typical images from the original images based on preset defect classification standards, and constructing template image sets for comparison and image sets to be detected for detection; and generating more training samples by using image enhancement and data augmentation techniques.

[0009] Furthermore, in step S1, for each joint image in the defect image database, the corresponding welding process parameter set, working environment parameter set, and maintenance method information are associated and labeled to form multimodal sample data; In step S3, when training the convolutional neural network model, the welding process parameter set and the working environment parameter set are used as auxiliary feature vectors, and after feature fusion with the corresponding joint image, they are input together, so that the convolutional neural network model can establish a mapping relationship between defect features and process parameters and environmental parameters. In step S4, the software and hardware platform generates a comprehensive diagnostic report containing possible cause analysis and maintenance suggestions based on the defect identification results output by the convolutional neural network model and combined with maintenance method information.

[0010] Furthermore, in step S3, the convolutional neural network model includes an input layer, multiple convolutional layers, pooling layers, depthwise separable convolutional layers, residual connection modules, multi-head self-attention mechanisms, fully connected layers, and an output layer; the pooling layers are used to downsample the feature maps, the fully connected layers use the deep features extracted by the convolutional layers and pooling layers to classify the joint images, and the output layer uses a Softmax classifier to output the defect categories.

[0011] Furthermore, in step S4, the software and hardware platform includes: The defect localization module is used to locate potential defect areas in an image; The feature extraction module is used to extract feature information from the located defect area; The defect identification module is used to identify defect categories based on feature information. The parameter adjustment module is used to dynamically adjust the recognition parameters of the convolutional neural network model. The defect review module is used for manual review and confirmation of the automatic identification results from the defect identification module. The quality assessment module is used to generate joint quality ratings and repair recommendations based on the identified defect types and severity. The results display module is used to comprehensively display the defect location, defect category, quality rating, and repair suggestions in the form of graphics and text.

[0012] Furthermore, the optimization training in step S4 specifically involves: using the hardware and software platform to compare and analyze the differences between the identification results obtained and the standard samples, as well as the new sample data confirmed by the defect review module, and optimizing the parameters of the convolutional neural network model through the backpropagation algorithm.

[0013] Furthermore, in step S3, the defect category identification results output by the convolutional neural network model are used to perform quality rating on the polyethylene pipe welded joints, and a quality report containing defect type, defect location, defect severity rating and repair suggestions is generated based on the identification results.

[0014] Furthermore, the defect image database constructed in step S1 is used to establish a defect evaluation index system for polyethylene pipe welded joints.

[0015] Furthermore, in step S2, image preprocessing further includes: repairing the damaged weld joint image using a deep learning image inpainting network, and generating a repaired complete image using an image inpainting model.

[0016] A defect analysis device for welded joints of polyethylene gas pipelines, applied to a defect analysis method for welded joints of polyethylene gas pipelines, includes: an image acquisition unit for acquiring images of welded joints of polyethylene gas pipelines; The image preprocessing unit is used to perform filtering, enhancement, and edge detection on the image. The defect identification unit is used to identify defects in the preprocessed image based on a convolutional neural network model and output defect category and location information. The platform management unit is used to compare the recognition results with standard samples and manage the defect image database; The model optimization unit is used to optimize the convolutional neural network model based on new data using an incremental learning mechanism. The user interaction unit provides an interface for parameter adjustment, result review, quality rating, display of repair suggestions, and result visualization.

[0017] Beneficial effects The present invention has the following beneficial effects: (1) This invention provides a comprehensive and standardized reference for defect identification and analysis by constructing a standard sample image set for defect types; by using image filtering, image enhancement and edge detection as preprocessing steps, the noise of the image to be analyzed is suppressed, the contrast is improved and the defect contour is clearly outlined, laying the foundation for accurate identification in the future; by using a convolutional neural network model for feature extraction and classification, the identification results of defect categories can be automatically and efficiently output; by using a hardware and software platform and automatically comparing the identification results with the standard sample image set, the entire identification, comparison and data storage process can be systematized and automated; by setting a defect review module to confirm the automatic identification results and transferring the confirmed data to the formal sample library, the quality and reliability of the data used for model optimization are ensured; by using a hardware and software platform to periodically trigger and incrementally learn and train the parameters of the convolutional neural network model based on new data, the convolutional neural network model can be continuously optimized using new data, thereby achieving continuous improvement in recognition performance.

[0018] (2) This invention constructs multimodal sample data by associating and labeling each joint image in the defect image database with the corresponding welding process parameter set, working environment parameter set and maintenance method information. When training the convolutional neural network model, the welding process parameter set and working environment parameter set are used as auxiliary feature vectors and fused with image features as input, so that the convolutional neural network model can learn the complex mapping relationship between defect morphology and specific process and environmental conditions. At the same time, the software and hardware platform generates a comprehensive diagnostic report containing possible cause analysis and maintenance suggestions based on the recognition results and combined with maintenance method information. When outputting the defect recognition results, it can automatically retrieve similar historical cases and generate corresponding maintenance guidance, so that users can directly obtain the corresponding maintenance methods based on the recognition results, which is convenient for industry newcomers to learn quickly.

[0019] (3) This invention integrates a defect location module, a feature extraction module, a defect identification module, a parameter adjustment module, a defect review module, a quality evaluation module, and a result display module into a hardware and software platform, enabling a complete closed-loop and refined control of the defect analysis process. The defect location module allows for quick and intuitive focusing on suspicious areas in an image; the feature extraction module provides high-quality feature input for subsequent accurate classification; the defect identification module enables automatic identification and output of defect categories; the parameter adjustment module allows operators to flexibly balance increasing detection rate and accuracy based on actual needs, enhancing the system's adaptability in different application scenarios; the defect review module introduces necessary manual supervision and quality control while leveraging algorithm automation, ensuring result reliability and providing accurate labeled data for model optimization; the quality evaluation module directly provides quantitative quality assessment and operable maintenance guidance; and the result display module comprehensively and intuitively presents all key information, greatly improving the efficiency of result interpretation and user experience.

[0020] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0021] Figure 1 This is a flowchart of the entire invention.

[0022] Figure 2 This is a schematic diagram of the software and hardware platform of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Please see Figure 1 and Figure 2 This invention provides a technical solution: a defect analysis method for welded joints of polyethylene gas pipelines, comprising the following steps: S1. Construct a database of defective images of polyethylene pipe welded joints: Obtain images of polyethylene pipe welded joints containing different defect types and form a standard sample image set; S2. Preprocess the welded joint image to be analyzed: acquire the image of the joint to be analyzed, and perform image filtering, image enhancement and edge detection processing in sequence; S3. Defect recognition based on convolutional neural network model: The preprocessed image is input into a pre-trained convolutional neural network model, which automatically extracts image features and outputs the recognition result of the defect category; S4. Platform Validation and Model Optimization: Build a hardware and software platform, use a convolutional neural network model to identify joint images, compare and analyze the recognition results with a standard sample image set, and store the recognition results and corresponding joint images in a defect image database. Based on the new data, use an incremental learning mechanism to optimize and train the convolutional neural network model.

[0025] In practical implementation, step S1 is first executed to construct a defect image database for polyethylene pipe welded joints. Raw joint image data, including different defect types such as holes, fusion surface inclusions, over-welding, lack of fusion, cold welding, no welding, unplaned edges, and misalignment, are acquired using a high-resolution industrial CT scanner to form an initial standard sample image set. Next, step S2 is executed to preprocess the joint images to be analyzed: Gaussian filtering is used to suppress noise, contrast-limited adaptive histogram equalization is applied to enhance image contrast, and the Canny operator is used for edge detection to outline defect contours. Then, step S3 is executed to input the preprocessed images into a convolutional neural network model pre-trained using a template image set and its annotation information within the TensorFlow framework, trained using a stochastic gradient descent algorithm, for defect identification. The convolutional neural network model automatically extracts features and outputs the defect classification results. Finally, step S4 is executed. On a hardware and software platform based on the PyCharm integrated development environment and using PyQt5 to build the user interface, a convolutional neural network model is called to recognize the newly input connector image. The recognition result is automatically compared and analyzed with a standard sample image set, and the automatic recognition result and the image are stored together in the pending review area of ​​the MySQL database. The results and images confirmed by the defect review module are then transferred to the formal sample library for subsequent model optimization training. The hardware and software platform triggers an incremental learning task every week. Based on the data added in the past week (this time is adjusted according to the actual situation, such as one day, one week, one month, one year, etc.), the stochastic gradient descent algorithm is used to optimize and train the parameters of the fully connected layer of the convolutional neural network model to continuously improve the model performance.

[0026] Furthermore, in step S1, the construction of the defect image database includes: acquiring original images of polyethylene pipe welded joints containing different defect types based on at least one of high-resolution industrial CT scanning technology, infrared imaging technology, and laser scanning technology; extracting typical images from the original images based on preset defect classification standards, and constructing template image sets for comparison and image sets to be detected for detection; and generating more training samples by using image enhancement and data augmentation techniques.

[0027] In specific implementation, the construction of the defect image database in step S1 is as follows: A micro-focus high-resolution industrial CT scanning system is preferentially used to scan the polyethylene welded joint test block with a voltage of 150kV and a current of 200μA, acquiring two-dimensional tomographic images containing artificially prefabricated defects as the original images. Based on the defect classification standards defined in the national standard GB / T 29461-2012, two engineers holding Level III nondestructive testing certificates jointly visually interpret the images, extracting 200 images each of typical defects such as holes, fusion surface inclusions, over-welding, lack of fusion, cold welding, no welding, unplaned edges, and misalignment from the original images. 80% of these images (i.e., 160 images for each defect) are used to construct a template image set for model training and initial comparison; the remaining 20% ​​of the images (i.e., 40 images for each defect) are used to construct a set of images to be tested and verified. To enhance data diversity, data augmentation techniques are employed. Each image in the template image set is subjected to random horizontal flipping, ±15-degree rotation, scaling from 90% to 110%, and brightness adjustment from 0.8 to 1.2 times, thereby effectively expanding the number of training samples to four times the original number.

[0028] Furthermore, in step S1, for each joint image in the defect image database, the corresponding welding process parameter set, working environment parameter set, and maintenance method information are associated and labeled to form multimodal sample data; In step S3, when training the convolutional neural network model, the welding process parameter set and the working environment parameter set are used as auxiliary feature vectors, and after feature fusion with the corresponding joint image, they are input together to enable the model to establish a mapping relationship between defect features and process parameters and environmental parameters. In step S4, the software and hardware platform generates a comprehensive diagnostic report containing possible cause analysis and maintenance suggestions based on the defect identification results output by the convolutional neural network model and combined with maintenance method information.

[0029] In specific implementation, step S1 involves associating each joint image in the database with its corresponding welding process parameter set (including hot plate temperature 210±5℃, heat absorption time 45 seconds, switching time 5 seconds, welding pressure 0.3MPa), operating environment parameter set (including ambient temperature 25℃, relative humidity 60%), and maintenance method information (such as "partial removal and re-welding"), thereby forming a structured, multimodal sample data table. In step S3, when training the convolutional neural network model, the aforementioned welding process parameter set and environmental parameter set are normalized and converted into an 8-dimensional auxiliary feature vector. Before the fully connected layer of the convolutional neural network model, this 8-dimensional vector is concatenated with the 512-dimensional image feature vector output from the convolutional neural network backbone feature extraction network to form a 520-dimensional fused feature vector, which is then input into the subsequent classification layer for training. This enables the convolutional neural network model to learn the complex mapping relationship between defect morphology and specific process and environmental conditions. In step S4, when the hardware and software platform outputs the identification result as "not fused", it will search the database for historical cases with similar process parameters (such as low hot plate temperature) that are marked as "not fused". Combined with their maintenance records, it will generate a cause analysis and maintenance suggestion in the comprehensive diagnostic report, such as "Poor fusion may be caused by insufficient hot plate temperature setting. It is recommended to increase the hot plate temperature to 215°C and re-weld".

[0030] By setting up multimodal sample data, when a user calls for identification, the user can obtain the corresponding repair method for the defect based on the identification result, which is convenient for newcomers to the industry to learn quickly.

[0031] Furthermore, in step S3, the convolutional neural network model includes an input layer, multiple convolutional layers, pooling layers, depthwise separable convolutional layers, residual connection modules, multi-head self-attention mechanisms, fully connected layers, and an output layer; the pooling layers are used to downsample the feature maps, the fully connected layers use the deep features extracted by the convolutional layers and pooling layers to classify the joint images, and the output layer uses a Softmax classifier to output the defect categories.

[0032] In specific implementation, the convolutional neural network model used in step S3 has the following structure: The input layer receives a preprocessed RGB three-channel image with a size of 224x224 pixels. It is then connected to four convolutional modules, each containing a convolutional layer with a 3x3 kernel and a stride of 1, and a max-pooling layer with a 2x2 window and a stride of 2.

[0033] After the third and fourth convolutional modules, depthwise separable convolutional layers are introduced to reduce computational cost, and residual connection modules are introduced to alleviate gradient vanishing.

[0034] Subsequently, a multi-head self-attention mechanism layer with eight attention heads is embedded to capture long-range dependencies between discrete defect regions in the image.

[0035] Then, two fully connected layers (with 1024 and 512 neurons respectively) are connected. Finally, the output layer outputs the probability distribution of the defect belonging to categories such as "hole", "fusion surface inclusion", "over-welded", "not fused", "cold welded", "not welded", "not planed", and "misaligned" through a Softmax classifier.

[0036] The computational efficiency and generalization ability are improved by using depthwise separable convolution and residual connections, and the capture of complex defect details is enhanced by using a multi-head self-attention mechanism.

[0037] Furthermore, in step S4, the software and hardware platform includes: The defect localization module is used to locate potential defect areas in an image; The feature extraction module is used to extract feature information from the located defect area; The defect identification module is used to identify defect categories based on feature information. The parameter adjustment module is used to dynamically adjust the recognition parameters of the convolutional neural network model. The defect review module is used for manual review and confirmation of the automatic identification results from the defect identification module. The quality assessment module is used to generate joint quality ratings and repair recommendations based on the identified defect types and severity. The results display module is used to comprehensively display the defect location, defect category, quality rating, and repair suggestions in the form of graphics and text.

[0038] In practical implementation, the hardware and software platform in step S4 uses modular Python code to implement its functions: the defect localization module uses a gradient-weighted class activation mapping algorithm to generate a heatmap on the image to highlight potential defect areas; the feature extraction module extracts image patches from these areas and uses the first few layers of the trained convolutional neural network model to extract its high-dimensional feature information; the defect recognition module receives this feature information and uses the last few fully connected layers of the convolutional neural network model and the Softmax classifier to complete the final determination of the defect category; the parameter adjustment module provides a slider on the platform interface, allowing users to dynamically adjust the confidence threshold for the convolutional neural network model to determine defects (default 0.8, adjustable range 0.5-0.95); when it is necessary to improve the detection... When the accuracy rate (to avoid missed detections) needs to be improved, the threshold can be appropriately lowered; when the accuracy rate needs to be improved (to avoid false alarms), the threshold can be appropriately raised. The defect review module provides an interactive interface where annotators can check "correct," "false alarm," and "missed detection" to confirm the results automatically identified by the system. The quality evaluation module calculates the quality score (0-100 points) according to the identified defect type, size (in pixel area), and distribution in the key area of ​​the joint, and generates repair suggestions such as "grinding" or "cutting and re-welding" according to predefined scoring rules. The results display module uses the graphical view framework of PyQt5 to display the original joint image and the defect location heat map overlay side by side on the interface, and lists the defect type, location coordinates, severity, and repair suggestion text in the form of a sidebar table.

[0039] Furthermore, the optimization training in step S4 specifically involves: using the hardware and software platform to compare and analyze the differences between the identification results obtained and the standard samples, as well as the new sample data confirmed by the defect review module, and optimizing the parameters of the convolutional neural network model through the backpropagation algorithm.

[0040] In specific implementation, the optimization training process in step S4 is as follows: Every Monday, the hardware and software platform automatically runs a batch recognition task, comparing 50 images collected in the past week with a standard sample image set, generating a difference data report containing 15 recognition differences (e.g., 5 false positives and 10 false negatives). Simultaneously, the defect review module records 30 new sample data points (including 20 corrected annotations and 10 newly added false negative defects) that have been manually confirmed as valid. The platform calls TensorFlow's underlying API, using a small batch dataset composed of these difference data and new sample data, and employs a stochastic gradient descent algorithm with a learning rate of 0.001. Through backpropagation, it fine-tunes the weight parameters of the last two fully connected layers of the convolutional neural network model for approximately 10 rounds to avoid catastrophic forgetting. This process does not involve changes to the main structure of the convolutional neural network model, but through targeted parameter updates, it improves the model's sensitivity to recognizing specific defect patterns in recent real-world data.

[0041] Furthermore, in step S3, the defect category identification results output by the convolutional neural network model are used to perform quality rating on the polyethylene pipe welded joints, and a quality report containing defect type, defect location, defect severity rating and repair suggestions is generated based on the identification results.

[0042] In practice, after the convolutional neural network model outputs the defect category identification result in step S3, the quality assessment unit of the software and hardware platform is immediately activated. The quality assessment unit embeds a rule-based scoring engine: if the identification result is "no defect," the quality rating is "excellent"; if it is a "hole" and its predicted bounding box area is less than 1% of the total image area, the rating is "acceptable," otherwise it is "unacceptable"; if it is "fusion surface inclusion" or "not fused," the rating is directly "unacceptable, requires rework." Subsequently, the software and hardware platform automatically calls the report generation template, filling in the defect type, its position in the image coordinate system (represented by pixel coordinates), the above rating result, and the corresponding standard repair suggestions (e.g., "acceptable" corresponds to "acceptable," and "unacceptable" corresponds to "recommendation to refer to procedure XYZ for repair") into a preset HTML format template, generating a detailed quality report containing text and illustrations, and saving it as a PDF document for user download.

[0043] Furthermore, the defect image database constructed in step S1 is used to establish a defect evaluation index system for polyethylene pipe welded joints.

[0044] In practical implementation, one of the core applications of the defect image database constructed in step S1 is to support the establishment of the evaluation index system. The database administrator regularly exports all labeled defect data, including defect type, size, quantity, and location distribution. Based on this data, statistical analysis software (such as SPSS) is used to calculate the frequency of occurrence of various defects and their correlation coefficients with welding process parameters. For example, analysis revealed that the incidence of "hole" defects increases when the ambient humidity is above 80% (p<0.01). Based on this statistical pattern, after discussion with industry experts, the threshold for detecting hole defects should be lowered to 0.5% when the ambient humidity is >80%, and this was formally incorporated into the draft evaluation index system for polyethylene pipe welded joint defects in this project, providing solid data support for the subsequent development of enterprise standards or industry guidance documents.

[0045] Furthermore, in step S2, image preprocessing further includes: repairing the damaged weld joint image using a deep learning image inpainting network, and generating a repaired complete image using an image inpainting model.

[0046] In practical implementation, the image preprocessing step S2 integrates a deep learning image inpainting network based on the U-Net architecture to address localized high-brightness artifacts (image damage) caused by metallic markers during CT scans. Implemented in PyTorch, the deep learning image inpainting network's encoder-decoder structure learns the image's contextual information. During inpainting, the image containing artifacts is input into the deep learning image inpainting network, which automatically generates a complete inpainted image with the artifacts properly filled in. The deep learning image inpainting network is optimized using a self-supervised learning method: during training, mask regions resembling artifacts are randomly generated on normal, undamaged images. The network is then required to learn how to inpaint the original image from the masked image. Backpropagation optimizes the network parameters by calculating the L1 loss and perceptual loss between the inpainted result and the original image. This method effectively improves the accuracy and efficiency of inpainting, providing cleaner input for subsequent feature extraction.

[0047] A defect analysis device for welded joints of polyethylene gas pipelines, applied to a defect analysis method for welded joints of polyethylene gas pipelines, includes: An image acquisition unit is used to acquire images of welded joints in polyethylene gas pipelines. The image preprocessing unit is used to perform filtering, enhancement, and edge detection on the image. The defect identification unit is used to identify defects in the preprocessed image based on a convolutional neural network model and output defect category and location information. The platform management unit is used to compare the recognition results with standard samples and manage the defect image database; The model optimization unit is used to optimize the convolutional neural network model based on new data using an incremental learning mechanism. The user interaction unit provides an interface for parameter adjustment, result review, quality rating, display of repair suggestions, and result visualization.

[0048] In practical implementation, the defect analysis device uses an industrial computer equipped with a processor and a powerful graphics card as its hardware core. The image acquisition unit communicates with an industrial CT scanner (model Yxlon FF35) via a gigabit Ethernet interface, driving it to complete scanning and receive DICOM format tomographic image data. The image preprocessing unit calls pre-compiled OpenCV library functions in memory to sequentially execute Gaussian filtering, CLAHE enhancement, and Canny edge detection algorithms. The defect identification unit loads a pre-trained convolutional neural network model based on TensorFlow SavedModel format stored on a solid-state drive and performs inference calculations on the preprocessed images. The platform management unit is responsible for scheduling tasks and interacts with the backend PostgreSQL database through Python's SQLAlchemy library to complete data storage, querying, and comparison. During system idle periods each Sunday, the model optimization unit starts an independent Python process to execute an incremental learning training script based on the Keras interface, using data added in the past week. The user interaction unit utilizes a graphical interface built with the PyQt5 framework, providing a parameter setting panel, a results display window, and a manual review dialog box. All operation response times are less than 500 milliseconds, ensuring a smooth user experience. The various units of the device exchange data and work collaboratively via an internal high-speed network bus, achieving a fully automated process from image acquisition to intelligent analysis and result output.

[0049] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0050] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A defect analysis method for welded joints of polyethylene gas pipelines, characterized in that: Includes the following steps: S1. Construct a database of defective images of polyethylene pipe welded joints: Obtain images of polyethylene pipe welded joints containing different defect types and form a standard sample image set; S2. Preprocess the welded joint image to be analyzed: acquire the image of the joint to be analyzed, and perform image filtering, image enhancement and edge detection processing in sequence; S3. Defect recognition based on convolutional neural network model: The preprocessed image is input into a pre-trained convolutional neural network model, which automatically extracts image features and outputs the recognition result of the defect category; S4. Platform Validation and Model Optimization: Build a hardware and software platform, use the convolutional neural network model to identify joint images, compare and analyze the identification results with the standard sample image set, and store the identification results and corresponding joint images in the defect image database. Based on the new data, use an incremental learning mechanism to optimize and train the convolutional neural network model.

2. The defect analysis method for welded joints of polyethylene gas pipelines according to claim 1, characterized in that: In step S1, the construction of the defect image database includes: acquiring original images of polyethylene pipe welded joints containing different defect types based on at least one of high-resolution industrial CT scanning technology, infrared imaging technology, and laser scanning technology; extracting typical images from the original images based on preset defect classification standards, and constructing template image sets for comparison and image sets to be detected for detection; and generating more training samples by using image enhancement and data augmentation techniques.

3. The defect analysis method for welded joints of polyethylene gas pipelines according to claim 2, characterized in that: In step S1, for each joint image in the defect image database, the corresponding welding process parameter set, working environment parameter set and maintenance method information are associated and labeled to form multimodal sample data; In step S3, when training the convolutional neural network model, the welding process parameter set and the working environment parameter set are used as auxiliary feature vectors, and after feature fusion with the corresponding joint image, they are input together, so that the convolutional neural network model can establish a mapping relationship between defect features and process parameters and environmental parameters. In step S4, the hardware and software platform generates a comprehensive diagnostic report containing possible cause analysis and maintenance suggestions based on the defect identification results output by the convolutional neural network model and in combination with the maintenance method information.

4. The defect analysis method for welded joints of polyethylene gas pipelines according to claim 1, characterized in that: In step S3, the convolutional neural network model includes an input layer, multiple convolutional layers, pooling layers, depthwise separable convolutional layers, residual connection modules, multi-head self-attention mechanisms, fully connected layers, and an output layer. The pooling layers are used to downsample the feature maps, the fully connected layers use the deep features extracted by the convolutional layers and pooling layers to classify the joint images, and the output layer uses a Softmax classifier to output the defect categories.

5. The defect analysis method for welded joints of polyethylene gas pipelines according to claim 1, characterized in that: In step S4, the software and hardware platform includes: The defect localization module is used to locate potential defect areas in an image; The feature extraction module is used to extract feature information from the located defect area; The defect identification module is used to identify the defect category based on the feature information; The parameter adjustment module is used to dynamically adjust the recognition parameters of the convolutional neural network model. The defect review module is used to manually review and confirm the automatic identification results of the defect identification module. The quality assessment module is used to generate joint quality ratings and repair recommendations based on the identified defect types and severity. The results display module is used to comprehensively display the defect location, defect category, quality rating, and repair suggestions in the form of graphics and text.

6. The defect analysis method for welded joints of polyethylene gas pipelines according to claim 5, characterized in that: The optimization training in step S4 specifically involves: using the hardware and software platform to compare and analyze the difference data between the identification results obtained and the standard samples, as well as the new sample data confirmed by the defect review module, to optimize the parameters of the convolutional neural network model through the backpropagation algorithm.

7. The defect analysis method for welded joints of polyethylene gas pipelines according to claim 1, characterized in that: In step S3, the defect category identification results output by the convolutional neural network model are used to perform quality rating on the polyethylene pipe welded joints, and a quality report containing defect type, defect location, defect severity rating and repair suggestions is generated based on the identification results.

8. The defect analysis method for welded joints of polyethylene gas pipelines according to claim 1, characterized in that: The defect image database constructed in step S1 is used to establish a defect evaluation index system for polyethylene pipe welded joints.

9. The defect analysis method for welded joints of polyethylene gas pipelines according to claim 1, characterized in that: In step S2, the image preprocessing further includes: repairing the damaged weld joint image using a deep learning image inpainting network, and generating a repaired complete image using an image inpainting model.

10. A defect analysis device for welded joints of polyethylene gas pipelines, applied to the defect analysis method for welded joints of polyethylene gas pipelines according to any one of claims 1 to 9, characterized in that, include: An image acquisition unit is used to acquire images of welded joints in polyethylene gas pipelines. An image preprocessing unit is used to perform filtering, enhancement, and edge detection processing on the image; The defect identification unit is used to identify defects in the preprocessed image based on a convolutional neural network model and output defect category and location information. The platform management unit is used to compare the recognition results with standard samples and manage the defect image database; The model optimization unit is used to optimize the convolutional neural network model based on the new data using an incremental learning mechanism. The user interaction unit provides an interface for parameter adjustment, result review, quality rating, display of repair suggestions, and result visualization.