Defect analysis method and system based on pipeline butt weld radiograph
Through digital scanning and intelligent analysis processes, combined with multi-level feature extraction and self-learning models, the efficiency and accuracy problems of traditional methods in pipeline butt weld ray film detection are solved, and automated detection and complex defect recognition are realized, adapting to different welding Conditions, providing efficient and accurate defect assessment and optimization suggestions.
Patent Information
- Application Number
- CN202411138389.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional manual analysis methods are inefficient, insufficient accuracy and poor consistency in the detection of pipeline butt weld ray films, making it difficult to meet the growing testing needs, especially in dealing with complex defects and different welding processes and material characteristics.
Using digital scanning and intelligent analysis processes, through multi-level feature extraction and self-learning defect analysis models, combined with self-organization mapping and spatiotemporal correlation analysis, multi-scale and multi-modal fusion of weld defects, and defects are carried out based on preset standards. Properties assessment and quantitative analysis to generate defect correction suggestions and remediation diagrams.
It realizes the automation of the entire process from negative film acquisition to defect report generation, greatly improves detection efficiency and accuracy, enhances the ability to identify complex defects, adapts to different welding conditions, and provides objective quality control basis and optimization direction.
Smart Images

Figure CN118941547A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pipeline defect analysis, and in particular to a defect analysis method and system based on pipeline butt weld radiographic films. Background Art
[0002] Pipe butt welds are key connection points in industrial pipeline systems, and their quality directly affects the safety and reliability of the entire pipeline system. Radiographic testing is an important means of evaluating weld quality, but traditional manual analysis methods have problems such as low efficiency, insufficient accuracy, and poor consistency. With the continuous improvement of industrial requirements for weld quality and the increase in large-scale pipeline projects, traditional methods can no longer meet the growing detection needs.
[0003] In recent years, with the rapid development of computer vision and machine learning technology, it has become possible to apply artificial intelligence to weld defect analysis. However, due to the diversity, complexity and uncertainty of weld defects, the development of an efficient and accurate automated defect analysis method still faces many challenges. In particular, existing methods still have limitations in processing large amounts of film data, identifying small or complex defects, and adapting to different welding processes and material properties. Summary of the invention
[0004] The present application provides a defect analysis method and system based on pipeline butt weld radiographic films, which are used to improve the accuracy of defect analysis of pipeline butt weld radiographic films.
[0005] In a first aspect, the present application provides a defect analysis method based on a pipeline butt weld radiograph, the defect analysis method based on a pipeline butt weld radiograph comprises: Digitally scanning and processing the pipeline butt weld radiographic film to obtain a film digital image, and preprocessing and enhancing the film digital image to obtain a target film image; Extracting and calculating features of the target film image to obtain image feature data, and inputting the image feature data into a preset self-learning defect analysis model to perform defect analysis to obtain an initial defect analysis result; According to preset standard information, defect property evaluation and quantitative analysis are performed on the initial defect analysis results to obtain defect property data and defect equivalent, location and level information; The defect property data and the defect equivalent, location and level information are comprehensively processed to obtain defect correction suggestions, and a rework schematic diagram and a defect analysis report are generated based on the defect correction suggestions.
[0006] In a second aspect, the present application provides a defect analysis system based on a pipeline butt weld radiographic film, the defect analysis system based on a pipeline butt weld radiographic film comprising: A processing module is used to digitally scan and process the pipeline butt weld radiographic film to obtain a film digital image, and to preprocess and enhance the film digital image to obtain a target film image; An analysis module is used to extract and calculate features of the target film image to obtain image feature data, and input the image feature data into a preset self-learning defect analysis model to perform defect analysis to obtain an initial defect analysis result; An evaluation module, used to perform defect property evaluation and quantitative analysis on the initial defect analysis results according to preset standard information, to obtain defect property data and defect equivalent, location and level information; A generation module is used to comprehensively process the defect property data and the defect equivalent, location and level information to obtain defect correction suggestions, and generate a rework schematic diagram and a defect analysis report based on the defect correction suggestions.
[0007] A third aspect of the present application provides a defect analysis device based on pipeline butt weld radiographic films, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory to enable the defect analysis device based on pipeline butt weld radiographic films to perform the above-mentioned defect analysis method based on pipeline butt weld radiographic films.
[0008] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned defect analysis method based on radiographic films of pipeline butt welds.
[0009] In the technical solution provided by this application, the whole process from film collection to defect report generation is automated through digital scanning and intelligent analysis process, which greatly improves the detection efficiency. The multi-level feature extraction and self-learning defect analysis model can accurately identify and classify various types of weld defects, improving the accuracy and reliability of defect detection. Through self-organizing mapping and spatiotemporal correlation analysis, multi-scale and multi-modal fusion of defect features is realized, and the method's ability to identify complex defects is enhanced. The self-learning model has the ability to continuously learn and optimize, can adapt to different welding processes, material properties and detection conditions, and has good generalization. Defect property evaluation and quantitative analysis based on preset standard information provide an objective basis for defect severity judgment and quality control. By generating defect correction suggestions and rework schematics, a large amount of film data is deeply analyzed, potential quality problems and optimization directions can be discovered, and data support can be provided for welding process improvement. The use of a unified analysis process and evaluation standards reduces the influence of human factors and improves the accuracy of defect analysis of pipeline butt weld radiographic films. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0011] Figure 1 It is a schematic diagram of an embodiment of a defect analysis method based on a pipeline butt weld radiograph in an embodiment of the present application; Figure 2 It is a schematic diagram of an embodiment of a defect analysis system based on pipeline butt weld radiographs in an embodiment of the present application. DETAILED DESCRIPTION
[0012] The embodiments of the present application provide a defect analysis method and system based on radiographic films of pipeline butt welds. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0013] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 In the embodiment of the present application, an embodiment of the defect analysis method based on the pipeline butt weld radiograph includes: Step S101, digitally scanning and processing the pipeline butt weld radiographic film to obtain a film digital image, and preprocessing and enhancing the film digital image to obtain a target film image; It is understandable that the execution subject of the present application may be a defect analysis system based on pipeline butt weld radiographs, or a terminal or a server, which is not specifically limited here. The present application embodiment is described by taking a server as the execution subject as an example.
[0014] Specifically, prepare a high-resolution industrial scanner that has sufficient resolution and accuracy to capture tiny details and defects on the film. Place the pipe butt weld radiographic film on the scanner's workbench to ensure that the film is flat and free of any obstructions to avoid affecting the scanning effect. Start the scanner and set appropriate resolution parameters. Normally, the resolution should be no less than 1200dpi to ensure a clear digital image of the film. During the scanning process, the scanner's light source must be kept stable and prevented from being disturbed by external light to ensure the consistency and accuracy of the scanned image. After the scan is completed, the obtained digital image of the film is transferred to the computer system for processing. Grayscale adjustment and denoising are performed on the digital image of the film. Grayscale adjustment is to ensure that the contrast of the image is moderate, so that the defects of the weld and its surroundings are more clearly visible. Denoising is to eliminate noise and impurities in the image generated during the scanning process. The image is normalized, that is, the brightness and contrast of the image are adjusted to meet a certain standard range, which is helpful for subsequent image processing and analysis. Edge detection and enhancement operations are performed on the image to obtain the target film image. Edge detection is to identify the boundaries of welds and the outlines of defects by detecting the changes in grayscale values in images. Common edge detection algorithms include Canny edge detection and Sobel operator. Through these algorithms, key feature points and contour lines in the film image are extracted. Image enhancement improves the details and contrast of the image through histogram equalization, adaptive contrast enhancement and other technologies, making welds and defects more prominent.
[0015] Step S102, extracting and calculating features of the target film image to obtain image feature data, and inputting the image feature data into a preset self-learning defect analysis model to perform defect analysis to obtain an initial defect analysis result; Specifically, first, edge detection is performed on the target film image. Common edge detection algorithms include Canny edge detection and Sobel operator, etc., and edge contour data in the image is extracted through these algorithms. According to the image edge contour data, the target film image is segmented to obtain the weld area image. Grayscale histogram is calculated for the weld area image. The grayscale histogram reflects the distribution of each grayscale value in the image. By analyzing the grayscale histogram, grayscale distribution feature data is obtained. These data are used to perform threshold segmentation on the weld area image to separate the potential defect area in the weld from the normal area. According to the characteristics of the grayscale histogram, a suitable threshold is selected, and the part of the image with a grayscale value higher or lower than the threshold is regarded as the potential defect area. Morphological operations are performed on the potential defect area. Morphological operations include corrosion, expansion, opening and closing operations, etc. These operations are used to eliminate noise, fill small holes in the defect area, and make the boundary of the defect area smoother and more regular. After morphological operation processing, the optimized defect candidate area is obtained. Geometric features of the optimized defect candidate area are calculated to obtain the defect shape descriptor. The calculation of geometric features includes the calculation of the area, perimeter, aspect ratio, shape complexity, etc. of the defect. These geometric features describe the basic morphological characteristics of the defect. According to the defect shape descriptor, the texture feature extraction is performed on the defect candidate area. The texture feature reflects the surface characteristics of the image. Different types of defects can be distinguished through texture analysis. The defect texture feature vector is processed by principal component analysis. By linearly transforming the feature vector, the most important principal components in the data are extracted to obtain the feature data after dimensionality reduction. The feature data after dimensionality reduction constitutes the feature space. In the feature space, cluster analysis is performed on these data to cluster similar defects together to obtain the preliminary classification results of the defect type. The preliminary classification results of the defect type and the image feature data are input into the preset self-learning defect analysis model for accurate identification of the defect type. The self-learning defect analysis model is a model based on machine learning. It is trained by a large number of defect samples to automatically learn and identify different types of defects. The initial defect analysis results are obtained by inputting the preliminary classification results and feature data into the model.
[0016] The feature data after dimensionality reduction is normalized to eliminate the dimension differences between different features, so that the data of each feature is in the same range, and a standardized feature vector is obtained. The standardized feature vector is used to construct a feature space, in which the data is subjected to K-means clustering analysis. K-means clustering analysis is a commonly used unsupervised learning method that divides data points into K clusters, each of which is represented by an initial cluster center. The initial cluster centers are iteratively optimized and calculated, and the distance between each data point and its nearest cluster center is minimized by continuously adjusting the position of the cluster center to obtain the optimal cluster center set. According to the optimal cluster center set, the distance of each data point in the feature space is calculated to determine the attribution label of each data point, that is, to which cluster each data point belongs. Density estimation analysis is performed on data points with the same attribution label to determine the distribution of data points in each cluster and obtain the probability distribution of defect types. Based on the probability distribution, the clustering results are hierarchically processed to construct a hierarchical tree structure of defect types. The hierarchical tree structure helps to describe the relationship and hierarchy between defect types in more detail. Prune the defect type hierarchical tree structure, remove redundant or unimportant branches, simplify the tree structure, and obtain a clearer preliminary classification result of the defect type. The preliminary classification result of the defect type and the image feature data are input into the self-organizing map layer and the spatiotemporal correlation analysis layer in the self-learning defect analysis model for feature extraction and mapping. The self-organizing map layer is responsible for mapping the input feature data to a new feature space, while the spatiotemporal correlation analysis layer analyzes the temporal and spatial relationship between the features to obtain a deeper feature representation. The attention mechanism is applied to the deep feature representation, and each feature is weighted according to its importance to obtain a weighted feature vector. The weighted feature vector is input into the fully connected layer. The fully connected layer is a typical neural network structure, which is used to convert the input feature vector into the probability output of the defect type. According to the probability output of the defect type, combined with the preset confidence threshold, the defect type is judged to obtain the final initial defect analysis result.
[0017] The preliminary classification results of defect types are processed by one-hot encoding, and the classification results are converted into category feature vectors so that they can be input into the model together with the image feature data. A multimodal input tensor is constructed based on the category feature vector and the image feature data, and the information from multiple data sources is combined to enable the model to understand the characteristics of the input data more comprehensively. The multimodal input tensor is adaptively normalized to eliminate the dimensional differences between different modal data, improve the stability and performance of model training, and obtain standardized input data. The standardized input data is input into the self-organizing map layer in the self-learning defect analysis model, and the self-organizing map layer generates a two-dimensional feature map matrix through self-organizing map calculation. The two-dimensional feature map matrix shows the distribution of the input data in high-dimensional space. The activation intensity of each neuron is calculated according to the two-dimensional feature map matrix, and the activation intensity is threshold-screened. The screened-out significant feature areas represent the most important parts for the classification task. These significant feature areas are subjected to spatial pyramid pooling operations to obtain multi-scale feature descriptors. Spatial pyramid pooling captures multi-scale information in the image by performing pooling operations at different scales. The generated multi-scale feature descriptors can better characterize the details of the image. A temporal feature sequence is constructed based on the multi-scale feature descriptor, and the temporal feature sequence is input into the spatiotemporal correlation analysis layer in the self-learning defect analysis model, and feature processing is performed through the long short-term memory network. The long short-term memory network can capture the temporal dimension information of the feature and generate a temporal dimension feature representation, which contains the dynamic change characteristics of the input data in time. A graph convolution operation is performed on the temporal dimension feature representation to generate a spatial correlation feature graph. The graph convolution operation can capture the spatial relationship between the data, and the generated spatial correlation feature graph shows the distribution and connection of the features in space. Topological structure information analysis and spectral clustering are performed on the spatial correlation feature graph to obtain a feature subgraph set. Topological structure information analysis can capture the structural information of the data, and spectral clustering clusters similar data points together to generate a feature subgraph set that shows the local structural characteristics of the data. The feature subgraph set is subjected to graph embedding processing to generate a low-dimensional dense vector representation. Graph embedding processing can convert high-dimensional graph structure data into low-dimensional dense vectors. The low-dimensional dense vector representation and the standardized input data are residually connected, and a deep feature representation is generated through a nonlinear activation function. The residual connection can retain the original information of the input data, and the nonlinear activation function introduces nonlinear features, so that the generated deep feature representation can better characterize the complex relationship of the data.
[0018] Randomly sample the standardized input data and initialize the weight vector set. The initial weight vector set is used to construct a self-organizing map network, so that the network has a certain degree of randomness and diversity in the initial state, and enhances its learning ability and adaptability. According to the constructed self-organizing map network, the Euclidean distance between each input sample and the network node is calculated. By calculating the Euclidean distance, it is determined which node each input sample is closest to, and the closest node is the best matching unit. The determination of the best matching unit determines the position and role of the input sample in the network. The Gaussian neighborhood function is calculated for the best matching unit to determine its local influence area. The Gaussian neighborhood function is used to calculate the influence of each node on the best matching unit. Generally, the closer the node is to the best matching unit, the greater the influence, and vice versa. According to the local influence area, the network weight is updated to obtain the optimized weight vector. By continuously adjusting the weight, the network can better represent the characteristics and structure of the input data. Construct a topology-preserving map based on the optimized weight vector. Topology-preserving mapping is a method of mapping high-dimensional data to low-dimensional space, which can maintain the topological structure of the data, that is, adjacent points in high-dimensional space are still adjacent in low-dimensional space. In this way, the low-dimensional manifold structure of the data is obtained. A unified distance matrix is constructed based on the low-dimensional manifold structure. The unified distance matrix is used to describe the distance and relationship between network nodes. By calculating the similarity between nodes, the data can be further analyzed and processed. The similarity between nodes is calculated based on the unified distance matrix to obtain a similarity matrix. The similarity matrix is a symmetric matrix, and each element represents the degree of similarity between two nodes. Hierarchical clustering analysis is performed on the similarity matrix to obtain a cluster tree structure. Hierarchical clustering analysis is a bottom-up clustering method that forms a tree-like clustering structure by continuously merging similar nodes. According to the cluster tree structure, the optimal number of clusters is determined, and the nodes are divided into several optimal clusters. After determining the optimal number of clusters, the cluster label of each node is obtained. According to the cluster label, the original feature space of the network nodes is reconstructed. The nodes in the low-dimensional space are remapped back to the high-dimensional space to obtain a two-dimensional feature mapping matrix.
[0019] Sliding window segmentation is performed on the multi-scale feature descriptors to segment the long sequence data into feature subsequences of fixed length. The sliding window technology ensures that all data are fully covered by sliding the window position step by step, and obtains multiple overlapping feature subsequences. The difference between the time steps is calculated according to the feature subsequence to obtain the feature change sequence. The difference calculation helps to capture the temporal change trend of the feature and reveal the evolution of the film defects at different times. The feature change sequence is transformed to obtain the frequency domain feature representation. The time domain signal is converted into the frequency domain signal through the fast Fourier transform and other technologies. In the frequency domain representation, the main frequency components are extracted to obtain the spectrum feature vector. The spectrum feature vector reflects the main frequency components of the feature change and helps to reveal the periodicity and repetitive behavior of the film defects. The spectrum feature vector is spliced with the previous feature subsequence to form an enhanced time series feature. The enhanced time series feature is input into the long short-term memory network for forward propagation calculation to obtain the hidden state sequence. The long short-term memory network can effectively capture the long-term dependency in the sequence data through its memory unit and gating mechanism, and the hidden state sequence is the dynamic representation of the input feature by the long short-term memory network. The attention weights are calculated according to the hidden state sequence to obtain the context vector. The attention mechanism generates a context vector by calculating the importance of each time step and focusing on the most relevant part of the current task. The context vector is fused with the hidden state sequence to obtain a fused feature representation. The fused feature representation is subjected to residual connection and layer normalization to obtain normalized features. Residual connection solves the gradient vanishing problem in deep network training by retaining input information, while layer normalization improves the training stability of the network. The normalized features are input into the fully connected layer and analyzed by a nonlinear activation function to obtain a time dimension feature representation. The fully connected layer maps the normalized features to the output space through linear transformation and nonlinear activation, and the nonlinear activation function introduces complex nonlinear features.
[0020] A k-nearest neighbor graph is constructed for the time dimension feature representation. By calculating the distance between each node and its nearest k neighbors, an initial correlation graph structure is formed to reveal the adjacent relationship and local connectivity between feature points. The graph Laplacian matrix is calculated based on the initial correlation graph structure to obtain the normalized graph Laplacian operator. The graph Laplacian matrix is used to describe the structural characteristics of the graph in graph theory. Through normalization, it is suitable for subsequent eigenvalue decomposition. The normalized graph Laplacian operator is subjected to eigenvalue decomposition to obtain the graph spectrum feature vector. Eigenvalue decomposition is the basis of graph convolution operation. By extracting the graph spectrum feature vector, the spectral characteristics of the graph are captured. A graph convolution kernel is constructed based on the graph spectrum feature vector, and a convolution operation is performed on the time dimension feature representation to obtain a spatial correlation feature map. The graph convolution kernel can smooth and extract the input features while retaining the graph structure information. The generated spatial correlation feature map integrates the feature information of time and space. The spatial correlation feature map is nonlinearly activated to obtain the activated feature map. Nonlinear activation functions such as ReLU introduce nonlinear transformations to enable the feature map to capture more complex feature relationships. The similarity matrix between nodes is calculated according to the activated feature graph to obtain a weighted adjacency matrix. The similarity matrix reflects the similarity between nodes in the feature graph. The weighted adjacency matrix is subjected to spectral clustering analysis to obtain the initial subgraph partitioning result. Spectral clustering is a graph-based clustering method that divides nodes into several subgraphs by clustering the eigenvectors of the weighted adjacency matrix. The modularity index is calculated according to the initial subgraph partitioning result to obtain the community structure evaluation score. The modularity index is a metric for evaluating clustering results. The quality of clustering is evaluated by calculating the modularity of the community structure. The community structure evaluation score is iteratively optimized to obtain the optimal subgraph partitioning scheme. The iterative optimization process maximizes the modularity index by continuously adjusting the subgraph partitioning to obtain the optimal community structure. According to the optimal subgraph partitioning scheme, the spatial correlation feature graph is segmented to obtain a feature subgraph set. The feature subgraph set divides the nodes in the spatial correlation feature graph into several interrelated subgraphs, each of which represents a class of similar features.
[0021] Step S103: According to preset standard information, the initial defect analysis results are evaluated and quantitatively analyzed to obtain defect property data and defect equivalent, location and level information; Specifically, the basic attributes of each defect are extracted from the initial defect analysis results, including its geometric features, morphological features, positional features, etc. The geometric features include parameters such as the length, width, and area of the defect, the morphological features include the shape and edge characteristics of the defect, and the positional features involve the specific position of the defect in the weld image. According to the preset standard information, the geometric features of the defects are quantitatively analyzed. For example, according to the defect length and width thresholds defined in the standard, the specific size of each defect is calculated and compared with the threshold to determine whether it exceeds the allowable range. For defects with a large area, its shape characteristics are analyzed to determine whether it is a serious structural defect. At the same time, the nature of the defect is evaluated in combination with the morphological characteristics of the defect. For example, by analyzing the edge smoothness and shape complexity of the defect, it is determined whether the defect is caused by a process problem or an external factor. In the positional feature analysis, the specific position of the defect in the weld image is calculated to determine its distribution relative to the entire weld. And evaluate its impact on the overall structure of the weld. For example, defects located in the key parts of the weld may have a greater impact on the overall strength and performance of the weld and require special attention. The above analysis results are combined to calculate the defect equivalent. Defect equivalent is a comprehensive indicator, which usually reflects the overall impact of defects by weighted calculation of different characteristic parameters. For example, according to the size, shape, location and other parameters of the defect, an equivalent value is weighted and calculated to quantify the severity of the defect. Defects are classified according to the classification basis in the preset standard. Defect levels are usually divided into several levels, such as minor defects, medium defects and severe defects. According to the calculated defect equivalent, each defect is classified into the corresponding level and its specific level information is recorded.
[0022] Step S104: Comprehensively process the defect property data and the defect equivalent, location and level information to obtain defect correction suggestions, and generate a rework diagram and a defect analysis report based on the defect correction suggestions.
[0023] Specifically, all the collected defect information is systematically organized and analyzed. This information includes the property data, equivalent, specific location and severity level of each defect. By establishing a comprehensive database, all defect information is entered into it for unified management and analysis. The defect information in the database is comprehensively processed using data analysis tools. The distribution and trend of defects are determined through statistical analysis methods. For example, some defects may appear in a specific weld area, which may indicate that there are process defects or material problems in the welding process in this area. Through this statistical analysis, potential problem areas and influencing factors are found. In the comprehensive processing process, risk assessment is carried out in combination with the property data and level information of each defect. According to the severity and location of the defect, its impact on the overall structure and performance of the pipeline is evaluated. For example, severe defects located in key weld parts need to be repaired first, while minor defects may not need to be processed immediately. Through risk assessment, the priority of repair work can be reasonably arranged. On this basis, defect correction suggestions are generated. Correction suggestions should include specific repair methods and steps, as well as the required tools and materials. For example, for some weld cracks, it may be recommended to repair them by re-welding or local heat treatment; for material defects, it may be recommended to replace the damaged part or use reinforcing materials. The correction suggestions should also take into account the feasibility and economic cost of the actual operation to ensure that the repair plan is not only technically feasible but also economically reasonable. Based on these correction suggestions, a repair schematic is generated. The repair schematic should indicate the location and repair plan of each defect in detail so that maintenance personnel can intuitively understand the key points and steps of the repair work. For example, the location and length of the weld crack are marked on the repair schematic, and different repair methods are indicated by different colors or symbols to ensure the accuracy and efficiency of the maintenance work. Based on the comprehensive processing and analysis results, a detailed defect analysis report is written.
[0024] In the embodiment of the present application, the whole process from film collection to defect report generation is automated through digital scanning and intelligent analysis process, which greatly improves the detection efficiency. The multi-level feature extraction and self-learning defect analysis model can accurately identify and classify various types of weld defects, improving the accuracy and reliability of defect detection. Through self-organizing mapping and spatiotemporal correlation analysis, multi-scale and multi-modal fusion of defect features is realized, and the method's ability to identify complex defects is enhanced. The self-learning model has the ability to continuously learn and optimize, can adapt to different welding processes, material properties and detection conditions, and has good generalization. Defect property evaluation and quantitative analysis based on preset standard information provide an objective basis for defect severity judgment and quality control. By generating defect correction suggestions and rework schematics, a large amount of film data is deeply analyzed, potential quality problems and optimization directions can be excavated, and data support can be provided for welding process improvement. The use of a unified analysis process and evaluation criteria reduces the influence of human factors and improves the accuracy of defect analysis of pipeline butt weld radiographic films.
[0025] In a specific embodiment, the process of executing step S102 may specifically include the following steps: (1) Perform edge detection processing on the target film image to obtain image edge contour data, and perform region segmentation processing on the target film image based on the image edge contour data to obtain a weld region image; (2) Calculate the grayscale histogram of the weld area image to obtain grayscale distribution feature data, and perform threshold segmentation processing on the weld area image based on the grayscale distribution feature data to obtain the potential defect area; (3) Perform morphological operations on the potential defect area to obtain an optimized defect candidate area, and calculate the geometric features of the optimized defect candidate area to obtain a defect shape descriptor; (4) Extracting texture features of the defect candidate area according to the defect shape descriptor to obtain a defect texture feature vector, and performing principal component analysis on the defect texture feature vector to obtain feature data after dimensionality reduction; (5) Construct a feature space based on the feature data after dimensionality reduction, perform cluster analysis on the feature space, and obtain a preliminary classification result of the defect type. The preliminary classification result of the defect type and the image feature data are input into the self-learning defect analysis model to accurately identify the defect type and obtain the initial defect analysis result.
[0026] Specifically, the image is preprocessed to enhance its contrast and remove noise. Common preprocessing methods include Gaussian filtering and mean filtering, which can smooth the image and reduce the impact of noise on edge detection. The Canny edge detection algorithm is used to detect edge points by calculating the image gradient. For each pixel, the gradient of its gray value in the x and y directions (respectively) is calculated. and ), and get the gradient amplitude and the gradient direction , the formula is: ; According to these calculation results, the edge points in the image are determined and the edge contour data of the image is formed. According to the obtained image edge contour data, the target film image is segmented. The weld area is separated from the background by a contour-based segmentation method. By analyzing the edge contour data, the boundary of the weld is determined, and then the weld area is masked to obtain the weld area image. The grayscale histogram of the weld area image is calculated. The grayscale histogram is a distribution diagram reflecting the number of pixels of each gray level in the image, which is used to analyze the brightness characteristics of the image. By calculating the grayscale histogram, the grayscale distribution feature data of the weld area image is obtained. According to the grayscale distribution feature data, the weld area image is subjected to threshold segmentation. Threshold segmentation is a method of classifying image pixels into foreground and background. According to the histogram characteristics, an appropriate threshold is selected, and the pixels with grayscale values higher than the threshold are set as the foreground, and those below the threshold are set as the background to obtain the potential defect area. Morphological operations are performed on the potential defect area to optimize the defect candidate area. Morphological operations include corrosion, expansion, opening and closing operations, etc. Through these operations, small noise is eliminated, small holes in the defect area are filled, and the edges are smoothed to obtain the optimized defect candidate area. The geometric features of the optimized defect candidate area are calculated to obtain the defect shape descriptor. The geometric features include the area, perimeter, shape complexity, etc. of the defect, which can be expressed by formulas. For example, the shape complexity of the defect can be expressed by the ratio of the square of the perimeter to the area, that is, the shape complexity: ; in is the circumference, is the area. Through these geometric features, the shape characteristics of the defect can be quantitatively described. According to the defect shape descriptor, the texture feature extraction is performed on the defect candidate area. The texture feature reflects the texture pattern and structure of the image surface and can be extracted by methods such as gray level co-occurrence matrix. For example, gray level co-occurrence matrix Indicates that the gray value in the image is The pixel point and gray value are The co-occurrence frequency of pixels at a certain distance and direction. The texture feature vector of the defect is obtained by calculating the contrast, entropy, energy and other features of the gray level co-occurrence matrix. The defect texture feature vector is processed by principal component analysis to reduce the dimension and remove redundant features. Principal component analysis projects the high-dimensional feature vector to a low-dimensional space through linear transformation, retaining the main information and reducing the data dimension. Assume that the original feature vector is , the linear transformation of principal component analysis is expressed as: ; in is the projection matrix, which is determined by maximizing the variance. The feature data after dimensionality reduction retains most of the information while reducing the computational complexity. The feature space is constructed based on the feature data after dimensionality reduction, and cluster analysis is performed on the feature space. Similar defects are classified into one category. Common methods include K-means clustering and hierarchical clustering. For example, K-means clustering divides data points into K clusters through iterative optimization, so that the distance between data points in the same cluster is minimized. Through cluster analysis, the preliminary classification results of defect types are obtained. The preliminary classification results of defect types and image feature data are input into the self-learning defect analysis model for accurate identification of defect types. The self-learning defect analysis model can adopt deep learning methods, such as convolutional neural networks or deep belief networks. Through model training and feature extraction, automatic classification and identification of defect types are achieved to obtain initial defect analysis results.
[0027] In a specific embodiment, the execution step constructs a feature space based on the feature data after dimensionality reduction, performs cluster analysis on the feature space, obtains a preliminary classification result of the defect type, and inputs the preliminary classification result of the defect type and the image feature data into the self-learning defect analysis model to accurately identify the defect type. The process of obtaining the initial defect analysis result can specifically include the following steps: (1) Normalize the feature data after dimensionality reduction to obtain standardized feature vectors, construct feature space based on the standardized feature vectors, and perform K-means clustering analysis on the feature space to obtain the initial cluster center; (2) Perform iterative optimization calculation on the initial cluster centers to obtain the optimal cluster center set, and calculate the distance of the data points in the feature space based on the optimal cluster center set to obtain the data point attribution label; (3) Perform density estimation analysis on data points with the same attribute label to obtain the defect type probability distribution, and perform hierarchical processing on the clustering results according to the defect type probability distribution to obtain the defect type hierarchical tree structure; (4) Prune the defect type hierarchical tree structure to obtain the preliminary classification results of the defect type; (5) Input the preliminary classification results of defect types and image feature data into the self-organizing mapping layer and spatiotemporal correlation analysis layer in the self-learning defect analysis model for feature extraction and mapping to obtain deep feature representation; (6) An attention mechanism is applied to the deep feature representation to obtain a weighted feature vector, which is then input into the fully connected layer to obtain a defect type probability output. The defect type is then determined based on the defect type probability output and a preset confidence threshold to obtain the initial defect analysis result.
[0028] Specifically, each feature is standardized, and the dimension differences between features are eliminated through mean normalization or minimum-maximum normalization to obtain a standardized feature vector. A feature space is constructed based on the standardized feature vector, and a K-means clustering analysis is performed on the feature space to divide the data points into K clusters, so that the data points in the same cluster are as close as possible, while the data points in different clusters are as far away as possible. For example, K initial cluster centers are randomly selected, and then the Euclidean distance of each data point to each cluster center is calculated. The formula is: ; in, It is Data points and The distance between cluster centers, It is The data point in The value of the dimension feature, It is The cluster center is in The value on the dimensional feature. By calculating the distance, each data point is assigned to the nearest cluster center to form the initial clustering result. The initial cluster centers are iteratively optimized to obtain the optimal cluster center set. The center point of each cluster is recalculated, that is, the mean of all data points belonging to the cluster, and then the new center point is used as the cluster center. The above allocation and calculation process is repeated until the cluster center no longer changes or the change amplitude is less than the preset threshold. The optimal cluster center set is obtained through iterative optimization. According to the optimal cluster center set, the distance of the data points in the feature space is calculated to obtain the attribution label of the data points. The attribution label indicates which cluster each data point belongs to. Density estimation analysis is performed on the data points with the same attribution label. The density estimation calculates the distribution density of the data points in each cluster to obtain the probability distribution of the defect type. The probability distribution reflects the distribution of each defect type in the feature space. According to the probability distribution of the defect type, the clustering results are hierarchically processed to construct a hierarchical tree structure of the defect type. The hierarchical processing organizes the data points into a tree structure by recursively splitting and merging the clustering results, so that the data points of the same defect type are in the same branch in the tree structure. Prune the defect type hierarchical tree structure to remove redundant or unimportant branches and obtain the preliminary classification results of the defect types. Input the preliminary classification results of the defect types and the image feature data into the self-organizing map layer and the spatiotemporal association analysis layer in the self-learning defect analysis model for feature extraction and mapping. The self-organizing map layer maps high-dimensional feature data to a low-dimensional space through a competitive learning mechanism to form a two-dimensional feature representation. The spatiotemporal association analysis layer further extracts deep feature representations by analyzing the temporal and spatial relationships between features. The attention mechanism is applied to the deep feature representation to highlight important features in a weighted manner. The attention mechanism calculates the importance weight of each feature and gives greater attention to features with higher weights to obtain a weighted feature vector. The formula is as follows: ; in, is the attention weight vector, is the attention weight matrix, It is a deep feature representation. By weighting, a weighted feature vector is obtained. The weighted feature vector is input into the fully connected layer and analyzed by a nonlinear activation function to obtain the probability output of the defect type. The fully connected layer maps the weighted feature vector to the output space through linear transformation and activation function. The formula is: ; in, is the probability output, is the fully connected layer weight matrix, is the bias vector, is an activation function. According to the probability output of the defect type and the preset confidence threshold, the defect type is determined to obtain the initial defect analysis result. The confidence threshold is used to determine whether the probability output is high enough to determine the reliability of the defect type.
[0029] In a specific embodiment, the execution step inputs the preliminary classification result of the defect type and the image feature data into the self-organizing mapping layer and the spatiotemporal correlation analysis layer in the self-learning defect analysis model for feature extraction and mapping, and the process of obtaining the deep feature representation may specifically include the following steps: (1) Perform one-hot encoding on the preliminary classification results of defect types to obtain the category feature vector; (2) constructing a multimodal input tensor based on the category feature vector and the image feature data, and adaptively normalizing the multimodal input tensor to obtain standardized input data; (3) Inputting the standardized input data into the self-organizing map layer in the self-learning defect analysis model to perform self-organizing map calculations to obtain a two-dimensional feature map matrix; (4) Calculate the activation strength of each neuron according to the two-dimensional feature mapping matrix, perform threshold screening on the activation strength, obtain the significant feature area, and perform spatial pyramid pooling operation on the significant feature area to obtain a multi-scale feature descriptor; (5) Construct a time series feature sequence based on the multi-scale feature descriptor, and input the time series feature sequence into the spatiotemporal correlation analysis layer in the self-learning defect analysis model. Perform feature processing through the long short-term memory network in the spatiotemporal correlation analysis layer to obtain the time dimension feature representation; (6) Perform graph convolution operations on the time dimension feature representation to obtain a spatial correlation feature graph, and perform topological structure information analysis and spectral clustering based on the spatial correlation feature graph to obtain a set of feature subgraphs; (7) Perform graph embedding processing on the feature subgraph set to obtain a low-dimensional dense vector representation, perform residual connection based on the low-dimensional dense vector representation and the standardized input data, and obtain a deep feature representation through a nonlinear activation function.
[0030] Specifically, the preliminary classification results of defect types are processed by one-hot encoding, and the preliminary classification results of defect types are converted into category feature vectors. One-hot encoding is a method of converting category variables into binary vectors. For each category, a unique vector is assigned. The vector has 1 in the position corresponding to the category and 0 in the other positions. Assuming there are n defect types, the category feature vector after one-hot encoding can be expressed as ,in 1 means the defect belongs to the i-th category, and 0 means it does not belong to the 1st category. Construct a multimodal input tensor based on the category feature vector and image feature data. Image feature data includes image features obtained through feature extraction, such as grayscale value, texture features, etc. Concatenate the one-hot encoded category feature vector with the image feature data to form a multimodal input tensor. ,in is the image feature data. The multimodal input tensor is adaptively normalized to eliminate the dimensional differences between different features and obtain standardized input data. The adaptive normalization process converts the feature value to a standard normal distribution by calculating the mean and standard deviation of each feature. Assume Each feature dimension of , then the standardized formula is: ; in, is the mean of the ith feature, is the standard deviation of the ith feature, is the standardized feature. The standardized input data is input into the self-organizing map layer in the self-learning defect analysis model for self-organizing map calculation. Self-organizing map is an unsupervised learning method for mapping high-dimensional data to low-dimensional space. Self-organizing map maps input data to a two-dimensional feature space through competitive learning and neighborhood function to form a feature map matrix. Each input data calculates the Euclidean distance with each neuron through the self-organizing map network, and selects the neuron with the closest distance as the best matching unit. According to the activation strength and neighborhood function of the best matching unit, the weight of the neuron is adjusted so that the network can adaptively reflect the topological structure of the input data. The activation strength of each neuron is calculated according to the two-dimensional feature map matrix, and the activation strength is thresholded to obtain the significant feature region. The significant feature region refers to the region with high activation strength in the feature space, which usually corresponds to the important features of the input data. The spatial pyramid pooling operation is performed on the significant feature region, and multi-scale feature descriptors are captured by pooling at different scales. Spatial pyramid pooling forms multi-scale feature descriptors by dividing the feature map into grids of different sizes and calculating feature statistics in each grid. The temporal feature sequence is constructed based on the multi-scale feature descriptor and input into the spatiotemporal correlation analysis layer in the self-learning defect analysis model. The spatiotemporal correlation analysis layer performs feature processing through the long short-term memory network, which can capture the time dependency and long-distance relationship in the sequence data. The temporal feature sequence is processed by the long short-term memory network to generate a time dimension feature representation. The graph convolution operation is performed on the time dimension feature representation to obtain a spatial correlation feature graph. The graph convolution operation captures the spatial correlation between nodes by performing convolution operations on the graph structure. Assume that the graph structure is represented as ,in is a node set, is the edge set. The graph convolution formula is: ; in, is the feature representation after convolution, is the adjacency matrix, is the input feature, is the weight matrix, is a nonlinear activation function. According to the spatial correlation feature graph, topological structure information analysis and spectral clustering are performed to obtain a set of feature subgraphs. Spectral clustering divides nodes into different clusters by calculating the eigenvectors of the graph Laplacian matrix. Assume that the graph Laplacian matrix is , its eigenvalue decomposition is ,in is the eigenvector matrix, is a diagonal eigenvalue matrix. By clustering the eigenvectors, a set of feature subgraphs is obtained. The feature subgraph set is subjected to graph embedding to obtain a low-dimensional dense vector representation. Graph embedding preserves the topological information of the graph by embedding the high-dimensional graph structure into a low-dimensional space. The low-dimensional dense vector representation is residually connected with the standardized input data and a nonlinear activation function is used to obtain a deep feature representation. The residual connection maintains the integrity of the information by directly passing the input features to the output. The formula is: ; in, For deep feature representation, is the feature representation after graph convolution, To standardize the input data, is a non-linear activation function.
[0031] In a specific embodiment, the process of executing the step of inputting the standardized input data into the self-organizing map layer in the self-learning defect analysis model to perform self-organizing map calculation to obtain a two-dimensional feature map matrix may specifically include the following steps: (1) Randomly sample the standardized input data to obtain an initial weight vector set, and construct a self-organizing map network based on the initial weight vector set; (2) Calculate the Euclidean distance between each input sample and the network node according to the self-organizing map network to obtain the best matching unit; (3) Calculate the Gaussian neighborhood function for the best matching unit to obtain the local influence area, and update the network weights according to the local influence area to obtain the optimized weight vector; (4) Construct a topology-preserving mapping based on the optimized weight vector to obtain a low-dimensional manifold structure; (5) Construct a unified distance matrix based on the low-dimensional manifold structure, and calculate the similarity between nodes based on the unified distance matrix to obtain a similarity matrix; (6) Perform hierarchical clustering analysis on the similarity matrix to obtain a clustering tree structure, and determine the optimal number of clusters based on the clustering tree structure to obtain cluster labels. Based on the cluster labels, reconstruct the original feature space of the network nodes to obtain a two-dimensional feature mapping matrix.
[0032] Specifically, some samples are randomly selected from the standardized input data set as the initial weight vector set. These samples are used as the initial weight vectors of the self-organizing map network for network initialization. Assume that the standardized input data set is , randomly select k samples from them to form an initial weight vector set . A self-organizing map network is constructed based on the initial weight vector set. The self-organizing map network is an unsupervised neural network that maps high-dimensional data to low-dimensional space through competitive learning. In the self-organizing map network, each node corresponds to a weight vector, and each weight vector in the initial weight vector set is initialized to a randomly sampled standardized input data sample. The Euclidean distance between each input sample and the network node is calculated according to the self-organizing map network to determine the best matching unit for each input sample. The Euclidean distance formula is: ; in, Represents the i-th input sample With the jth network node The distance between and are the values of the input sample and the weight vector on the k-th dimension feature, respectively. By calculating the distance between all input samples and all network nodes, the network node closest to each input sample is found, that is, the best matching unit. The Gaussian neighborhood function is calculated for the best matching unit to obtain the local influence area. The Gaussian neighborhood function is used to determine the influence range of a network node, and its formula is: ; in, is the influence of the i-th network node on the j-th input sample, is the neighborhood width parameter, which is adjusted by The size of the neighborhood range can be controlled. The local influence area of each network node is determined through the Gaussian neighborhood function. The network weight is updated according to the local influence area. The update formula is: ; in, is the weight vector of the jth node at time step t, is the learning rate, is the input sample, and the weights of the network nodes are gradually adjusted by updating the formula to better reflect the topological structure of the input data. After the weight update is completed, a topology-preserving mapping is constructed based on the optimized weight vector to obtain a low-dimensional manifold structure. The low-dimensional manifold structure is a representation of high-dimensional data mapped to a low-dimensional space through a self-organizing mapping network, which retains the topological relationship of the data. A unified distance matrix is constructed based on the low-dimensional manifold structure, and the similarity between nodes is calculated based on the unified distance matrix. Unified distance matrix Each element in represents the distance between two nodes, and the similarity matrix is obtained by distance calculation. , the formula is: ; in, represents the similarity between the i-th node and the j-th node, is the distance scale parameter. Perform hierarchical clustering analysis on the similarity matrix to obtain a cluster tree structure. Hierarchical clustering builds a tree-like cluster structure by recursively merging or splitting data points. In the cluster tree structure, the optimal number of clusters is determined by analyzing the hierarchical relationship of the tree. The optimal number of clusters is determined based on the cluster tree structure to obtain cluster labels. The cluster label indicates the cluster category to which each network node belongs. According to the cluster label, the original feature space of the network nodes is reconstructed to obtain a two-dimensional feature mapping matrix. The two-dimensional feature mapping matrix maps the position of the network nodes in the low-dimensional manifold structure back to the high-dimensional feature space, so that the feature representation of each node can reflect its characteristics in the original data.
[0033] In a specific embodiment, the execution step constructs a time series feature sequence according to the multi-scale feature descriptor, and inputs the time series feature sequence into the spatiotemporal correlation analysis layer in the self-learning defect analysis model, performs feature processing through the long short-term memory network in the spatiotemporal correlation analysis layer, and obtains the time dimension feature representation. The process may specifically include the following steps: (1) Segment the multi-scale feature descriptor into sliding windows to obtain a fixed-length feature subsequence, and calculate the difference between time steps based on the feature subsequence to obtain a feature change sequence; (2) Transform the feature variation sequence to obtain the frequency domain feature representation, and extract the main frequency components based on the frequency domain feature representation to obtain the spectrum feature vector; (3) Concatenate the spectral feature vector and the feature subsequence to obtain enhanced time series features, and perform forward propagation calculation of the long short-term memory network on the enhanced time series features to obtain the hidden state sequence; (4) Calculate the attention weight according to the hidden state sequence to obtain the context vector, and fuse the context vector with the hidden state sequence to obtain the fused feature representation; (5) Perform residual connection and layer normalization on the fused feature representation to obtain normalized features, and then analyze the normalized features through a fully connected layer and activation function to obtain the feature representation of the time dimension.
[0034] Specifically, the descriptor is divided into feature subsequences of fixed length. Assume that the multi-scale feature descriptor is , where each represents the feature value at the i-th time step. Sliding window segmentation generates a series of feature subsequences by applying a fixed-length window on the descriptor and sliding the window with a certain step size. Assume that the window length is And the sliding step length is , then the characteristic subsequence , where k represents the sequence number of the window. Based on these feature subsequences, the difference between time steps is calculated to obtain the feature change sequence. The difference between time steps can reveal the change of features between different time steps. The formula is as follows: ; in, represents the difference sequence of the kth feature subsequence. By calculating the difference, we can obtain the feature variation sequence, which can reflect the dynamic change of the feature over time. We transform the feature variation sequence to obtain the frequency domain feature representation. For example, we can transform the time domain signal into the frequency domain signal through the fast Fourier transform. Assume that the feature variation sequence is , and the frequency domain representation is obtained through fast Fourier transform: ; in, represents the frequency domain feature representation. The frequency domain feature representation can reveal the periodicity and frequency components in the signal. According to the frequency domain feature representation, the main frequency components are extracted to obtain the spectrum feature vector. The main frequency components can be obtained by selecting several components with the largest amplitude in the spectrum. Assume that the frequency domain feature representation is , select the first k components with the largest amplitude and get the spectrum feature vector: ; in, is the index of the frequency component. The spectral feature vector is concatenated with the feature subsequence to obtain the enhanced time series feature. The concatenation operation forms a feature sequence containing more information by connecting the spectral feature vector with the corresponding feature subsequence: ; in, Represents the enhanced time series feature sequence. The enhanced time series features are forward propagated by the long short-term memory network to obtain the hidden state sequence. The long short-term memory network is a neural network that can capture long-distance dependencies in sequence data. It effectively processes sequence data through memory units and gating mechanisms. The forward propagation formula of the long short-term memory network is: ; in, represents the hidden state at time step t, is the input of the enhanced time series feature at time step t, and are the weight matrices, is the bias vector, is the activation function. Through the forward propagation of the long short-term memory network, the hidden state sequence of the entire sequence is obtained The attention weight is calculated according to the hidden state sequence to obtain the context vector. The attention mechanism focuses on the most relevant part of the current task by calculating the importance weight of each hidden state. The calculation formula of the attention weight is: ; in, is the attention weight at time step t, is the weight matrix. The context vector is obtained by weighted summation: ; The context vector is fused with the hidden state sequence to obtain a fused feature representation. The fusion operation connects the context vector and the hidden state sequence to form a feature representation that contains global and local information: ; The fused feature representation is subjected to residual connection and layer normalization to obtain normalized features. The residual connection maintains the integrity of the information by passing the input directly to the output. The formula is: ; Layer normalization improves the training stability of the network by standardizing the features. The formula is: ; in, is the normalization feature, and are the mean and standard deviation of the features respectively. According to the normalized features, the time dimension feature representation is obtained through the full connection layer and activation function analysis. The full connection layer maps the normalized features to the output space through linear transformation and activation function. The formula is: ; in, is the time dimension feature representation, is the fully connected layer weight matrix, is the bias vector, is the activation function.
[0035] In a specific embodiment, the execution step performs a graph convolution operation on the time dimension feature representation to obtain a spatial correlation feature graph, and performs topological structure information analysis and spectral clustering based on the spatial correlation feature graph to obtain a feature subgraph set. The process may specifically include the following steps: (1) Construct a k-nearest neighbor graph for the time dimension feature representation to obtain the initial association graph structure, and calculate the graph Laplacian matrix based on the initial association graph structure to obtain the normalized graph Laplacian operator; (2) Perform eigenvalue decomposition on the normalized graph Laplacian operator to obtain the graph spectral feature vector, and construct a graph convolution kernel based on the graph spectral feature vector, perform convolution operation on the time dimension feature representation, and obtain a spatial correlation feature map; (3) Perform nonlinear activation on the spatial correlation feature map to obtain the activated feature map, and calculate the similarity matrix between nodes based on the activated feature map to obtain the weighted adjacency matrix; (4) Perform spectral clustering analysis on the weighted adjacency matrix to obtain the initial subgraph partitioning results, and calculate the modularity index based on the initial subgraph partitioning results to obtain the community structure evaluation score; (5) Iteratively optimize the community structure evaluation score to obtain the optimal subgraph partitioning scheme, and then segment the spatial correlation feature graph according to the optimal subgraph partitioning scheme to obtain a feature subgraph set.
[0036] Specifically, the k nearest neighbors of each feature vector are determined to obtain the initial association graph structure. Assume that the time dimension feature is represented as , for each eigenvector , and calculate it and other eigenvectors The Euclidean distance between: ; in, is the Euclidean distance between the i-th eigenvector and the j-th eigenvector, and They are and The value of the feature in the kth dimension. By calculating the distance between all feature vectors, selecting the k nearest neighbors of each feature vector, and constructing a k nearest neighbor graph, represented as an adjacency matrix ,in express and Neighbors, otherwise . The graph Laplacian matrix is calculated according to the initial association graph structure to obtain the normalized graph Laplacian operator. The graph Laplacian matrix L is defined as: ; in, is the degree matrix, whose diagonal elements Represents the degree of node i, that is, the number of neighbors of node i. Normalized graph Laplacian operator is defined as: ; By calculating the normalized graph Laplacian operator, the spectral features of the graph are obtained for subsequent feature extraction and graph convolution operations. The eigenvalue decomposition of the normalized graph Laplacian operator is performed to obtain the graph spectral feature vector. Assume that the eigenvalue decomposition of the normalized graph Laplacian operator is: ; in, is the eigenvector matrix, is a diagonal eigenvalue matrix. Used to construct the graph convolution kernel. The graph convolution kernel is constructed based on the graph feature vector, and the time dimension feature representation is convolved to obtain the spatial correlation feature map. The formula for the graph convolution operation is: ; in, is the feature representation after convolution, is the adjacency matrix, are input features, is the convolution kernel weight matrix, is a nonlinear activation function. The spatial correlation feature map is nonlinearly activated to obtain the activated feature map. Nonlinear activation functions such as ReLU, etc., enable the feature map to capture more complex feature relationships by introducing nonlinear transformations. The similarity matrix between nodes is calculated based on the activated feature map to obtain the weighted adjacency matrix. The similarity matrix S is constructed by calculating the similarity between nodes in the activated feature map: ; in, is the similarity between node i and node j, is the scale parameter. Perform spectral clustering analysis on the weighted adjacency matrix to obtain the initial subgraph partitioning result. Spectral clustering is a graph-based clustering method that can partition nodes into different subgraphs by clustering the eigenvectors of the weighted adjacency matrix. Assume that the eigenvector of the weighted adjacency matrix is , perform K-means clustering on these feature vectors to obtain the initial subgraph partitioning results. Calculate the modularity index based on the initial subgraph partitioning results to obtain the community structure evaluation score. The modularity index is used to evaluate the quality of the clustering results and is defined as: ; in, is the modularity, is the adjacency matrix element, and are the degrees of node i and node j respectively, is the number of edges in the graph is an indicator function, which is 1 when nodes i and j belong to the same community, otherwise it is 0. The community structure evaluation score is iteratively optimized to obtain the optimal subgraph partitioning scheme. By repeatedly adjusting the subgraph partitioning, the modularity index is maximized and the optimal community structure is obtained. According to the optimal subgraph partitioning scheme, the spatial correlation feature graph is segmented to obtain a set of feature subgraphs. By applying the optimal subgraph partitioning scheme, the spatial correlation feature graph is segmented into several subgraphs, each of which represents a class of similar features.
[0037] The above describes the defect analysis method based on the pipeline butt weld radiographic film in the embodiment of the present application. The following describes the defect analysis system based on the pipeline butt weld radiographic film in the embodiment of the present application. Figure 2 In the embodiment of the present application, an embodiment of a defect analysis system based on a pipeline butt weld radiograph includes: The processing module 201 is used to digitally scan and process the pipeline butt weld radiographic film to obtain a radiographic digital image, and to perform preprocessing and enhancement operations on the radiographic digital image to obtain a target radiographic image; The analysis module 202 is used to extract and calculate the features of the target film image to obtain image feature data, and input the image feature data into a preset self-learning defect analysis model to perform defect analysis to obtain an initial defect analysis result; Evaluation module 203, used to evaluate and quantitatively analyze the initial defect analysis results according to preset standard information, and obtain defect property data and defect equivalent, location and level information; The generation module 204 is used to comprehensively process the defect property data and the defect equivalent, location and level information to obtain defect correction suggestions, and generate a rework diagram and a defect analysis report based on the defect correction suggestions.
[0038] Through the collaboration of the above components, digital scanning and intelligent analysis processes, the whole process from film collection to defect report generation is automated, greatly improving the detection efficiency. The multi-level feature extraction and self-learning defect analysis model can accurately identify and classify various types of weld defects, improving the accuracy and reliability of defect detection. Through self-organizing mapping and spatiotemporal correlation analysis, multi-scale and multi-modal fusion of defect features is realized, enhancing the method's ability to identify complex defects. The self-learning model has the ability to continuously learn and optimize, can adapt to different welding processes, material properties and detection conditions, and has good generalization. Defect property evaluation and quantitative analysis based on preset standard information provide an objective basis for defect severity judgment and quality control. By generating defect correction suggestions and rework schematics, a large amount of film data is deeply analyzed to dig out potential quality problems and optimization directions, providing data support for welding process improvement. The use of a unified analysis process and evaluation standards reduces the influence of human factors and improves the accuracy of defect analysis of pipeline butt weld radiographic films.
[0039] The present application also provides a defect analysis device based on pipeline butt weld radiographic films, the defect analysis device based on pipeline butt weld radiographic films comprising a memory and a processor, the memory storing computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the defect analysis method based on pipeline butt weld radiographic films in the above-mentioned embodiments.
[0040] The present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the defect analysis method based on the pipeline butt weld radiograph.
[0041] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0042] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0043] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A defect analysis method based on pipeline butt weld radiographs, characterized in that: The method comprises: Digitally scanning and processing the pipeline butt weld radiographic film to obtain a film digital image, and preprocessing and enhancing the film digital image to obtain a target film image; Extracting and calculating features of the target film image to obtain image feature data, and inputting the image feature data into a preset self-learning defect analysis model to perform defect analysis to obtain an initial defect analysis result; According to preset standard information, defect property evaluation and quantitative analysis are performed on the initial defect analysis results to obtain defect property data and defect equivalent, location and level information; The defect property data and the defect equivalent, location and level information are comprehensively processed to obtain defect correction suggestions, and a rework schematic diagram and a defect analysis report are generated based on the defect correction suggestions.
2. The defect analysis method based on pipeline butt weld radiographs according to claim 1 is characterized in that: The feature extraction and calculation of the target film image are performed to obtain image feature data, and the image feature data are input into a preset self-learning defect analysis model to perform defect analysis to obtain an initial defect analysis result, including: Performing edge detection processing on the target film image to obtain image edge contour data, and performing region segmentation processing on the target film image according to the image edge contour data to obtain a weld region image; Performing grayscale histogram calculation on the weld area image to obtain grayscale distribution characteristic data, and performing threshold segmentation processing on the weld area image according to the grayscale distribution characteristic data to obtain a potential defect area; Performing morphological operations on the potential defect region to obtain an optimized defect candidate region, and performing geometric feature calculations on the optimized defect candidate region to obtain a defect shape descriptor; Extracting texture features of the defect candidate area according to the defect shape descriptor to obtain a defect texture feature vector, and performing principal component analysis on the defect texture feature vector to obtain feature data after dimensionality reduction; A feature space is constructed based on the reduced feature data, and a cluster analysis is performed on the feature space to obtain a preliminary classification result of the defect type. The preliminary classification result of the defect type and the image feature data are input into a self-learning defect analysis model to accurately identify the defect type and obtain an initial defect analysis result.
3. The defect analysis method based on pipeline butt weld radiographs according to claim 2 is characterized in that: The feature space is constructed according to the feature data after dimension reduction, and cluster analysis is performed on the feature space to obtain a preliminary classification result of defect types, and the preliminary classification result of defect types and the image feature data are input into a self-learning defect analysis model to accurately identify defect types, and obtain an initial defect analysis result, including: Normalizing the feature data after dimensionality reduction to obtain a standardized feature vector, constructing a feature space according to the standardized feature vector, and performing K-means clustering analysis on the feature space to obtain an initial cluster center; Iteratively optimizing the initial cluster centers to obtain an optimal cluster center set, and performing distance calculation on the data points in the feature space according to the optimal cluster center set to obtain data point attribution labels; Performing density estimation analysis on data points with the same attribute label to obtain defect type probability distribution, and hierarchically processing clustering results according to the defect type probability distribution to obtain a defect type hierarchical tree structure; Performing a pruning operation on the defect type hierarchical tree structure to obtain a preliminary defect type classification result; Inputting the preliminary defect type classification result and the image feature data into the self-organizing mapping layer and the spatiotemporal correlation analysis layer in the self-learning defect analysis model for feature extraction and mapping to obtain a deep feature representation; An attention mechanism is performed on the deep feature representation to obtain a weighted feature vector, and the weighted feature vector is input into a fully connected layer to obtain a defect type probability output, and the defect type is determined based on the defect type probability output and a preset confidence threshold to obtain an initial defect analysis result.
4. The defect analysis method based on pipeline butt weld radiographs according to claim 3 is characterized in that: The step of inputting the preliminary defect type classification result and the image feature data into the self-organizing mapping layer and the spatiotemporal correlation analysis layer in the self-learning defect analysis model for feature extraction and mapping to obtain a deep feature representation includes: One-hot encoding is performed on the preliminary classification results of the defect types to obtain a category feature vector; Constructing a multimodal input tensor according to the category feature vector and the image feature data, and performing adaptive normalization processing on the multimodal input tensor to obtain standardized input data; Inputting the standardized input data into the self-organizing map layer in the self-learning defect analysis model to perform self-organizing map calculation to obtain a two-dimensional feature map matrix; Calculating the activation strength of each neuron according to the two-dimensional feature mapping matrix, performing threshold screening on the activation strength to obtain a significant feature region, and performing a spatial pyramid pooling operation on the significant feature region to obtain a multi-scale feature descriptor; Constructing a time series feature sequence according to the multi-scale feature descriptor, and inputting the time series feature sequence into the spatiotemporal correlation analysis layer in the self-learning defect analysis model, performing feature processing through the long short-term memory network in the spatiotemporal correlation analysis layer, and obtaining a time dimension feature representation; Performing a graph convolution operation on the time dimension feature representation to obtain a spatial correlation feature graph, and performing topological structure information analysis and spectral clustering based on the spatial correlation feature graph to obtain a feature subgraph set; The feature subgraph set is subjected to graph embedding processing to obtain a low-dimensional dense vector representation, a residual connection is performed based on the low-dimensional dense vector representation and the standardized input data, and a deep feature representation is obtained through a nonlinear activation function.
5. The defect analysis method based on pipeline butt weld radiographs according to claim 4 is characterized in that: The step of inputting the standardized input data into the self-organizing map layer in the self-learning defect analysis model to perform self-organizing map calculation to obtain a two-dimensional feature map matrix includes: Randomly sampling the standardized input data to obtain an initial weight vector set, and constructing a self-organizing map network according to the initial weight vector set; Calculate the Euclidean distance between each input sample and the network node according to the self-organizing map network to obtain the best matching unit; Performing Gaussian neighborhood function calculation on the best matching unit to obtain a local influence area, and updating the network weight according to the local influence area to obtain an optimized weight vector; Constructing a topology preserving mapping according to the optimized weight vector to obtain a low-dimensional manifold structure; Constructing a unified distance matrix according to the low-dimensional manifold structure, and calculating the similarity between nodes according to the unified distance matrix to obtain a similarity matrix; A hierarchical clustering analysis is performed on the similarity matrix to obtain a cluster tree structure, and an optimal cluster number is determined according to the cluster tree structure to obtain cluster labels, and the original feature space of the network nodes is reconstructed according to the cluster labels to obtain a two-dimensional feature mapping matrix.
6. The defect analysis method based on pipeline butt weld radiographs according to claim 4 is characterized in that: The step of constructing a time series feature sequence according to the multi-scale feature descriptor, inputting the time series feature sequence into the spatiotemporal correlation analysis layer in the self-learning defect analysis model, and performing feature processing through the long short-term memory network in the spatiotemporal correlation analysis layer to obtain a time dimension feature representation includes: Performing sliding window segmentation on the multi-scale feature descriptor to obtain a feature subsequence of fixed length, and calculating the difference between time steps based on the feature subsequence to obtain a feature variation sequence; Transforming the characteristic variation sequence to obtain a frequency domain characteristic representation, and extracting a main frequency component according to the frequency domain characteristic representation to obtain a frequency spectrum characteristic vector; The spectrum feature vector is concatenated with the feature subsequence to obtain an enhanced time series feature, and a long short-term memory network forward propagation calculation is performed on the enhanced time series feature to obtain a hidden state sequence; Calculate the attention weight according to the hidden state sequence to obtain a context vector, and fuse the context vector with the hidden state sequence to obtain a fused feature representation; The fused feature representation is subjected to residual connection and layer normalization to obtain normalized features, and the normalized features are analyzed through a full connection layer and an activation function to obtain a time dimension feature representation.
7. The defect analysis method based on pipeline butt weld radiographs according to claim 4 is characterized in that: The graph convolution operation is performed on the time dimension feature representation to obtain a spatial correlation feature graph, and topological structure information analysis and spectral clustering are performed according to the spatial correlation feature graph to obtain a feature subgraph set, including: Constructing a k-nearest neighbor graph for the time dimension feature representation to obtain an initial association graph structure, and calculating a graph Laplacian matrix according to the initial association graph structure to obtain a normalized graph Laplacian operator; Performing eigenvalue decomposition on the normalized graph Laplacian operator to obtain a graph spectral feature vector, constructing a graph convolution kernel based on the graph spectral feature vector, performing a convolution operation on the time dimension feature representation, and obtaining a spatial correlation feature graph; Performing nonlinear activation on the spatial correlation feature map to obtain an activated feature map, and calculating a similarity matrix between nodes based on the activated feature map to obtain a weighted adjacency matrix; Performing spectral clustering analysis on the weighted adjacency matrix to obtain an initial subgraph partitioning result, and calculating a modularity index based on the initial subgraph partitioning result to obtain a community structure evaluation score; The community structure evaluation score is iteratively optimized to obtain an optimal subgraph partitioning scheme, and the spatial association feature graph is segmented according to the optimal subgraph partitioning scheme to obtain a feature subgraph set.
8. A defect analysis system based on pipeline butt weld radiographs, characterized in that: The system is used to perform a defect analysis method based on a pipeline butt weld radiograph according to any one of claims 1 to 7, the system comprising: A processing module is used to digitally scan and process the pipeline butt weld radiographic film to obtain a film digital image, and to preprocess and enhance the film digital image to obtain a target film image; An analysis module is used to extract and calculate features of the target film image to obtain image feature data, and input the image feature data into a preset self-learning defect analysis model to perform defect analysis to obtain an initial defect analysis result; An evaluation module, used to perform defect property evaluation and quantitative analysis on the initial defect analysis results according to preset standard information, to obtain defect property data and defect equivalent, location and level information; A generation module is used to comprehensively process the defect property data and the defect equivalent, location and level information to obtain defect correction suggestions, and generate a rework schematic diagram and a defect analysis report based on the defect correction suggestions.
9. A defect analysis device based on pipeline butt weld radiographs, characterized in that: The defect analysis device based on pipeline butt weld radiographs comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the defect analysis device based on pipeline butt weld radiographs to execute the defect analysis method based on pipeline butt weld radiographs as described in any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the defect analysis method based on pipeline butt weld radiographs as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Seamless steel tube defect detection method and device based on machine vision and storage medium
CN119246811A
Control system, method, apparatus, medium and program product for a welding process
CN119512011A
Detection method, system and equipment for intelligent welding of pipe pile splicing and medium
CN119559382A
Detection Method, System, Equipment and Medium for Intelligent Welding of Pipe Pile Joint
CN119559382B
Urban drainage pipe network functional defect automatic identification and maintenance grading method and system
CN119693859A
