Training set construction, pipeline defect identification model training, identification method and device

By constructing a training set and generating enhanced images to expand and enrich the training set, the problem of low accuracy in pipeline defect identification is solved, and more efficient pipeline defect identification is achieved.

CN116091383BActive Publication Date: 2026-03-10CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of pipeline defect identification is low. Manual analysis makes it difficult to distinguish between interference signals and actual pipeline defects, leading to misjudgments and omissions, resulting in waste of human and material resources and safety hazards.

Method used

The training set construction method involves identifying multiple interference source scenarios and interference factors, generating initial training images, moving target pixels to generate enhanced images, expanding and enriching the training set for training the pipeline defect recognition model.

Benefits of technology

It improves the generalization ability and recognition accuracy of pipeline defect identification models, reduces false positives and false negatives, and enhances work efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116091383B_ABST
    Figure CN116091383B_ABST
Patent Text Reader

Abstract

This invention provides a training set construction, pipeline defect recognition model training, and recognition method and apparatus. The training set construction method includes: an initial image determination step: determining multiple initial training images based on multiple interference source scenarios corresponding to pipeline defect detection and the interference factors corresponding to each interference source scenario, and adding the multiple initial training images to the training set; a target pixel determination step: determining target pixels from each initial training image based on the pixel values ​​of the pixels in each initial training image; a pixel movement step: moving each target pixel corresponding to each initial training image along the vertical axis according to the target pixel movement distance to obtain an enhanced image, and adding the enhanced image to the training set; and a dataset construction step: repeatedly executing the pixel movement step until the number of movement rounds for each initial training image reaches the target number. This invention can improve the generalization ability of the pipeline defect recognition model, thereby improving the recognition accuracy of pipeline defects.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of pipeline detection, in particular to a training set construction, pipeline defect identification model training, identification method and device. BACKGROUND

[0002] Various buried pipelines laid in chemical plants and refineries are threatened by failure in actual engineering applications. Since fatigue cracks on the pipelines are mostly located in stress concentration areas on the surface or near the surface of the pipelines, and corrosion and micro defects in the pipelines also cause stress concentration, the use of magnetic memory non-contact detection can not only qualitatively detect defects such as corrosion of the pipelines, but also early warn the dangerous areas of the pipelines.

[0003] However, in the actual environment of a refinery, the environment where the buried pipeline is located is very complex. High-voltage lines and various metal objects that may exist around the measured pipeline will interfere with the detection process, and the interference signals will eventually be reflected on the detection data graph. At present, the detection data graph is analyzed by manual methods, but it is difficult for humans to distinguish interference signals from real pipeline defects. Once the interference signals are misjudged as pipeline defects and the pipeline is excavated for repair, a lot of manpower and resources will be wasted. In addition, the analysis by manual methods may miss the real pipeline defects due to interference signals, resulting in the need for timely repair of defects that need to be repaired, causing more serious accidents such as pipeline leakage. SUMMARY

[0004] The present application provides a training set construction, pipeline defect identification model training, identification method and device to solve the problem of low pipeline defect identification accuracy in the prior art.

[0005] The present application provides a training set construction method, comprising:

[0006] An initial image determination step: based on a plurality of interference source scenes corresponding to pipeline defect detection and interference factors corresponding to each interference source scene, a plurality of initial training images are determined, and the plurality of initial training images are added to the training set;

[0007] A target pixel determination step: based on the pixel value of the pixel points in each initial training image, target pixel points are determined from each initial training image;

[0008] A pixel moving step: each target pixel point corresponding to each initial training image is moved along the ordinate according to a target pixel moving distance to obtain an enhanced image, and the enhanced image is added to the training set; the target pixel moving distance is determined based on a target moving value list;

[0009] The pixel moving step is repeatedly performed until the moving rounds of all the initial training images reach a target number; wherein, in each moving round, all the target pixels in each initial training image are moved once.

[0010] According to the training set construction method provided by the application, the corresponding multiple interference source scenes of pipeline detection and the interference factors corresponding to each interference source scene are determined to obtain multiple initial training images, including:

[0011] The interference factors corresponding to each interference source scene are valued, and all Cartesian product combinations are obtained by combining the values of the interference factors. The images corresponding to each Cartesian product combination are used as the initial training images.

[0012] According to the training set construction method provided by the application, the target pixels are determined from the initial training images based on the pixel values of the pixels in the initial training images, including:

[0013] When the pixel value of the pixel in each initial training image is different from the background pixel value in the corresponding initial training image, the corresponding pixel is used as the target pixel.

[0014] According to the training set construction method provided by the application, the interference source scenes include at least one of the ordinary wire interference scene, the high-voltage line interference scene, the steel bar pile interference scene, and the buried steel bar mesh interference scene.

[0015] According to the training set construction method provided by the application, the interference factors corresponding to the ordinary wire interference scene include at least one of the voltage, the distance from the pipeline defect, the wire position, and the pipeline state; the interference factors corresponding to the high-voltage line interference scene include at least one of the voltage, the distance from the pipeline defect, the high-voltage line position, and the pipeline state; the interference factors corresponding to the steel bar pile interference scene include at least one of the number of steel bars, the distance from the pipeline defect, the steel bar position, and the pipeline state; and the interference factors corresponding to the buried steel bar mesh interference scene include at least one of the number of meshed steel bars, the steel bar diameter, the distance from the pipeline defect, the steel bar mesh position, and the pipeline state.

[0016] The application further provides a pipeline defect identification model training method, including:

[0017] The training set is obtained by using the training set construction method described above.

[0018] An initial model of pipeline defects is trained based on the training set and the pipeline defect results corresponding to each image in the training set to obtain a pipeline defect identification model.

[0019] The application further provides a pipeline defect identification method, including:

[0020] determine a pipeline image to be identified;

[0021] input the pipeline image to be identified into a pipeline defect identification model to obtain a pipeline defect identification result output by the pipeline defect identification model; the pipeline defect identification model is trained by using the pipeline defect identification model training method.

[0022] The application further provides a training set construction device, comprising:

[0023] An initial image determination unit is configured to determine a plurality of initial training images based on a plurality of interference source scenes corresponding to pipeline defect detection and interference factors corresponding to each interference source scene, and add the plurality of initial training images to a training set;

[0024] A target pixel determination unit is configured to determine target pixel points from each initial training image based on pixel values of pixel points in each initial training image;

[0025] A pixel moving unit is configured to move each target pixel point corresponding to each initial training image along a vertical coordinate by a target pixel moving distance to obtain an enhanced image, and add the enhanced image to the training set; the target pixel moving distance is determined based on a target moving value list;

[0026] A data set construction unit is configured to cyclically execute the pixel moving step until a moving round of each initial training image reaches a target number; in each moving round, all target pixel points in each initial training image are moved once.

[0027] The application further provides a pipeline defect identification model training device, comprising:

[0028] A data set acquisition unit is configured to acquire a training set by using the training set construction method;

[0029] A model training unit is configured to train an initial model of a pipeline defect based on the training set and pipeline defect results corresponding to each image in the training set to obtain a pipeline defect identification model.

[0030] The application further provides a pipeline defect identification device, comprising:

[0031] An image determination unit is configured to determine a pipeline image to be identified;

[0032] A defect identification unit is configured to input the pipeline image to be identified into a pipeline defect identification model to obtain a pipeline defect identification result output by the pipeline defect identification model; the pipeline defect identification model is trained by using the pipeline defect identification model training method.

[0033] The present application also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the training set construction method according to any one of the above, and / or the processor implements the steps of the pipeline defect identification model training method according to any one of the above, and / or the processor implements the steps of the pipeline defect identification method according to any one of the above.

[0034] The present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the training set construction method according to any one of the above, and / or the computer program, when executed by a processor, implements the steps of the pipeline defect identification model training method according to any one of the above, and / or the computer program, when executed by a processor, implements the steps of the pipeline defect identification method according to any one of the above.

[0035] The present application also provides a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the steps of the training set construction method according to any one of the above, and / or the computer program, when executed by a processor, implements the steps of the pipeline defect identification model training method according to any one of the above, and / or the computer program, when executed by a processor, implements the steps of the pipeline defect identification method according to any one of the above.

[0036] The present application provides a training set construction method, a pipeline defect identification model training method, and a pipeline defect identification method and device, which move each target pixel point corresponding to each initial training image along the longitudinal coordinate according to the target pixel movement distance to obtain an enhanced image, and add the obtained enhanced image to the training set, thereby not only expanding the training set, but also enriching the diversity of the training set, so that the generalization ability of the model can be improved when used for subsequent pipeline defect identification model training, and the recognition accuracy of the pipeline defect can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0038] Figure 1 is one of the flowcharts of the training set construction method provided by the present application;

[0039] Figure 2 is another flowchart of the training set construction method provided by the present application;

[0040] Figure 3 is a flowchart of a pipeline defect identification model training method provided by the present application;

[0041] Figure 4 is a flowchart of a pipeline defect identification method provided by the present application;

[0042] Figure 5 is a structural schematic diagram of a training set construction device provided by the present application;

[0043] Figure 6 is a structural schematic diagram of a pipeline defect identification model training device provided by the present application;

[0044] Figure 7 is a structural schematic diagram of a pipeline defect identification device provided by the present application;

[0045] Figure 8 is a structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0046] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work fall within the scope of protection of the present application.

[0047] In the actual environment of a refinery, the environment of a buried pipeline is very complex. High-voltage lines and various metal objects that can exist around the measured pipeline can interfere with the detection process, and the interference signals will eventually be reflected on the detection data graph. At present, the detection data graph is analyzed by manual methods, but it is difficult for humans to distinguish interference signals from real pipeline defects. Once the interference signals are misjudged as pipeline defects and the pipeline is excavated for repair, a large amount of manpower and material resources will be wasted. In addition, the real pipeline defects may be missed due to interference signals when analyzed by manual methods, resulting in the need for timely repair of defects that need to be repaired, causing more serious accidents such as pipeline leakage in the later period.

[0048] Although the image recognition technology can overcome the low accuracy of manual recognition and improve the recognition accuracy of defects, a large amount of training data is required to train an image recognition model with a qualified accuracy, and the common interference signal scenarios must be covered in the training data, so that the trained model can distinguish the defect signals from the interference signals. However, in practice, only a small amount of detection data graphs can be obtained by performing a magnetic memory non-contact detection, which cannot meet the data amount requirement of the model training based on deep learning, and the data of a specific detection area cannot cover the common interference scenarios, so the recognition model trained based on the detection data of the area has poor generalization ability, and the accuracy of the model will decrease when the detection area is changed.

[0049] To this end, the present application provides a training set construction method. Figure 1 is one of the flowcharts of the training set construction method provided by the present application, as shown in Figure 1 The method comprises the following steps:

[0050] Step 110, initial image determination step: based on the multiple interference source scenarios corresponding to the pipeline defect detection and the interference factors corresponding to each interference source scenario, multiple initial training images are determined, and the multiple initial training images are added to the training set.

[0051] It should be noted that various buried pipelines laid in chemical plants and refineries are threatened by failure in actual engineering applications. Since most of the fatigue cracks on the pipeline are located in the stress concentration area on the surface or near the surface of the pipeline, and corrosion and micro defects exist in the pipeline, which also cause stress concentration, it is necessary to detect whether the pipeline has defects in time to avoid safety accidents caused by defects. However, in the actual environment of the refinery, the environment of the buried pipeline is very complex, and there may be high-voltage lines and various metal objects around the measured pipeline, which will interfere with the detection process, and the interference signals will eventually be reflected on the detection data graphs, thereby affecting the accuracy of the defect recognition result.

[0052] Since the pipeline graph data is usually obtained by the magnetic memory non-contact detection method when identifying the pipeline defects, if there are wires, metals and other objects near the pipeline, the magnetic field signals during the magnetic memory non-contact detection will be affected, and the obtained pipeline graph data will have noise, which will affect the recognition result of the pipeline defects. The interference source scenarios corresponding to the pipeline defect detection can include ordinary wire interference scenarios, high-voltage line interference scenarios, steel bar pile interference scenarios, buried steel mesh interference scenarios, etc.

[0053] For the general power line interference scene, the voltage of the power line, the distance from the defect, the position of the power line, the state of the pipeline and the like can interfere with the pipeline map data, and therefore the voltage of the power line, the distance from the defect, the position of the power line, the state of the pipeline and the like can be taken as interference factors of the general power line interference scene.

[0054] Similarly, for the high-voltage line interference scene, the voltage of the high-voltage line, the distance from the defect, the position of the high-voltage line, the state of the pipeline and the like can interfere with the pipeline map data, and therefore the voltage of the high-voltage line, the distance from the defect, the position of the high-voltage line, the state of the pipeline and the like can be taken as interference factors of the high-voltage line interference scene.

[0055] For the steel bar pile interference scene, the number of steel bars, the distance from the defect, the position of the steel bar pile, the state of the pipeline and the like can interfere with the pipeline map data, and therefore the number of steel bars, the distance from the defect, the position of the steel bar pile, the state of the pipeline and the like can be taken as interference factors of the steel bar pile interference scene.

[0056] For the buried steel mesh interference scene, the number of networking steel bars, the diameter of the steel bar, the distance from the defect, the position of the steel mesh, the state of the pipeline and the like can interfere with the pipeline map data, and therefore the number of networking steel bars, the diameter of the steel bar, the distance from the defect, the position of the steel mesh, the state of the pipeline and the like can be taken as interference factors of the buried steel mesh interference scene.

[0057] After determining the multiple interference source scenes corresponding to the pipeline defect detection and the interference factors corresponding to each interference source scene, different detection environments can be constructed according to the combination of different interference factors, and the pipelines with defects and the pipelines without defects are pre-buried in the corresponding detection environments, and then the corresponding initial training images under each detection environment can be obtained. It can be understood that the initial training images can be the map data under each detection environment obtained by the magnetic memory non-contact detection method, or the map data under each detection environment obtained by the guided wave detection method, and the embodiments of the present application do not make specific limitations thereto.

[0058] Step 120, target pixel determination step: determining target pixel points from each initial training image based on the pixel values of the pixel points in each initial training image.

[0059] Specifically, each initial training image contains background pixel points and signal curve pixel points, and when performing pipeline defect recognition, the image formed by the signal curve pixel points needs to be recognized, and therefore, based on the pixel values of each pixel point in the initial training image, it is judged whether the pixel point is a background pixel point or a signal curve pixel point, and if it is a signal curve pixel point, the corresponding pixel point can be taken as a target pixel point.

[0060] Optionally, the pixel values ​​of background pixels can be preset, and each pixel in the initial training image can be traversed. The pixel values ​​of each pixel are compared with the preset pixel values ​​of background pixels. If they are the same, it indicates that the corresponding pixel is a background pixel; if they are different, it indicates that the corresponding pixel is a signal curve pixel, that is, the corresponding pixel can be used as the target pixel.

[0061] Step 130, Pixel Movement Step: Move each target pixel corresponding to each initial training image along the vertical axis according to the target pixel movement distance to obtain an enhanced image, and add the enhanced image to the training set; the target pixel movement distance is determined based on the target movement value list.

[0062] Specifically, in order to further expand the training set, after determining the target pixel, this embodiment of the invention moves each target pixel along the vertical coordinate, so that the data curve pixels in the initial training image undergo pixel-level small random movement along the vertical coordinate direction to obtain an enhanced image. That is, the enhanced image is enhanced data generated on the basis of the initial training image. This enhanced image not only expands the training set, but also enriches the diversity of the training set, thereby improving the generalization ability of the model when it is used for subsequent training of the pipeline defect recognition model, and thus improving the recognition accuracy of pipeline defects.

[0063] It should be noted that each target pixel moves randomly along the vertical axis according to its movement distance. This means that the movement distance for each target pixel may be the same or different. The target pixel movement distance is determined based on a pre-set list of target movement values. For example, if the target movement value list is [1, 2, -1, -2], then the target pixel can move d pixels along the vertical axis. The value of d can be determined from the target movement value list, thus causing the target pixel to move and resulting in an enhanced image.

[0064] Furthermore, when the target pixel moves along the vertical axis, the horizontal axis remains unchanged. This does not alter the location of the pipe defect; it only changes the signal intensity in the image. For example, when a pipe has a defect, the signal at the defect location in the initial training image differs from the signal at a location without a defect. When the target pixel moves along the vertical axis, the defect location represented in the enhanced image remains unchanged; only the signal intensity at the defect location differs from the signal intensity at the defect location before the pixel moved. This does not affect the defect detection result. However, if the target pixel moves along the horizontal axis, it changes the location of the pipe defect, thus affecting the accuracy of the pipe defect identification result.

[0065] Step 140, Dataset Construction Step: Execute the pixel movement step repeatedly until the number of movement rounds for each initial training image reaches the target number; wherein, in each movement round, all target pixels in each initial training image are moved once.

[0066] Specifically, the pixel movement steps are executed cyclically until the number of movement rounds for each initial training image reaches the target number. For example, for an initial training image A, which includes 100 target pixels, after all 100 pixels have moved once, the number of movement rounds for the initial training image A is incremented by 1. When the number of movement rounds reaches the target number (e.g., 10), 10 enhanced images corresponding to the initial training image A are obtained, thus expanding the training set. The target number of rounds can be set according to actual conditions, and this embodiment of the invention does not impose a specific limitation on it.

[0067] The training set construction method provided in this embodiment of the invention moves each target pixel corresponding to each initial training image along the vertical axis according to the target pixel movement distance to obtain an enhanced image, and adds the obtained enhanced image to the training set. This not only expands the training set but also enriches its diversity, thereby improving the generalization ability of the model when it is subsequently used for training the pipeline defect recognition model, and thus improving the recognition accuracy of pipeline defects.

[0068] like Figure 2 As shown, for the graph matrix of the initial training image, it is initialized as a raw detection map pixel matrix of size m×n. The background color pixel value `back_px` (e.g., the RGB value of white) outside the image's data curve is set, along with a list of possible pixel movement values ​​`stride_list`. `stride_list` contains both positive and negative values, ensuring the pixel movement direction is random, such as [1, 2, -1, -2]. Then, the target number of pixel movements `N` on the raw detection map pixel matrix is ​​initialized, along with the pixel matrix `target` after the pixel movements, and the pixel movement count counter is initialized to 0.

[0069] The graph matrix is ​​traversed row by row and column by column. At each pixel encountered, the pixel value `cur_px` is checked against `back_px`. If they are equal, `cur_px` is assigned to the pixel at the same coordinate in the target matrix, and the process continues to the next pixel in the graph matrix. If they are not equal, a value is randomly selected from `stride_list` and assigned to `d` pixels. The pixel is then moved `d` pixels along its vertical coordinate, and its new coordinates are assigned to the corresponding position in the target matrix. If the pixel moves beyond the vertical coordinate range of the target matrix, it is discarded, and its original position is filled with the value of `back_px`.

[0070] If the currently traversed pixel is the last pixel of the image, i.e., the m×n-th pixel, then the value of count is incremented by 1, and the image corresponding to the current target matrix is ​​saved, with the image file named according to the current time accurate to milliseconds. If the value of count is less than N, then return to step 2 of this algorithm to continue execution; if the value of count is equal to N, then the data augmentation of the initial training image is completed, and a training set with sufficient data volume is obtained.

[0071] Based on the above embodiments, multiple initial training images are determined based on multiple interference source scenarios corresponding to pipeline detection and the interference factors corresponding to each interference source scenario, including:

[0072] Values ​​are assigned to the interference factors corresponding to each interference source scenario, and combinations are made based on the values ​​of each interference factor to obtain all Cartesian product combinations. The images corresponding to each Cartesian product combination are used as the initial training images.

[0073] Specifically, in a typical power line interference scenario, factors such as power line voltage, distance from defects, power line position, and pipe condition can interfere with pipe mapping data. Therefore, these factors can be considered as interference factors in a typical power line interference scenario. When there are 2 possible power line voltage values, 4 possible distances from defects, 2 possible power line positions, and 2 possible pipe conditions, the corresponding number of Cartesian product combinations is 2 × 4 × 2 × 2 = 32, meaning the number of initial training images for a typical power line interference scenario is 32.

[0074] Similarly, in high-voltage line interference scenarios, the voltage of the high-voltage line, its distance from the defect, its location, and the state of the pipeline can all interfere with the pipeline mapping data. Therefore, the voltage, distance from the defect, location, and state of the high-voltage line can be considered as interference factors in high-voltage line interference scenarios. When the voltage of the high-voltage line is 1, the distance from the defect is 5, the location of the high-voltage line is 1, and the state of the pipeline is 2, the corresponding number of Cartesian product combinations is 1×5×1×2=10, meaning the number of initial training images corresponding to the high-voltage line interference scenario is 10.

[0075] For the rebar pile interference scenario, the number of rebars, the distance from the defect, the location of the rebar pile, and the state of the pipes can all interfere with the pipe mapping data. Therefore, the number of rebars, the distance from the defect, the location of the rebar pile, and the state of the pipes can be considered as interference factors in the rebar pile interference scenario. When the number of rebars is 3, the distance from the defect is 4, the location of the rebar pile is 1, and the state of the pipes is 2, the corresponding number of Cartesian product combinations is 3×4×1×2=24, that is, the number of initial training images corresponding to the rebar pile interference scenario is 24.

[0076] For buried rebar mesh interference scenarios, the number of rebars, rebar diameter, distance from defects, rebar mesh location, and pipeline status can all interfere with pipeline mapping data. Therefore, these factors can be considered as interference elements in buried rebar mesh interference scenarios. When the number of rebars is 1, the rebar diameter is 2, the distance from defects is 2, the rebar mesh location is 1, and the pipeline status is 2, the corresponding number of Cartesian product combinations is 1×2×2×1×2=8, meaning the number of initial training images for buried rebar mesh interference scenarios is 8.

[0077] Based on any of the above embodiments, determining the target pixel from each initial training image based on the pixel value of each pixel in each initial training image includes:

[0078] When the pixel value of a pixel in each initial training image is different from the background pixel value in the corresponding initial training image, the corresponding pixel is taken as the target pixel.

[0079] Specifically, each initial training image contains background pixels and signal curve pixels. When identifying pipeline defects, it is necessary to identify the image composed of signal curve pixels. Therefore, in this embodiment of the invention, the pixel value of each pixel in the initial training image is used to determine whether the pixel is a background pixel or a signal curve pixel. If it is a signal curve pixel, the corresponding pixel can be used as the target pixel.

[0080] Optionally, the pixel values ​​of background pixels can be preset, and each pixel in the initial training image can be traversed. The pixel values ​​of each pixel are compared with the preset pixel values ​​of background pixels. If they are the same, it indicates that the corresponding pixel is a background pixel; if they are different, it indicates that the corresponding pixel is a signal curve pixel, that is, the corresponding pixel can be used as the target pixel.

[0081] Based on any of the above embodiments, the interference source scenarios include at least one of the following: ordinary power line interference scenario, high-voltage line interference scenario, steel bar pile interference scenario, and buried steel mesh interference scenario.

[0082] When identifying pipeline defects, pipeline map data is usually obtained through magnetic memory non-contact detection. However, if there are objects such as wires or metal near the pipeline, they will affect the magnetic field signal during magnetic memory non-contact detection, which will cause noise in the obtained pipeline map data and affect the pipeline defect identification results.

[0083] Typically, buried pipelines are located near ordinary power lines, high-voltage power lines, steel bar piles, and buried steel mesh, all of which can significantly interfere with pipeline defect identification. Therefore, in order to accurately identify pipelines, the interference source scenarios in this embodiment of the invention include at least one of the following: ordinary power line interference scenario, high-voltage line interference scenario, steel bar pile interference scenario, and buried steel mesh interference scenario.

[0084] Based on any of the above embodiments, the interference factors corresponding to the ordinary power line interference scenario include at least one of voltage, distance from the pipe defect, power line location, and pipe condition; the interference factors corresponding to the high-voltage line interference scenario include at least one of voltage, distance from the pipe defect, high-voltage line location, and pipe condition; the interference factors corresponding to the rebar pile interference scenario include at least one of the number of rebars, distance from the pipe defect, rebar location, and pipe condition; the interference factors corresponding to the buried rebar mesh interference scenario include at least one of the number of mesh rebars, rebar diameter, distance from the pipe defect, rebar mesh location, and pipe condition.

[0085] Table 1 shows the values ​​of interference scenarios and corresponding interference factors. As shown in Table 1, for ordinary power line interference scenarios, the corresponding interference factors include voltage, distance from pipe defects, power line location, and pipe condition; for high-voltage power line interference scenarios, the corresponding interference factors include voltage, distance from pipe defects, high-voltage power line location, and pipe condition; for rebar pile interference scenarios, the corresponding interference factors include the number of rebars, distance from pipe defects, rebar location, and pipe condition; for buried rebar mesh interference scenarios, the corresponding interference factors include the number of mesh rebars, rebar diameter, distance from pipe defects, rebar mesh location, and pipe condition.

[0086] Table 1

[0087]

[0088]

[0089] Furthermore, based on the values ​​of interference factors under different interference scenarios in Table 1, the number of initial training images corresponding to different interference scenarios can be determined. Table 2 is a comparison table of interference factor values ​​and the number of initial training images. Combining with Table 1, it can be seen that in the ordinary wire interference scenario in Table 2, the voltage value is 2, the distance from the pipe defect is 4, the wire position is 2, and the pipe state is 2. The number of initial training images corresponding to the ordinary wire interference scenario is 2×4×2×2=32.

[0090] In the high-voltage line interference scenario, the voltage value is 1, the distance from the pipeline defect is 5, the position of the high-voltage line is 1, and the pipeline state is 2. The number of initial training images corresponding to the high-voltage line interference scenario is 1×5×1×2=10.

[0091] In the scenario of rebar pile interference, the number of rebars is 3, the distance from the pipe defect is 4, the position of the rebar pile is 1, and the pipe state is 2. The number of initial training images corresponding to the rebar pile interference scenario is 3×4×1×2=24.

[0092] In the buried steel mesh interference scenario, the number of steel bars in the mesh is 1, the diameter of the steel bars is 2, the distance from the pipe defect is 2, the position of the steel mesh is 1, and the pipe state is 2. The number of initial training images corresponding to the buried steel mesh interference scenario is 1×2×2×1×2=8.

[0093] As shown in Table 2, based on the initial number of training images in the scenarios of ordinary power line interference, high-voltage line interference, steel bar pile interference, and buried steel mesh interference, the final number of images that can be collected in the training set is 32+10+24+8=74.

[0094] Table 2

[0095]

[0096] Based on any of the above embodiments, the present invention provides a method for training a pipeline defect identification model, such as... Figure 3 As shown, the method includes:

[0097] Step 310: Obtain the training set using the training set construction method described in any of the above embodiments;

[0098] Step 320: Train the initial model of pipeline defects based on the training set and the pipeline defect results corresponding to each image in the training set to obtain the pipeline defect recognition model.

[0099] Specifically, the embodiments of the present invention use the training set construction method described in the above embodiments to obtain the training set. That is, by moving the target pixels corresponding to each initial training image along the vertical coordinate, an enhanced image is obtained, and the obtained enhanced image is added to the training set. This not only expands the training set but also enriches its diversity. Thus, when training the initial model of pipeline defects based on the training set and the pipeline defect results corresponding to each image in the training set, the generalization ability of the model can be improved, thereby improving the recognition accuracy of pipeline defects.

[0100] It should be noted that if there is a defect in the pipeline, the pipeline defect result for each image in the training set can be a label indicating the location of the defect; if there is no defect in the pipeline, the pipeline defect result for each image in the training set can be a label indicating that the defect does not exist in the image.

[0101] Based on any of the above embodiments, the present invention provides a pipeline defect identification method, such as... Figure 4 As shown, the method includes:

[0102] Step 410: Determine the pipe image to be identified;

[0103] Step 420: Input the pipeline image to be identified into the pipeline defect recognition model to obtain the pipeline defect recognition result output by the pipeline defect recognition model; the pipeline defect recognition model is trained using the pipeline defect recognition model training method described above.

[0104] Specifically, the pipeline defect identification model trained based on the above-mentioned pipeline defect identification model training method has a significantly improved defect identification capability due to its comprehensive coverage of interference scenarios and sufficient data. It can accurately distinguish between interference, defects, and situations where both interference and defects are present in the detection map, thereby overcoming the pain point that manual inspection of the detection map cannot accurately distinguish between interference and defects, improving work efficiency and effectiveness, avoiding the waste of manpower and resources caused by excavation due to misjudgment, and eliminating safety hazards caused by missed judgment.

[0105] The training set construction apparatus provided by the present invention is described below. The training set construction apparatus described below and the training set construction method described above can be referred to in correspondence.

[0106] Based on any of the above embodiments, the present invention also provides a training set construction apparatus, such as... Figure 5 As shown, the device includes:

[0107] The initial image determination unit 510 is used to determine multiple initial training images based on multiple interference source scenarios corresponding to pipeline defect detection and interference factors corresponding to each interference source scenario.

[0108] The target pixel determination unit 520 is used to determine the target pixel from each initial training image based on the pixel value of the pixel in each initial training image;

[0109] The pixel moving unit 530 is used to move the current target pixel along the vertical axis according to the target pixel moving distance to obtain an enhanced image, and add the enhanced image to the training set; the target pixel moving distance is determined based on the target pixel moving value list;

[0110] The dataset construction unit 540 is used to iterate through each target pixel and repeatedly execute the steps in the pixel moving unit until the number of moving rounds of each initial training image reaches the target number; wherein, in each moving round, all target pixels in each initial training image are moved once.

[0111] Based on any of the above embodiments, the initial image determination unit 510 is used for:

[0112] Values ​​are assigned to the interference factors corresponding to each interference source scenario, and combinations are made based on the values ​​of each interference factor to obtain all Cartesian product combinations. The image corresponding to each Cartesian product combination is used as the initial training image.

[0113] Based on any of the above embodiments, the target pixel determination unit 520 is used for:

[0114] When the pixel value of a pixel in each initial training image is different from the background pixel value in the corresponding initial training image, the corresponding pixel is taken as the target pixel.

[0115] Based on any of the above embodiments, the interference source scenarios include at least one of the following: ordinary power line interference scenario, high-voltage line interference scenario, steel bar pile interference scenario, and buried steel mesh interference scenario.

[0116] Based on any of the above embodiments, the interference factors corresponding to the ordinary power line interference scenario include at least one of voltage, distance from the pipe defect, power line location, and pipe condition; the interference factors corresponding to the high-voltage line interference scenario include at least one of voltage, distance from the pipe defect, high-voltage line location, and pipe condition; the interference factors corresponding to the rebar pile interference scenario include at least one of the number of rebars, distance from the pipe defect, rebar location, and pipe condition; and the interference factors corresponding to the buried rebar mesh interference scenario include at least one of the number of mesh rebars, rebar diameter, distance from the pipe defect, rebar mesh location, and pipe condition.

[0117] Based on any of the above embodiments, the present invention also provides a pipeline defect identification model training device, such as... Figure 6 As shown, the device includes:

[0118] The dataset acquisition unit 610 is used to acquire a training set using the training set construction method described in any of the above embodiments;

[0119] The model training unit 620 is used to train an initial model of pipeline defects based on the training set and the pipeline defect results corresponding to each image in the training set, so as to obtain a pipeline defect recognition model.

[0120] Based on any of the above embodiments, the present invention also provides a pipeline defect identification device, such as... Figure 7 As shown, the device includes:

[0121] Image determination unit 710 is used to determine the pipe image to be identified;

[0122] The defect identification unit 720 is used to input the pipeline image to be identified into the pipeline defect identification model to obtain the pipeline defect identification result output by the pipeline defect identification model; the pipeline defect identification model is trained using the pipeline defect identification model training method described above.

[0123] Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 8 As shown, the electronic device may include: a processor 810, a memory 820, a communication interface 830, and a communication bus 840, wherein the processor 810, the memory 820, and the communication interface 830 communicate with each other through the communication bus 840. The processor 810 can call logic instructions in the memory 820 to execute a training set construction method, which includes: an initial image determination step: determining multiple initial training images based on multiple interference source scenarios corresponding to pipeline defect detection and interference factors corresponding to each interference source scenario, and adding the multiple initial training images to the training set; a target pixel determination step: determining target pixels from each initial training image based on the pixel values ​​of the pixels in each initial training image; a pixel movement step: moving each target pixel corresponding to each initial training image along the vertical axis according to the target pixel movement distance to obtain an enhanced image, and adding the enhanced image to the training set; the target pixel movement distance is determined based on a target movement value list; and a dataset construction step: repeatedly executing the pixel movement step until the number of movement rounds for each initial training image reaches the target number; wherein, in each movement round, all target pixels in each initial training image are moved once.

[0124] And / or, to perform a pipeline defect recognition model training method, the method comprising: obtaining a training set using the training set construction method described above; training an initial model of pipeline defects based on the training set and the pipeline defect results corresponding to each image in the training set, to obtain a pipeline defect recognition model.

[0125] And / or, to perform a pipeline defect identification method, the method comprising: determining a pipeline image to be identified; inputting the pipeline image to be identified into a pipeline defect identification model to obtain a pipeline defect identification result output by the pipeline defect identification model; wherein the pipeline defect identification model is trained using the pipeline defect identification model training method described above.

[0126] Furthermore, the logical instructions in the aforementioned memory 820 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0127] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer is able to execute the training set construction method provided by the above methods, the method including: an initial image determination step: determining multiple initial training images based on multiple interference source scenarios corresponding to pipeline defect detection and interference factors corresponding to each interference source scenario, and adding the multiple initial training images to the training set; a target pixel determination step: determining target pixels from each initial training image based on the pixel values ​​of the pixels in each initial training image; a pixel movement step: moving each target pixel corresponding to each initial training image along the vertical axis according to the target pixel movement distance to obtain an enhanced image, and adding the enhanced image to the training set; the target pixel movement distance is determined based on a target movement value list; a dataset construction step: repeatedly executing the pixel movement step until the number of movement rounds of each initial training image reaches the target number; wherein, in each movement round, all target pixels in each initial training image are moved once.

[0128] And / or, to perform a pipeline defect recognition model training method, the method comprising: obtaining a training set using the training set construction method described above; training an initial model of pipeline defects based on the training set and the pipeline defect results corresponding to each image in the training set, to obtain a pipeline defect recognition model.

[0129] And / or, to perform a pipeline defect identification method, the method comprising: determining a pipeline image to be identified; inputting the pipeline image to be identified into a pipeline defect identification model to obtain a pipeline defect identification result output by the pipeline defect identification model; wherein the pipeline defect identification model is trained using the pipeline defect identification model training method described above.

[0130] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the training set construction methods provided above. The method includes: an initial image determination step: determining multiple initial training images based on multiple interference source scenarios corresponding to pipeline defect detection and interference factors corresponding to each interference source scenario, and adding the multiple initial training images to the training set; a target pixel determination step: determining target pixels from each initial training image based on the pixel values ​​of the pixels in each initial training image; a pixel movement step: moving each target pixel corresponding to each initial training image along the vertical axis according to the target pixel movement distance to obtain an enhanced image, and adding the enhanced image to the training set; wherein the target pixel movement distance is determined based on a target movement value list; and a dataset construction step: repeatedly executing the pixel movement step until the number of movement rounds for each initial training image reaches a target number; wherein, in each movement round, all target pixels in each initial training image move once.

[0131] And / or, to perform a pipeline defect recognition model training method, the method comprising: obtaining a training set using the training set construction method described above; training an initial model of pipeline defects based on the training set and the pipeline defect results corresponding to each image in the training set, to obtain a pipeline defect recognition model.

[0132] And / or, to perform a pipeline defect identification method, the method comprising: determining a pipeline image to be identified; inputting the pipeline image to be identified into a pipeline defect identification model to obtain a pipeline defect identification result output by the pipeline defect identification model; wherein the pipeline defect identification model is trained using the pipeline defect identification model training method described above.

[0133] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A training set construction method characterized by, The method comprises the following steps: An initial image determination step: based on multiple interference source scenes corresponding to pipeline defect detection and interference factors corresponding to each interference source scene, multiple initial training images are determined, and the multiple initial training images are added to a training set; wherein, for a general wire interference scene, the corresponding interference factors include the voltage of the wire, the distance from the defect, the position of the wire, and the state of the pipeline; for a high-voltage line interference scene, the corresponding interference factors include the voltage of the high-voltage line, the distance from the defect, the position of the high-voltage line, and the state of the pipeline; for a steel bar pile interference scene, the corresponding interference factors include the number of steel bars, the distance from the defect, the position of the steel bar pile, and the state of the pipeline; for a buried steel mesh interference scene, the corresponding interference factors include the number of meshed steel bars, the diameter of the steel bar, the distance from the defect, the position of the steel mesh, and the state of the pipeline; A target pixel determination step: based on the pixel values of the pixel points in each initial training image, target pixel points are determined from each initial training image; A pixel moving step: each target pixel point corresponding to each initial training image is moved along the vertical coordinate by a target pixel moving distance to obtain an enhanced image, and the enhanced image is added to the training set; the target pixel moving distance is determined based on a target moving value list; wherein, when each target pixel point is moved along the vertical coordinate, the horizontal coordinate direction remains unchanged; A data set construction step: the pixel moving step is repeatedly executed until the moving round of each initial training image reaches a target number; wherein, in each moving round, all target pixel points in each initial training image are moved once.

2. The training set construction method of claim 1, wherein, The method comprises the following steps: The values of the interference factors corresponding to each interference source scene are determined, and all Cartesian product combinations are obtained based on the values of the interference factors; the images corresponding to each Cartesian product combination are taken as the initial training images.

3. The training set construction method of claim 1, wherein, The method comprises the following steps: When the pixel value of each pixel point in each initial training image is different from the background pixel value in the corresponding initial training image, the corresponding pixel point is taken as the target pixel point.

4. A pipeline defect identification model training method, characterized in that, The method comprises the following steps: A training set is obtained by using the training set construction method according to any one of claims 1 to 3; An initial model of pipeline defect is trained based on the training set and the pipeline defect results corresponding to each image in the training set, to obtain a pipeline defect recognition model.

5. A method of pipe defect recognition characterized by, The method comprises the following steps: A pipeline image to be recognized is determined; The pipeline image to be recognized is input into the pipeline defect recognition model to obtain a pipeline defect recognition result output by the pipeline defect recognition model; the pipeline defect recognition model is trained by using the pipeline defect recognition model training method according to claim 4.

6. A training set construction apparatus characterized by comprising: The method comprises the following steps: The initial image determination unit is configured to determine a plurality of initial training images based on a plurality of interference source scenes corresponding to pipeline defect detection and interference factors corresponding to each interference source scene, and add the plurality of initial training images to a training set; wherein for a general wire interference scene, the corresponding interference factors include the voltage of the wire, the distance from the defect, the position of the wire, and the state of the pipeline; for a high-voltage line interference scene, the corresponding interference factors include the voltage of the high-voltage line, the distance from the defect, the position of the high-voltage line, and the state of the pipeline; for a steel bar pile interference scene, the corresponding interference factors include the number of steel bars, the distance from the defect, the position of the steel bar pile, and the state of the pipeline; for a buried steel mesh interference scene, the corresponding interference factors include the number of meshed steel bars, the diameter of the steel bar, the distance from the defect, the position of the steel mesh, and the state of the pipeline; The target pixel determination unit is configured to determine target pixel points from each initial training image based on the pixel values of the pixel points in each initial training image; The pixel moving unit is configured to move each target pixel point corresponding to each initial training image along the longitudinal coordinate by a target pixel moving distance to obtain an enhanced image, and add the enhanced image to the training set; the target pixel moving distance is determined based on a target moving value list; wherein when each target pixel point is moved along the longitudinal coordinate, the horizontal coordinate direction remains unchanged; The data set construction unit is configured to cyclically execute the pixel moving step of the pixel moving unit until the moving round of each initial training image reaches a target number; wherein in each moving round, all target pixel points in each initial training image are moved once. 7.A pipeline defect identification model training apparatus, characterized by, The data set construction unit is configured to cyclically execute the pixel moving step of the pixel moving unit until the moving round of each initial training image reaches a target number; wherein in each moving round, all target pixel points in each initial training image are moved once. The data set acquisition unit is configured to acquire a training set by using the training set construction method of any one of claims 1 to 3; The model training unit is configured to train an initial model of pipeline defects based on the training set and pipeline defect results corresponding to each image in the training set, to obtain a pipeline defect recognition model.

8. A pipe defect recognition apparatus characterized by comprising: The image determination unit is configured to determine a pipeline image to be recognized; The defect recognition unit is configured to input the pipeline image to be recognized into the pipeline defect recognition model to obtain a pipeline defect recognition result output by the pipeline defect recognition model; the pipeline defect recognition model is trained by using the pipeline defect recognition model training method of claim 4. ​

Citation Information

Patent Citations

  • Image recognition model training method and device, computer equipment and storage medium

    CN111582410A