Tank bottom plate defect recognition model training method, device, equipment and medium
By generating defect image information of simulated tank bottom plates and using corrosion diffusion and color assignment processing, the problem of insufficient samples in the training of tank bottom plate defect recognition model is solved, and the accuracy and recognition efficiency of the model are improved.
Patent Information
- Application Number
- CN202510548777.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-04-28
AI Technical Summary
In the existing technology, training a tank bottom plate defect recognition model requires draining the medium in the tank and cleaning the tank, resulting in insufficient and poor quality sample data, and thus low model accuracy.
By generating defect image information of the simulated tank bottom plate, using corrosion diffusion processing and color assignment processing to generate a heat map, enrich the model training samples, and use the YOLOv8 model of the EfficientNet architecture for training.
The accuracy of the defect recognition model is improved, the number of model training samples is enriched, and the precision and efficiency of defect recognition are improved.
Smart Images

Figure CN120070444B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of defect recognition of storage tank bottom plates, and in particular to a method, device, equipment and medium for training a defect recognition model of storage tank bottom plates. Background Art
[0002] In related technologies, images of tank floor defects can only be acquired after the tank has been shut down, its contents drained, and cleaned. This allows these images to be used as samples for model training to generate a defect recognition model. This trained model can then be used to identify images of tank floor defects to be inspected.
[0003] Because acquiring images of tank floor defects requires draining the tank and cleaning it, which is time-consuming and labor-intensive, model training can result in insufficient and poorly-quality sample data, leading to low accuracy in the defect recognition model. Therefore, improving the accuracy of defect recognition models remains a technical challenge. Summary of the Invention
[0004] In view of this, the present application proposes a method, device, equipment and medium for training a defect recognition model for a tank bottom plate, aiming to improve the accuracy of the defect recognition model.
[0005] In a first aspect, the present application proposes a method for training a defect recognition model for a tank bottom, comprising: generating first defect image information of a simulated tank bottom according to preset defect features; the first defect image information includes pixels in the first defect image and first defect depths of the pixels; performing corrosion diffusion processing on the pixels in the first defect image according to the first defect depths of the pixels in the first defect image information and the first defect depths of adjacent pixels to obtain second defect image information; the second defect image information includes pixels in the second defect image and second defect depths of the pixels; the second defect depth is the defect depth after corrosion diffusion processing; performing color assignment processing on the pixels in the second defect image information according to the second defect depths of the pixels in the second defect image information to obtain a thermal map of the simulated tank bottom; the thermal map includes the values of the pixels, the second defect depths of the pixels and the colors of the pixels in the thermal map; a defect recognition model is obtained by training according to the thermal map of the simulated tank bottom; the defect recognition model is used to perform defect recognition on the input defect recognition map of the tank bottom.
[0006] Optionally, defect generation processing is performed on each pixel point in the initial image of the simulated tank site to obtain a first defect image; the defect generation processing includes: determining a first pixel point that meets a preset probability requirement from the initial image based on a preset probability; determining a direction selection strategy and a number of selections based on preset defect characteristics; the direction selection strategy is used to characterize the probability of selecting a target direction; taking the first pixel point as the initial point, accessing the unmasked second pixel point in the initial image based on the direction selection strategy and the number of selections; assigning a first defect depth to each pixel point in the second pixel point, and masking each pixel point in the second pixel point to obtain a first defect image; the first defect depth is less than a threshold value.
[0007] Optionally, determine the first defect depth of four pixels adjacent to the third pixel; the third pixel is any pixel in the first defect image information; determine the second defect depth of the third pixel based on the first defect depth and defect depth corrosion rate of the four pixels adjacent to the third pixel; obtain the second defect image information based on the third pixel and the second defect depth of the third pixel.
[0008] Optionally, the second defect depth of the third pixel satisfies the following formula: ; Wherein, P is the second defect depth of the third pixel, r is the defect depth corrosion rate, is the first defect depth of the third pixel, d(k, ) is the first defect depth of each of the four pixels adjacent to the third pixel, ; (i-1,j), (i+1,j), (i,j-1), and (i,j+1) are the pixels adjacent to the third pixel respectively.
[0009] Optionally, the defect depth adjustment range is determined based on the second defect depth of the pixel in the second defect image information and the thickness of the simulated tank bottom plate; the color of the fourth pixel is determined based on the second defect depth of the fourth pixel, the defect depth adjustment range and the color bar; the color bar includes at least one color, and the fourth pixel is any pixel point in the second defect image information; based on the fourth pixel and the color of the fourth pixel, a thermal map of the simulated tank bottom plate is obtained.
[0010] Optionally, the color value of the fourth pixel satisfies the following formula:
[0011] .
[0012] in, is the color value of the fourth pixel, x is the second defect depth of the fourth pixel, x i is the boundary value of the adjustment range of the i-th defect depth, x i+1is the boundary value of the i+1th defect depth adjustment range, C i is x i The corresponding color value, C i+1 is x i+1 The corresponding color value, .
[0013] Optionally, defect data of the experimental tank bottom plate is obtained through an ultrasonic device; a thermal map of the experimental tank bottom plate is determined based on the defect data of the experimental tank bottom plate; and a defect recognition model is trained based on the thermal map of the simulated tank bottom plate and the thermal map of the experimental tank bottom plate.
[0014] Optionally, the defect recognition model is a YOLOv8 model based on the EfficientNet architecture.
[0015] Optionally, the defect data of the bottom plate of the storage tank to be inspected is obtained by an ultrasonic device on the robot crawler; the defect data of the bottom plate of the storage tank to be inspected is input into a defect recognition model to obtain a defect recognition map.
[0016] In a second aspect, the present application proposes a defect recognition model training device for a tank bottom, comprising: a processing unit; a processing unit for generating first defect image information of a simulated tank bottom according to preset defect features; the first defect image information includes pixels in the first defect image and first defect depths of pixels; a processing unit for performing corrosion diffusion processing on pixels in the first defect image according to the first defect depths of pixels in the first defect image information and the first defect depths of adjacent pixels to obtain second defect image information; the second defect image information includes pixels in the second defect image and second defect depths of pixels; the second defect depth is the defect depth after corrosion diffusion processing; a processing unit for performing color assignment processing on pixels in the second defect image information according to the second defect depths of pixels in the second defect image information to obtain a thermal map of the simulated tank bottom; the thermal map includes the values of pixels, second defect depths and colors of pixels in the thermal map; the processing unit for training a defect recognition model based on the thermal map of the simulated tank bottom; the defect recognition model is used to perform defect recognition on an input defect recognition map of the tank bottom.
[0017] In a third aspect, a tank bottom plate defect recognition model training device is provided, comprising a memory and a processor; the memory is used to store computer execution instructions, and the processor and the memory are connected via a bus; when the tank bottom plate defect recognition model training device is running, the processor executes the computer execution instructions stored in the memory, so that the tank bottom plate defect recognition model training device performs the tank bottom plate defect recognition model training method of the second aspect.
[0018] The tank floor defect recognition model training device can be a network device or a component within the network device, such as a chip system within the network device. The chip system is configured to support the network device in implementing the functions described in the first aspect and any possible implementation thereof, such as acquiring, determining, and transmitting data and / or information involved in the tank floor defect recognition model training method. The chip system includes a chip and may also include other discrete components or circuit structures.
[0019] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium including computer execution instructions, which, when executed on a computer, enable the computer to execute the tank bottom plate defect recognition model training method of the second aspect.
[0020] In a fifth aspect, a computer program product is also provided, which includes computer instructions. When the computer instructions are run on a tank bottom plate defect recognition model training device, the tank bottom plate defect recognition model training device performs the tank bottom plate defect recognition model training method as described in the second aspect above.
[0021] It should be noted that the aforementioned computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer-readable storage medium may be packaged together with the processor of the tank floor defect recognition model training device, or may be packaged separately from the processor of the tank floor defect recognition model training device, and this is not limited in this embodiment of the present application.
[0022] The description of the second, third, fourth and fifth aspects of this application can refer to the detailed description of the first aspect.
[0023] In the embodiments of this application, the name of the tank floor defect recognition model training device does not limit the device or functional modules themselves. In actual implementation, these devices or functional modules may appear with other names. For example, the receiving unit may also be called a receiving module, a receiver, etc. As long as the functions of each device or functional module are similar to those of this application, they are within the scope of this application and its equivalents.
[0024] The tank floor defect recognition model training device disclosed herein generates first defect image information of a simulated tank floor based on preset defect features. Since the first defect image information includes pixels in the first defect image and their first defect depths, erosion diffusion processing is performed on the pixels in the first defect image based on the first defect depths of the pixels and the first defect depths of adjacent pixels in the first defect image information to obtain second defect image information. Due to the erosion diffusion processing performed on the pixels in the first defect image, multiple second defect image information diffused from the first defect image can be obtained based on the degree of erosion diffusion processing. Considering that the second defect image information includes pixels in the second defect image and their second defect depths, and that the second defect depth is the defect depth after erosion diffusion processing, color assignment processing is performed on the pixels in the second defect image information based on the second defect depths of the pixels in the second defect image information to obtain multiple thermal maps of the simulated tank floor. Since the present invention can generate multiple thermal maps of the simulated tank floor based on multiple second defect image information, training a defect recognition model based on the thermal maps of the simulated tank floor can enrich the number of model training samples and improve the accuracy of the defect recognition model. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0026] Figure 1 A schematic diagram of the architecture of a tank bottom plate defect recognition model training system provided in an embodiment of the present application;
[0027] Figure 2 A schematic structural diagram of a tank bottom plate defect recognition model training device provided in an embodiment of the present application;
[0028] Figure 3 A flowchart of a method for training a defect recognition model for a tank bottom plate provided in an embodiment of the present application;
[0029] Figure 4 A flow chart of another method for training a defect recognition model for a tank bottom plate provided in an embodiment of the present application;
[0030] Figure 5 A schematic diagram of the architecture of a tank bottom plate defect identification system provided in an embodiment of the present application;
[0031] Figure 6 A schematic structural diagram of another tank bottom plate defect recognition model training device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0033] In this document, the character " / " generally indicates an "or" relationship between the preceding and following objects. For example, A / B can be understood as either A or B.
[0034] The terms "first" and "second" in the following description are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first edge service node" and "second edge service node" are used to distinguish different edge service nodes, rather than to describe the characteristic order of edge service nodes.
[0035] Furthermore, the terms "including," "having," and any variations thereof, as used in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or apparatus.
[0036] Additionally, in the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present concepts in a concrete manner.
[0037] In related technologies, images of tank floor defects can only be acquired after the tank has been shut down, its contents drained, and cleaned. This allows these images to be used as samples for model training to generate a defect recognition model. This trained model can then be used to identify images of tank floor defects to be inspected.
[0038] Because acquiring images of tank floor defects requires draining the tank and cleaning it, which is time-consuming and labor-intensive, model training can result in insufficient and poorly-quality sample data, leading to low accuracy in the defect recognition model. Therefore, improving the accuracy of defect recognition models remains a technical challenge.
[0039] The present application provides a method for training a defect recognition model for a tank bottom. The tank bottom defect recognition model training device generates first defect image information of a simulated tank bottom based on preset defect features. Since the first defect image information includes pixels in the first defect image and the first defect depth of the pixels, corrosion diffusion processing is performed on the pixels in the first defect image based on the first defect depth of the pixels and the first defect depth of the adjacent pixels in the first defect image information to obtain second defect image information. Since the corrosion diffusion processing is performed on the pixels in the first defect image, multiple second defect image information diffused from the first defect image can be obtained based on the degree of corrosion diffusion processing. Considering that the second defect image information includes pixels in the second defect image and the second defect depth of the pixels; the second defect depth is the defect depth after the corrosion diffusion processing. Based on the second defect depth of the pixels in the second defect image information, color assignment processing is performed on the pixels in the second defect image information to obtain multiple thermal maps of the simulated tank bottom. Since the present application can obtain a thermal map of a simulated tank bottom based on multiple second defect image information, a defect recognition model can be trained based on the thermal map of the simulated tank bottom to enrich the number of model training samples and improve the accuracy of the defect recognition model.
[0040] For example, Figure 1 As shown, Figure 1 This is a schematic diagram of the architecture of a tank bottom plate defect recognition model training system provided in an embodiment of the present application. The tank bottom plate defect recognition model training system includes: a data acquisition device 101 and a tank bottom plate defect recognition model training device 102.
[0041] The defect recognition model training device 102 for the tank bottom plate is used to generate first defect image information of a simulated tank bottom plate according to preset defect features; perform corrosion diffusion processing on the pixel points in the first defect image information according to the first defect depth of the pixel points and the first defect depth of the adjacent pixel points to obtain second defect image information; perform color assignment processing on the pixel points in the second defect image information according to the second defect depth of the pixel points in the second defect image information to obtain a thermal map of the simulated tank bottom plate; and obtain a defect recognition model based on the training of the thermal map of the simulated tank bottom plate.
[0042] The data acquisition device 101 can obtain defect data of the bottom plate of the storage tank to be inspected through the ultrasonic device on the robot crawler.
[0043] The defect recognition model may be provided in the tank bottom plate defect recognition model training device 102 or in a processing device connected to the tank bottom plate defect recognition model training device 102 .
[0044] Optionally, the physical device of the data acquisition device 101 is a terminal, and the physical device of the tank bottom plate defect recognition model training device 102 is a server.
[0045] Optionally, the terminal may be a device that provides voice and / or data connectivity to a user, a handheld device with wireless connection capabilities, or other processing devices connected to a wireless modem. A wireless terminal may communicate with one or more core networks via a radio access network (RAN). A wireless terminal may be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal, or a portable, pocket-sized, handheld, computer-built-in, or vehicle-mounted mobile device that exchanges voice and / or data with a radio access network, such as a mobile phone, tablet computer, laptop computer, netbook, or personal digital assistant (PDA).
[0046] Optionally, the above-mentioned server can be a server in a server cluster (consisting of multiple servers), or a chip in the server, or a system on a chip in the server, or can be implemented by a virtual machine (VM) deployed on a physical machine, which is not limited in this embodiment of the present application.
[0047] The embodiment of the present application provides a tank bottom plate defect recognition model training device, which is used to execute the tank bottom plate defect recognition model training system provided by the embodiment of the present application. Figure 2 This is a schematic diagram of the structure of a tank bottom plate defect recognition model training device provided in an embodiment of the present application. Figure 2 As shown, the tank bottom plate defect recognition model training device 102 includes at least one first processor 201, a communication line 202, and at least one communication interface 204, and may also include a memory 203. The first processor 201, the memory 203, and the communication interface 204 may be connected via the communication line 202.
[0048] The first processor 201 can be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more digital signal processors (DSPs) or one or more field programmable gate arrays (FPGAs).
[0049] The communication link 202 may include a pathway for transmitting information between the aforementioned components.
[0050] The communication interface 204 is used to communicate with other devices or communication networks, and can use any transceiver or similar device, such as Ethernet, radio access network (RAN), WLAN, etc.
[0051] The memory 203 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to contain or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0052] In one possible design, the memory 203 can exist independently of the first processor 201, that is, the memory 203 can be a memory external to the first processor 201. In this case, the memory 203 can be connected to the first processor 201 via the communication line 202, and is used to store execution instructions or application code, and is controlled by the first processor 201 to implement the tank bottom plate defect recognition model training method provided in the following embodiment of this application. In another possible design, the memory 203 can also be integrated with the first processor 201, that is, the memory 203 can be the internal memory of the first processor 201. For example, the memory 203 is a cache that can be used to temporarily store some data and instruction information.
[0053] As an implementation method, the first processor 201 may include one or more CPUs, such as Figure 2 As another implementation, the tank bottom plate defect recognition model training device 102 may include multiple processors, such as Figure 2As another implementation, the tank bottom plate defect recognition model training apparatus 102 may further include an output device 205 and an input device 206.
[0054] The following, combined with the Figure 3 A tank bottom plate defect recognition model training method provided in an embodiment of the present application is described in detail. Figure 3 As shown, the tank bottom plate defect recognition model training method includes S301-S304.
[0055] S301. The tank bottom plate defect recognition model training device generates first defect image information of a simulated tank bottom plate according to preset defect features.
[0056] The first defect image information includes pixels in the first defect image and first defect depths of the pixels.
[0057] Optionally, the preset defect features include strip defects, circular defects, and irregular defects.
[0058] In one possible implementation, a tank bottom plate defect recognition model training device generates first defect image information of a simulated tank bottom plate according to preset defect features, and generates a zero matrix of a specified size as an image array and a mask matrix of the same size.
[0059] It should be explained that the tank floor defect recognition model training device begins traversing each pixel of the initial image with a given extremely low probability, based on the shape type of the generated defect. If the current pixel in the initial image is selected as the initial corrosion point, a random walk is performed from that pixel to generate the first defect image information.
[0060] S302. The tank bottom plate defect recognition model training device performs corrosion diffusion processing on the pixel points in the first defect image according to the first defect depth of the pixel points in the first defect image information and the first defect depth of the adjacent pixel points to obtain second defect image information.
[0061] The second defect image information includes pixel points in the second defect image and second defect depths of the pixel points; the second defect depth is the defect depth after corrosion diffusion processing.
[0062] It should be explained that the tank floor defect recognition model training device performs a preset number of corrosion diffusion iterations on the first defect image information. During each iteration, the difference between the first defect depth of a pixel and its adjacent pixels is calculated. The second defect depth is updated based on this first defect depth difference and a preset defect depth corrosion rate, ensuring that the second defect depth does not exceed a preset threshold.
[0063] S303. The tank bottom plate defect recognition model training device performs color assignment processing on the pixel points in the second defect image information according to the second defect depth of the pixel points in the second defect image information to obtain a thermal map of the simulated tank bottom plate.
[0064] The heat map includes the pixel points in the heat map, the second defect depth of the pixel points, and the color value of the pixel points.
[0065] S304. The tank bottom plate defect recognition model training device obtains a defect recognition model based on the thermal map of the simulated tank bottom plate.
[0066] Among them, the defect recognition model is used to identify defects in the input defect recognition image of the tank bottom plate. The defect recognition model is the YOLOv8 model of the EfficientNet architecture.
[0067] In one possible implementation, the tank bottom plate defect recognition model training device uses 80% of the sample data for YOLO network training, 15% of the sample data for defect recognition model verification, and the remaining sample data for defect recognition model testing.
[0068] Optionally, the sample data is data from a thermal map simulating a tank floor.
[0069] It's important to explain that the validation dataset is used for model tuning and hyperparameter adjustment to ensure the model maintains good performance on unseen data and to calculate model evaluation metrics (such as mean average precision, precision, and recall). Based on the validation set evaluation results, model hyperparameters are adjusted, ultimately training an improved YOLO network that can accurately identify defect types.
[0070] It is understandable that EfficientNet strikes a balance between computing resources and performance by dynamically adjusting the network width, depth, and resolution. Combining the real-time and high efficiency of YOLO with the lightweight and high-precision advantages of EfficientNet, it effectively improves defect recognition accuracy and reduces the probability of misjudgment and missed judgment.
[0071] For example, Figure 4As shown, the defect recognition model training device for the tank bottom determines the preset defect features, traverses the pixels in the initial image, and assigns the preset probability to the pixels. When the probability of the first pixel is greater than the corrosion probability, the pixels in the initial image are re-traversed and the preset probability is assigned to the pixels. When the probability of the first pixel is not greater than the corrosion probability, the generation direction of the defect is determined and the number of steps is increased by 1. When the current number of steps is not greater than the random number of steps, the generation direction of the defect is re-determined and the number of steps is increased by 1. When the current number of steps is greater than the random number of steps, a determined defect outline is generated. The defect depth change of a single corrosion point is determined, and the surrounding corrosion probability is considered. All pixels are traversed, the overall defect depth change is generated, a thermal map of the simulated tank bottom is generated, and a data set is constructed.
[0072] The tank floor defect recognition model training device disclosed herein generates first defect image information of a simulated tank floor based on preset defect features. Since the first defect image information includes pixels in the first defect image and their first defect depths, erosion diffusion processing is performed on the pixels in the first defect image based on the first defect depths of the pixels and the first defect depths of adjacent pixels in the first defect image information to obtain second defect image information. Due to the erosion diffusion processing performed on the pixels in the first defect image, multiple second defect image information diffused from the first defect image can be obtained based on the degree of erosion diffusion processing. Considering that the second defect image information includes pixels in the second defect image and their second defect depths, and that the second defect depth is the defect depth after erosion diffusion processing, color assignment processing is performed on the pixels in the second defect image information based on the second defect depths of the pixels in the second defect image information to obtain multiple thermal maps of the simulated tank floor. Since the present invention can generate multiple thermal maps of the simulated tank floor based on multiple second defect image information, training a defect recognition model based on the thermal maps of the simulated tank floor can enrich the number of model training samples and improve the accuracy of the defect recognition model.
[0073] In some embodiments of the present application, in S301 above, generating first defect image information of a simulated tank bottom plate according to preset defect features includes:
[0074] S401. The tank bottom plate defect recognition model training device performs defect generation processing on each pixel point in the initial image of the simulated tank bottom to obtain a first defect image.
[0075] Optionally, the defect generation process of the defect recognition model training device for the tank bottom plate includes:
[0076] Step 1: Based on a preset probability, determine the first pixel point that meets the preset probability requirement from the initial image.
[0077] Optionally, the default probability is 0.01.
[0078] Exemplarily, the first pixel point (i, j) in the initial image is traversed, and the Bernoulli distribution of the preset probability is considered to determine the first pixel point that meets the preset probability requirement.
[0079] Step 2: Based on the preset defect characteristics, determine the direction selection strategy and number of selections.
[0080] Among them, the direction selection strategy is used to characterize the probability of selecting the target direction.
[0081] Optionally, the direction selection strategy includes: uniform distribution mode, vertical priority distribution mode and horizontal priority distribution mode.
[0082] For example, in the vertical priority distribution mode, the selection probability of the up and down direction is 0.4, and the selection probability of the left and right direction is 0.1; in the horizontal priority distribution mode, the selection probability of the left and right direction is 0.45, and the selection probability of the up and down direction is 0.05.
[0083] Exemplarily, the number of selections is greater than 1000 and less than 2000.
[0084] Step 3: Using the first pixel as the initial point, access the unmasked second pixel in the initial image based on the direction selection strategy and the number of selections.
[0085] Step 4: assign a first defect depth to each pixel in the second pixel points, and perform a mask on each pixel in the second pixel points to obtain a first defect image.
[0086] The first defect depth is less than a threshold.
[0087] Optionally, the threshold value is less than the thickness of the simulated tank floor.
[0088] In some embodiments of the present application, in S302 above, performing erosion diffusion processing on pixels in the first defect image according to the first defect depth of the pixels and the first defect depth of adjacent pixels in the first defect image information to obtain the second defect image information includes:
[0089] S501. The tank bottom plate defect recognition model training device determines the first defect depths of four pixel points adjacent to the third pixel point.
[0090] The third pixel point is any pixel point among the pixel points in the first defect image information.
[0091] Exemplarily, the third pixel point is (i+1, j).
[0092] It is understandable that the four pixel points adjacent to the third pixel point include: the pixel point located to the left of the third pixel point , the pixel to the right of the third pixel , the pixel above the third pixel , the pixel below the third pixel .
[0093] S502. The tank bottom plate defect recognition model training device determines the second defect depth of the third pixel point based on the first defect depth of the third pixel point, the first defect depths of four pixel points adjacent to the third pixel point, and the defect depth corrosion rate.
[0094] The second defect depth of the third pixel satisfies the following formula: ; Wherein, P is the second defect depth of the third pixel, r is the defect depth corrosion rate, is the first defect depth of the third pixel, d(k, ) is the first defect depth of each of the four pixels adjacent to the third pixel, ; (i-1,j), (i+1,j), (i,j-1), and (i,j+1) are the pixels adjacent to the third pixel respectively.
[0095] Optionally, r is 0.8.
[0096] S503. The tank bottom plate defect recognition model training device obtains second defect image information according to the third pixel point and the second defect depth of the third pixel point.
[0097] It's important to explain that a corrosion unit is defined as a combination of a pixel and its defect depth, with an area of 1. This serves as the basis for calculating the corrosion spread process. The extent of corrosion within a corrosion unit depends on its defect depth. The defect depth corrosion rate, r, represents the corrosion intensity per unit area per unit time. Each corrosion unit has up to five exposed surfaces (front, back, left, right, and top). A pixel (i, j) experiences corrosion above it only if it has already been corroded, meaning the defect depth d(i, j) is greater than 0. The extent of corrosion spread depends on the influence of neighboring pixels on the pixel. If the defect depth of a neighboring corrosion unit is greater than that of the current unit, the neighboring unit will corrode the current unit. The corrosion intensity is determined by the difference in defect depth between the two units, and the exposed area is equal to the defect depth difference. The corrosion intensity of an exposed surface is proportional to its area and correlated with the defect depth corrosion rate, r. In other words, when the exposed surface area increases by one pixel, its corrosion intensity per unit time increases by r. This indicates that a significant change in corrosion intensity requires a quantitative change in the exposed area, meaning an increase of at least one pixel.
[0098] In some embodiments of the present application, in S303 above, color assignment processing is performed on the pixels in the second defect image information according to the second defect depth of the pixels in the second defect image information to obtain a thermal map simulating the tank bottom plate, including:
[0099] S601. The tank bottom plate defect recognition model training device determines a defect depth adjustment range according to a second defect depth of a pixel point in the second defect image information and a thickness of a simulated tank bottom plate.
[0100] It should be explained that the second defect image information can be Dividing by the thickness T of the tank bottom plate yields the defect depth adjustment range, making it more suitable for mapping to the color space. The operation is expressed as:
[0101] A color bar Contains a series of colors, each color corresponds to a parameter interval. The number of colors in the color bar determines the granularity of the parameter interval division. In order to obtain a more detailed color distribution, you can use the magnification factor right Zoom in and get the parameter range after zooming in: ; where k is 10 and can be adjusted according to actual conditions.
[0102] Optionally, the thickness T of the tank bottom plate is 80 pixels.
[0103] S602. The tank bottom plate defect recognition model training device determines the color of the fourth pixel according to the second defect depth of the fourth pixel, the defect depth adjustment range, and the color bar.
[0104] The color bar includes at least one color, and the fourth pixel is any pixel point among the pixel points in the second defect image information.
[0105] The color value of the fourth pixel satisfies the following formula:
[0106] .
[0107] in, is the color value of the fourth pixel, x is the second defect depth of the fourth pixel, x i is the boundary value of the adjustment range of the i-th defect depth, x i+1 is the boundary value of the i+1th defect depth adjustment range, C i is x i The corresponding color value, C i+1 is x i+1 The corresponding color value, .
[0108] Optionally, the color bar can include: [255,0,0], [220,40,30], [230,160,50], [235,235,60], [150,200,50], [70,180,50], [35,160,55], [25,130,140], [30,80,155], [160,180,255], [255,255,255].
[0109] S603. The tank bottom plate defect recognition model training device obtains a thermal map of the simulated tank bottom plate according to the fourth pixel and the color of the fourth pixel.
[0110] Optionally, the tank bottom plate defect recognition model training device generates a zero array of the same size as the depth image based on the second defect image information as the initialization image I o . The calculated color value C interpolated Assign values to the initialization image I respectively o The red, green and blue channels form a heat map I heatmap I heatmap (R,G,B) = [C interpolated (R), C interpolated (G), C interpolated (B),] Repeat the above process to generate the specified number The heat map is used as the model training sample.
[0111] It's important to explain that the number of colors in the color bar determines the granularity of the parameter interval divisions. To obtain a more detailed color distribution, the depth map can be adjusted using the magnification factor to obtain the magnified parameter interval. Based on the color bar and the magnified parameter interval, linear interpolation is used to calculate the color corresponding to each depth value. The calculated color values are assigned to the red, green, and blue channels of the initialization image, forming a heat map. Repeat this process to generate a preset number of heat maps as the simulated defect dataset.
[0112] In some embodiments of the present application, in S304 above, the defect recognition model is obtained by training the thermal map of the simulated tank bottom plate, including:
[0113] S701. The tank bottom plate defect recognition model training device obtains defect data of the experimental tank bottom plate through an ultrasonic device.
[0114] It should be explained that the ultrasonic device can carry a 256-element phased array ultrasonic sensor, which can collect 18,000 ultrasonic thickness measurement values per 929 square centimeters area and can perform C-scan imaging to obtain defect data of the bottom plate of the experimental tank based on the scanning imaging results.
[0115] S702. The tank bottom plate defect recognition model training device determines a thermal map of the experimental tank bottom plate based on the defect data of the experimental tank bottom plate.
[0116] In one possible implementation, the tank bottom plate defect recognition model training device inputs the defect data of the experimental tank bottom plate into the thermal map software, and obtains the thermal map of the experimental tank bottom plate based on the thermal map software.
[0117] S703. The tank bottom plate defect recognition model training device trains a defect recognition model based on the thermal map of the simulated tank bottom plate and the thermal map of the experimental tank bottom plate.
[0118] It's understandable that defect recognition model training utilizes a dataset consisting of two parts: one is a simulated defect dataset generated using a single-point diffusion Markov chain to simulate real tank bottom defects; the other is a measured dataset collected from manually processed defect samples to construct the real dataset. This not only enriches the sample set but also improves its accuracy, thereby increasing the training efficiency of the defect recognition model.
[0119] It is understood that to evaluate the effectiveness and accuracy of the defect recognition algorithm, this application selects manually annotated test images for testing. The trained model is loaded into the test environment, and the test images are fed into the model to obtain the algorithm's prediction results. The algorithm's prediction results are compared with the manually annotated results to evaluate the algorithm's accuracy. The prediction results are analyzed to identify weaknesses in the algorithm and make targeted improvements.
[0120] In some embodiments of the present application, after the above S304, the defect recognition model is used to identify defect data of the bottom plate of the storage tank to be inspected, including:
[0121] S801. The tank bottom plate defect recognition model training device obtains defect data of the tank bottom plate to be inspected through the ultrasonic device on the robot crawler.
[0122] For example, Figure 5As shown, an embodiment of the present application provides a tank floor defect identification system consisting of a robotic crawler 501, an ultrasonic probe 5011, an ultrasonic board 5012, and a robotic control console 502. The ultrasonic probe 5011 and ultrasonic board 5012 are mounted on the robotic crawler 501 and are used to transmit and receive ultrasonic signals. During inspection, the robotic crawler 501 is located inside the tank. Data collected by the ultrasonic probe 5011 is initially processed by the ultrasonic board 5012 and then transmitted via optical fiber from the robot to the robotic control console 502 outside the tank. The robotic control console 502 includes key components such as an optoelectronic converter, a robot control computer, and an ultrasonic data processing computer. The optoelectronic converter converts optical signals into electrical signals for subsequent processing. The robot control computer runs the robot control software, responsible for robot movement and operational control. The ultrasonic data processing computer runs the ultrasonic data processing software and intelligent recognition algorithms to conduct in-depth analysis and processing of the collected ultrasonic data, enabling accurate detection and assessment of the tank's internal conditions. The robot control computer and the ultrasonic data processing computer communicate through the network port to realize the exchange of data and control signals, ensuring the coordination and efficiency of the entire detection process.
[0123] S802: The tank bottom plate defect recognition model training device inputs the defect data of the tank bottom plate to be detected into the defect recognition model to obtain a defect recognition map.
[0124] Optionally, the defect identification map includes shape information of the defect, color distribution of the defect, and defect depth of the defect.
[0125] like Figure 6 , which is a structural diagram of another tank bottom plate defect recognition model training device provided in an embodiment of the present application. Figure 6The defect recognition model training device for the tank bottom shown in the figure includes: a processing unit 601 and an acquisition unit 602; the processing unit 601 is used to generate first defect image information of the simulated tank bottom according to the preset defect features; the first defect image information includes the pixel points in the first defect image and the first defect depth of the pixel points; the processing unit 601 is used to perform corrosion diffusion processing on the pixel points in the first defect image according to the first defect depth of the pixel points in the first defect image information and the first defect depth of the adjacent pixel points to obtain second defect image information; the second defect image information includes the pixel points in the second defect image the pixel point and the second defect depth of the pixel point; the second defect depth is the defect depth after corrosion diffusion processing; the processing unit 601 is used to perform color assignment processing on the pixel point in the second defect image information according to the second defect depth of the pixel point in the second defect image information to obtain a thermal map of the simulated tank bottom plate; the thermal map includes the pixel point in the thermal map, the second defect depth of the pixel point and the color value of the pixel point; the processing unit 601 is used to train a defect recognition model based on the thermal map of the simulated tank bottom plate; the defect recognition model is used to perform defect recognition on the input defect recognition map of the tank bottom plate.
[0126] In some embodiments, the processing unit 601 is specifically used to: perform defect generation processing on each pixel point in the initial image of the simulated tank site to obtain a first defect image; the defect generation processing includes: determining the first pixel point that meets the preset probability requirement from the initial image based on a preset probability; determining the direction selection strategy and the number of selections based on preset defect characteristics; the direction selection strategy is used to characterize the probability of selecting the target direction; taking the first pixel point as the initial point, accessing the unmasked second pixel point in the initial image based on the direction selection strategy and the number of selections; assigning a first defect depth to each pixel point in the second pixel point, and masking each pixel point in the second pixel point to obtain a first defect image; the first defect depth is less than a threshold.
[0127] In some embodiments, the processing unit 601 is specifically used to: determine the first defect depth of four pixels adjacent to the third pixel; the third pixel is any pixel in the first defect image information; determine the second defect depth of the third pixel based on the first defect depth of the third pixel, the first defect depth of the four pixels adjacent to the third pixel and the defect depth corrosion rate; obtain the second defect image information based on the third pixel and the second defect depth of the third pixel.
[0128] In some embodiments, the second defect depth of the third pixel satisfies the following formula: ; Wherein, P is the second defect depth of the third pixel, r is the defect depth corrosion rate, is the first defect depth of the third pixel, d(k, ) is the first defect depth of each of the four pixels adjacent to the third pixel, ; (i-1,j), (i+1,j), (i,j-1), and (i,j+1) are the pixels adjacent to the third pixel respectively.
[0129] In some embodiments, the processing unit 601 is specifically used to: determine a defect depth adjustment range based on the second defect depth of the pixel point in the second defect image information and the thickness of the simulated tank bottom plate; determine the color of the fourth pixel based on the second defect depth of the fourth pixel, the defect depth adjustment range and the color bar; the color bar includes at least one color, and the fourth pixel is any pixel point in the second defect image information; and obtain a thermal map of the simulated tank bottom plate based on the fourth pixel and the color of the fourth pixel.
[0130] In some embodiments, the value of the color of the fourth pixel satisfies the following formula: .
[0131] in, is the color value of the fourth pixel, x is the second defect depth of the fourth pixel, x i is the boundary value of the adjustment range of the i-th defect depth, x i+1 is the boundary value of the i+1th defect depth adjustment range, C i is x i The corresponding color value, C i+1 is x i+1 The corresponding color value, .
[0132] In some embodiments, the acquisition unit 602 is used to acquire defect data of the experimental tank bottom plate through an ultrasonic device; the processing unit 601 is used to determine the thermal map of the experimental tank bottom plate based on the defect data of the experimental tank bottom plate; the processing unit 601 is used to train a defect recognition model based on the thermal map of the simulated tank bottom plate and the thermal map of the experimental tank bottom plate.
[0133] In some embodiments, the defect recognition model is a YOLOv8 model of the EfficientNet architecture.
[0134] In some embodiments, the acquisition unit 602 is used to acquire defect data of the bottom plate of the tank to be inspected through an ultrasonic device on the robotic crawler; the processing unit 601 is used to input the defect data of the bottom plate of the tank to be inspected into the defect recognition model to obtain a defect recognition map.
[0135] An embodiment of the present application also provides a computer-readable storage medium, which includes computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer executes the tank bottom plate defect recognition model training method provided in the above embodiment.
[0136] The embodiments of the present application also provide a computer program product that can be directly loaded into a memory and contains software code. After being loaded and executed by a computer, the computer program product can implement the tank bottom plate defect recognition model training method provided in the above embodiments. Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present application with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present application.
[0137] The system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present application can be decomposed or combined. For example, the modules in the above embodiment can be combined into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present application are only for distinguishing the modules or steps and are not considered to be improper limitations of the present application.
[0138] Those skilled in the art should be able to appreciate that, in conjunction with the modules and method steps of each example described in the embodiments disclosed herein, it is possible to implement them with electronic hardware, computer software, or a combination of the two, and the programs corresponding to the software modules and method steps can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art 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 this application.
Claims
1. A method for training a defect recognition model for a tank bottom plate, characterized in that: include: Generate first defect image information of a simulated tank bottom plate according to preset defect features; The first defect image information includes a pixel in the first defect image and a first defect depth of the pixel; performing erosion diffusion processing on a pixel in the first defect image information according to a first defect depth of the pixel and a first defect depth of an adjacent pixel to obtain second defect image information; the second defect image information includes the pixel in the second defect image and the second defect depth of the pixel; the second defect depth is the defect depth after the erosion diffusion processing; performing color assignment processing on the pixels in the second defect image information according to the second defect depths of the pixels in the second defect image information to obtain a thermal map of the simulated tank bottom plate; the thermal map includes the pixels in the thermal map, the second defect depths of the pixels, and the colors of the pixels; A defect recognition model is obtained by training the thermal map of the simulated tank bottom plate; The defect recognition model is used to perform defect recognition on the input defect recognition image of the tank bottom plate; The step of generating first defect image information of a simulated storage tank bottom plate according to preset defect features includes: Performing defect generation processing on each pixel in the initial image of the simulated storage tank to obtain the first defect image; The defect generation process includes: determining a first pixel point that meets a preset probability requirement from an initial image based on a preset probability; Determining a direction selection strategy and a number of selections based on the preset defect characteristics; the direction selection strategy is used to characterize the probability of selecting a target direction; Taking the first pixel as an initial point, accessing a second pixel that is not masked in the initial image based on the direction selection strategy and the number of selections; The first defect depth is assigned to each pixel in the second pixel points, and each pixel in the second pixel points is masked to obtain the first defect image; the first defect depth is less than a threshold.
2. The method according to claim 1, characterized in that The performing erosion diffusion processing on the pixel points in the first defect image according to the first defect depth of the pixel points and the first defect depth of the adjacent pixel points in the first defect image information to obtain the second defect image information includes: Determine the first defect depths of four pixels adjacent to a third pixel; the third pixel being any one of the pixels in the first defect image information; determining a second defect depth of the third pixel point according to the first defect depth of the third pixel point, the first defect depths of four pixel points adjacent to the third pixel point, and defect depth corrosion rates; The second defect image information is obtained according to the third pixel point and the second defect depth of the third pixel point.
3. The method according to claim 2, characterized in that The second defect depth of the third pixel satisfies the following formula: ; Wherein, P is the second defect depth of the third pixel, r is the defect depth corrosion rate, is the first defect depth of the third pixel, d(k, ) is the first defect depth of each of the four pixels adjacent to the third pixel, ; (i-1,j), (i+1,j), (i,j-1), and (i,j+1) are the pixels adjacent to the third pixel respectively.
4. The method according to claim 1, wherein The step of performing color assignment processing on the pixel points in the second defect image information according to the second defect depth of the pixel points in the second defect image information to obtain the thermal map of the simulated tank bottom plate includes: determining a defect depth adjustment range according to a second defect depth of a pixel point in the second defect image information and a thickness of the simulated tank bottom plate; determining a color of the fourth pixel according to the second defect depth of the fourth pixel, the defect depth adjustment range, and a color bar, wherein the color bar includes at least one color, and the fourth pixel is any one of the pixels in the second defect image information; A thermal map of the simulated tank bottom plate is obtained according to the fourth pixel and the color of the fourth pixel.
5. The method according to claim 4, characterized in that The color value of the fourth pixel satisfies the following formula: ; in, is the color value of the fourth pixel, x is the second defect depth of the fourth pixel, x i is the boundary value of the adjustment range of the i-th defect depth, x i+1 is the boundary value of the i+1th defect depth adjustment range, C i is x i The corresponding color value, C i+1 is x i+1 The corresponding color value, .
6. The method according to claim 1, characterized in that The defect recognition model is obtained by training the thermal map of the simulated tank bottom plate, including: Obtain defect data of the bottom plate of the experimental tank using an ultrasonic device; Determining a thermal map of the experimental storage tank bottom plate based on the defect data of the experimental storage tank bottom plate; The defect recognition model is trained based on the thermal map of the simulated tank bottom plate and the thermal map of the experimental tank bottom plate.
7. The method according to claim 1, characterized in that The defect recognition model is the YOLOv8 model of the EfficientNet architecture.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: The ultrasonic device on the robot crawler is used to obtain defect data of the bottom plate of the tank to be inspected; The defect data of the bottom plate of the storage tank to be inspected is input into the defect recognition model to obtain a defect recognition map.
9. A tank bottom plate defect recognition model training device, characterized in that: including a processing unit; The processing unit is configured to generate first defect image information simulating the bottom plate of the storage tank according to preset defect characteristics; the first defect image information includes pixel points in the first defect image and first defect depths of the pixel points; The processing unit is configured to perform erosion diffusion processing on a pixel point in the first defect image according to a first defect depth of the pixel point and a first defect depth of an adjacent pixel point in the first defect image information to obtain second defect image information; the second defect image information includes the pixel point in the second defect image and the second defect depth of the pixel point; the second defect depth is the defect depth after the erosion diffusion processing; The processing unit is configured to perform color assignment processing on pixels in the second defect image information according to the second defect depth of the pixels in the second defect image information, so as to obtain a thermal map of the simulated tank bottom plate; the thermal map includes the pixels in the thermal map, the second defect depth of the pixels, and the color values of the pixels; The processing unit is used to obtain a defect recognition model through training based on the thermal map of the simulated tank bottom plate; The defect recognition model is used to perform defect recognition on the input defect recognition image of the tank bottom plate; The processing unit is configured to perform defect generation processing on each pixel in the initial image of the simulated storage tank to obtain the first defect image; The defect generation process includes: determining a first pixel point that meets the preset probability requirement from the initial image based on a preset probability; determining a direction selection strategy and a number of selections based on the preset defect characteristics; the direction selection strategy is used to characterize the probability of selecting a target direction; taking the first pixel point as the initial point, accessing the unmasked second pixel point in the initial image based on the direction selection strategy and the number of selections; assigning the first defect depth to each pixel point in the second pixel point, and masking each pixel point in the second pixel point to obtain the first defect image; the first defect depth is less than a threshold.
10. An electronic device, characterized in that: include: A processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the tank bottom plate defect recognition model training method according to any one of claims 1 to 8.
11. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the defect recognition model training method for a tank bottom plate according to any one of claims 1 to 8.
Citation Information
Patent Citations
Power image defect detection method based on dynamic activation thermodynamic diagram
CN115410024A