Method and device for determining intersection-to-parallel ratio threshold value of pipeline magnetic flux leakage internal detection
By defining defects and calculating magnetization level values for detection data in the pipeline magnetic leakage, the intersection ratio threshold value of detection in the pipeline magnetic leakage is solved, and the problem of impacting detection accuracy in the existing technology is achieved, and a higher detection accuracy and positioning capability.
Patent Information
- Application Number
- CN202411323783.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art is difficult to quickly and accurately determine the cross-conference threshold in pipeline magnetic leakage detection, which affects the detection accuracy and positioning ability of the detection model.
通过获取漏磁内检测数据,进行缺陷标注,确定每个缺陷区域的磁化水平值,并根据这些值计算平均磁化水平值,最终确定管道漏磁内检测的交并比阈值。
It realizes the rapid and accurate determination of the intersection threshold of detection data in the magnetic leakage of different pipelines, and improves the detection accuracy and positioning capabilities of the detection model.
Smart Images

Figure CN119399107A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image detection technology, and in particular to a method and device for determining an intersection-and-combination ratio threshold value for pipeline magnetic flux leakage internal detection. Background Art
[0002] In recent years, with the rapid economic development, the use of oil and natural gas has continued to increase. However, when transporting oil and natural gas through pipelines, the pipelines may be threatened by material corrosion and external factors, resulting in increasing safety risks. Once the pipeline is damaged and oil and gas leaks, it will not only cause serious energy waste, but also cause serious pollution to the environment. Therefore, it is crucial to regularly inspect the pipeline to ensure its safe operation. In pipeline inspection, defect identification is a crucial step that can effectively detect potential damage sites. Designing an accurate defect identification algorithm is of great significance for the detection of actual projects.
[0003] Pipeline magnetic flux leakage internal detection is currently the most widely used pipeline non-destructive testing technology. Compared with other technologies, it has higher stability, detection efficiency and accuracy, and can perform well in complex environments. In recent years, magnetic flux leakage internal detection is often used in combination with machine learning algorithms to achieve the identification and location of pipeline defects. The intersection-over-union loss plays an important role in the training of defect detection models. The setting of the intersection-over-union threshold will have an important impact on the detection accuracy and generalization ability of the final detection model. In related technologies, the intersection-over-union threshold is usually set using a global threshold. Since the image of the magnetic flux leakage internal detection has certain noise and uncertainty, this will affect the setting of the intersection-over-union threshold, and thus affect the detection accuracy and positioning ability of the detection model.
[0004] Therefore, there is an urgent need for a method and device for determining the intersection-and-union ratio threshold of pipeline magnetic leakage internal detection, which can quickly and accurately determine the intersection-and-union ratio threshold corresponding to different pipeline magnetic leakage internal detection data, thereby improving the detection accuracy and positioning capability of the detection model. Summary of the invention
[0005] The embodiment of the present invention provides a method and device for determining an intersection-and-joint ratio threshold for pipeline magnetic flux leakage internal detection, which quickly and accurately determines the intersection-and-joint ratio threshold corresponding to different pipeline magnetic flux leakage internal detection data, thereby improving the detection accuracy and positioning capability of the detection model.
[0006] To achieve the above object, the embodiments of the present invention adopt the following technical solutions:
[0007] In a first aspect, a method for determining an intersection-and-joint ratio threshold value of pipeline magnetic flux leakage internal detection is provided, the method comprising: obtaining magnetic flux leakage internal detection data, the magnetic flux leakage internal detection data being magnetic flux leakage amplitude values of multiple sampling points of a target pipeline obtained by multiple sensors; performing defect marking on the magnetic flux leakage internal detection data to obtain defect data corresponding to each defect area of multiple defect areas of the target pipeline, the defect data being magnetic flux leakage amplitude values of multiple sampling points included in the defect area obtained by multiple sensors respectively; determining an average magnetization level value corresponding to the magnetic flux leakage internal detection data according to the defect data corresponding to each defect area in the multiple defect areas; and determining an intersection-and-joint ratio threshold value of pipeline magnetic flux leakage internal detection according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data.
[0008] In a possible implementation of the first aspect, determining an average magnetization level value corresponding to the magnetic flux leakage internal detection data according to defect data corresponding to each defect area in a plurality of defect areas includes: determining a magnetization level value corresponding to each defect area according to the defect data corresponding to each defect area in a plurality of defect areas; determining an average magnetization level value corresponding to the magnetic flux leakage internal detection data according to the magnetization level value corresponding to each defect area;
[0009] The formula for determining the magnetization level value GS corresponding to each defect area is:
[0010]
[0011] Among them, m is the number of sampling points included in each defect area, n is the number of sensors corresponding to each defect data, mid(x i ) is the median value of the leakage magnetic field amplitude of the m sampling points obtained by the i-th sensor, i is less than or equal to n;
[0012] The average magnetization level value GS corresponding to the leakage magnetic field detection data average The formula for determining is:
[0013]
[0014] Among them, B N is the preset batch quantity, GS i is the magnetization level value corresponding to the i-th defect area.
[0015] In a possible implementation manner of the first aspect, determining an intersection-over-union ratio threshold value of pipeline magnetic flux leakage internal detection according to an average magnetization level value corresponding to the magnetic flux leakage internal detection data, including: when the average magnetization level value corresponding to the magnetic flux leakage internal detection data is greater than or equal to a first preset threshold value, determining the intersection-over-union ratio threshold value of the pipeline magnetic flux leakage internal detection to be 0.75; when the average magnetization level value corresponding to the magnetic flux leakage internal detection data is less than a second preset threshold value, determining the intersection-over-union ratio threshold value of the pipeline magnetic flux leakage internal detection to be 0.5; when the average magnetization level value corresponding to the magnetic flux leakage internal detection data is less than the first preset threshold value and greater than or equal to the second preset threshold value, the intersection-over-union ratio threshold value IoU of the pipeline magnetic flux leakage internal detection is determined by a formula:
[0016]
[0017]
[0018] Among them, F max is the first preset threshold, F min is the second preset threshold, P r is the proportion of unqualified data in defective data, N f is the number of unqualified data in defective data, N all is the total number of defective data, and unqualified data is defective data with a peak signal-to-noise ratio less than a preset peak signal-to-noise ratio.
[0019] In a possible implementation manner of the first aspect, before determining the intersection-and-joint ratio threshold of the pipeline magnetic flux leakage internal detection according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data, the method further includes: determining a peak signal-to-noise ratio corresponding to each defect data; determining the number of unqualified data in the defect data according to the peak signal-to-noise ratio corresponding to each defect data;
[0020] Peak signal-to-noise ratio (PSNR) of the i-th defect data i The formula for determining is:
[0021]
[0022]
[0023] x i The magnetic flux leakage amplitude corresponding to the i-th sampling point obtained by the target sensor for obtaining the i-th defect data, x max is the maximum value of the leakage magnetic amplitude corresponding to the n sampling points obtained by the target sensor of the i-th defect data, is the average value of the leakage magnetic amplitude corresponding to the n sampling points obtained by the target sensor for the i-th defect data, the peak-to-valley value difference of the target sensor for obtaining the i-th defect data is the maximum value of the peak-to-valley value differences of multiple sensors for obtaining the i-th defect data, and the peak-to-valley value difference is the difference between the maximum and minimum values of the leakage magnetic amplitude corresponding to the n sampling points.
[0024] In a possible implementation of the first aspect, the method further includes: determining characteristic parameters corresponding to the leakage magnetic internal detection data, the characteristic parameters including the average peak-to-valley value difference, the average surface energy and the average volume energy; determining an image compression coefficient corresponding to the leakage magnetic internal detection data according to the characteristic parameters corresponding to the leakage magnetic internal detection data; processing the leakage magnetic internal detection data according to the image compression coefficient corresponding to the leakage magnetic internal detection data to obtain a color leakage magnetic internal detection image.
[0025] In a possible implementation of the first aspect, characteristic parameters corresponding to the leakage magnetic internal detection data are determined, including: determining the peak-to-valley value difference, surface energy and volume energy corresponding to each defect data included in the leakage magnetic internal detection data; determining the average peak-to-valley value difference as the ratio of the average value of the peak-to-valley value difference corresponding to each defect data to the maximum value of the peak-to-valley value difference corresponding to each defect data, determining the average surface energy as the ratio of the average value of the surface energy corresponding to each defect data to the maximum value of the surface energy corresponding to each defect data, and determining the average volume energy as the ratio of the average value of the volume energy corresponding to each defect data to the maximum value of the volume energy corresponding to each defect data.
[0026] In a possible implementation manner of the first aspect, a formula for determining an image compression coefficient CR corresponding to the magnetic flux leakage internal detection data is:
[0027] CR=A′ fg ×K fg +A′ s ×K s +A′ v ×K v ;
[0028] Among them, A′ fg is the average peak-to-valley difference, K fg is the peak-to-valley value difference weight coefficient, A′ s is the average surface energy, K s is the surface energy weight coefficient, A′ v is the average body energy, K v is the body energy weight coefficient.
[0029] In a possible implementation of the first aspect, the magnetic flux leakage internal detection data is processed according to an image compression coefficient corresponding to the magnetic flux leakage internal detection data to obtain a color magnetic flux leakage internal detection image, including: based on a grayscale mapping method, the magnetic flux leakage internal detection data is converted into a grayscale image; according to the image compression coefficient corresponding to the magnetic flux leakage internal detection data, the grayscale image is processed to obtain a color magnetic flux leakage internal detection image.
[0030] The beneficial effects of the present invention are as follows: the method provided by the present invention obtains the magnetic flux leakage internal detection data, and then marks the defects of the magnetic flux leakage internal detection data to obtain the defect data corresponding to each defect area of the target pipeline; the average magnetization level value corresponding to the magnetic flux leakage internal detection data is determined according to the defect data corresponding to each defect area in the multiple defect areas; the intersection-to-joint ratio threshold value of the pipeline magnetic flux leakage internal detection is determined according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data. In this way, the present invention can quickly and accurately determine the intersection-to-joint ratio threshold value corresponding to the magnetic flux leakage internal detection data of different pipelines, and then when the detection model is trained through the magnetic flux leakage internal detection data of different pipelines, the detection accuracy and positioning ability of the detection model can be effectively improved.
[0031] On the other hand, the method provided by the present invention can effectively remove image redundancy and improve the quality of image data by determining the image compression coefficient corresponding to the leakage magnetic internal detection data and compressing the leakage magnetic internal detection data according to the image compression coefficient corresponding to the leakage magnetic internal detection data.
[0032] In a second aspect, an embodiment of the present invention provides an apparatus for determining an intersection-and-joint ratio threshold value of pipeline magnetic flux leakage internal detection, the apparatus comprising: a data acquisition unit, used to acquire magnetic flux leakage internal detection data, the magnetic flux leakage internal detection data being magnetic flux leakage amplitude values of multiple sampling points of a target pipeline acquired by multiple sensors; a defect marking unit, used to mark defects on the magnetic flux leakage internal detection data, and obtain defect data corresponding to each defect area in multiple defect areas of the target pipeline, the defect data being magnetic flux leakage amplitude values obtained by multiple sensors respectively acquiring multiple sampling points included in the defect area; a magnetization determination unit, used to determine an average magnetization level value corresponding to the magnetic flux leakage internal detection data according to the defect data corresponding to each defect area in the multiple defect areas; and a threshold determination unit, used to determine an intersection-and-joint ratio threshold value of pipeline magnetic flux leakage internal detection according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data.
[0033] According to a third aspect, an electronic device is provided, comprising a memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the electronic device executes a method as in any implementation of the first aspect.
[0034] According to a fourth aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method in any implementation of the first aspect.
[0035] According to a fifth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is enabled to execute the method in any implementation of the first aspect.
[0036] It can be understood that the beneficial effects that can be achieved by the device of the second aspect, the electronic device of the third aspect, the computer-readable storage medium of the fourth aspect, and the computer program product of the fifth aspect provided above can be referred to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the hardware structure of an electronic device shown in an embodiment of the present invention;
[0038] Figure 2 A flow chart of a method for determining an intersection-to-parallel ratio threshold value for pipeline magnetic flux leakage internal detection according to an embodiment of the present invention;
[0039] Figure 3 A flow chart of another method for determining an intersection-to-parallel ratio threshold value for pipeline magnetic flux leakage internal detection shown in an embodiment of the present invention;
[0040] Figure 4 A flowchart of another method for determining an intersection-to-parallel ratio threshold value for pipeline magnetic flux leakage internal detection according to an embodiment of the present invention;
[0041] Figure 5 The figure is a schematic diagram of the hardware structure of a determination device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The technical solution in the embodiment of the present invention will be described below in conjunction with the accompanying drawings in the embodiment of the present invention. Among them, in the description of the present invention, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present invention is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the present invention, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items.
[0043] In addition, in order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit the difference.
[0044] Meanwhile, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way for easy understanding.
[0045] In recent years, with the rapid economic development, the use of oil and natural gas has continued to increase. However, when transporting oil and natural gas through pipelines, the pipelines may be threatened by material corrosion and external factors, resulting in increasing safety risks. Once the pipeline is damaged and oil and gas leaks, it will not only cause serious energy waste, but also cause serious pollution to the environment. Therefore, it is crucial to regularly inspect the pipeline to ensure its safe operation. In pipeline inspection, defect identification is a crucial step that can effectively detect potential damage sites. Designing an accurate defect identification algorithm is of great significance for the detection of actual projects.
[0046] Pipeline magnetic flux leakage internal detection is currently the most widely used pipeline non-destructive testing technology. Compared with other technologies, it has higher stability, detection efficiency and accuracy, and can perform well in complex environments. In recent years, magnetic flux leakage internal detection is often used in combination with machine learning algorithms to achieve the identification and location of pipeline defects. The intersection-over-union loss plays an important role in the training of defect detection models. The setting of the intersection-over-union threshold will have an important impact on the detection accuracy and generalization ability of the final detection model. In related technologies, the intersection-over-union threshold is usually set using a global threshold. Since the image of the magnetic flux leakage internal detection has certain noise and uncertainty, this will affect the setting of the intersection-over-union threshold, and thus affect the detection accuracy and positioning ability of the detection model.
[0047] Therefore, there is an urgent need for a method and device for determining the intersection-and-union ratio threshold of pipeline magnetic leakage internal detection, which can quickly and accurately determine the intersection-and-union ratio threshold of pipeline magnetic leakage internal detection, thereby improving the detection accuracy and positioning capability of the detection model.
[0048] In view of this, an embodiment of the present invention provides a method for determining an intersection-and-joint ratio threshold value of pipeline magnetic flux leakage internal detection, the method comprising: acquiring magnetic flux leakage internal detection data, the magnetic flux leakage internal detection data being magnetic flux leakage amplitude values of multiple sampling points of a target pipeline acquired by multiple sensors; performing defect marking on the magnetic flux leakage internal detection data to obtain defect data corresponding to each defect area of multiple defect areas of the target pipeline, the defect data being magnetic flux leakage amplitude values of multiple sampling points included in the defect area acquired by multiple sensors respectively; determining an average magnetization level value corresponding to the magnetic flux leakage internal detection data according to the defect data corresponding to each defect area in the multiple defect areas; and determining an intersection-and-joint ratio threshold value of pipeline magnetic flux leakage internal detection according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data.
[0049] The method provided by the embodiment of the present invention obtains the magnetic flux leakage internal detection data, and then marks the defects of the magnetic flux leakage internal detection data to obtain the defect data corresponding to each defect area of the target pipeline; determines the average magnetization level value corresponding to the magnetic flux leakage internal detection data according to the defect data corresponding to each defect area in the multiple defect areas; and determines the intersection-to-joint ratio threshold of the magnetic flux leakage internal detection of the pipeline according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data. In this way, the embodiment of the present invention can quickly and accurately determine the intersection-to-joint ratio threshold corresponding to the magnetic flux leakage internal detection data of different pipelines, and then when the detection model is trained through the magnetic flux leakage internal detection data of different pipelines, the detection accuracy and positioning ability of the detection model can be effectively improved.
[0050] On the other hand, the method provided by the embodiment of the present invention can effectively remove image redundancy and improve the quality of image data by determining the image compression coefficient corresponding to the leakage magnetic internal detection data and compressing the leakage magnetic internal detection data according to the image compression coefficient corresponding to the leakage magnetic internal detection data.
[0051] In some embodiments, the method for determining the intersection-and-parallel ratio threshold value of pipeline magnetic flux leakage internal detection provided by the embodiments of the present invention can be performed by an apparatus 100 for determining the intersection-and-parallel ratio threshold value of pipeline magnetic flux leakage internal detection (hereinafter referred to as the determination apparatus 100). As an example, the determination apparatus 100 can be any electronic device 200 with data processing capabilities, such as a general-purpose computer, a personal computer, a laptop computer, a switch or a tablet computer, etc. The specific implementation of the purchase list determination apparatus 100 is not limited here.
[0052] Figure 1 The hardware structure diagram of the electronic device provided by the embodiment of the present invention is shown. The electronic device 200 includes a processor 210, a memory 220 and a communication interface 230.
[0053] The processor 210 may include one or more processing cores. The processor 210 uses various interfaces and lines to connect various parts in the electronic device 200, and executes various functions and processes data of the electronic device 200 by running or executing instructions, programs, code sets or instruction sets stored in the memory 220, and calling data stored in the memory 220. Optionally, the processor 210 can be implemented in at least one hardware form of a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA).
[0054] The memory 220 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 220 includes a non-transitory computer-readable storage medium. The memory 220 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 220 may include a program storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a data acquisition function, a data processing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.
[0055] The communication interface 230 is used to communicate with other devices, equipment or communication networks, such as data storage devices, image processing equipment or Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0056] In physical implementation, the above-mentioned components (such as processor 210, memory 220 and communication interface 230) can be components in the same device (such as a laptop). Alternatively, at least two of the components can be set in the same device, that is, as different components in one device, such as a deployment method similar to devices or components in a distributed system.
[0057] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 200. In other embodiments of the present invention, the electronic device 200 may include more or fewer components than those illustrated, or combine certain components, or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0058] The following describes a method for determining an intersection-to-parallel ratio threshold for pipeline magnetic flux leakage internal detection provided by an embodiment of the present invention in conjunction with the accompanying drawings.
[0059] Figure 2 A flowchart of a method for determining an intersection-to-parallel ratio threshold value for pipeline magnetic flux leakage internal detection provided by an embodiment of the present invention. Optionally, the method can be Figure 1 The electronic device 200 shown is executed, that is, the determination device 100 is executed. The method may include the following steps:
[0060] S1. Obtaining magnetic flux leakage internal detection data, where the magnetic flux leakage internal detection data is magnetic flux leakage amplitudes of multiple sampling points of a target pipeline obtained by multiple sensors.
[0061] Specifically, the magnetic leakage internal detection device is provided with a plurality of sensors, and the magnetic leakage internal detection device moves radially along the target pipeline during operation. The target pipeline includes a plurality of sampling points, and the magnetic leakage internal detection data is the magnetic leakage amplitude of a plurality of sampling points obtained by each of the plurality of sensors.
[0062] For example, see Table 1, which is a data table of magnetic flux leakage internal detection data shown in an embodiment of the present invention. The magnetic flux leakage internal detection device is provided with 5 sensors, namely sensors 1-5, and the target pipeline includes 5 sampling points. The magnetic flux leakage internal detection data is the magnetic flux leakage amplitude of sampling points 1-5 obtained by each of the 5 sensors. Each column of the table corresponds to a sensor, and each row of the table corresponds to a sampling point. X11 is the magnetic flux leakage amplitude of sampling point 1 obtained by sensor 1.
[0063] Table 1
[0064] Sensor 1 Sensor 2 Sensor 3 Sensor 4 Sensor 5 Sampling point 1 X11 X12 X13 X14 X15 Sampling point 2 X21 X22 X23 X24 X25 Sampling point 3 X31 X32 X33 X34 X35 Sampling point 4 X41 X42 X43 X44 X45 Sampling point 5 X51 X52 X53 X54 X55
[0065] It should be understood that in different usage scenarios, the number of sensors and the number of sampling points set in the leakage magnetic field detection device can be more than the above examples. For example, the number of sampling points is usually tens of thousands or hundreds of thousands. The number of sampling points in the embodiment of the present invention can be of any order of magnitude. The above examples are only for the convenience of explanation, so the number of sensors is exemplified as 5 and the number of sampling points is exemplified as 5.
[0066] S2. Defects are marked on the leakage magnetic internal detection data to obtain defect data corresponding to each defect area in multiple defect areas of the target pipeline, where the defect data is leakage magnetic amplitudes obtained by multiple sensors at multiple sampling points included in the defect area.
[0067] Specifically, when there are multiple defective areas in the target pipeline, when the magnetic flux leakage internal detection device passes through the defective area, the magnetic flux leakage amplitudes corresponding to multiple sampling points included in the defective area acquired by multiple sensors are defect data.
[0068] In conjunction with Table 1, see Table 2, which is a data table of defect data included in the magnetic leakage internal detection data. Table 2 includes the magnetic leakage amplitudes corresponding to the sampling points 2-4 acquired by the sensors 1-3 in the magnetic leakage internal detection data.
[0069] Table 2
[0070] Sensor 1 Sensor 2 Sensor 3 Sampling point 2 40 50 70 Sampling point 3 50 55 40 Sampling point 4 60 60 70
[0071] It should be understood that the above examples of defect data are for illustration only, and the embodiments of the present invention do not impose any particular limitation on the number of leakage magnetic amplitudes included in the defect data. For example, the defect data may be the leakage magnetic amplitudes corresponding to 500 sampling points included in the defect area obtained by 50 sensors.
[0072] S3. Determine an average magnetization level value corresponding to the leakage magnetic field detection data according to the defect data corresponding to each defect area in the plurality of defect areas.
[0073] In one possible implementation, see Figure 3 The above S3 specifically includes the following steps:
[0074] S31 , determining a magnetization level value corresponding to each defect area according to defect data corresponding to each defect area among a plurality of defect areas.
[0075] Specifically, the formula for determining the magnetization level value GS corresponding to each defect area is:
[0076]
[0077] Among them, m is the number of sampling points included in each defect area, n is the number of sensors corresponding to each defect data, mid(x i ) is the median value of the leakage magnetic amplitude of the m sampling points obtained by the i-th sensor, and i is less than or equal to n.
[0078] Exemplarily, in combination with Table 2, first determine the number of sampling points m included in the defect data as 3, obtain the number of sensors n corresponding to each defect data as 3, and then determine the median of X21, X31 and X41, the median of X22, X32 and X42, and the median of X23, X33 and X43. Then, the magnetization level value GS corresponding to the defect area is obtained according to the above formula.
[0079] It should be understood that the magnetic leakage internal detection data includes a plurality of defect data, and the determination method of the magnetization level value GS corresponding to each defect data is the same as the above example, which will not be repeated here.
[0080] S32. Determine an average magnetization level value corresponding to the leakage magnetic internal detection data according to the magnetization level value corresponding to each defect area.
[0081] Specifically, the average magnetization level value GS corresponding to the leakage magnetic detection data average The formula for determining is:
[0082]
[0083] Among them, B N is the preset batch quantity, GS i is the magnetization level value corresponding to the i-th defect area.
[0084] It should be noted that the preset batch quantity B N It can be preset by the user according to the actual usage scenario. In the embodiment of the present invention, the preset batch quantity B N The specific implementation method is not particularly limited.
[0085] In some embodiments, before determining the intersection-and-joint ratio threshold of pipeline magnetic flux leakage internal detection according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data, the method provided by the embodiment of the present invention further includes: determining the peak signal-to-noise ratio corresponding to each defect data; and determining the number of unqualified data in the defect data according to the peak signal-to-noise ratio corresponding to each defect data.
[0086] Peak signal-to-noise ratio (PSNR) of the i-th defect data i The formula for determining is:
[0087]
[0088]
[0089] x i The magnetic flux leakage amplitude corresponding to the i-th sampling point obtained by the target sensor for obtaining the i-th defect data, x max is the maximum value of the leakage magnetic amplitude corresponding to the n sampling points obtained by the target sensor of the i-th defect data, is the average value of the leakage magnetic amplitude corresponding to the n sampling points obtained by the target sensor for the i-th defect data, the peak-to-valley value difference of the target sensor for obtaining the i-th defect data is the maximum value of the peak-to-valley value differences of multiple sensors for obtaining the i-th defect data, and the peak-to-valley value difference is the difference between the maximum and minimum values of the leakage magnetic amplitude corresponding to the n sampling points.
[0090] For example, in combination with Table 2, since the peak-to-valley value difference corresponding to sensor 1 is 20, the peak-to-valley value difference corresponding to sensor 2 is 10, and the peak-to-valley value difference corresponding to sensor 3 is 30, sensor 3 is the target sensor. Therefore, is 60, x max is 70.
[0091] S4. Determine an intersection-to-combination ratio threshold value of pipeline magnetic flux leakage internal detection according to an average magnetization level value corresponding to the magnetic flux leakage internal detection data.
[0092] In a possible implementation, the above S4 specifically includes the following steps:
[0093] When the average magnetization level value corresponding to the internal magnetic leakage detection data is greater than or equal to the first preset threshold, the intersection-to-joint ratio threshold of the internal magnetic leakage detection of the pipeline is determined to be 0.75;
[0094] When the average magnetization level value corresponding to the internal magnetic leakage detection data is less than the second preset threshold, the intersection-to-joint ratio threshold of the internal magnetic leakage detection of the pipeline is determined to be 0.5;
[0095] When the average magnetization level value corresponding to the internal magnetic leakage detection data is less than the first preset threshold value and greater than or equal to the second preset threshold value, the formula for determining the intersection-over-union ratio threshold IoU of the internal magnetic leakage detection of the pipeline is:
[0096]
[0097]
[0098] Among them, F max is the first preset threshold, F min is the second preset threshold, P r is the proportion of unqualified data in defective data, N f is the number of unqualified data in defective data, N all is the total number of defective data, and unqualified data is defective data with a peak signal-to-noise ratio less than a preset peak signal-to-noise ratio.
[0099] In one example, the first preset threshold is 190, the second preset threshold is 140, and the preset peak signal-to-noise ratio is 10 dB.
[0100] As can be seen from S1-S4 above, the method provided by the embodiment of the present invention obtains the magnetic flux leakage internal detection data, and then marks the defects of the magnetic flux leakage internal detection data to obtain the defect data corresponding to each defect area of the target pipeline; determines the average magnetization level value corresponding to the magnetic flux leakage internal detection data according to the defect data corresponding to each defect area in the multiple defect areas; and determines the intersection-to-joint ratio threshold of the magnetic flux leakage internal detection of the pipeline according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data. In this way, the embodiment of the present invention can quickly and accurately determine the intersection-to-joint ratio threshold corresponding to the magnetic flux leakage internal detection data of different pipelines, and then when the detection model is trained through the magnetic flux leakage internal detection data of different pipelines, it can effectively improve the detection accuracy and positioning ability of the detection model.
[0101] In the process of training the detection model, image preprocessing and data enhancement are also crucial to the detection algorithm. Image compression, as a common preprocessing method, can effectively remove image redundancy and improve the quality of pipeline magnetic leakage internal detection data. It has the advantages of controllable parameters and simple implementation. However, in related technologies, technicians set image compression coefficients based on their own experience, which cannot guarantee the quality of images obtained after data compression; at the same time, unified normalization processing may lead to the loss of important features, thereby affecting the accuracy of the detection algorithm. Therefore, in order to improve image quality, it is necessary to accurately and quickly determine the image compression coefficients of different pipeline magnetic leakage internal detection data to meet the user's usage needs in different usage scenarios.
[0102] In some embodiments, see Figure 4 , the method provided by the embodiment of the present invention further includes the following steps:
[0103] S51, determining characteristic parameters corresponding to the magnetic flux leakage internal detection data, the characteristic parameters including average peak-to-valley value difference, average surface energy and average volume energy.
[0104] In a possible implementation, the above S51 specifically includes the following steps:
[0105] Determine the peak-to-valley value difference, surface energy and volume energy corresponding to each defect data included in the magnetic leakage detection data; determine the average peak-to-valley value difference as the ratio of the average value of the peak-to-valley value difference corresponding to each defect data to the maximum value of the peak-to-valley value difference corresponding to each defect data, determine the average surface energy as the ratio of the average value of the surface energy corresponding to each defect data to the maximum value of the surface energy corresponding to each defect data, and determine the average volume energy as the ratio of the average value of the volume energy corresponding to each defect data to the maximum value of the volume energy corresponding to each defect data.
[0106] Specifically, the peak-to-valley value difference corresponding to each defect data is the difference between the maximum value and the minimum value of the leakage magnetic amplitude of multiple sampling points corresponding to the target sensor of each defect area.
[0107] The formula for determining the peak-to-valley value difference FG corresponding to each defect data is:
[0108] FG=max(f max -f min );
[0109] The formula for determining the surface energy corresponding to each defect data is:
[0110]
[0111] Among them, X l Indicates the left valley point of the pipeline defect, X r is the valley point on the right side of the pipeline defect, F D is the magnetic field strength curve of the sensor, F rl It is the straight line formed by connecting the valley point on the left and the valley point on the right.
[0112] S52, determining an image compression coefficient corresponding to the magnetic flux leakage internal detection data according to characteristic parameters corresponding to the magnetic flux leakage internal detection data;
[0113] In some embodiments, the formula for determining the image compression coefficient CR corresponding to the magnetic flux leakage internal detection data is:
[0114] CR=A′ fg ×K fg +A′ s ×K s +A′ v ×K v ;
[0115] Among them, A′ fg is the average peak-to-valley difference, K fg is the peak-to-valley value difference weight coefficient, A′ s is the average surface energy, K s is the surface energy weight coefficient, A′ v is the average body energy, K v is the body energy weight coefficient.
[0116] In one example, K fg The reference value is 0.7, K s The reference value is 0.2, K v The reference value is 0.1.
[0117] S53, processing the magnetic flux leakage internal detection data according to the image compression coefficient corresponding to the magnetic flux leakage internal detection data to obtain a color magnetic flux leakage internal detection image.
[0118] In a possible implementation, the above S53 specifically includes the following steps:
[0119] Based on the grayscale mapping method, the magnetic flux leakage internal detection data is converted into a grayscale image; the grayscale image is processed according to the image compression coefficient corresponding to the magnetic flux leakage internal detection data to obtain a color magnetic flux leakage internal detection image.
[0120] Specifically, the data matrix D corresponding to the magnetic flux leakage internal detection data is mapped into a grayscale image using a grayscale mapping method, and the grayscale image pixels are converted into RGB pseudo-color pixels according to the CLUT table. This method is used to traverse all pixels in the grayscale image to convert the grayscale image into a color magnetic flux leakage internal detection image. The specific color magnetic flux leakage internal detection image conversion method is:
[0121]
[0122] Among them, f R , f G , f B are the conversion coefficients of the red domain, green domain and blue domain in the CLUT table respectively; C R , C G , C B are the red domain coefficient matrix, green domain coefficient matrix and blue domain coefficient matrix of the converted color magnetic flux leakage internal detection image respectively; G gray is a grayscale image.
[0123] From the above, it can be seen that the method provided by the embodiment of the present invention can effectively remove image redundancy and improve the quality of image data by determining the image compression coefficient corresponding to the leakage magnetic internal detection data and compressing the leakage magnetic internal detection data according to the image compression coefficient corresponding to the leakage magnetic internal detection data.
[0124] The above mainly introduces the scheme of the embodiment of the present invention from the perspective of the method. It can be understood that in order to realize the above functions, the determination device includes at least one of the hardware structure and software modules corresponding to the execution of each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed in this article, the embodiment of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiment of the present invention.
[0125] The embodiment of the present invention can divide the determination device into functional units according to the above method example. For example, the determination device can be divided into functional units corresponding to various functions, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present invention is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0126] For example, Figure 5 The hardware structure diagram of a determination device provided by an embodiment of the present invention is shown. The determination device 100 includes: a data acquisition unit 510, which is used to acquire magnetic flux leakage internal detection data, the magnetic flux leakage internal detection data is the magnetic flux leakage amplitude of multiple sampling points of the target pipeline acquired by multiple sensors; a defect marking unit 520, which is used to mark defects on the magnetic flux leakage internal detection data, and obtain defect data corresponding to each defect area in multiple defect areas of the target pipeline, the defect data is the magnetic flux leakage amplitude obtained by multiple sensors respectively acquiring multiple sampling points included in the defect area; a magnetization determination unit 530, which is used to determine the average magnetization level value corresponding to the magnetic flux leakage internal detection data according to the defect data corresponding to each defect area in the multiple defect areas; a threshold determination unit 540, which is used to determine the intersection-to-joint ratio threshold of pipeline magnetic flux leakage internal detection according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data.
[0127] Optionally, the magnetization determination unit 530 is specifically used to: determine the magnetization level value corresponding to each defect area according to the defect data corresponding to each defect area in the multiple defect areas; determine the average magnetization level value corresponding to the leakage magnetic internal detection data according to the magnetization level value corresponding to each defect area;
[0128] The formula for determining the magnetization level value GS corresponding to each defect area is:
[0129]
[0130] Among them, m is the number of sampling points included in each defect area, n is the number of sensors corresponding to each defect data, mid(x i ) is the median value of the leakage magnetic field amplitude of the m sampling points obtained by the i-th sensor, i is less than or equal to n;
[0131] The average magnetization level value GS corresponding to the leakage magnetic field detection data average The formula for determining is:
[0132]
[0133] Among them, B N is the preset batch quantity, GS iis the magnetization level value corresponding to the i-th defect area.
[0134] Optionally, the threshold determination unit 540 is specifically used to: when the average magnetization level value corresponding to the internal magnetic leakage detection data is greater than or equal to a first preset threshold, determine the intersection-over-union ratio threshold of the internal magnetic leakage detection of the pipeline to be 0.75; when the average magnetization level value corresponding to the internal magnetic leakage detection data is less than a second preset threshold, determine the intersection-over-union ratio threshold of the internal magnetic leakage detection of the pipeline to be 0.5; when the average magnetization level value corresponding to the internal magnetic leakage detection data is less than the first preset threshold and greater than or equal to the second preset threshold, the determination formula of the intersection-over-union ratio threshold IoU of the internal magnetic leakage detection of the pipeline is:
[0135]
[0136]
[0137] Among them, F max is the first preset threshold, F min is the second preset threshold, P r is the proportion of unqualified data in defective data, N f is the number of unqualified data in defective data, N all is the total number of defective data, and unqualified data is defective data with a peak signal-to-noise ratio less than a preset peak signal-to-noise ratio.
[0138] Optionally, the magnetization determination unit 530 is further used to: determine a peak signal-to-noise ratio corresponding to each defect data; determine the number of unqualified data in the defect data according to the peak signal-to-noise ratio corresponding to each defect data;
[0139] Peak signal-to-noise ratio (PSNR) of the i-th defect data i The formula for determining is:
[0140]
[0141]
[0142] x i The magnetic flux leakage amplitude corresponding to the i-th sampling point obtained by the target sensor for obtaining the i-th defect data, x max is the maximum value of the leakage magnetic amplitude corresponding to the n sampling points obtained by the target sensor of the i-th defect data, is the average value of the leakage magnetic amplitude corresponding to the n sampling points obtained by the target sensor for the i-th defect data, the peak-to-valley value difference of the target sensor for obtaining the i-th defect data is the maximum value of the peak-to-valley value differences of multiple sensors for obtaining the i-th defect data, and the peak-to-valley value difference is the difference between the maximum and minimum values of the leakage magnetic amplitude corresponding to the n sampling points.
[0143] In some embodiments, the determination device provided by the embodiments of the present invention also includes an image compression unit 550, which is used to: determine the characteristic parameters corresponding to the leakage magnetic internal detection data, the characteristic parameters including the average peak-to-valley value difference, the average surface energy and the average volume energy; determine the image compression coefficient corresponding to the leakage magnetic internal detection data according to the characteristic parameters corresponding to the leakage magnetic internal detection data; process the leakage magnetic internal detection data according to the image compression coefficient corresponding to the leakage magnetic internal detection data to obtain a color leakage magnetic internal detection image.
[0144] Optionally, the image compression unit 550 is specifically used to: determine the peak-to-valley value difference, surface energy and volume energy corresponding to each defect data included in the magnetic flux leakage detection data; determine the ratio of the average value of the peak-to-valley value difference corresponding to each defect data to the maximum value of the peak-to-valley value difference corresponding to each defect data as the average peak-to-valley value difference, determine the ratio of the average value of the surface energy corresponding to each defect data to the maximum value of the surface energy corresponding to each defect data as the average surface energy, and determine the average volume energy as the ratio of the average value of the volume energy corresponding to each defect data to the maximum value of the volume energy corresponding to each defect data.
[0145] Optionally, the formula for determining the image compression coefficient CR corresponding to the magnetic flux leakage internal detection data is:
[0146] CR=A′ fg ×K fg +A′ s ×K s +A′ v ×K v ;
[0147] Among them, A′ fg is the average peak-to-valley difference, K fg is the peak-to-valley value difference weight coefficient, A′ s is the average surface energy, K s is the surface energy weight coefficient, A′ v is the average body energy, K v is the body energy weight coefficient.
[0148] Optionally, the image compression unit 550 is specifically used to: convert the magnetic flux leakage internal detection data into a grayscale image based on a grayscale mapping method; and process the grayscale image according to an image compression coefficient corresponding to the magnetic flux leakage internal detection data to obtain a color magnetic flux leakage internal detection image.
[0149] It should be understood that the specific description of the above optional methods can refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any of the above-provided determination devices 100 and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
[0150] The embodiment of the present invention further provides a computer-readable storage medium, in which at least one computer instruction is stored, and the at least one computer instruction is loaded and executed by a processor to implement the methods of the above embodiments. For the explanation of the relevant contents and the description of the beneficial effects in any of the above-mentioned computer-readable storage media, reference can be made to the above-mentioned corresponding embodiments, which will not be repeated here.
[0151] The embodiment of the present invention further provides a chip. The chip integrates a control circuit and one or more ports for implementing the functions of the above-mentioned determination device 100. Optionally, the functions supported by the chip can be referred to above and will not be described in detail here.
[0152] Those skilled in the art will appreciate that all or part of the steps of the above embodiments can be implemented by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, a specific circuit structure (application specific integrated circuit, ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
[0153] The embodiment of the present invention also provides a computer program product including instructions, when the instructions are run on a computer, the computer executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.
[0154] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present invention, such as but not limited to the above-mentioned memory, computer-readable storage medium and communication chip, etc., all have non-transitory. Those skilled in the art should be aware that in one or more of the above-mentioned examples, the functions described in the embodiments of the present invention can be implemented with hardware, software, firmware or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication medium includes any medium that is convenient for transmitting a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0155] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for determining the intersection-to-joint ratio threshold for pipeline magnetic flux leakage internal detection, characterized in that: The method comprises: Acquire magnetic leakage internal detection data, where the magnetic leakage internal detection data is magnetic leakage amplitudes of multiple sampling points of the target pipeline acquired by multiple sensors; Perform defect marking on the magnetic leakage internal detection data to obtain defect data corresponding to each defect area in the multiple defect areas of the target pipeline, wherein the defect data is the magnetic leakage amplitude obtained by multiple sensors respectively obtaining multiple sampling points included in the defect area; Determine an average magnetization level value corresponding to the leakage magnetic internal detection data according to the defect data corresponding to each defect area in the plurality of defect areas; The intersection-to-combination ratio threshold of the pipeline magnetic flux leakage internal detection is determined according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data.
2. The method according to claim 1, characterized in that The step of determining the average magnetization level value corresponding to the leakage magnetic internal detection data according to the defect data corresponding to each defect area in the plurality of defect areas comprises: Determine a magnetization level value corresponding to each defect region according to defect data corresponding to each defect region in the plurality of defect regions; Determine the average magnetization level value corresponding to the leakage magnetic internal detection data according to the magnetization level value corresponding to each defect area; The formula for determining the magnetization level value GS corresponding to each defect area is: Among them, m is the number of sampling points included in each defect area, n is the number of sensors corresponding to each defect data, mid(x i ) is the median value of the leakage magnetic field amplitude of the m sampling points obtained by the i-th sensor, i is less than or equal to n; The average magnetization level value GS corresponding to the leakage magnetic detection data average The formula for determining is: Among them, B N is the preset batch quantity, GS i is the magnetization level value corresponding to the i-th defect area.
3. The method according to claim 2, characterized in that The determining of the intersection-to-joint ratio threshold of pipeline magnetic flux leakage internal detection according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data includes: When the average magnetization level value corresponding to the internal magnetic leakage detection data is greater than or equal to the first preset threshold, determining the intersection-to-joint ratio threshold of the internal magnetic leakage detection of the pipeline to be 0.75; When the average magnetization level value corresponding to the internal magnetic leakage detection data is less than the second preset threshold, determining the intersection-to-joint ratio threshold of the pipeline magnetic leakage internal detection to be 0.5; When the average magnetization level value corresponding to the internal magnetic leakage detection data is less than the first preset threshold value and greater than or equal to the second preset threshold value, the formula for determining the intersection-over-union ratio threshold IoU of the internal magnetic leakage detection of the pipeline is: Among them, F max is the first preset threshold, F min is the second preset threshold, P r is the proportion of unqualified data in defective data, N f is the number of unqualified data in defective data, N all is the total number of defective data, and unqualified data is defective data with a peak signal-to-noise ratio less than a preset peak signal-to-noise ratio.
4. The method according to claim 3, characterized in that: Before determining the intersection-to-parallel ratio threshold of pipeline magnetic flux leakage internal detection according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data, the method further includes: Determine the peak signal-to-noise ratio corresponding to each defect data; Determine the number of unqualified data in the defect data according to the peak signal-to-noise ratio corresponding to each defect data; Peak signal-to-noise ratio (PSNR) of the i-th defect data i The formula for determining is: x i The magnetic flux leakage amplitude corresponding to the i-th sampling point obtained by the target sensor for obtaining the i-th defect data, x max is the maximum value of the leakage magnetic amplitude corresponding to the n sampling points obtained by the target sensor of the i-th defect data, is the average value of the leakage magnetic amplitude corresponding to the n sampling points obtained by the target sensor for the i-th defect data, the peak-to-valley value difference of the target sensor for obtaining the i-th defect data is the maximum value of the peak-to-valley value differences of multiple sensors for obtaining the i-th defect data, and the peak-to-valley value difference is the difference between the maximum and minimum values of the leakage magnetic amplitude corresponding to the n sampling points.
5. The method according to claim 4, characterized in that The method further comprises: Determine characteristic parameters corresponding to the magnetic flux leakage internal detection data, wherein the characteristic parameters include average peak-to-valley value difference, average surface energy, and average volume energy; Determining an image compression coefficient corresponding to the magnetic flux leakage internal detection data according to characteristic parameters corresponding to the magnetic flux leakage internal detection data; The magnetic flux leakage internal detection data is processed according to an image compression coefficient corresponding to the magnetic flux leakage internal detection data to obtain a color magnetic flux leakage internal detection image.
6. The method according to claim 5, characterized in that The determining of the characteristic parameters corresponding to the magnetic leakage internal detection data includes: Determine the peak-to-valley value difference, surface energy, and volume energy corresponding to each defect data included in the magnetic flux leakage internal detection data; The ratio of the average value of the peak-to-valley value difference corresponding to each defect data to the maximum value of the peak-to-valley value difference corresponding to each defect data is determined as the average peak-to-valley value difference, the ratio of the average value of the surface energy corresponding to each defect data to the maximum value of the surface energy corresponding to each defect data is determined as the average surface energy, and the ratio of the average value of the volume energy corresponding to each defect data to the maximum value of the volume energy corresponding to each defect data is determined as the average volume energy.
7. The method according to claim 5, characterized in that The formula for determining the image compression coefficient CR corresponding to the magnetic flux leakage internal detection data is: CR=A ′ fg ×K fg +A ′ s ×K s +A ′ v ×K v ; Among them, A ′ fg is the average peak-to-valley difference, K fg is the peak-to-valley value difference weight coefficient, A ′ s is the average surface energy, K s is the surface energy weight coefficient, A ′ v is the average body energy, K v is the body energy weight coefficient.
8. The method according to claim 7, characterized in that The step of processing the magnetic flux leakage internal detection data according to the image compression coefficient corresponding to the magnetic flux leakage internal detection data to obtain a color magnetic flux leakage internal detection image includes: Based on the grayscale mapping method, the magnetic flux leakage internal detection data is converted into a grayscale image; The grayscale image is processed according to the image compression coefficient corresponding to the magnetic flux leakage internal detection data to obtain a color magnetic flux leakage internal detection image.
9. A device for determining an intersection-to-parallel ratio threshold value for pipeline magnetic flux leakage internal detection, characterized in that: The device comprises: A data acquisition unit, used to acquire magnetic leakage internal detection data, wherein the magnetic leakage internal detection data is magnetic leakage amplitude values of multiple sampling points of the target pipeline acquired by multiple sensors; A defect marking unit is used to mark defects on the magnetic leakage internal detection data to obtain defect data corresponding to each defect area in the multiple defect areas of the target pipeline, wherein the defect data is the magnetic leakage amplitude obtained by multiple sensors respectively obtaining multiple sampling points included in the defect area; a magnetization determination unit, configured to determine an average magnetization level value corresponding to the leakage magnetic internal detection data according to defect data corresponding to each defect area in the plurality of defect areas; The threshold determination unit is used to determine the intersection-to-combination ratio threshold of the pipeline magnetic flux leakage internal detection according to the average magnetization level value corresponding to the magnetic flux leakage internal detection data.
10. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for determining an intersection-to-parallel ratio threshold for pipeline magnetic flux leakage internal detection according to any one of claims 1 to 8.
Citation Information
Cited By
Method and apparatus for determining intersection over union threshold value of magnetic flux leakage internal inspection of pipeline
WO2026061156A1
