Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Regarding the theory of non-contact magnetic memory detection, related researches on the technology of pipeline non-contact magnetic detection have been carried out as early as 1999 in Russian dynamic diagnosis company technology research and development center. In 2014, russian scholars Dobov propose a non-contact magnetic memory detection method, which can realize the detection of stress concentration areas of pipelines buried within a range of 3 meters, and has remarkable engineering application effect. Many russian companies use non-contact magnetic diagnostic techniques in the diagnosis of natural gas and petroleum pipelines. Among them, energodiagnostics, LLC RDC "Transkor-K" and CJSC NPC "Molniya" have own detection and analysis instrument combinations and detection guidance files approved by russian technical supervision (Rostekhnadzor). Pipeline safety problem diagnostics companies use this technology and combination instrumentation to conduct on-site inspections of hundreds of kilometers of Moscow distribution system wiring. Moscow energy diagnosis company performs metal magnetic memory non-contact detection on 24 km buried pipelines of Poland, and the measurement signals at the girth weld joint show areas with uneven magnetic field gradient distribution. Zhao Guoquan et al perform non-contact magnetic detection and diving exploration verification on a long pipeline on the sea floor 40km of the Bohai sea oil field, and perform defect grading on the detected magnetic abnormal part. A large number of engineering applications prove that the method can effectively detect the pipeline defects.
The non-contact weak magnetic detection is mainly aimed at a ferromagnetic pipeline developed metal magnetic memory signal detection method with a certain distance from a detection instrument (for example, detection of a buried pipeline magnetic field at the ground, remote detection of a submarine pipeline magnetic field and the like). The main magnetic signal characteristics for distinguishing the local stress concentration area and the deformation area of the pipeline at present are that the tangential component zero crossing point of the magnetic field intensity of the leakage magnetic field has the maximum value of the normal component gradient of the magnetic field intensity.
Liao Kexi et al adopts a magnetic sensor to measure three components of magnetic field intensity and gradient modulus of a pipeline along the x direction in a non-contact manner, performs gradient change region and extremum analysis on actual pipeline detection data, and analyzes the change characteristics of the magnetic field intensity in a girth weld stress concentration region by measuring the pipeline at 360 degrees. Li and the like predict the distribution characteristics of the earth leakage magnetic field (GMLF) based on a magnetic dipole theoretical model, and carry out a non-contact detection experiment on the buried pipeline, and the result shows that the position of the leakage magnetic field can be judged through the change of the gradient modulus of a magnetic field signal. Jarvis et al corrects the GML model of Li, introduces factors such as pipeline materials and the like as model correction factors, and improves the accuracy of model prediction.
Regarding the magnetic chromatography imaging detection theory, in recent years, the magnetic chromatography imaging detection has been widely applied to the safety evaluation of underground or underwater, submarine long-distance oil and gas pipelines, heating power and tap water pipe networks and other pipelines in view of the advantages of no pretreatment of the pipeline to be detected, simple operation, low requirements on the pipeline structure and the like. The feasibility and effectiveness of the magnetic tomography pipeline detection method have been proved by a large number of industries, and have been put into commercial use since 2002, so far, the magnetic tomography pipeline detection method has been successfully applied to underground and underwater pipeline investigation of more than 2 ten thousand kilometers in more than 10 countries of Russian federal, china, england, united states and the like, and the detection efficiency and reliability level are not lower than 87%.
The magnetic layer imaging technology is applied to the remote detection of submarine pipeline which cannot be pigged in arctic regions by S.Kamaeva et al, and the result shows that the detection of the pipeline by the method can not only remotely identify the abnormal region of the metal defect, but also record the mechanical stress level under the condition of considering the actual load. Dan Weiguo and the like respectively collect magnetic field intensity data of the buried pipeline on the ground by using a magnetometer, and an underwater robot carrying a magnetic layer analysis imaging detection probe measures magnetic field signals of the underwater pipeline to detect the II-level and III-level magnetic anomaly areas at 15 positions. Guo Shoushuai and the like detect a plurality of oil delivery pipelines of an oil extraction plant by adopting a magnetic tomography detection method, and detect that the defect types are metal corrosion defects through on-site excavation and comparison verification of detection results, wherein the defect positions meet the requirement of precision indexes. Zhang Shaochun and the like detect defects of the small-caliber buried natural gas pipeline in the mountain by adopting a magnetic tomography detection technology, identify a magnetic anomaly region by quantitative and qualitative analysis, and verify engineering effectiveness of the method by field excavation. Zhu Hongdong, and the like, apply the magnetic layer analysis imaging detection technology to the stress concentration area detection of landslide pipelines in mountain areas, and perform gradient change analysis on the acquired magnetic signals to judge the magnetic anomaly areas of the pipelines. Sun Changbao et al of Zhonghai oil clothes carry out magnetic layer analysis imaging detection to the submarine high risk pipeline section of Zhonghai oil cliff city, and magnetometer detection data is transmitted to a remote control system through an underwater data acquisition unit, carries out defect grading on a magnetic anomaly part, and can effectively detect a pipeline high risk area. The horizontal offset distance between the magnetometer and the pipeline is smaller than 1.5 times of the pipe diameter, and the distance from the ROV to the seabed is controlled to be 2-3 m. ASME B31G Specification, ASME-MTM Correlation software (MTMCS 2.0.0).
Meanwhile, researchers at home and abroad perform related theoretical research and experimental research on magnetic chromatography imaging pipeline detection. Liao et al explore the principle of magnetic chromatography imaging detection based on metal magnetostriction effect and pipeline magnetic field stress detection, and analyze the application range and technical characteristics of the technology by combining the measurement process and the result, thereby providing a reference basis for the safety level evaluation of pipeline detection. The unique relationship between stress and magnetization intensity is studied by the aid of the universal force, a force magnetic coupling model of a pipeline stress concentration area is established based on a Z-L model, and judging effects of the model on defect positions and depths are verified through experiments. Han researches the basic principle of pipeline magnetic detection under the non-excavation condition, simulates the buried pipeline environment to perform field detection, and excavates a certain pipeline on site to verify the reliability of the technology. Chen Guangming researches a magnetic layer analysis imaging detection data defect grade evaluation analysis algorithm, wherein the algorithm can evaluate the maximum allowable operating pressure and the residual service life of a pipeline according to the initial condition and the detection condition of the pipeline, and performs excavation verification on a certain domestic oil field, and the result shows that the method can detect various types of defects and has the accuracy of more than 85%. Magnetic layer imaging detection defines the stress characteristics of a pipe section by recording pipe magnetic field changes based on the anti-magnetostriction effect, but is less accurate when detecting pipe characteristics (e.g., pitting) with stress levels less than 5% of the Specified Minimum Yield Strength (SMYS). Jabbar Mirzoev a methodology for developing an effective pipeline integrity management plan is described based on the DCVG/CIPS/MTM findings of the Gazprom pipeline.
The magnetic chromatography imaging pipeline detection signal is a weak magnetic field signal, is more easily interfered by surrounding ferromagnetic environment to influence the detection effect, and in order to reduce the influence of surrounding magnetic media on the magnetic chromatography imaging pipeline detection result, zhichao Li and the like of the university of wawei in the United kingdom evaluate defects and pipeline surrounding magnetic field disturbance caused by ferromagnetic objects, an anisotropic magneto-resistance (AMR) sensor array is designed for detecting the defects, the influence of magnetic field interference signals is reduced, and the relation between the defect detection rate and the detection distance is provided.
As shown in fig. 1 and 2, the magnetic layer analytical imaging (MTM) detection principle is based on the verali effect, and a pipeline is naturally magnetized by a geomagnetic field, and a magnetization curve may be distorted in a stress concentration area or a corrosion site. The magnetic chromatography imaging detection equipment remotely records a magnetic field from a pipeline when moving along the pipeline route, and a worker identifies the type, the position and the direction of a stress concentration area or a defect by analyzing detection data, ranks the dangerous degree and evaluates the safety state of the pipeline.
The MTM detection technology has the following requirements that the thickness of a pipe wall to be detected is at least 3mm, the inner diameter of the metal pipe is within the range of 56-1420 mm, the length of the pipe to be detected and the detection environment are not limited, and the magnetic field information detection of the metal pipe with the depth of 200-300 mm below the earth surface can be realized.
Pipeline defects are mainly divided into cracks and stress strains, wherein magnetic memory signals and crack depths are in nonlinear relation. The increasing rate of the characteristic value gradually decreases with increasing depth, but the characteristic value increases linearly with increasing width in linear relation to the crack width. The signal is positively correlated with stress and cracks are more sensitive to stress variations than welds.
For a data acquisition system based on magnetic gradient tensor, the system comprises a main control unit and peripheral circuits, an AD acquisition unit and 2 magnetic sensors. The system block diagram is shown in fig. 3.
The hardware design of the data acquisition system based on the magnetic gradient tensor ensures the real-time performance and resolution of the acquisition of each channel of the AD chip, which greatly influences the accuracy of the magnetic gradient tensor. The power supply unit should be able to provide a voltage of + -12 v and a voltage required by the main control unit. The storage unit is used for storing the magnetic data acquired during the operation so as to facilitate the subsequent data processing. The communication unit adopts the RS-232 level to improve the anti-interference performance and the transmission distance.
The software aspect of the magnetic guidance system based on the magnetic gradient tensor should provide instructions to alter the sampling rate to accommodate the needs of different work tasks. While the storage unit should support a file system to facilitate exporting data in the PC.
In addition, the accuracy of the magnetic gradient tensor system measurement is severely affected by single magnetic sensor system errors and misalignment errors between the sensor arrays. Therefore, in order to obtain accurate tensor measurement output, an integrated mathematical model of systematic errors such as single magnetic sensor zero drift, scale factors, non-orthogonal angles and the like and misalignment errors among multiple sensor shafting needs to be established. Specifically, the magnetic gradient tensor system correction concept can be divided into two steps, namely, a first step of correcting the system error of a single magnetic sensor, and a second step of correcting the misalignment error of a sensor array and geomagnetic steering difference. And then calculating a coefficient matrix in the model by using a meta heuristic algorithm, and finally completing system correction.
The magnetic layer analytical imaging detection is a pipeline detection method based on a metal magnetic memory theory, and under the action of a geomagnetic field, a stress concentration area is formed at a corrosion part and a defect part when the pipeline bears external load, a magnetic abnormal shape is shown in a magnetic memory signal, and the position and the type of the stress concentration area can be judged and determined by analyzing the abnormal part of the magnetic signal. The method is a passive detection mode for natural magnetization of the pipeline by using the geomagnetic field, does not need complex preparation work and manual excitation before detection, is easy to operate, and can detect damage, welding lines, defects and other stress concentration areas within a range of 15 times of the inner diameter of the pipeline body. If the precision of the detecting instrument is improved and the interference signal of the surrounding magnetic field is reduced, more types of defects and even stress concentration initial formation areas can be detected. Compared with other pipeline external detection methods, the magnetic layer imaging method has more measurable defect types, is more convenient to apply and has wider development space.
Magnetic layer analytical imaging (MTM) pipeline external detection is based on the reverse magnetostriction effect of a metal pipeline under the natural magnetization effect of a geomagnetic field, so that magnetic field signals of a stress concentration area are abnormal to those of a normal area, and the magnetic signals are measured, processed and analyzed at a certain distance outside the pipeline by using a detector, so that the identification and analysis of the stress concentration area of the pipe fitting are realized. The method overcomes the defect of internal detection to a certain extent, and can be used as an important supplementary means for the detection in the pipeline. The magnetic tomography detection principle is based on the Violet effect, the pipeline is magnetized naturally by the geomagnetic field, and a magnetization curve can be distorted in a stress concentration area or a corrosion position. The magnetic chromatography imaging detection equipment remotely records a magnetic field from a pipeline when moving along the pipeline route, and a worker identifies the type, the position and the direction of a stress concentration area or a defect by analyzing detection data, ranks the dangerous degree and evaluates the safety state of the pipeline.
Magnetic layer analytical imaging (MTM) detection principle is based on the Viril effect, a pipeline is naturally magnetized by a geomagnetic field, and a magnetization curve can be distorted in a stress concentration area or a corrosion position. The magnetic chromatography imaging detection equipment remotely records a magnetic field from a pipeline when moving along the pipeline route, and a worker identifies the type, the position and the direction of a stress concentration area or a defect by analyzing detection data, ranks the dangerous degree and evaluates the safety state of the pipeline.
The embodiment provides a magnetic imaging identification method and magnetometer based on deep learning.
Magnetic signal characteristic identification based on neural network
In order to study the spatial distribution characteristics and the transmission rule of the magnetic memory signals in the stress concentration area of the pipeline, finite element analysis is needed to be carried out on the spatial distribution model of the magnetic field. The finite element analysis method is a complex mathematical problem approximation solution method based on differential and variation numerical analysis methods. For engineering electromagnetic field problems, the region can be discretized into multiple small cells for infinite approximation to the original region. And setting material parameters of each part, and iterating to obtain a magnetic field equation of each unit according to the Laplace equation. Because the leakage magnetic field generated by the stress concentration area and the crack area can be equivalently regarded as the magnetic field generated by magnetic dipoles with different sizes, the finite element simulation current-carrying coil model can be used as a physical model of the magnetic dipoles, and the spatial magnetic field distribution characteristics and the change trend of the equivalent magnetic field of the stress concentration area can be analyzed by combining a pipeline.
After finite element analysis and real data acquisition, filtering, calculating, extracting and analyzing characteristic quantity of magnetic gradient tensor of corrosion part and data characteristic of magnetic signal curve, and establishing characteristic data set of corrosion part of submarine cable pipeline. The data set is divided into a training set and a testing set, and is imported into a machine learning model. In recent years, the kernel extreme learning machine abandons the original ELM random feature mapping, and the stability and accuracy of the ELM are further improved by introducing kernel functions, so that the kernel extreme learning machine is widely focused. The kernel parameters and regularization coefficients need to be initialized for remembering before the dataset is trained, and then the kernel parameters and regularization coefficients are input into the model for training. And judging whether the termination condition is reached or not according to the global optimal fitness value updated by the meta-heuristic algorithm, and finally obtaining the optimal nuclear parameter and regularization coefficient, thereby realizing target pattern recognition. The specific flow is shown in fig. 4, and fig. 4 is a flow chart for identifying a magnetic anomaly pattern of pipe cable corrosion based on a neural network in the embodiment.
Scheme II, magnetic imaging identification based on deep learning
The magnetic gradient tensor data obtained through magnetic vector calculation contains the spatial position information and differential change of the magnetic target, so that noise can be well suppressed, and the magnetic gradient tensor data has higher information dimension. Multiple deep features of data can be mined by deep learning, magnetic targets can be identified automatically by combining magnetic gradient tensors, human intervention is reduced, and efficiency is improved greatly.
Firstly, filtering and spatial data interpolation are carried out on the acquired data, the problem of sparse measured data is solved, and encryption reconstruction of a magnetic map is realized. The magnetic source boundaries are then extracted using different combinations of magnetic gradient tensor components to enhance the information, including horizontal gradient methods (Total Horizontal Derivative, THDR), total gradient modeling (ANALYTIC SIGNAL Magnitude, ASM), which term is sometimes also referred to in the geophysics field as "Total Gradient Magnitude"), theta methods, and the like. The preprocessed data is pseudo-color coded to create a magnetic image dataset, wherein the image color represents intensity. And finally, training by using an improved R-CNN network, and further identifying the defects of the pipeline or the pipe cable. FIG. 5 is a schematic illustration of identification of a umbilical defect based on magnetic imaging. This flow describes a data processing and image detection procedure, as shown in fig. 5, by first generating interpolation data by the kriging interpolation method, starting from the original data. The data is then edge enhanced. The edge-enhanced data is then converted into a 640x640 pixel, 3 channel pseudo color coded image. Finally, the YOLO v5 model with a coordinate attention mechanism was used for detection. This process combines geostatistical methods (kriging interpolation), image processing techniques (edge enhancement and pseudo-color coding), and advanced deep learning models (YOLO v 5) for identifying specific objects or features in images in a detection task.
Fig. 6 is a flowchart of a magnetic imaging recognition method based on deep learning of the present embodiment. As shown in fig. 6, the magnetic imaging recognition method based on the deep learning includes the following steps:
s10, preprocessing the acquired magnetic field data to obtain encrypted and reconstructed magnetic map data;
Specifically, the collected magnetic field data is preprocessed, encrypted and reconstructed, and the step is beneficial to improving the data quality and ensuring the data safety. Preprocessing may include denoising, normalization, etc., while encryption reconstruction involves secure storage and transmission of data.
S20, calculating magnetic gradient tensor components based on the encrypted and reconstructed magnetic map data, and extracting magnetic field gradient characteristics by utilizing different combination methods of the magnetic gradient tensor components, identifying magnetic field abnormality information by analyzing the magnetic field gradient characteristics, wherein the magnetic field abnormality information represents a magnetic field intensity or gradient change area;
in particular, the calculation of the magnetic gradient tensor component based on the reconstructed magnetic map data is a key step, since the magnetic gradient tensor contains detailed information of the magnetic field variation. The magnetic gradient tensor typically comprises a plurality of components, such as ∂ Bx/∂ x, ∂ By/∂ y, etc., where B represents the magnetic induction and x, y, z represent the spatial coordinates. By analyzing different combinations of the components, rich magnetic field gradient characteristics can be extracted, and further abnormal magnetic field information can be identified. The magnetic field anomaly information typically presents localized variations in magnetic field strength or gradient that tend to correspond to the location of pipe defects.
After identifying the magnetic field anomaly information, the method uses the information to extract the magnetic source boundary from the encrypted reconstructed magnetic map data. The magnetic source boundary refers to the edge of the field anomaly region that spatially corresponds to the location of a potential pipe defect. The importance of this step is that it enables accurate localization of areas where defects may be present.
S30, combining the magnetic source boundary with the encrypted and reconstructed magnetic map data, and performing pseudo-color coding to establish a magnetic image data set, wherein the pseudo-color coding utilizes different colors to represent the changes of magnetic field intensity and magnetic field abnormality information;
In particular, pseudo color coding is a visualization technique that uses different colors to represent the changes in magnetic field strength and magnetic field anomaly information. For example, red may be used to represent high intensity areas, blue to represent low intensity areas, and yellow or green may be used to mark abnormal areas. The coding mode not only enhances the visual effect of the data, but also provides richer characteristic information for the subsequent deep learning model.
S40, training an improved region-based convolutional neural network R-CNN pipeline defect detection model by using the magnetic image data set, wherein the input of the pipeline defect detection model is a magnetic image, and the output is the position and the type of the pipeline defect;
s50, performing pipeline defect identification on the newly input magnetic image by using the trained pipeline defect detection model.
The method uses a modified R-CNN (Region-based Convolutional Neural Network) model for pipeline defect detection. R-CNN is an advanced target detection algorithm, which is improved by the invention to adapt to the characteristics of magnetic images. The training dataset is made up of the magnetic images generated by the previous steps, the input of the model is the magnetic image and the output is the location and type of pipe defect. Through training of a large amount of data, the model can learn the complex relationship between the magnetic field abnormality and the pipeline defect. Finally, the trained model is utilized to carry out defect identification on the new magnetic image, so that automatic and efficient pipeline defect detection is realized.
The method has the beneficial technical effects that firstly, through deep analysis and processing of magnetic field data, particularly calculation of magnetic gradient tensor components and extraction of magnetic gradient characteristics, the accuracy and the sensitivity of defect detection are greatly improved. And secondly, the application of the pseudo color coding technology not only enhances the visual effect of the data, but also provides richer characteristic information for the deep learning model, thereby being beneficial to improving the recognition capability of the model. And thirdly, the improved R-CNN model is adopted for defect detection, so that the latest progress of deep learning in the field of image recognition is fully utilized, and the accuracy and the efficiency of defect detection are remarkably improved. Finally, the method realizes full-process automation from data acquisition to defect identification, greatly reduces manual intervention, improves detection efficiency, and simultaneously reduces the possibility of human errors.
In some embodiments, step S10 may specifically include the sub-steps of:
s11, carrying out coordinate conversion on the acquired magnetic field data, converting the acquired coordinate system into a uniform geographic coordinate system, and obtaining magnetic field data under the uniform geographic coordinate system as magnetic field data after coordinate conversion;
in this step, magnetic field data acquired from different sources or at different times are unified into a standard geographic coordinate system. This is critical for the integration and subsequent analysis of the data. For example, some data may be collected based on a local coordinate system, while others may use GPS coordinates. By converting all data to a uniform geographic coordinate system (e.g., the WGS84 coordinate system), spatial consistency and comparability of all data points can be ensured.
S12, carrying out normalization processing on the magnetic field data after coordinate conversion to obtain normalized magnetic field data;
Normalization is the mapping of data into a fixed range, typically [0,1] or [ -1, 1]. This step helps to eliminate the effects of different units of measure or scales so that data from different sources can be directly compared. For example, a min-max normalization method may be used (x-min (x))/(max (x) -min (x)), where x is the raw data value. The normalized data facilitates subsequent processing and analysis, particularly when machine learning algorithms are applied.
S13, performing trend removal processing on the normalized magnetic field data to obtain trend-removed magnetic field data;
the trending process may remove long-term trends or systematic variations in the data, highlighting local anomalies or fluctuations. This is particularly important for identifying pipe defects, as defects often appear as localized magnetic field anomalies. The trending can be achieved by polynomial fitting or moving average. For example, a quadratic polynomial may be used to fit the overall trend, and then this trend is subtracted from the original data, leaving a residual of data that is detritus.
S14, performing filtering processing on the magnetic field data subjected to trend removal processing to obtain the magnetic field data subjected to filtering processing;
The filtering process is used for removing noise in the data and improving the signal quality. Depending on the specific case, different types of filters may be selected, such as a low-pass filter, a high-pass filter, or a band-pass filter. For example, a butterworth low pass filter may be used to remove high frequency noise, leaving the low frequency signal. The selection of the filtering parameters requires a trade-off between signal retention and noise removal to ensure that important defect information is not lost.
S15, performing spatial data interpolation on the magnetic field data subjected to the filtering processing by adopting a Kriging interpolation algorithm or an inverse distance weighted interpolation algorithm to obtain an interpolation result;
Spatial data interpolation is to estimate the values of unknown points between known data points to generate a continuous spatial distribution. The kriging interpolation is a geostatistical method that takes into account spatial autocorrelation and is applicable to irregularly distributed data points. The inverse distance weighted interpolation is based on the inverse relationship of distance, assuming that the closer the point the greater the impact. Which method is selected depends on the nature and distribution of the data. For example, for data with a distinct spatial structure, kriging interpolation may be more appropriate.
And S16, based on the interpolation result, improving the spatial resolution of the original magnetic field data, and obtaining the encrypted and reconstructed magnetic map data.
This step uses the interpolation results to increase the density of data points and improve spatial resolution. For example, if the raw data is acquired on a 10 meter-spaced grid, 1 meter-spaced high resolution grid data may be generated by interpolation. The encrypted and reconstructed magnetic map data not only can provide finer magnetic field distribution information, but also can provide richer input for subsequent image processing and deep learning models. The high resolution data helps to capture small scale magnetic field variations, thereby improving the accuracy of defect detection.
In some embodiments, step S16 specifically includes the following sub-steps:
S161, determining the spatial resolution and the data point density of the original magnetic field data;
s162, setting target spatial resolution to be at least 2 times of original resolution;
S163, calculating the number of data points to be increased based on the target spatial resolution, and ensuring that the number of data points in each unit area is increased by at least 4 times;
s164, creating new data points among the original data points by utilizing the interpolation result, wherein the value of the new data points is calculated according to a Kriging interpolation algorithm or an inverse distance weighted interpolation algorithm;
S165, adding the newly created data points into the original magnetic field data to form encrypted reconstructed magnetic map data;
S166, verifying whether the spatial resolution of the magnetic pattern data after encryption and reconstruction reaches an expected target, and if not, returning to the step S163 for adjustment;
And S167, outputting the final encrypted reconstructed magnetic image data.
In some embodiments, step S20 specifically includes the sub-steps of:
S21, calculating a magnetic gradient tensor component based on the encrypted and reconstructed magnetic map data, wherein the magnetic gradient tensor component comprises a horizontal gradient, a vertical gradient and a total gradient, the horizontal gradient comprises an x-direction gradient and a y-direction gradient, the vertical gradient is a z-direction gradient, and the total gradient is a vector sum of the three direction gradients;
s22, extracting magnetic field gradient characteristics by utilizing different combination methods of the magnetic gradient tensor components, wherein the combination methods comprise a horizontal gradient method THDR, a total gradient modeling method ASM and a Theta method, wherein the horizontal gradient method THDR is used for calculating the amplitude value of a horizontal gradient, the total gradient modeling method ASM is used for calculating the model of the total gradient in a three-dimensional space, and the Theta method is used for calculating the included angle between the total gradient and the horizontal gradient;
The horizontal gradient method (THDR) is a method for calculating the magnitude of the magnetic field horizontal gradient. The method mainly considers the rate of change of the magnetic field in the horizontal plane, i.e. the gradient in the x and y directions. THDR has a calculation formula:
Where T represents the total magnetic field strength, ∂ T/∂ x and ∂ T/∂ y represent the partial derivatives of the magnetic field in the x and y directions, respectively. This method is particularly useful for highlighting the edge features of magnetic anomalies, helping to determine the horizontal position and boundaries of the magnetic body.
The total gradient model method (ASM) is a method of calculating the total gradient model in three-dimensional space, also called analytical signal amplitude method. ASM considers the change of magnetic field in three directions of x, y and z, and its calculation formula is:
wherein ∂ T/∂ z represents the partial derivative of the magnetic field in the vertical direction. The main advantage of this method is that it is insensitive to magnetization direction and can handle complex magnetization situations efficiently. The ASM method is particularly useful for enhancing the edge characteristics of magnetic anomalies, precisely locating the boundaries of magnetic bodies, and detecting deeply buried or weakly magnetic targets.
Theta is a method for calculating the angle between the total gradient and the horizontal gradient, which is commonly referred to as the tilt angle. The calculation formula is theta=arctan (∂ T/∂ z/THDR), wherein ∂ T/∂ z is a vertical gradient and THDR is a horizontal gradient. The Theta method combines horizontal and vertical gradient information and can provide spatial localization information of the magnetic body. This method is particularly useful for determining the depth and degree of inclination of a magnetic body, and is excellent in handling complex geologic formations and multiple source stacks.
S23, identifying magnetic field abnormality information by analyzing the magnetic field gradient characteristics, wherein the magnetic field abnormality information represents a change area of magnetic field intensity or gradient;
S24, extracting a magnetic source boundary from the encrypted and reconstructed magnetic map data by using the magnetic field abnormality information.
In some embodiments, step S23 specifically includes the sub-steps of:
s231, respectively setting a horizontal gradient amplitude value, a total gradient module and a threshold value corresponding to the included angle between the total gradient and the horizontal gradient;
This step involves thresholding three key magnetic field gradient features. The horizontal gradient amplitude reflects the rate of change of the magnetic field in the horizontal direction, the total gradient mode represents the overall rate of change of the magnetic field in three-dimensional space, and the included angle between the total gradient and the horizontal gradient reflects the spatial direction of the magnetic field change. The setting of the threshold is typically based on empirical values or statistical analysis. For example, the threshold for horizontal gradient magnitude may be set to average plus twice standard deviation, the threshold for total gradient modulus may be 1.5 times background value, and the included angle threshold may be set to 45 degrees. The choice of these thresholds requires a trade-off between detection sensitivity and false positive rate.
S232, marking the magnetic field gradient characteristics exceeding the corresponding threshold as a magnetic field abnormal region;
Specifically, this step compares the magnetic field gradient characteristics of each data point with the threshold set in step S231. If any feature exceeds its corresponding threshold, that point is marked as a potential field anomaly region. This process may be accomplished by creating a boolean mask in which points that exceed a threshold are marked 1 and other points are marked 0. For example, if the horizontal gradient magnitude at a point is 10 nT/m and the threshold is set to 8 nT/m, that point will be marked as abnormal. This method can quickly identify areas where pipe defects may exist.
S233, carrying out cluster analysis on the marked magnetic field abnormal region to obtain a clustered magnetic field abnormal region;
The purpose of cluster analysis is to combine spatially adjacent outliers into a larger outlier region. This may be achieved by algorithms such as DBSCAN (density based spatial clustering applying noise) or K-means. For example, when using the DBSCAN algorithm, the minimum number of points may be set to 5, and the neighborhood radius may be set to 2 meters, so that the number of abnormal points with a distance of less than 2 meters and not less than 5 may be grouped into one class. Cluster analysis helps to distinguish between a wide range of anomalies caused by a single defect and a dispersed anomaly caused by multiple small defects.
S234, determining the range and distribution information of each clustered magnetic field abnormal region;
Specifically, the step involves quantitatively describing each clustered abnormal region. The range information may include the area, perimeter, center coordinates, and the like of the abnormal region. The distribution information may then include shape characteristics (e.g., major axis to minor axis ratio), directionality, density, etc. of the anomaly region. For example, for an elliptical field anomaly, the anomaly has a major axis of 5 meters, a minor axis of 2 meters, and a center coordinate of (X, Y) (longitude, latitude). The main axis direction is 30 degrees north and east. The maximum field strength of this region was 500 nanotesla (nT) and the background field strength was 45000 nanotesla (nT). The maximum horizontal gradient was 20 nanotesla/meter (nT/m), which occurs at the edges of the ellipse. The area of the anomaly is approximately 7.85 square meters. Based on the magnetic field signature estimates, the possible source of anomalies is buried at about 1.5 meters.
S235, generating magnetic field abnormality information comprising the range and distribution information of the clustered magnetic field abnormality regions;
Finally, the step integrates all the information obtained in the previous step into a comprehensive magnetic field abnormality information report. The magnetic field anomaly information report typically contains a number of key fields to fully describe the anomaly region detected. These fields include an anomaly ID as a unique identifier, a central coordinate (longitude and latitude) indicating the specific location of the anomaly region, an area representing the coverage (in square meters) of the anomaly region, maximum and background magnetic field strengths (both in nanotesla nT) reflecting the peak within the anomaly region and the average magnetic field strength of the surrounding normal region, respectively, maximum horizontal and total gradients (in nanotesla/meter, nT/m) describing the severity of the magnetic field change, gradient directions (in degrees, relative to the north direction) indicating the spatial direction of the primary magnetic field change, anomaly shape descriptions (e.g. "linear", "circular", "irregular", etc.) providing the geometry of the anomaly region, and finally estimating the depth of burial (in meters) to infer the possible anomaly source depth based on the magnetic field characteristics. This integrated information provides a detailed profile of magnetic field anomalies to pipeline inspectors, facilitating further analysis and decision-making.
Step S24 may specifically include the following sub-steps:
S241, selecting an edge detection algorithm based on magnetic field abnormality information comprising the range and distribution information of the clustered magnetic field abnormality regions;
specifically, in step S241, an appropriate edge detection algorithm is selected based on the range and distribution information of the magnetic field abnormality region obtained previously. For example, the Canny edge detection algorithm may be selected if the anomaly region exhibits a more regular shape (e.g., elliptical or circular), and the Sobel operator or LAPLACIAN OF GAUSSIAN (LoG) algorithm may be considered if the anomaly region is irregularly shaped or noisy. The algorithm is selected with consideration of the characteristics of the magnetic field gradients to ensure accurate capture of the boundaries of the magnetic field variations.
S242, applying the edge detection algorithm to the magnetic field abnormal region in the encrypted and reconstructed magnetic map data to obtain a magnetic field abnormal region with enhanced edge characteristics;
Specifically, in step S242, the selected edge detection algorithm is applied to encrypt the reconstructed magnetic pattern data in the previous step. This process highlights the edge features of the field anomaly region. For example, if the Canny algorithm is used, it will first gaussian smooth the image, then calculate the gradient magnitude and direction, then perform non-maximum suppression and dual threshold detection, and finally get a sharp edge. For magnetic field data, this means that regions of sharp changes in magnetic field strength can be more clearly identified, which generally correspond to the boundaries of the magnetic source.
S243, extracting the outline of the magnetic field abnormal region based on the magnetic field abnormal region with enhanced edge characteristics;
Specifically, step S243 involves extracting a specific contour from the region of the magnetic field anomaly that enhances the edge feature. This may be achieved by a contour tracking algorithm, such as the Moore-Neighbor algorithm (Moore-Neighbor) or the Suzuki algorithm (Suzuki). These algorithms will move along the edge pixels, registering successive edge points, and eventually forming a closed contour. For the field anomaly region, this means that a contour line can be obtained which accurately describes the shape of the anomaly region.
S244, optimizing the outline of the magnetic field abnormal region to obtain an optimized outline;
Specifically, this step performs an optimization process on the extracted contours, which may include a smoothing process to remove noise and small irregularities, or a polygonal approximation to simplify the contours. For example, the Douglas-Peucker algorithm (Douglas-Peucker) can be applied to reduce the number of contour points while maintaining the overall shape of the contour. For the field anomaly region, this step helps to eliminate contour irregularities caused by measurement errors or environmental disturbances, resulting in a smoother and more accurate boundary description.
And S245, determining the optimized contour as a magnetic source boundary.
Specifically, this step defines the processed profile as the final magnetic source boundary. For example, for a buried metal pipe, the optimized profile may be presented as an elongated oval with a long axis that coincides with the pipe run. This boundary not only provides a planar projection of the pipe location, but also provides a basis for estimating the pipe's burial depth and diameter, possibly by its shape and size.
In some embodiments, step S30 specifically includes the sub-steps of:
s301, determining a magnetic field intensity range in the encrypted and reconstructed magnetic map data;
Specifically, in step S301, the encrypted and reconstructed magnetic map data is analyzed, and the minimum value and the maximum value of the magnetic field intensity in the whole data set are determined, thereby obtaining the range of the magnetic field intensity. For example, assume that the analysis results show a magnetic field strength in the range of 20,000 nT to 60,000 nT (natto). This range information is crucial for subsequent color mapping, as it determines how the values are mapped to the color space.
S302, determining a first color mapping scheme for representing the magnetic field intensity change according to the magnetic field intensity range;
Specifically, in step S302, an appropriate color mapping scheme is selected to represent the change in magnetic field strength based on the magnetic field strength range determined in S301. For example, a gradient color scheme from blue (representing low intensity) to red (representing high intensity) may be selected. Specifically, 20,000 nT may be mapped to dark blue and 60,000 nT to dark red, with the intermediate values interpolated linearly to the corresponding color. This mapping scheme can intuitively show the spatial distribution of the magnetic field strength.
S303, determining a second color mapping scheme for representing the degree of magnetic field abnormality according to the magnetic field abnormality information;
Specifically, the step S303 involves designing another color mapping scheme for the degree of magnetic field anomalies. This scheme uses a different color system than the first scheme in order to clearly distinguish in the final image. For example, gradation from white (indicating no abnormality) to black (indicating a height abnormality) may be used. Or a gradual change from transparent to opaque may be selected, where transparency represents the degree of abnormality. Thus, when superimposed on the base layer, the abnormal region is more prominent.
S304, converting the magnetic source boundary into a magnetic source boundary vector image layer;
specifically, in step S304, the magnetic source boundary determined in the previous step is converted into a vector format. This may convert the sequence of boundary points into vector polygons or curves. For example, if the magnetic source is a buried metallic pipe, its boundaries may be represented as a series of connected straight line segments or Bezier curves, forming a closed polygon. This vector format allows the boundaries to remain clear at different scales and can be scaled and edited easily.
S305, applying the first color mapping scheme to the encrypted and reconstructed magnetic map data to generate a basic pseudo-color magnetic map;
Specifically, the step S305 applies the color mapping scheme determined in S302 to the encrypted reconstructed magnetic map data, generating a basic pseudo-color magnetic map. For example, using the blue-to-red gradient color scheme mentioned earlier, a low intensity region (e.g., 20,000 nT) would appear blue, a high intensity region (e.g., 60,000 nT) would appear red, and the intermediate intensity would appear as a corresponding transition color. The image thus generated can intuitively exhibit the magnetic field intensity distribution of the entire region.
S306, superposing the second color mapping scheme on the basic pseudo-color magnetic pattern to obtain a comprehensive pseudo-color magnetic pattern for highlighting the abnormal magnetic field region;
specifically, in step S306, the second color mapping scheme designed in S303 is superimposed on the basic pseudo color magnetic map generated in S305. If a gradual change in transparency is used, areas of high anomaly may be displayed in a darker color or with higher opacity over the base layer. For example, a strong field anomaly may appear as a dark gray or black region on a red background, while a slight anomaly may appear as a light gray. The superposition effect can effectively highlight the abnormal magnetic field area, and meanwhile, basic magnetic field intensity information is reserved.
S307, stacking the magnetic source boundary vector diagram on the comprehensive pseudo-color magnetic diagram to form an integrated magnetic diagram containing magnetic field intensity, magnetic field abnormality and magnetic source boundary information;
Specifically, the step S307 superimposes the magnetic source boundary vector map created in the step S304 on the integrated pseudo color magnetic map generated in the step S306. For example, the magnetic source boundary line may be drawn using a distinct contrasting color (e.g., bright yellow) to make it clearly visible in the background. Thus, the final integrated magnetic map contains three key information of magnetic field intensity (represented by basic color), magnetic field abnormality (represented by superimposed transparency or color) and magnetic source boundary (represented by clear outline).
S308, adding auxiliary information including a legend, a scale and a direction indication into the integrated magnetic diagram to obtain a complete magnetic diagram;
specifically, in step S308, necessary auxiliary information is added to the integrated magnetic pattern, making it a complete, interpretable magnetic pattern. Specifically, elements may be added that are a legend that explains the correspondence of color to magnetic field strength, and a method of representing the degree of abnormality, a scale that indicates the relationship of distance to actual geographical distance in the image, a direction indication that is a north-pointing arrow that helps determine the direction of the magnetic map, a title and description that include key information such as date, place, etc. The addition of such auxiliary information makes the magnetic map easier to understand and interpret, especially for non-professionals.
S309, carrying out the standardization processing of resolution and format on the complete magnetic image, and storing the complete magnetic image into a standard format to form a single standardized magnetic image;
specifically, step S309 involves converting the complete magnetic pattern into a standardized format and resolution. For example, the image may be uniformly converted to a resolution of 300 DPI and saved as a lossless compressed TIFF format. This normalization ensures consistent quality and compatibility of all generated magnetic patterns. Normalization may also include ensuring that all images have the same size scale, e.g., uniform A3 size. The magnetic image thus processed is convenient for storage, comparison and subsequent analysis.
And S310, sorting and labeling the generated plurality of standardized magnetic images to obtain a structured magnetic image data set.
Specifically, this step organizes all of the generated normalized magnetic images into one structured dataset. This may include creating a metadata file, recording key information for each image, such as date of measurement, geographic location, equipment used, anomaly, etc. For example, a CSV file may be created, with each row corresponding to a magnetic map, and columns including information such as file name, date of measurement, latitude and longitude coordinates, primary anomaly type, etc. This structured organization facilitates subsequent data retrieval, analysis, and machine learning applications.
In some embodiments, step S40 specifically includes the sub-steps of:
S401, preparing a training data set, wherein the training data set comprises a training set, a verification set and a test set;
s402, labeling the magnetic images in the training set, wherein labeling contents comprise positions and types of pipeline defects;
S403, designing a structure of a pipeline defect detection model based on an improved R-CNN;
s404, initializing parameters of the pipeline defect detection model and selecting pre-trained weights;
s405, training the pipeline defect detection model by using a training set, wherein the pre-training weight selected in the step S404 is utilized in the training process;
S406, after each training period is finished, evaluating the performance of the pipeline defect detection model by using the verification set to obtain performance evaluation results corresponding to a plurality of performance evaluation indexes, wherein the plurality of performance evaluation indexes comprise calculation accuracy, recall rate and average precision;
S407, according to the performance evaluation result of the verification set, adjusting the super parameters of the pipeline defect detection model, wherein the super parameters comprise a learning rate, a batch size and a training period;
S408, repeating the steps S405 to S407 until the performance of the pipeline defect detection model converges or a preset training period is reached;
S409, performing final test on the trained pipeline defect detection model by using the test set to obtain performance indexes of the model on the test set;
S410, if the test result does not meet the predetermined criteria, taking one or more of the following measures:
Returning to step S403, adjusting the structure of the pipeline defect detection model;
Returning to step S404, adjusting initialization parameters of the pipeline defect detection model;
Adjusting the training strategy, which includes changing the learning rate adjustment strategy or using a different optimizer in step S405, increasing or changing the performance evaluation index in S406, adjusting the range of the super parameter in step S407, and then repeating steps S405 to S409;
Specifically, changing the learning rate adjustment strategy in step S405 refers to dynamically adjusting the learning rate during model training using different methods. The learning rate is a critical superparameter that determines the step size of the model parameter update. The learning rate adjustment strategies include step decay (STEP DECAY), exponential decay (Exponential Decay), cosine Annealing (Cosine Annealing), and cyclic learning rate (CYCLICAL LEARNING RATES), among others. For example, the learning rate may be reduced by a certain proportion every certain training period by switching from a fixed learning rate strategy to a step decay strategy. Or may attempt to use a cosine annealing strategy that allows the learning rate to vary periodically during the training process, which may help the model jump out of the locally optimal solution. The purpose of changing the learning rate adjustment strategy is to find a learning rate variation that enables the model to converge faster and achieve better performance.
Specifically, using a different optimizer in step S405 refers to replacing the optimization algorithm used to update the model parameters. Optimizers include random gradient descent (SGD), adam, RMSprop, adaGrad, and the like. Each optimizer has its unique characteristics and applicable scenarios. For example, adam optimizers that can switch from the most basic SGD to an adaptive learning rate, adam is generally able to converge faster and less sensitive to the selection of the initial learning rate. Or may attempt to use AdamW an optimizer, which is a variant of Adam, that adds weight decay (WEIGHT DECAY) to improve the generalization ability of the model. Selecting different optimizers may affect the convergence speed of the model, the final performance, and the sensitivity to hyper-parameters. By trying different optimizers, the optimization method most suitable for the current problem and the data set can be found, so that the training effect of the model is improved.
S411, if the test result meets the preset standard, confirming that the trained pipeline defect detection model is obtained.
In some embodiments, the improved R-CNN pipeline defect detection model includes a feature extraction network, a region proposal network, a classification network, and a bounding box regression network;
the improved R-CNN (Region-based Convolutional Neural Network) is a deep learning model for target detection, which is improved on the basis of the original R-CNN to improve the detection efficiency and accuracy. In applications of pipeline defect detection, this model structure is adapted to the characteristics of the magnetic image and the characteristics of the pipeline defect. The model consists of four main components, each with its specific functions and roles.
A feature extraction network for extracting a useful feature map from an input magnetic image;
The feature extraction network is the fundamental part of the model, employing a pre-trained convolutional neural network (ResNet, VGG, or EFFICIENTNET) as the backbone network. This network receives as input the original magnetic image, and extracts the features of the image layer by layer through a series of convolution layers, pooling layers and activation functions. For pipeline defect detection, the feature extraction network may be fine-tuned to suit the particular nature of the magnetic image. For example, additional convolution layers may be added to capture subtle changes in magnetic field anomalies, or the convolution kernel may be sized to match the dimensions of typical defects. The output feature map contains rich space and semantic information, and provides a basis for subsequent detection tasks.
The regional proposal network RPN is used for sliding a window on the feature map output by the feature extraction network to generate a candidate region possibly containing pipeline defects;
The Regional Proposal Network (RPN) is a key innovation of the modified R-CNN, which slides a small window (3 x 3) on the feature map, generating multiple anchor boxes (anchors) of different sizes and aspect ratios for each location. The RPN uses two parallel fully connected layers, one for determining whether the anchor frame contains a target (here, a pipe defect) and the other for adjusting the position and size of the anchor frame. For pipe defect detection, the RPN may adjust the size and proportion of the anchor frame to match the shape of the typical defect. For example, for elongated fractures, more rectangular anchor boxes may be required, and for corrosion sites, more square anchor boxes may be required. The output of the RPN is a series of candidate regions that may contain pipe defects that are sent to subsequent classification and regression networks for further processing.
The classification network is used for classifying the candidate region generated by the RPN and determining whether the candidate region contains a pipeline defect and a specific defect type;
the classification network receives the candidate regions generated by the RPN and classifies each region. In the context of pipe defect detection, classification networks need to not only distinguish between background and defects, but also identify specific defect types, such as cracks, corrosion, deformation, etc. This is achieved by a series of fully connected layers, with the last layer outputting the probability of each category using a softmax activation function. In order to improve classification accuracy, attention mechanisms can be introduced into the network, so that the model focuses more on key characteristics of defects. For example, for crack detection, a spatial attention module may be designed to focus the model on linear structures, and for corrosion detection, a channel attention mechanism may be used to emphasize specific color or texture features.
And the bounding box regression network is used for adjusting the position and the size of the candidate region according to the feature map and the candidate region so as to more accurately position the defect type and the position of the pipeline defect.
The goal of the bounding box regression network is to fine tune the candidate regions generated by the RPN to more accurately frame the actual defect region. The network shares layers with the sorting network, but eventually outputs four values corresponding to the central coordinates (x, y) of the bounding box and the adjustment amounts of width and height, respectively. In pipe defect detection, conventional rectangular bounding boxes may not be accurate enough because the shape of the defect may be very irregular. Thus, the use of more complex shape representations, such as rotated bounding boxes or polygons, may be considered. For example, for curved cracks, a rotating bounding box may be used to better fit the defect shape, and for irregularly eroded areas, a series of point coordinates may be output to define a polygonal profile. The improvement can obviously improve the accuracy of defect positioning and provide more accurate information for subsequent defect evaluation and repair.
In some embodiments, step S50 specifically includes the following sub-steps:
s51, preprocessing a newly input magnetic image to enable the newly input magnetic image to meet the input requirement of a pipeline defect detection model;
Specifically, in this step, the newly input magnetic field data need to undergo a series of preprocessing operations to ensure that they conform to the input specifications of the trained pipeline defect detection model. The pretreatment comprises the following aspects:
Firstly, coordinate conversion is carried out, and an acquisition coordinate system is converted into a uniform geographic coordinate system, so that magnetic field data under the uniform geographic coordinate system is obtained. This step ensures that data acquired from different sources or at different times can be compared and analyzed in the same coordinate system.
And secondly, carrying out normalization processing on the magnetic field data after coordinate conversion. The normalization process can scale the data to a uniform range, which is helpful to eliminate numerical value differences caused by different acquisition devices or environmental conditions and improve the generalization capability of the model.
And performing trending treatment on the normalized magnetic field data. The step can remove the long-term change trend in the data, highlight local abnormal changes and is beneficial to detecting local pipeline defects.
Then, the magnetic field data after the trending processing is subjected to a filter processing. The filtering can reduce noise in the data, and improve the signal to noise ratio, so that potential defect signals are more obvious.
Then, spatial data interpolation is carried out on the magnetic field data after the filtering processing by adopting a Kriging interpolation algorithm or an inverse distance weighted interpolation algorithm. This step can fill in the gap in the data acquisition process, and provide a more continuous and complete magnetic field distribution image.
And finally, based on an interpolation result, improving the spatial resolution of the original magnetic field data, and obtaining the encrypted and reconstructed magnetic map data. This step can add detail information to the data, helping to detect smaller scale or finer pipe defects.
Through the above preprocessing steps, the raw magnetic field data is converted into high quality, standardized magnetic map data that is more suitable for input into a pipeline defect detection model for analysis and defect identification.
S52, inputting the preprocessed magnetic image into a trained pipeline defect detection model;
Specifically, the method inputs the preprocessed magnetic image into a previously trained pipeline defect detection model. Specific operations include converting image data into a format acceptable to the model, such as converting the image into tensor (tensor) form, and ensuring that the data type and dimensions match the input layers of the model. If batch processing (batch processing) is used to increase efficiency, it may be desirable to combine multiple images into one batch. Furthermore, if the model supports multi-scale detection, it may be necessary to generate an image pyramid, i.e. multiple different-sized versions of the same image, to detect defects of different sizes.
S53, obtaining an output result of the pipeline defect detection model, wherein the output result comprises predicted pipeline defect positions and types;
Specifically, after the model processes the input magnetic image, a prediction result is output. These results typically contain information of the bounding box coordinates (x, y coordinates of the upper left and lower right corners) of each defect detected, predictions of defect type (cracks, corrosion, distortion, etc.), and confidence scores for each prediction. For more complex models, the output may also include the exact contour (polygon or mask) of the defect. These raw outputs require further parsing and processing, e.g., converting the bounding box coordinates from relative coordinates to absolute pixel coordinates on the image, mapping the class index to the actual defect type name. For each detected defect, the model may output a number of possible categories and their probabilities, with the highest confidence category being selected as the final prediction.
S54, carrying out post-processing on the output result of the pipeline defect detection model, wherein the post-processing comprises non-maximum value inhibition and/or threshold value filtration to obtain a final pipeline defect detection result;
In particular, the post-processing step facilitates removing redundant and low confidence detection results at the original output of the refined model. Non-maximum suppression (NMS) is used to solve the problem of the same defect being detected multiple times. The NMS works on the principle that for overlapping detection frames, the one with the highest confidence is reserved and the other detection frames with the overlap above a certain threshold (e.g. IoU > 0.5) are deleted. This is particularly useful when dealing with densely distributed small defects. The threshold filtering is to delete the detection results with confidence below a certain preset value (e.g. 0.5) to reduce false positives. For pipe defect detection, the parameters of the NMS and threshold filtering may be adjusted according to the characteristics of different types of defects. For example, for a crack that is typically linear, a more relaxed NMS standard is required, while for a pitting corrosion, a more stringent standard is required. Furthermore, rule-based post-processing may be introduced, such as merging neighboring small defects, or filtering out unlikely defect combinations based on a priori knowledge.
And S55, visualizing and outputting the final pipeline defect detection result, wherein the final pipeline defect detection result comprises marking the position and the type of the detected pipeline defect on the original magnetic image.
Specifically, the last step is to present the processed detection result in an intuitive manner. This involves drawing annotations on the original magnetic image. In particular, rectangular boxes of different colors may be used to represent different types of defects, and the thickness of the boxes may be used to represent confidence in the detection. Next to each detection box, a text label may be added, displaying the defect type and confidence score. For more accurate defect contours, polygons or contours may be used for delineation. To enhance readability, a translucent color fill may be used to highlight the defective areas. Furthermore, legends may be added to the images to explain the meaning of the different colors and labels. For large-sized duct images, an interactive visual interface may be implemented that allows the user to zoom in on a particular area to view detailed information. Finally, a detailed report may be generated containing statistical information of the location, type, size, and severity of each detected defect, as well as an assessment of overall pipe health.
Fig. 7 is a cross-shaped magnetic gradient tensor sensor array of the present embodiment, and the magnetic layer analysis imaging detection MTM system is designed as follows, and the sensor adopts a cross-shaped geomagnetic three-component sensor array, so as to obtain magnetic gradient tensor data. The magnetic gradient tensor, the second derivative of the total magnetic field strength, can reflect the magnetic anomaly boundary changes. Compared with three-component magnetic sensor arrangement modes such as triangle, regular tetrahedron, the cross has the characteristics of higher precision and stronger anti-interference performance.
Fig. 8 is a diagram of an annular magnetic gradient tensor sensor array according to the present embodiment, in order to more attach to a pipeline to be detected and a submarine cable, thereby identifying a fine defect, three-component magnetic sensors may be arranged in an annular manner, so as to construct a magnetic gradient tensor array. Wherein the lower column of fig. 7 is an analog pipeline, and the black cuboid is a three-component magnetic sensor.
Fig. 9 is a non-magnetic XY axis slide rail of the present embodiment. Regardless of which array is used to collect data, the electromagnetic properties of the subsea umbilical must first be measured and the test should be kept as high as possible. Therefore, an nonmagnetic slide rail experiment platform is to be built, wherein the structural component is an aluminum alloy frame, and the fixing components such as bolts are all made of copper, so that the nonmagnetic slide rail experiment platform is ensured to minimize magnetic interference on the component to be tested. Finally, the scanning type data acquisition is carried out on an XY axis at a certain fixed height.
The embodiment also provides a magnetometer, which comprises:
The magnetic gradient tensor sensor array is used for collecting magnetic field data and comprises a plurality of three-component magnetic sensors for measuring three orthogonal components of a magnetic field;
The nonmagnetic XY axis sliding rail is used for supporting and moving the magnetic gradient tensor sensor array and comprises the following components:
A frame forming a main body structure of the slide rail;
a fixing member for connecting and fixing the portions of the frame;
the X-axis sliding mechanism and the Y-axis sliding mechanism are used for realizing the two-dimensional movement of the magnetic gradient tensor sensor array in a horizontal plane;
The control unit is electrically connected with the magnetic gradient tensor sensor array and the nonmagnetic XY axis sliding rail and is used for controlling the movement of the magnetic gradient tensor sensor array and the data acquisition;
And the data processing unit is electrically connected with the magnetic gradient tensor sensor array, and is used for receiving and processing the acquired magnetic field data and executing the magnetic imaging identification method based on the deep learning.
In some embodiments, the array of magnetic gradient tensor sensors is a cross-shaped array or a circular array. This design can provide a more comprehensive magnetic field gradient measurement. The cross-shaped array can measure magnetic field gradients in two orthogonal directions simultaneously, and provides richer spatial information. The annular array can conduct 360-degree omnibearing measurement around the pipeline or the submarine cable, and defect information of any angle is not omitted. Both configurations can significantly improve the accuracy and comprehensiveness of the detection, so that the system can capture defects in various directions and types, thereby improving the reliability of the detection.
In some embodiments, when the array of magnetic gradient tensor sensors is a circular array, its shape is adapted to the shape of the pipe or sea cable to be tested. This design takes into account the requirements of the actual application scenario. By matching the array shape to the shape of the object to be inspected, it is ensured that the sensor is maintained at an optimal distance and angle from the surface to be inspected, thereby obtaining an optimal signal quality. For example, for large diameter pipes, a larger annular array may be used, while for small diameter sea cables, a smaller annular array may be used. The adaptive design not only improves the detection precision, but also enhances the universality of the system, so that the system can adapt to detection objects with different sizes and shapes.
In some embodiments, the nonmagnetic XY axis slide rail further comprises a height adjustment mechanism for adjusting the height of the magnetic gradient tensor sensor array relative to the object to be measured. This functionality greatly enhances the flexibility and adaptability of the system. The height adjustment mechanism allows the operator to precisely adjust the distance between the sensor array and the surface being inspected for different inspection objects and environmental conditions. This is critical to optimizing signal strength and spatial resolution. For example, for a pipe with an uneven surface, the consistency of the measured data can be ensured by adjusting the height to maintain a consistent distance of the sensor from the pipe surface. In addition, the height adjustment can also help to avoid accidental contact of the sensor with the detection object, and protect the safety of the device.
In some embodiments, the magnetometer further comprises a display unit for displaying the magnetic image and the detection result. This design greatly improves the practicality and user friendliness of the system. The display unit can display the magnetic field distribution image and the defect detection result in real time, so that an operator can intuitively know the detection process and the detection result. This not only helps to quickly identify potential problem areas, but also helps the operator adjust the detection strategy based on real-time feedback. For example, if an abnormality is found in the signal of a certain area, the operator can immediately decide whether a more detailed scan is required or other action is taken. In addition, the display unit can be used for displaying advanced functions such as historical data comparison, trend analysis and the like, and provides powerful support for long-term monitoring and maintenance.
In some embodiments, the frame comprises an aluminum alloy frame and the fixture comprises a copper fixture. This material selection takes into account the special requirements of magnetic field detection. The aluminum alloy frame has the characteristics of light weight, high strength and corrosion resistance, and is very suitable for being used as a structural material of portable equipment. More importantly, the aluminum alloy is a non-magnetic material, so that the magnetic field measurement is not disturbed, and the accuracy of the measurement result is ensured. The copper fixing member is also non-magnetic and has good electrical conductivity and heat dissipation. These characteristics allow the copper mount to effectively reduce electromagnetic interference and help maintain a stable operating temperature of the sensor, thereby improving accuracy and reliability of the measurement. The material combination not only optimizes the performance of the equipment, but also prolongs the service life of the equipment, and is particularly suitable for long-term and stable magnetic field detection under various severe environments.
The embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as any one of the above.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. Of course, there are other ways of readable storage medium, such as quantum memory, graphene memory, etc. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The invention also provides electronic equipment. The electronic device comprises one or more processors and a storage device, wherein the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the method provided by the invention.
Referring now to FIG. 10, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 10 is merely an example, and should not impose any limitation on the functionality and scope of use of embodiments of the present invention.
As shown in fig. 10, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data required for the operation of the computer system 800 are also stored. The CPU801, ROM 802, and RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Connected to the I/O interface 805 are an input section 806 including a keyboard, a mouse, and the like, an output section 807 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like, a storage section 808 including a hard disk, and the like, and a communication section 809 including a network interface card such as a LAN card, a modem, and the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 810 as needed, so that a computer program read out therefrom is installed into the storage section 808 as needed.
In particular, the processes described in the main step diagrams above may be implemented as computer software programs according to the disclosed embodiments of the invention. For example, embodiments of the present invention include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the main step diagrams. In the above-described embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by the central processing unit 801.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, a computer readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present invention may be implemented in software or in hardware. The units described may also be provided in a processor, the names of these units in some cases not constituting a limitation of the unit itself.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.