Pipeline magnetic flux leakage defect detection method and system
By constructing a continuous implicit neural field and using multi-view rendering technology, the problem of loss of three-dimensional defect information in existing technologies has been solved, realizing high-precision three-dimensional detection and feature extraction of pipeline defects, and improving the accuracy and generalization ability of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHEASTERN UNIV CHINA
- Filing Date
- 2026-04-28
- Publication Date
- 2026-05-29
AI Technical Summary
Existing deep learning methods compress three-dimensional defects into a two-dimensional plane for analysis, resulting in the loss of three-dimensional morphological information of defects and insufficient extraction of complex morphological features, which in turn leads to insufficient accuracy and generalization ability in defect detection.
By extracting global features based on multi-channel magnetic flux leakage detection signals, a continuous implicit neural field is constructed. Combined with multi-view rendering and geometric perception feature fusion processing, a three-dimensional detection result is generated, including defect category, geometric parameters and three-dimensional model.
It significantly improves the detection accuracy and model generalization ability of complex and irregular defects, and realizes accurate quantitative output of defect category, geometric parameters and three-dimensional model. It overcomes the loss of key depth information and the limitation of single viewpoint caused by two-dimensional plane compression in traditional methods.
Smart Images

Figure CN122109290A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pipeline inspection technology, and in particular to a method and system for detecting pipeline magnetic flux leakage defects. Background Technology
[0002] Pipelines are the main carriers for transporting oil and gas energy. During long-term use, they are susceptible to defects such as corrosion and cracks. Magnetic flux leakage (MF) detection technology is currently the most widely used non-destructive testing method for pipeline defects. Traditional MF detection relies on expert experience and uses manually designed features (such as peak value, wave width, and slope) for defect identification, which is inefficient and highly subjective. In recent years, MF detection methods based on deep learning have gradually become mainstream. By converting one-dimensional signals into two-dimensional B-Scan images, features are automatically extracted using convolutional neural networks, improving the level of automation. However, existing deep learning methods have the following limitations: (1) They compress three-dimensional defects into a two-dimensional plane for analysis, losing key three-dimensional morphological information such as depth and sidewall slope; (2) They use a fixed single perspective, which cannot fully characterize anisotropic or complex morphological defects; (3) The model has limited generalization ability and a low recognition rate for irregular or composite defects that have not been seen before.
[0003] In summary, existing technologies cannot fully explore and utilize the three-dimensional spatial information contained in magnetic flux leakage detection data, which limits the accuracy and effectiveness of pipeline defect identification. Summary of the Invention
[0004] This application provides a method and system for detecting magnetic flux leakage defects in pipelines, which at least solves the problem in the prior art that the loss of three-dimensional morphological information and insufficient extraction of complex morphological features due to the compression of three-dimensional spatial defects to two-dimensional plane representation, resulting in insufficient accuracy and generalization ability of defect detection.
[0005] In a first aspect, this application provides a method for detecting magnetic flux leakage defects in pipelines, the method comprising: Global features are extracted based on the acquired multi-channel magnetic flux leakage detection signals; The global features and spatial coordinates are input into a three-dimensional field reconstruction network to construct a continuous implicit neural field, which is used to characterize the geometric shape of pipe defects in three-dimensional space. Based on the continuous implicit neural field, a view fusion feature is obtained by fusing multi-view rendering and geometric perception features. Based on the aforementioned perspective fusion features, a three-dimensional detection result is generated, which includes defect category, geometric parameters, and a three-dimensional model.
[0006] The above technical solution maps two-dimensional magnetic flux leakage signals to three-dimensional space by constructing a continuous implicit neural field to restore the geometric shape of the defect. Combined with multi-view rendering and geometric perception feature fusion mechanism, it realizes the complete representation of the three-dimensional morphological information of the defect and the full extraction of multi-dimensional features. Its beneficial effect is that it effectively overcomes the loss of key depth information and the limitation of single viewpoint caused by two-dimensional plane compression in traditional methods. It significantly improves the detection accuracy and model generalization ability of complex and irregular defects, and realizes the accurate quantitative output of defect category, geometric parameters and three-dimensional model.
[0007] Secondly, this application provides a pipeline magnetic flux leakage defect detection system, comprising: The feature extraction module is used to extract global features based on the acquired multi-channel magnetic flux leakage detection signal; The three-dimensional field reconstruction module is used to input the global features and spatial coordinates into the three-dimensional field reconstruction network to construct a continuous implicit neural field, which is used to characterize the geometric shape of pipe defects in three-dimensional space. The feature fusion module is used to obtain view fusion features based on the continuous implicit neural field through multi-view rendering and geometric perception feature fusion processing. The detection result generation module is used to generate a three-dimensional detection result based on the fusion features of the viewpoint. The three-dimensional detection result includes defect category, geometric parameters and three-dimensional model.
[0008] Thirdly, this application provides an electronic device comprising one or more processors and one or more memories, wherein at least one piece of program code is stored in the one or more memories, the program code being loaded and executed by the one or more processors to implement the operations performed by the pipeline magnetic flux leakage defect detection method.
[0009] Fourthly, this application also provides a computer-readable storage medium storing at least one piece of program code, which is loaded and executed by a processor to implement the operations performed by the pipeline magnetic flux leakage defect detection method.
[0010] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described methods for detecting pipeline magnetic flux leakage defects. Attached Figure Description
[0011] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a pipeline magnetic flux leakage defect detection method provided in this application embodiment. Figure 1 ; Figure 2 A flowchart illustrating a pipeline magnetic flux leakage defect detection method provided in this application embodiment. Figure 2 ; Figure 3 A flowchart illustrating a pipeline magnetic flux leakage defect detection method provided in this application embodiment. Figure 3 ; Figure 4 A flowchart illustrating a pipeline magnetic flux leakage defect detection method provided in this application embodiment. Figure 4 ; Figure 5 A flowchart illustrating a pipeline magnetic flux leakage defect detection method provided in this application embodiment. Figure 5 ; Figure 6 A flowchart illustrating a pipeline magnetic flux leakage defect detection method provided in this application embodiment. Figure 6 ; Figure 7 A flowchart illustrating a pipeline magnetic flux leakage defect detection method provided in this application embodiment. Figure 7 ; Figure 8 A flowchart illustrating a pipeline magnetic flux leakage defect detection method provided in this application embodiment. Figure 8 ; Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 10 This is a schematic diagram of a pipeline magnetic flux leakage defect detection system provided in an embodiment of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0015] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0016] Among related technologies, magnetic flux leakage (MF) internal detection technology is currently the most widely used non-destructive testing method for pipeline defects. Traditional MF detection relies on expert experience and uses manually designed features (such as peak value, wave width, and slope) for defect identification, which is inefficient and highly subjective. In recent years, MF detection methods based on deep learning have gradually become mainstream. By converting one-dimensional signals into two-dimensional B-Scan images and using convolutional neural networks to automatically extract features, the level of automation has been improved. However, existing deep learning methods mainly have the following limitations: (1) They compress three-dimensional spatial defects into a two-dimensional plane for analysis, losing key three-dimensional morphological information such as depth and sidewall slope; (2) They use a fixed single perspective, which cannot fully characterize anisotropic or complex morphological defects; (3) The model has limited generalization ability and has a low recognition rate for irregular or composite defects that have not been seen before. In summary, existing technologies cannot fully explore and utilize the three-dimensional spatial information contained in MF detection data, which limits the accuracy and effectiveness of pipeline defect identification.
[0017] To address the aforementioned technical problems, this application provides a pipeline magnetic flux leakage defect detection method. Specifically, it extracts global features based on the acquired multi-channel magnetic flux leakage detection signals, inputs the global features and spatial coordinates into a three-dimensional field reconstruction network to construct a continuous implicit neural field, and obtains perspective fusion features based on the continuous implicit neural field through multi-view rendering and geometric perception feature fusion processing, ultimately generating a three-dimensional detection result. This method at least solves the problem in the prior art where compressing three-dimensional spatial defects to a two-dimensional plane representation leads to the loss of three-dimensional morphological information of defects and insufficient extraction of complex morphological features, resulting in insufficient accuracy and generalization ability of defect detection.
[0018] The application scenarios of the technical solutions provided in the embodiments of this application are described below.
[0019] The pipeline magnetic flux leakage defect detection method provided in this application can be widely applied to various pipeline facilities that require regular maintenance and inspection, such as oil and gas transmission pipelines, chemical pipelines, and urban water supply networks. As pipelines age, defects caused by corrosion, cracks, and mechanical damage become increasingly prominent. If these defects are not detected and accurately assessed in a timely manner, they can easily lead to serious safety accidents such as leaks and explosions. Therefore, high-precision and high-reliability non-destructive testing of pipelines is a crucial step in ensuring their safe operation.
[0020] In practical applications, a pipeline magnetic flux leakage detector (commonly known as a "smart pipeline pig") is typically used as the mounting platform. This detector integrates a high-precision magnetic flux leakage sensor array and can travel along the pipeline path. During its journey, the magnetic flux leakage sensor collects magnetic flux leakage signals from the pipeline surface and near the surface.
[0021] The detector transmits the acquired raw multi-channel magnetic flux leakage detection signals to the data processing device. The data processing device runs the pipeline magnetic flux leakage defect detection method provided in this application embodiment. First, it preprocesses the raw signal to extract global features; then, it uses a three-dimensional field reconstruction network to construct a continuous implicit neural field to restore the three-dimensional geometric shape of the defect; subsequently, it obtains view fusion features through multi-view rendering and geometric perception feature fusion; finally, it generates a three-dimensional detection result containing defect category, geometric parameters, and a three-dimensional model based on the view fusion features.
[0022] By applying the technical solution of this application, the problem of information loss in traditional two-dimensional detection methods can be overcome, the three-dimensional morphology of defects can be reconstructed with high fidelity, and the detection accuracy and generalization ability of complex and irregular defects can be significantly improved, providing a scientific and accurate basis for pipeline integrity assessment and maintenance.
[0023] After introducing the implementation environment and application scenarios of the embodiments of this application, the technical solutions provided by the embodiments of this application are described below. (See also...) Figure 1 A method for detecting magnetic flux leakage defects in pipelines, specifically including the following steps.
[0024] Step S101: Extract global features based on the acquired multi-channel magnetic flux leakage detection signal.
[0025] First, the raw multi-channel magnetic flux leakage (MFL) detection signals collected by the pipeline MFL detector are acquired. To eliminate baseline drift and noise interference, the raw signals are preprocessed and benchmarked. Then, the corrected signals are processed in parallel using multi-scale one-dimensional convolutional kernels to capture multi-level information ranging from local subtle fluctuations to global trends. Next, the multi-scale features are concatenated and segmented into sequences, and after adding positional encoding, they are input into a Transformer encoder for sequence context encoding, thereby obtaining a feature sequence with global context awareness. Finally, global average pooling is performed on this feature sequence to compress it into a fixed-dimensional global feature vector. This global feature vector contains deep semantic information about the presence of defects in the MFL signal, providing necessary constraints for subsequent 3D reconstruction.
[0026] Step S102: Input global features and spatial coordinates into the 3D field reconstruction network to construct a continuous implicit neural field.
[0027] The implicit neural field is used to characterize the geometric shape of pipe defects in three-dimensional space. Specifically, this step constructs a continuous implicit neural field, taking spatial coordinates and the global feature vector obtained in step S101 as inputs, and mapping them to a scalar value, such as the symbolic distance function (SDF) or spatial occupancy probability. To capture high-frequency geometric details, the spatial coordinates need to undergo high-frequency position encoding processing before being input into the network. This three-dimensional field reconstruction network is usually composed of a multilayer perceptron. By learning continuous mapping relationships, it is no longer limited by the resolution of discrete voxels and can characterize the geometric shape of defects at arbitrary resolutions. In addition, to ensure the smoothness and physical rationality of the reconstructed surface, physical regularization constraints, such as Eikonal constraints, are introduced during the construction process to force the gradient magnitude of the implicit field to approach a preset value, such as 1, making it approach a standard symbolic distance field, thereby ensuring that the generated geometric shape conforms to the real physical characteristics.
[0028] Step S103: Based on the continuous implicit neural field, multi-view rendering and geometric perception feature fusion processing are used to obtain view fusion features.
[0029] This step aims to transform a 3D implicit field into 2D observation features using differentiable rendering technology, and to achieve deep fusion of multi-view information. First, differentiable volume rendering integrals are used to simulate observations of a continuous implicit neural field from multiple preset virtual viewpoints: for each pixel ray in each viewpoint, samples are taken along the ray, and the attributes of the sampled points, such as volume density and color, are integrated to generate a corresponding 2D rendered image or feature map. This process is fully differentiable, allowing gradients to propagate back from 2D space to the 3D field. Subsequently, a convolutional neural network with shared weights is used to extract features from the generated multi-view images. Crucially, a geometrically perceptual attention mechanism is introduced to calculate the relative pose encoding between different viewpoints and modulate cross-viewpoint attention weights accordingly, thereby adaptively fusing feature information from different viewpoints. This fusion mechanism can dynamically focus on the most discriminative observation angle, effectively overcoming the problem of insufficient anisotropic feature representation under a single viewpoint.
[0030] Step S104: Generate 3D detection results based on viewpoint fusion features.
[0031] The 3D detection results include defect category, geometric parameters, and a 3D model. After obtaining viewpoint fusion features rich in 3D contextual information, parallel processing is performed through a task-decoupled recognition network. On one hand, the classification sub-network outputs the specific category probability of the defect, such as corrosion, cracks, and metal loss; on the other hand, the regression sub-network outputs the quantitative geometric parameters of the defect, including center position coordinates, 3D dimensions, and orientation angles. The 3D dimensions include length, width, and depth. Furthermore, using the implicit neural field trained in step S102, isosurfaces are extracted, for example using the Marching Cubes algorithm, to generate a visualized 3D triangular mesh model of the defect. This 3D triangular mesh model supports rotation and observation at any angle, realizing the transformation of detection results from qualitative judgment to quantitative 3D visualization.
[0032] This embodiment maps sparse leakage magnetic field signals into a continuous geometric representation in three-dimensional space by constructing a continuous implicit neural field. It then utilizes differentiable rendering and a geometrically perceptual attention mechanism to fuse multi-view observation information, achieving high-fidelity reconstruction of the three-dimensional morphology of defects and enhanced extraction of key features. Its advantages lie in effectively overcoming the problems of depth information loss and blind spots in single-view observation caused by two-dimensional plane compression in traditional methods. It significantly improves the detection accuracy and robustness for anisotropic and complex defects, while simultaneously achieving the joint output of defect categories, geometric parameters, and a three-dimensional visualization model, providing comprehensive and accurate data support for pipeline integrity assessment.
[0033] It should be noted that the above steps S101-S104 are a simplified description of the embodiments provided in this application.
[0034] In some embodiments, before extracting global features based on the acquired multi-channel magnetic flux leakage detection signal, the process further includes preprocessing and benchmark correction of the original signal.
[0035] In practice, the raw multi-channel magnetic flux leakage detection signals acquired by the pipeline magnetic flux leakage detector are first preprocessed. Due to the roughness of the pipeline inner wall, sensor vibration, and environmental electromagnetic interference, the raw signals usually contain baseline drift and noise.
[0036] The preprocessing specifically includes: First, using bandpass filters or wavelet thresholding denoising methods to filter out high-frequency noise and low-frequency baseline drift, while retaining the effective signal frequency band caused by defects; Second, performing baseline correction. To address the gain inconsistency or zero-point drift issues in different sensor channels, the signal statistical characteristics (such as mean or median) of the lossless region (i.e., defect-free segment) are used to normalize or shift the signal, eliminating signal baseline differences caused by non-defect factors, ensuring that the amplitude of the signal in each channel is at the same baseline, and providing a high-quality data source for subsequent feature extraction.
[0037] In some embodiments, the method provided in this application further includes: The training process optimizes network parameters by minimizing a total loss function, which includes classification loss, regression loss, rendering loss, and physical regularization loss. The classification loss is determined based on the difference between the predicted defect category and the true label; the regression loss is determined based on the difference between the predicted geometric parameters and the true annotation; and the rendering loss is based on the differentiable volume rendering results and the supervision data. The physical regularization loss is determined based on the deviation between the gradient magnitude of the implicit neural field and a preset value, so as to introduce physical regularization constraints to make the gradient magnitude of the implicit neural field approach the preset value.
[0038] In practice, an end-to-end approach is used to jointly train the 3D field reconstruction network and the subsequent detection network. The total loss function consists of four parts: classification loss, usually using the cross-entropy loss function, is used to measure the difference between the predicted defect category probability distribution and the real label, forcing the network to accurately identify the defect type; regression loss, which can use the Smooth L1 loss function, is used to calculate the deviation between the predicted geometric parameters, such as center coordinates and size, and the real label, ensuring the accuracy of geometric reconstruction; rendering loss is determined based on the difference between the differentiable volume rendering result and the supervised data, such as the difference between real multi-view images or feature maps, and the shape of the implicit field is optimized through backpropagation gradient to make its appearance consistent with the real defect; physical regularization loss is determined based on the deviation of the gradient magnitude of the implicit neural field from a preset value (usually 1). Specifically, Eikonal constraints can be introduced to force the spatial gradient magnitude of the implicit field to approach 1, thereby introducing physical regularization constraints to make the implicit neural field approach a standard signed distance field, avoiding non-physical distortions or breaks in the reconstructed surface.
[0039] The specific loss function is as follows: (1) Classification loss: determined based on the difference between the predicted result of the defect category and the true label. The cross-entropy loss function is usually used to force the network to accurately identify the defect type, such as corrosion, cracks, metal loss, etc.
[0040] (2) Regression loss: Based on the difference between the predicted results of geometric parameters and the actual annotations, the SmoothL1 loss function can be used to calculate the deviation between the predicted geometric parameters, such as center coordinates and size, and the actual annotations, to ensure the accuracy of geometric reconstruction.
[0041] (3) Rendering loss: determined based on the difference between the differentiable volume rendering result and the supervision data. Specifically, the mean square error between the multi-view 2D image generated by rendering and the real multi-view image is calculated. If there is a mean square error between them, the shape of the implicit field is optimized by backpropagating gradients to make its appearance consistent with the real defects.
[0042] (4) Physical regularization loss: As mentioned above, based on the deviation between the gradient magnitude of the implicit neural field and the preset value, Eikonal constraints are introduced to ensure the physical rationality of the geometric shape.
[0043] The total loss function is expressed as:
[0044] in, λi These are the weighting coefficients for each loss term. The mean squared error loss between the rendered image and the real multi-view image. For classification cross-entropy loss, To smooth the L1 loss during regression, The physical regularization loss is as described above, where, i It is an identifier for the loss term, used to distinguish different loss terms and their corresponding weight coefficients. i They are total, render, cls, reg, and eik, respectively.
[0045] Physical regularization loss By introducing the Eikonal constraint, the gradient magnitude of the implicit neural field is forced to approach a preset value, usually 1, so that it approaches a standard signed distance field.
[0046] Furthermore, considering the high cost and limited quantity of 3D labeled data, a two-stage strategy can be adopted in the training process: The first stage involves pre-training using a large amount of data without 3D ground truth. By designing self-supervised tasks, such as magnetic flux leakage signal reconstruction and multi-view rendering consistency constraints, the signal feature extraction network and the implicit 3D field reconstruction network are trained, enabling the network to learn general defect features and 3D geometric priors.
[0047] The second stage involves fine-tuning: using a small amount of data with detailed 3D annotations, such as 3D models of defects and geometric parameters, for fine-tuning. By fixing some pre-training parameters or using a small learning rate, end-to-end supervised optimization is performed on the entire network to further improve the model's detection accuracy and generalization ability on specific tasks.
[0048] This embodiment achieves a deep integration of data-driven and physical priors in the training process of deep learning models by constructing a multi-task total loss function that includes a physical regularization term for joint optimization. Its beneficial effect is that it can effectively guide the network to comply with the physical properties of the geometric field while fitting the observed data, avoiding non-physical distortions or fractures on the reconstructed surface, thereby significantly improving the accuracy and reliability of the three-dimensional reconstruction of pipeline defects.
[0049] The following will provide a more detailed explanation, using examples, of the extraction of global features based on the acquired multi-channel magnetic flux leakage detection signal provided in the embodiments of this application. (See also...) Figure 2 Specifically, it includes the following steps.
[0050] Step S201: Perform multi-scale parallel feature extraction on the multi-channel magnetic flux leakage detection signal to obtain multi-scale features.
[0051] In practice, a multi-scale feature extraction network with multiple parallel convolutional branches is constructed. Considering the diverse morphologies of pipeline defects, with micro-cracks and large-volume corrosion exhibiting different frequency characteristics in the signal, each convolutional branch employs a one-dimensional convolutional kernel of different sizes. For example, small-scale convolutional kernels, such as 1×3, are used to capture high-frequency abrupt changes in the signal, corresponding to the local texture of micro-defects; large-scale convolutional kernels, such as 1×15 or larger, are used to cover the low-frequency, gradually varying regions of the signal, corresponding to the macroscopic contours of large-area defects. The preprocessed multi-channel magnetic flux leakage detection signal is input into each convolutional branch, and each branch independently extracts local features within different receptive fields. Finally, these features are concatenated along the channel dimension to obtain a feature representation containing multi-scale information.
[0052] Step S202: Encode the multi-scale features into a sequence and add positional encoding to obtain the encoded sequence.
[0053] In practice, to model the long-range dependencies between features using sequence models, the multi-scale feature map obtained in step S201 is first flattened or segmented, converting it into a one-dimensional feature sequence. Simultaneously, considering that convolution operations have translation invariance but may lose the absolute positional information of features in the signal, which is crucial for defect localization, a positional encoding technique is employed. This technique uses sine and cosine functions to generate position vectors, or sets learnable positional embedding vectors, which are then added to the corresponding positions in the feature sequence to obtain an encoded sequence with positional awareness information.
[0054] Step S203: Process the sequence after adding position encoding through a sequence encoding network to obtain the feature sequence.
[0055] In practice, the encoded sequence is input into a sequence encoding network, which typically employs a Transformer encoder structure. The core of the Transformer encoder consists of a multi-head self-attention mechanism and a feedforward neural network. The self-attention mechanism calculates the correlation weights between elements in the sequence, thereby aggregating contextual information globally and effectively capturing long-range dependencies between features. Through stacked processing of multiple Transformer encoders, feature sequences with deep semantic features and global context awareness can be extracted.
[0056] Step S204: Pool the feature sequence to obtain global features.
[0057] In practice, to convert the variable-length feature sequence into a fixed-dimensional feature vector for input into the subsequent 3D field reconstruction network, pooling is performed on the feature sequence. Global average pooling is typically used, calculating the average value of the feature sequence in the time or spatial dimension and compressing it into a fixed-length vector. This vector is the global feature, which condenses the deep semantic information about the existence of defects in the magnetic flux leakage signal, serving as the conditional input for subsequent 3D reconstruction.
[0058] This embodiment extracts features from different receptive fields through multi-scale parallel convolution, combines positional encoding and Transformer sequence encoding for global context modeling, and finally uses pooling to obtain global features. This achieves deep fusion and unified representation of local details and global semantic information of the magnetic flux leakage signal. Its beneficial effect is that it can effectively capture multi-scale defect features in the signal and establish long-range dependencies between features, solving the problem of insufficient expression ability of single receptive field features in traditional methods, and providing high-quality prior conditions for subsequent high-precision three-dimensional field reconstruction.
[0059] In some embodiments, see Figure 3 Global features and spatial coordinates are input into a 3D field reconstruction network to construct a continuous implicit neural field, including: Step S301: Use the position coding function to perform high-frequency coding on the spatial coordinates to obtain the coded coordinates.
[0060] In practice, a positional encoding function is used to process the input three-dimensional spatial coordinates. Because multilayer perceptrons suffer from spectral bias in learning high-frequency signals, the input coordinates are insufficient to represent the fine geometric details of the defect surface. Therefore, a high-frequency sine and cosine function is used to map the low-dimensional spatial coordinates to a high-dimensional space, making it contain rich high-frequency components. This high-frequency positional encoding significantly improves the network's ability to fit high-frequency geometric features such as defect edges and corners, yielding coded coordinates.
[0061] Step S302: Fuse the encoded coordinates with global features and input them into the multilayer perceptron network.
[0062] In practice, the obtained coded coordinates are fused with the extracted global features. The global feature vector, as conditional information, provides prior knowledge about defects in the magnetic flux leakage signal, guiding the network to generate the geometric field of a specific defect. The fused feature vector is then input into a multilayer perceptron network. The multilayer perceptron network, acting as a fitter for implicit functions, learns the complex mapping relationship from input features to spatial geometric properties through its multilayer nonlinear structure.
[0063] Step S303: Map the scalar values corresponding to the output spatial coordinates through a multilayer perceptron network to construct a continuous implicit neural field.
[0064] The scalar values include symbolic distance values or occupancy probability values. In specific implementations, the multilayer perceptron network outputs the scalar value corresponding to the spatial coordinates. This scalar value is used to characterize the relationship between the spatial point and the geometric surface of the defect. Specifically, the scalar value can be a symbolic distance function value, representing the shortest distance from the point to the defect surface, where a positive value indicates the outside of the defect and a negative value indicates the inside of the defect; or it can be a spatial occupancy probability value, representing the probability density that the point belongs to the defect portion. By traversing the sampling points in three-dimensional space, the network outputs the scalar value for each point, thereby constructing a continuous, resolution-independent implicit neural field that characterizes the geometric morphology of the pipeline magnetic flux leakage defect in three-dimensional space.
[0065] In some embodiments, constructing a continuous implicit neural field specifically includes: First, an implicit field function is defined, which combines the spatial coordinates with the global feature vector extracted in step S101. h The mapping is to a scalar value, the symbolic distance function (SDF) value, or the spatial occupancy probability. To capture high-frequency geometric details, the spatial coordinates need to be processed by high-frequency position encoding γ(·) before being input into the network, mapping them to a high-dimensional space. The implicit field function is expressed as:
[0066] in, The high-frequency position coding function is expressed as follows:
[0067] This encoding can significantly improve the network's ability to fit high-frequency geometric features such as defect edges and corners.
[0068] Furthermore, to ensure the smoothness and physical plausibility of the reconstructed surface, physical regularization constraints are introduced during the construction process. Specifically, an Eikonal constraint is introduced to force the gradient magnitude of the implicit neural field to approach a preset value at spatial sampling points. This constraint is implemented through the Eikonal loss function:
[0069] Where Ω represents the set of points sampled in space and near the defect surface. Ns The total number of sampling points (H) represents the number of three-dimensional spatial points (H) randomly or strategically sampled in the pipe defect space and near the defect surface. A common value is 10⁴ to 10⁵. For the first i The three-dimensional spatial coordinates of each sampling point ( x , y (z), such as the axial / circumferential / radial direction of the pipe. for coordinates P i The three-dimensional gradient vector.
[0070] The Eikonal constraint makes the implicit field approximate a standard signed distance field, thereby avoiding non-physical distortions or breaks in the reconstructed surface and ensuring that the generated geometry conforms to the real physical properties.
[0071] This embodiment achieves continuous mapping from low-dimensional coordinates to high-dimensional geometric attributes and implicit representation of defect morphology by high-frequency encoding of spatial coordinates and fusing them with global features, and by using a multilayer perceptron to map the output scalar values to construct a continuous implicit neural field. Its beneficial effect is that it can effectively capture high-frequency details of the defect surface, overcome the shortcomings of traditional discrete representation methods such as voxels or point clouds that are limited by resolution and have large memory consumption, and thus reconstruct the complex three-dimensional geometric morphology of pipeline defects with high fidelity.
[0072] In some embodiments, see Figure 4 Based on the continuous implicit neural field, multi-view rendering and geometric perception feature fusion processing are used to obtain view fusion features, including: Step S401: Based on the continuous implicit neural field, perform differentiable volume rendering under multiple preset virtual camera perspectives to generate corresponding multi-view two-dimensional images.
[0073] In practice, a continuous implicit neural field is combined with a differentiable volumetric rendering integral to simulate observation of the continuous implicit neural field from multiple preset virtual perspectives. For each pixel ray in each perspective, samples are taken along the ray, and the attributes of the sampled points, such as volume density and color, are integrated to generate the corresponding two-dimensional rendered image or feature map. This process is fully differentiable, allowing gradients to propagate back from two-dimensional space to the three-dimensional field.
[0074] Step S402: Based on the multi-view two-dimensional image, feature extraction is performed through a feature extraction network with shared weights to obtain a multi-view feature map.
[0075] Subsequently, the generated multi-view 2D images are input into a convolutional neural network with shared weights. This network ensures that features from different viewpoints are aligned in the same feature space through shared weights, thereby extracting deep semantic features with viewpoint consistency and obtaining multi-view feature maps.
[0076] Step S403: Obtain the relative pose codes between each viewpoint pair using the pose parameters of each viewpoint.
[0077] In practice, based on the pose parameters of each virtual camera, such as position and orientation, the relative position and angle relationships between different viewpoints are calculated, and then converted into high-dimensional relative pose encoding vectors through a position encoding function.
[0078] Step S404: Construct a geometric relationship matrix based on relative pose encoding.
[0079] Based on these relative pose codes, a geometric relationship matrix is constructed. This matrix quantifies the correlation strength between features from different viewpoints in spatial geometry, and is used to guide the subsequent feature fusion process.
[0080] Step S405: Utilize the geometric relationship matrix to modulate the cross-view attention mechanism, and perform weighted fusion of multi-view feature maps to obtain view fusion features.
[0081] Finally, a cross-view attention mechanism is modulated using a geometric relation matrix. Specifically, the geometric relation matrix is used as an attention bias term to calculate the attention weights between features from different perspectives, thereby adaptively fusing feature information from different perspectives. The first step is to construct query, key, and value vectors:
[0082]
[0083]
[0084] in, W Q 、W K , W V These are the learnable projection matrices. The geometry-aware attention output is calculated as follows:
[0085] in, B It is a learnable bias matrix based on the geometric relationship matrix, used to introduce the relative pose relationship between viewpoints; d k denoted as the dimension of the key vector. This fusion mechanism can adaptively fuse feature information from different perspectives, dynamically focusing on the most discriminative observation angle, effectively overcoming the problem of insufficient anisotropic feature representation under a single perspective.
[0086] This embodiment achieves the conversion of three-dimensional implicit fields to two-dimensional features and the intelligent integration of multi-view information by rendering a differentiable volume of a continuous implicit neural field under a virtual perspective, extracting multi-view features using a shared weight network, and constructing a geometric relationship matrix by combining relative pose encoding to modulate a cross-view attention mechanism for weighted fusion. Its beneficial effect is that it can dynamically focus on the most discriminative observation angle, effectively overcome the problem of insufficient expression of anisotropic defect features under a single viewpoint, and significantly improve the detection accuracy and robustness of complex and irregular defects.
[0087] In some embodiments, see Figure 5Based on a continuous implicit neural field, differentiable volume rendering is performed under multiple preset virtual camera viewpoints to generate corresponding multi-view 2D images, including: Step S501: Based on the continuous implicit neural field, obtain light sampling points under multiple preset virtual camera perspectives.
[0088] In practice, multiple preset virtual camera viewpoints are first set in three-dimensional space to simulate the observation of pipeline defects from different directions. For each pixel in each viewpoint, a ray is emitted through that pixel. Along each ray, a layered sampling or uniform sampling strategy is used to sample in three-dimensional space, thereby obtaining a series of discrete ray sampling points. The position coordinates of these sampling points will serve as input data for querying the continuous implicit neural field.
[0089] Step S502: Based on the light sampling points, determine the density and color attributes of each sampling point.
[0090] Next, the three-dimensional spatial coordinates of each light sampling point are input into the constructed multilayer perceptron network. Based on the input spatial coordinates, the network outputs the density and color attributes corresponding to that point through a nonlinear mapping. The density attribute characterizes the probability or opacity of the spatial location belonging to the defect entity, and is a key parameter for reconstructing the defect geometry; the color attribute characterizes the optical features of the point under a specific viewpoint, and is used to assist in feature representation during the rendering process.
[0091] Step S503: Determine the image pixel values based on density and color attributes.
[0092] Subsequently, a differentiable volume rendering integral equation is used to perform cumulative integral calculations for all sampling points along each ray. Specifically, firstly, the weight of a sampling point is calculated based on its density attribute and the distance between adjacent sampling points; this weight reflects the degree of opacity attenuation of the ray as it passes through that point. Then, the color attribute of each sampling point is weighted and summed with its corresponding weight to calculate the image pixel value corresponding to that ray. This process is fully differentiable, ensuring that the gradient can propagate backward from the two-dimensional image level to the three-dimensional implicit neural field.
[0093] Step S504: Generate the corresponding multi-view two-dimensional image based on the image pixel values.
[0094] Finally, all pixel values calculated for each viewpoint are combined and arranged to generate a corresponding 2D rendered image. This process is repeated for all preset virtual camera views, ultimately resulting in a multi-view 2D image sequence that reflects the 3D geometry of the defect, providing a data foundation for subsequent multi-view feature fusion.
[0095] This embodiment utilizes a differentiable volume rendering technique that generates multi-view images by emitting rays to acquire sampling points from a virtual perspective, querying density and color attributes, and calculating pixel values through integration. This technique achieves continuous mapping and data conversion from a three-dimensional implicit field to a two-dimensional observation space. Its beneficial effect lies in its ability to decouple three-dimensional geometric information into multi-view two-dimensional features in a fully differentiable manner. This not only provides rich observation data for subsequent feature fusion but also ensures the accuracy and detail reproduction of the three-dimensional reconstruction through a gradient backpropagation mechanism.
[0096] In some embodiments, see Figure 6 Based on multi-view two-dimensional images, feature extraction is performed through a shared-weight feature extraction network to obtain multi-view feature maps, including: Step S601: Based on the multi-view two-dimensional images, obtain the image input from each viewpoint.
[0097] In practice, the first step is to acquire a sequence of multi-view 2D images generated during the differentiable volume rendering stage, and then treat each rendered image as an independent image input channel. These images correspond to preset virtual camera viewpoints, representing the geometric projection and texture information of the same defect in different orientations, providing multi-dimensional observation data for subsequent feature extraction.
[0098] Step S602: Based on the image input, determine the intermediate features through a feature extraction network with shared weights.
[0099] Subsequently, the images from each viewpoint are input into a feature extraction network with shared weights. This network typically employs a convolutional neural network structure, ensuring that the network can extract representations in the same feature space for images from different viewpoints by sharing network parameters, i.e., weights. This parameter-sharing mechanism eliminates the differences in feature distribution caused by changes in viewpoint, thereby obtaining intermediate features with viewpoint consistency.
[0100] Step S603: Based on the intermediate features, process them through multi-layer convolution and downsampling operations to determine the deep semantic features.
[0101] Next, deep processing of intermediate features is performed using multi-layer convolution and downsampling operations. By increasing the network depth and gradually expanding the receptive field, high-level abstract features that can characterize the morphology, contour, and internal structure of defects can be extracted. At the same time, the downsampling operation reduces the spatial resolution of the feature map, reducing the computational load while preserving key semantic information, and finally determining the deep semantic features from each perspective.
[0102] Step S604: Based on deep semantic features, combine the features extracted from each perspective to obtain a multi-view feature map.
[0103] Finally, the deep semantic features extracted from each perspective are structurally combined. Specifically, the feature maps from each perspective can be spliced or stacked along the channel dimension to form a high-dimensional tensor containing rich multi-view observation information, which is the multi-view feature map, laying the foundation for subsequent cross-view feature fusion.
[0104] This embodiment achieves unified representation and deep feature extraction of multi-view observation data by inputting multi-view two-dimensional images into a feature extraction network with shared weights, extracting deep semantic features through multi-layer convolution and downsampling, and combining them. Its beneficial effect is that it ensures the consistency and comparability of features from different perspectives, effectively aggregates complementary information from each perspective, and provides high-quality input for subsequent geometric perception feature fusion.
[0105] In some embodiments, see Figure 7 Based on viewpoint fusion features, 3D detection results are generated, including: Step S701: Input the perspective fusion features into the classification subnetwork and regression subnetwork in parallel to obtain the classification prediction results and regression prediction results.
[0106] The classification subnetwork outputs the probability distribution of defect categories. Specifically, the viewpoint fusion features, processed by geometric perception fusion, are used as shared input and simultaneously fed into both the classification and regression subnetworks. The classification subnetwork typically consists of several fully connected layers and a softmax activation function, used to perform high-dimensional mapping of features and calculate the probability that a defect belongs to different categories. This subnetwork outputs the probability distribution of defect categories, for example, distinguishing between types such as corrosion, cracks, and metal loss, and selecting the category with the highest probability as the final defect classification prediction result.
[0107] Step S702: Output the geometric parameters of the defect through the regression subnetwork. The geometric parameters include the center position, size and orientation angle.
[0108] Simultaneously, the regression subnetwork receives the same viewpoint fusion features and uses a regression algorithm to numerically predict the geometric properties of the defect. This subnetwork outputs quantitative geometric parameters of the defect, specifically including the defect's center position (axial coordinates, circumferential angle) in the pipeline coordinate system, its three-dimensional dimensions (length, width, depth), and the defect's extension direction angle. These parameters directly reflect the spatial morphology and size of the defect, providing crucial quantitative evidence for pipeline integrity assessment.
[0109] Step S703: Based on the constructed continuous implicit neural field, a three-dimensional visualization model is generated by extracting isosurfaces, and the three-dimensional detection results are obtained by combining probability distribution and geometric parameters.
[0110] Furthermore, using the continuous implicit neural field constructed and optimized in the previous steps, the zero isosurface or a specific threshold surface in the implicit field is extracted through isosurface extraction algorithms (such as the Marching Cubes algorithm) to construct a three-dimensional triangular mesh model of the defect, i.e., a three-dimensional visualization model. Finally, the determined defect category and the obtained geometric parameters are mapped onto this three-dimensional visualization model to generate the final three-dimensional detection result containing the defect category, geometric parameters, and three-dimensional morphology.
[0111] This embodiment achieves the joint output of defect attribute determination and three-dimensional morphological reconstruction by using the technique of parallel input of perspective fusion features into classification and regression subnetworks to obtain qualitative and quantitative parameters, and extracting isosurfaces from continuous implicit neural fields to generate a three-dimensional visualization model. Its beneficial effect is that it can simultaneously output the defect type, accurate geometric parameters and intuitive three-dimensional model, realize the multi-dimensional representation of the detection results, and significantly improve the readability and engineering application value of the detection results.
[0112] In some embodiments, see Figure 8 Based on the constructed continuous implicit neural field, a 3D visualization model is generated by extracting the zero isosurface, and combined with probability distribution and geometric parameters, the 3D detection results are obtained, including: Step S801: Based on the continuous implicit neural field, a three-dimensional mesh model is constructed through isosurface extraction.
[0113] In practice, a pre-defined isosurface extraction algorithm (such as the Marching Cubes algorithm) is used to traverse and compute the constructed continuous implicit neural field. Since the implicit neural field usually represents the defect geometry in the form of a signed distance function or occupancy probability, the processing device searches for and connects sampling points in space with function values of zero (or a specific threshold), converting these implicitly expressed surface information into an explicit set of triangular facets, thereby constructing a three-dimensional mesh model that can accurately represent the closed surface structure of the defect.
[0114] Step S802: Render the 3D mesh model to generate a 3D visualization model.
[0115] Subsequently, the graphics rendering engine is invoked to render the generated 3D mesh model. By setting virtual lighting conditions, material properties, and viewing angle, the abstract geometric mesh data is transformed into a 3D visualization model with realistic lighting effects and texture features. This 3D visualization model supports multi-angle rotation, scaling, and cross-sectional viewing, and can display the three-dimensional morphological characteristics of defects in the pipeline's 3D space.
[0116] Step S803: Map the defect category determined by the probability distribution to the geometric parameters and obtain the three-dimensional visualization model to obtain the three-dimensional detection results.
[0117] Finally, the defect categories (such as corrosion and cracks) determined by the classification subnetwork and the geometric parameters (such as center coordinates, length, width, and depth) predicted by the regression subnetwork are mapped and labeled to the corresponding positions in the 3D visualization model. By deeply integrating qualitative classification information, quantitative geometric parameters, and an intuitive 3D morphological model, structured 3D detection results are generated, achieving a multi-dimensional presentation of the detection results.
[0118] This embodiment achieves explicit reconstruction of the three-dimensional morphology of defects and integrated display of multi-dimensional information by extracting isosurfaces from implicit neural fields to construct a mesh, generating a visual model through rendering, and mapping categories and parameters. Its beneficial effect is that it can provide intuitive, three-dimensional detection results with quantitative parameters, significantly improving the intuitiveness of pipeline defect assessment and the comprehensiveness of decision support.
[0119] Figure 10 This is a schematic diagram of a pipeline magnetic flux leakage defect detection system provided in an embodiment of this application. See also... Figure 10 The pipeline magnetic flux leakage defect detection system 10 includes: a feature extraction module 1001, a three-dimensional field reconstruction module 1002, a feature fusion module 1003, and a detection result generation module 1004.
[0120] The feature extraction module 1001 is used to extract global features based on the acquired multi-channel magnetic flux leakage detection signal. In specific implementation, the module first preprocesses and corrects the baseline of the received original magnetic flux leakage detection signal to eliminate baseline drift and noise interference. Then, it uses multi-scale parallel convolution kernels to extract multi-scale features of the signal, encodes them into a sequence, adds position encoding, captures the long-distance contextual dependence of the signal through a sequence encoding network, and finally compresses them through pooling operations to obtain a fixed-dimensional global feature vector. This global feature vector contains deep semantic information about the existence of defects in the magnetic flux leakage signal.
[0121] The 3D field reconstruction module 1002 is used to input global features and spatial coordinates into the 3D field reconstruction network to construct a continuous implicit neural field. The implicit neural field is used to characterize the geometric shape of the pipeline defect in 3D space. Specifically, the module uses a position encoding function to perform high-frequency mapping of spatial coordinates, and then inputs the encoded coordinates and global features into a multilayer perceptron network. By learning the mapping relationship between spatial coordinates and scalar values, such as symbolic distance values or occupancy probability values, a continuous, resolution-independent 3D geometric field is constructed, thereby restoring the complex 3D morphology of the pipeline defect.
[0122] The feature fusion module 1003 is used to obtain view fusion features by fusing multi-view rendering and geometric perception features based on a continuous implicit neural field. The module performs differentiable volume rendering of the implicit neural field under multiple preset virtual camera views to generate multi-view two-dimensional images. Then, it uses a feature extraction network with shared weights to extract features from each view and constructs a geometric relationship matrix by calculating relative pose encoding. This modulates the cross-view attention mechanism and adaptively fuses complementary information from different views, effectively overcoming the limitations of single-view observation.
[0123] The detection result generation module 1004 is used to generate three-dimensional detection results based on viewpoint fusion features. The three-dimensional detection results include defect categories, geometric parameters, and a three-dimensional model. Specifically, this module inputs viewpoint fusion features in parallel into the classification sub-network and the regression sub-network to obtain the probability distribution of defect categories and the prediction of geometric parameters, respectively. At the same time, it uses the constructed continuous implicit neural field to generate a three-dimensional visualization model by extracting isosurfaces. Finally, it combines the categories, parameters, and model to output a complete three-dimensional detection result.
[0124] It should be noted that the pipeline magnetic flux leakage defect detection system provided in the above embodiments is only illustrated by the division of the above functional modules when detecting pipeline defects. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer equipment can be divided into different functional modules to complete all or part of the functions described above. In addition, the pipeline magnetic flux leakage defect detection system and the pipeline magnetic flux leakage defect detection method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0125] This application also provides an electronic device. Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0126] Typically, an electronic device 900 includes one or more processors 901 and one or more memories 902.
[0127] Processor 901 may include one or more processing cores, such as a quad-core processor, a hexa-core processor, etc. Processor 901 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 901 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 901 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 901 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0128] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 902 are used to store at least one computer program, which is executed by the processor 901 to implement the pipeline magnetic flux leakage defect detection method provided in the method embodiments of this application.
[0129] Those skilled in the art will understand that Figure 10 The structure shown does not constitute a limitation on the system and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0130] In addition, the device provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the pipeline magnetic flux leakage defect detection method provided in the above embodiments.
[0131] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement the pipeline magnetic flux leakage defect detection method provided in the above embodiment.
[0132] This embodiment also provides a computer program product. When the computer program product is run on a computer, it causes the computer to perform the above-mentioned related steps to realize the pipeline magnetic flux leakage defect detection method provided in the above embodiment.
[0133] In this embodiment, the system, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0134] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0135] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0136] The above description is only a specific implementation of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application.
Claims
1. A method for detecting magnetic flux leakage defects in pipelines, characterized in that, The method includes: Global features are extracted based on the acquired multi-channel magnetic flux leakage detection signals; The global features and spatial coordinates are input into a three-dimensional field reconstruction network to construct a continuous implicit neural field, which is used to characterize the geometric shape of pipe defects in three-dimensional space. Based on the continuous implicit neural field, a view fusion feature is obtained by fusing multi-view rendering and geometric perception features. Based on the aforementioned perspective fusion features, a three-dimensional detection result is generated, which includes defect category, geometric parameters, and a three-dimensional model.
2. The pipeline magnetic flux leakage defect detection method according to claim 1, characterized in that, The extraction of global features based on the acquired multi-channel magnetic flux leakage detection signal includes: Multi-scale parallel feature extraction is performed on the multi-channel magnetic flux leakage detection signal to obtain multi-scale features; The multi-scale features are encoded into a sequence and positional encoding is added to obtain the encoded sequence; The sequence after position encoding is processed by a sequence coding network to obtain a feature sequence; The feature sequence is pooled to obtain the global feature.
3. The pipeline magnetic flux leakage defect detection method according to claim 1, characterized in that, The step of inputting the global features and spatial coordinates into a three-dimensional field reconstruction network to construct a continuous implicit neural field includes: The spatial coordinates are then high-frequency encoded using a position encoding function to obtain the encoded coordinates; The encoded coordinates are fused with the global features and then input into a multilayer perceptron network. The scalar values corresponding to the spatial coordinates are mapped and output through the multilayer perceptron network to construct a continuous implicit neural field, wherein the scalar values include symbolic distance values or occupancy probability values.
4. The pipeline magnetic flux leakage defect detection method according to claim 1, characterized in that, Also includes: Training process; The training process optimizes the network parameters by minimizing the total loss function, which includes classification loss, regression loss, rendering loss, and physical regularization loss. The classification loss is determined based on the difference between the predicted defect category and the true label. The regression loss is determined based on the difference between the predicted results of the geometric parameters and the true annotations; The rendering loss is determined based on the difference between the differentiable volume rendering result and the supervision data; The physical regularization loss is determined based on the deviation between the gradient magnitude of the implicit neural field and a preset value, so as to introduce physical regularization constraints to make the gradient magnitude of the implicit neural field approach the preset value.
5. The pipeline magnetic flux leakage defect detection method according to claim 1, characterized in that, The process of fusing multi-view rendering and geometric perception features based on the continuous implicit neural field to obtain view fusion features includes: Based on the continuous implicit neural field, differentiable volume rendering is performed under multiple preset virtual camera perspectives to generate corresponding multi-view two-dimensional images. Based on the multi-view two-dimensional image, feature extraction is performed through a shared weight feature extraction network to obtain a multi-view feature map; The relative pose codes between each viewpoint pair are obtained by using the pose parameters of each viewpoint. Based on the relative pose encoding, a geometric relationship matrix is constructed; The geometric relationship matrix is used to modulate the cross-view attention mechanism to perform weighted fusion of the multi-view feature maps, thereby obtaining the view fusion features.
6. The pipeline magnetic flux leakage defect detection method according to claim 5, characterized in that, The step of performing differentiable volume rendering based on the continuous implicit neural field under multiple preset virtual camera perspectives to generate corresponding multi-view two-dimensional images includes: Based on the continuous implicit neural field, light sampling points are obtained from multiple preset virtual camera perspectives; Based on the light sampling points, the density and color attributes of each sampling point are determined; Based on the density and color attributes, determine the image pixel values; Based on the image pixel values, a corresponding multi-view two-dimensional image is generated.
7. The pipeline magnetic flux leakage defect detection method according to claim 5, characterized in that, The process of extracting features from the multi-view two-dimensional image using a shared-weight feature extraction network to obtain a multi-view feature map includes: Based on the multi-view two-dimensional images, image inputs from each viewpoint are obtained; Based on the image input, intermediate features are determined through a feature extraction network with shared weights; Based on the intermediate features, deep semantic features are determined through multi-layer convolution and downsampling operations. Based on the deep semantic features, the features extracted from each perspective are combined to obtain a multi-view feature map.
8. The pipeline magnetic flux leakage defect detection method according to claim 1, characterized in that, The generation of 3D detection results based on the viewpoint fusion features includes: The aforementioned perspective fusion features are input in parallel into the classification subnetwork and the regression subnetwork to obtain classification prediction results and regression prediction results; wherein, the probability distribution of defect categories is output through the classification subnetwork; The regression subnetwork outputs the geometric parameters of the defect, including the center position, size, and orientation angle. Based on the constructed continuous implicit neural field, a three-dimensional visualization model is generated by extracting isosurfaces, and the three-dimensional detection results are obtained by combining the probability distribution and geometric parameters.
9. The pipeline magnetic flux leakage defect detection method according to claim 8, characterized in that, The constructed continuous implicit neural field generates a 3D visualization model by extracting the zero isosurface, and combines the probability distribution and geometric parameters to obtain 3D detection results, including: Based on the continuous implicit neural field, a three-dimensional mesh model is constructed through isosurface extraction processing; The three-dimensional mesh model is rendered to generate a three-dimensional visualization model; The defect category determined by the probability distribution is mapped to the geometric parameters and then to the three-dimensional visualization model to obtain the three-dimensional detection result.
10. A pipeline magnetic flux leakage defect detection system, characterized in that, The system includes: The feature extraction module is used to extract global features based on the acquired multi-channel magnetic flux leakage detection signal; The three-dimensional field reconstruction module is used to input the global features and spatial coordinates into the three-dimensional field reconstruction network to construct a continuous implicit neural field, which is used to characterize the geometric shape of pipe defects in three-dimensional space. The feature fusion module is used to obtain view fusion features based on the continuous implicit neural field through multi-view rendering and geometric perception feature fusion processing. The detection result generation module is used to generate a three-dimensional detection result based on the fusion features of the viewpoint. The three-dimensional detection result includes defect category, geometric parameters and three-dimensional model.