Storage tank bottom plate defect identification model training method, device, equipment and medium
By simulating the defect image information of the storage tank base plate, corrosion diffusion and color assignment processing are performed, and a thermal map is generated to train the defect recognition model, which solves the problem of insufficient sample data in the prior art and improves the accuracy of the model.
Patent Information
- Application Number
- CN202510548777.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-28
AI Technical Summary
In the prior art, in the training of the tank base defect recognition model, the medium and the storage tank need to be emptied, resulting in insufficient sample data and poor quality, thereby reducing the accuracy of the defect recognition model.
By generating defect image information of the simulated storage tank base plate, corrosion diffusion processing and color assignment processing are performed to obtain a thermal map, thereby training the defect recognition model, enriching the training samples and improving the model accuracy.
This method can improve the accuracy of the defect identification model, reduce dependence on actual storage tank cleaning, and save time and resources.
Smart Images

Figure CN120070444A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of defect identification of storage tank bottoms, and more specifically, to a method, device, equipment, and medium for training a defect identification model of a storage tank bottom. Background Art
[0002] In the related art, after the storage tank is deactivated, the medium in the tank is emptied, and the storage tank is cleaned, the defect inspection image of the storage tank bottom can be obtained. In this way, the defect inspection image of the storage tank bottom can be used as a sample for model training to obtain a defect identification model, and the trained defect identification model can be used to identify the defect image of the storage tank bottom to be detected.
[0003] Since it is time-consuming and laborious to empty the medium in the tank and clean the storage tank when obtaining the defect inspection image of the storage tank bottom. Therefore, during the model training process, problems such as insufficient sample data and poor sample data quality may occur, resulting in a low accuracy rate of the defect identification model. Therefore, how to improve the accuracy rate of the defect identification model is still a technical problem to be solved. Summary of the Invention
[0004] In view of this, the present application provides a method, device, equipment, and medium for training a defect identification model of a storage tank bottom, aiming to improve the accuracy rate of the defect identification model.
[0005] In a first aspect, a method for training a defect identification model of a storage tank bottom provided by the present application includes: generating first defect image information of a simulated storage tank bottom according to preset defect features; the first defect image information includes pixel points in the first defect image and the first defect depth of the pixel points; performing erosion 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 adjacent pixel points to obtain second defect image information; the second defect image information includes pixel points in the second defect image and the second defect depth of the pixel points; the second defect depth is the defect depth after erosion diffusion processing; 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 a heat map of the simulated storage tank bottom; the heat map includes pixel points in the heat map, the second defect depth of the pixel points, and the color value of the pixel points; training a defect identification model according to the heat map of the simulated storage tank bottom; the defect identification model is used to identify defects in the input defect identification image of the storage tank bottom.
[0006] Optionally, perform defect generation processing on each pixel point in the initial image of the simulated storage tank to obtain a first defect image; the defect generation processing includes: determining, based on a preset probability, a first pixel point that meets the preset probability requirement from the initial image; determining a direction selection strategy and the number of selections based on preset defect features; the direction selection strategy is used to represent the probability of selecting a target direction; using the first pixel point as the initial point, accessing unmasked second pixel points 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 points, and masking each pixel point in the second pixel points to obtain a first defect image; the first defect depth is less than a threshold value.
[0007] Optionally, determine the first defect depths of four pixel points adjacent to a third pixel point; the third pixel point is any one of the pixel points in the first defect image information; determine the second defect depth of the third pixel point according to the first defect depths of the four pixel points adjacent to the third pixel point and the defect depth corrosion rate; obtain second defect image information according to the third pixel point and the second defect depth of the third pixel point.
[0008] Optionally, the second defect depth of the third pixel point satisfies the following formula: ; where P is the second defect depth of the third pixel point, r is the defect depth corrosion rate, is the first defect depth of the third pixel point, d(k, ) is the first defect depth of each of the four pixel points adjacent to the third pixel point, ; (i - 1, j), (i + 1, j), (i, j - 1), and (i, j + 1) are the pixel points adjacent to the third pixel point respectively.
[0009] Optionally, determine the defect depth adjustment range according to the second defect depth of the pixel points in the second defect image information and the thickness of the simulated storage tank bottom plate; determine the color of a fourth pixel according to the second defect depth of the fourth pixel, the defect depth adjustment range, and a color bar; the color bar includes at least one color, and the fourth pixel is any one of the pixel points in the second defect image information; obtain a heat map of the simulated storage tank bottom plate according to the fourth pixel and the color of the fourth pixel.
[0010] Optionally, the value of the color of the fourth pixel satisfies the following formula: .
[0011] Where, is the value of the color of the fourth pixel, x is the second defect depth of the fourth pixel, x i is the boundary value of the i-th defect depth adjustment range, x i+1 is the boundary value of the (i + 1)-th defect depth adjustment range, Ci is x i The corresponding color value, C i+1 is x i+1 The corresponding color value 。
[0012] Optionally, defect data of the bottom plate of the experimental storage tank is obtained through an ultrasonic device; based on the defect data of the bottom plate of the experimental storage tank, a heat map of the bottom plate of the experimental storage tank is determined; and a defect recognition model is trained according to the heat map of the simulated bottom plate of the storage tank and the heat map of the bottom plate of the experimental storage tank.
[0013] Optionally, the defect recognition model is a YOLOv8 model with an EfficientNet architecture.
[0014] Optionally, defect data of the bottom plate of the storage tank to be detected is obtained through an ultrasonic device on a robot crawler; the defect data of the bottom plate of the storage tank to be detected is input into the defect recognition model to obtain a defect recognition map.
[0015] In a second aspect, a device for training a defect recognition model of a bottom plate of a storage tank proposed in the present application includes: a processing unit; the processing unit is configured to generate first defect image information of a simulated bottom plate of a storage tank according to a preset defect feature; the first defect image information includes pixel points in the first defect image and the first defect depth of the pixel points; the processing unit is configured to perform erosion 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 adjacent pixel points, so as to obtain second defect image information; the second defect image information includes pixel points in the second defect image and the second defect depth of the pixel points; the second defect depth is the defect depth after erosion diffusion processing; the processing unit is configured to 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, so as to obtain a heat map of the simulated bottom plate of the storage tank; the heat map includes pixel points in the heat map, the second defect depth of the pixel points, and the color value of the pixel points; the processing unit is configured to train a defect recognition model according to the heat map of the simulated bottom plate of the storage tank; the defect recognition model is used to perform defect recognition on an input defect recognition map of the bottom plate of the storage tank.
[0016] In a third aspect, a device for training a defect recognition model of a bottom plate of a storage tank is provided, including a memory and a processor; the memory is used to store computer execution instructions, and the processor is connected to the memory through a bus; when the device for training a defect recognition model of a bottom plate of a storage tank runs, the processor executes the computer execution instructions stored in the memory, so that the device for training a defect recognition model of a bottom plate of a storage tank executes the method for training a defect recognition model of a bottom plate of a storage tank in the second aspect.
[0017] The defect recognition model training device for the storage tank bottom plate can be a network device or a part of the device in the network device, such as a chip system in the network device. The chip system is used to support the network device to implement the functions involved in the first aspect and any possible implementation manner thereof. For example, it acquires, determines, and sends the data and / or information involved in the defect recognition model training method for the storage tank bottom plate described above. The chip system includes chips and may also include other discrete devices or circuit structures.
[0018] Fourthly, a computer-readable storage medium is provided. The computer-readable storage medium includes computer-executable instructions. When the computer-executable instructions run on a computer, the computer is caused to execute the defect recognition model training method for the storage tank bottom plate in the second aspect.
[0019] Fifthly, a computer program product is further provided. The computer program product includes computer instructions. When the computer instructions run on the defect recognition model training device for the storage tank bottom plate, the defect recognition model training device for the storage tank bottom plate is caused to execute the defect recognition model training method for the storage tank bottom plate as described in the second aspect above.
[0020] It should be noted that the above computer instructions can be stored in whole or in part on the computer-readable storage medium. Among them, the computer-readable storage medium can be packaged together with the processor of the defect recognition model training device for the storage tank bottom plate, or can be separately packaged from the processor of the defect recognition model training device for the storage tank bottom plate. The embodiments of the present application do not make any limitation thereto.
[0021] The descriptions of the second aspect, the third aspect, the fourth aspect, and the fifth aspect in this application can refer to the detailed description of the first aspect.
[0022] In the embodiments of the present application, the name of the defect recognition model training device for the storage tank bottom plate does not limit the device or the functional module itself. In actual implementation, these devices or functional modules may appear under 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 the present application and belong to the scope of the present application and its equivalent technologies.
[0023] In this application, the defect recognition model training device for the storage tank bottom plate generates the first defect image information simulating the storage tank bottom plate according to the preset defect features. Since the first defect image information includes the pixel points in the first defect image and the first defect depth of the pixel points, therefore, 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, the pixel points in the first defect image are subjected to erosion diffusion processing to obtain the second defect image information. Since when performing the erosion diffusion processing on the pixel points 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 the pixel points in the second defect image and the second defect depth of the pixel points; the second defect depth is the defect depth after the erosion diffusion processing. According to the second defect depth of the pixel points in the second defect image information, color assignment processing is performed on the pixel points in the second defect image information to obtain multiple heat maps of the simulated storage tank bottom plate. Since this application can obtain multiple heat maps of the simulated storage tank bottom plate based on multiple second defect image information, and the defect recognition model can be trained according to the heat maps of the simulated storage tank bottom plate, the number of model training samples can be enriched, and the accuracy of the defect recognition model can be improved. Description of the Drawings
[0024] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of this application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings: Figure 1 is a schematic architecture diagram of a defect recognition model training system for a storage tank bottom plate provided by an embodiment of this application; Figure 2 is a schematic structural diagram of a defect recognition model training device for a storage tank bottom plate provided by an embodiment of this application; Figure 3 is a schematic flowchart of a defect recognition model training method for a storage tank bottom plate provided by an embodiment of this application; Figure 4 is a schematic flowchart of another defect recognition model training method for a storage tank bottom plate provided by an embodiment of this application; Figure 5 is a schematic architecture diagram of a defect recognition system for a storage tank bottom plate provided by an embodiment of this application; Figure 6 is a schematic structural diagram of another defect recognition model training device for a storage tank bottom plate provided by an embodiment of this application. Detailed Embodiments
[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0026] In this document, the character " / " generally indicates an "or" relationship between the associated objects before and after. For example, A / B can be understood as A or B.
[0027] In the following description, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first edge service node and the second edge service node are used to distinguish different edge service nodes, rather than to describe the characteristic order of the edge service nodes.
[0028] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes other unlisted steps or units, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0029] In addition, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present concepts in a specific manner.
[0030] In the related art, after the storage tank is deactivated, the medium in the tank is emptied and the storage tank is cleaned, the defect inspection image of the storage tank bottom plate can be obtained. In this way, the defect inspection image of the storage tank bottom plate can be used as a sample for model training to obtain a defect recognition model, and the trained defect recognition model can be used to identify the defect image of the storage tank bottom plate to be detected.
[0031] Since the medium in the tank needs to be emptied and the storage tank needs to be cleaned when obtaining the defect inspection image of the storage tank bottom plate, it is time-consuming and laborious. Therefore, during the process of model training, problems such as insufficient sample data and poor sample data quality may occur, resulting in a low accuracy rate of the defect recognition model. Therefore, how to improve the accuracy rate of the defect recognition model is still a technical problem to be solved.
[0032] The present application provides a method for training a defect recognition model for a storage tank bottom plate. The defect recognition model training device for the storage tank bottom plate generates first defect image information simulating the storage tank bottom plate according to preset defect features. Since the first defect image information includes the pixel points in the first defect image and the first defect depth of the pixel points, therefore, according to the first defect depth of the pixel points in the first defect image information and the first defect depth of adjacent pixel points, the pixel points in the first defect image are subjected to erosion diffusion processing to obtain second defect image information. Since when performing erosion diffusion processing on the pixel points in the first defect image, multiple pieces of second defect image information obtained by diffusing the first defect image can be obtained based on the degree of erosion diffusion processing. Considering that the second defect image information includes the pixel points in the second defect image and the second defect depth of the pixel points; the second defect depth is the defect depth after erosion diffusion processing. According to the second defect depth of the pixel points in the second defect image information, color assignment processing is performed on the pixel points in the second defect image information to obtain multiple heat maps simulating the storage tank bottom plate. Since the present application can obtain heat maps of multiple simulated storage tank bottom plates based on multiple pieces of second defect image information, and a defect recognition model can be trained according to the heat maps of the simulated storage tank bottom plates, the number of model training samples can be enriched, and the accuracy of the defect recognition model can be improved.
[0033] Exemplarily, as Figure 1 shown, Figure 1 FIG. 7 is a schematic architecture diagram of a defect recognition model training system for a storage tank bottom plate provided by an embodiment of the present application. The defect recognition model training system for the storage tank bottom plate includes: a data acquisition device 101, and a defect recognition model training device 102 for the storage tank bottom plate.
[0034] The defect recognition model training device 102 for the storage tank bottom plate is configured to generate first defect image information simulating the storage tank bottom plate according to preset defect features; perform erosion 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 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 heat map simulating the storage tank bottom plate; and train a defect recognition model according to the heat map simulating the storage tank bottom plate.
[0035] The data acquisition device 101 can obtain defect data of the storage tank bottom plate to be detected through an ultrasonic device on a robot crawler.
[0036] Among them, the defect recognition model can be set in the defect recognition model training device 102 for the storage tank bottom plate, or can be set in a processing device connected to the defect recognition model training device 102 for the storage tank bottom plate.
[0037] Optionally, the physical device of the data acquisition device 101 is a terminal, and the physical device of the defect identification model training device 102 for the storage tank bottom plate is a server.
[0038] Optionally, the above terminal may be a device that provides voice and / or data connectivity to the user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem. The wireless terminal may communicate with one or more core networks via a radio access network (RAN). The wireless terminal may be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal, or may also be a portable, pocket-sized, handheld, computer-integrated or vehicle-mounted mobile device that exchanges language and / or data with the wireless access network. For example, a mobile phone, a tablet computer, a laptop computer, a netbook, a personal digital assistant (PDA).
[0039] Optionally, the above server may be a server in a server cluster (composed of multiple servers), or a chip in the server, or a system-on-chip in the server, or may also be implemented by a virtual machine (VM) deployed on a physical machine. The embodiments of the present application do not make any limitations in this regard.
[0040] The embodiments of the present application provide a defect identification model training device for the storage tank bottom plate, which is used to execute the defect identification model training system for the storage tank bottom plate provided by the embodiments of the present application. Figure 2 This is a schematic structural diagram of a defect identification model training device for the storage tank bottom plate provided by the embodiments of the present application. As Figure 2 shown, the defect identification model training device 102 for the storage tank bottom plate includes at least one first processor 201, a communication line 202, and at least one communication interface 204, and may further include a memory 203. Among them, the first processor 201, the memory 203, and the communication interface 204 may be connected through the communication line 202.
[0041] The first processor 201 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. For example: one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs).
[0042] The communication line 202 may include a path for transmitting information between the above components.
[0043] The communication interface 204, for communicating with other devices or communication networks, may use any transceiver-like device, such as Ethernet, radio access network (RAN), WLAN, etc.
[0044] 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 may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to include or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0045] In a possible design, the memory 203 may exist independently of the first processor 201, that is, the memory 203 may be an external memory of the first processor 201. At this time, the memory 203 may be connected to the first processor 201 through the communication line 202, for storing execution instructions or application program codes, and being controlled by the first processor 201 to execute, so as to implement the method for training the defect identification model of the storage tank bottom plate provided in the following embodiments of the present application. In another possible design, the memory 203 may also be integrated with the first processor 201, that is, the memory 203 may be an internal memory of the first processor 201. For example, the memory 203 is a cache, which can be used to temporarily store some data and instruction information, etc.
[0046] As an implementable manner, the first processor 201 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 in Figure 2The first processor 201 and the second processor 207 in it. As another implementable manner, the defect identification model training device 102 for the storage tank bottom plate may further include an output device 205 and an input device 206.
[0047] Next, in conjunction with the attached Figure 3 A method for training a defect identification model for a storage tank bottom plate provided by an embodiment of the present application will be described in detail. As Figure 3 shown, the method for training a defect identification model for a storage tank bottom plate includes S301 - S304.
[0048] S301. The defect identification model training device for the storage tank bottom plate generates first defect image information simulating the storage tank bottom plate according to preset defect features.
[0049] Among them, the first defect image information includes pixel points in the first defect image and the first defect depth of the pixel points.
[0050] Optionally, the preset defect features include strip defects, circular defects, and irregular defects.
[0051] In a possible implementation manner, the defect identification model training device for the storage tank bottom plate generates first defect image information simulating the storage 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.
[0052] It should be explained that the defect identification model training device for the storage tank bottom plate starts to traverse each pixel point of the initial image with a given extremely low probability according to the shape type of the generated defect. If the current pixel point of the initial image is selected as the initial corrosion point, a random walk starts from this pixel point to generate the first defect image information.
[0053] S302. The defect identification model training device for the storage tank bottom plate 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 adjacent pixel points to obtain second defect image information.
[0054] Among them, the second defect image information includes pixel points in the second defect image and the second defect depth of the pixel points; the second defect depth is the defect depth after corrosion diffusion processing.
[0055] It should be explained that the defect identification model training device for the storage tank bottom plate performs corrosion diffusion iteration a preset number of times on the first defect image information. In each iteration, the difference in the first defect depth between the pixel point and the adjacent pixel is calculated, the second defect depth is updated according to the difference in the first defect depth and the preset defect depth corrosion rate, and the second defect depth is controlled not to exceed the preset threshold.
[0056] S303. The defect identification model training device for the storage tank bottom plate 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, so as to obtain a thermal map simulating the storage tank bottom plate.
[0057] Among them, the thermal map includes the pixel points in the thermal map, the second defect depth of the pixel points, and the color value of the pixel points.
[0058] S304. The defect identification model training device for the storage tank bottom plate trains a defect identification model according to the thermal map simulating the storage tank bottom plate.
[0059] Among them, the defect identification model is used to identify defects in the input defect identification map of the storage tank bottom plate, and the defect identification model is a YOLOv8 model with an EfficientNet architecture.
[0060] In a possible implementation, the defect identification model training device for the storage tank bottom plate uses 80% of the sample data for YOLO network training, 15% of the sample data for defect identification model verification, and the remaining sample data for defect identification model testing.
[0061] Optionally, the sample data is the data in the thermal map simulating the storage tank bottom plate.
[0062] It should be explained that the validation dataset is used for model tuning and hyperparameter adjustment to ensure that the model can also maintain good performance on unseen data, and calculate model evaluation metrics (for example, mean average precision, precision, and recall). According to the evaluation results of the validation set, adjust the model hyperparameters, and finally train an improved YOLO network that can accurately identify the defect type.
[0063] It can be understood that EfficientNet achieves a balance between computing resources and performance by dynamically adjusting the network width, depth, and resolution. Combining the real-time efficiency of YOLO and the lightweight high-precision advantages of EfficientNet can effectively improve the defect identification accuracy and reduce the probability of misjudgment and missed judgment.
[0064] Exemplarily, such as Figure 4As shown, the defect identification model training device for the storage tank bottom plate determines preset defect features, traverses the pixel points in the initial image, and assigns preset probabilities to the pixel points. When the probability of the first pixel point is greater than the corrosion probability, traverse the pixel points in the initial image again and assign preset probabilities to the pixel points. When the probability of the first pixel point is not greater than the corrosion probability, determine the generation direction of the defect and increase the step number by 1. When the current step number is not greater than the random step number, re-determine the generation direction of the defect and increase the step number by 1. When the current step number is greater than the random step number, generate the determined defect contour. Determine the defect depth change of a single corrosion point, consider the surrounding corrosion probability, traverse all pixel points, the overall defect depth change, generate a heat map simulating the storage tank bottom plate, and construct a data set.
[0065] In this application, the defect identification model training device for the storage tank bottom plate generates the first defect image information simulating the storage tank bottom plate according to the preset defect features. Since the first defect image information includes the pixel points in the first defect image and the first defect depth of the pixel points, therefore, 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, perform corrosion diffusion processing on the pixel points in the first defect image to obtain the second defect image information. Since when performing corrosion diffusion processing on the pixel points 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 the pixel points in the second defect image and the second defect depth of the pixel points; the second defect depth is the defect depth after corrosion diffusion processing. According to the second defect depth of the pixel points in the second defect image information, perform color assignment processing on the pixel points in the second defect image information to obtain multiple heat maps simulating the storage tank bottom plate. Since this application can obtain multiple heat maps simulating the storage tank bottom plate based on multiple second defect image information, and the defect identification model can be trained according to the heat map simulating the storage tank bottom plate, the number of model training samples can be enriched and the accuracy of the defect identification model can be improved.
[0066] In some embodiments of this application, in the above S301, generating the first defect image information simulating the storage tank bottom plate according to the preset defect features includes: S401. The defect identification model training device for the storage tank bottom plate performs defect generation processing on each pixel point in the initial image simulating the storage tank ground to obtain the first defect image.
[0067] Optionally, the defect generation processing of the defect identification model training device for the storage tank bottom plate includes: Step 1. Based on the preset probability, determine the first pixel point that meets the preset probability requirement from the initial image.
[0068] Optionally, the preset probability is 0.01.
[0069] Exemplarily, traverse the first pixel point (i, j) in the initial image, consider the Bernoulli distribution of the preset probability, and determine the first pixel point that meets the preset probability requirement.
[0070] Step 2: Based on the preset defect features, determine the direction selection strategy and the number of selections.
[0071] Among them, the direction selection strategy is used to represent the probability of selecting the target direction.
[0072] Optionally, the direction selection strategy includes: uniform distribution mode, vertical priority distribution mode, and horizontal priority distribution mode.
[0073] Exemplarily, in the vertical priority distribution mode, the selection probability of the up and down directions is 0.4, and the selection probability of the left and right directions is 0.1; in the horizontal priority distribution mode, the selection probability of the left and right directions is 0.45, and the selection probability of the up and down directions is 0.05.
[0074] Exemplarily, the number of selections is greater than 1000 and less than 2000.
[0075] Step 3: Taking the first pixel point as the initial point, access the unmasked second pixel points in the initial image based on the direction selection strategy and the number of selections.
[0076] Step 4: Assign the first defect depth to each pixel point in the second pixel points, and mask each pixel point in the second pixel points to obtain the first defect image.
[0077] Among them, the first defect depth is less than the threshold.
[0078] Optionally, the threshold is less than the thickness of the simulated storage tank bottom plate.
[0079] In some embodiments of the present application, in S302 above, 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, perform erosion diffusion processing on the pixel points in the first defect image to obtain the second defect image information, including: S501: The defect recognition model training device of the storage tank bottom plate determines the first defect depths of the four pixel points adjacent to the third pixel point.
[0080] Among them, the third pixel point is any one of the pixel points in the first defect image information.
[0081] Exemplarily, the third pixel point is (i + 1, j).
[0082] It can be understood that the four pixel points adjacent to the third pixel point include: the pixel point located on the left of the third pixel point and the pixel point located on the right of the third pixel point , the pixel points above the third pixel point , the pixel points below the third pixel point .
[0083] S502. The defect recognition model training device for the storage tank bottom plate determines the second defect depth of the third pixel point according to the first defect depth of the third pixel point, the first defect depths of the four pixel points adjacent to the third pixel point, and the defect depth corrosion rate.
[0084] Among them, the second defect depth of the third pixel point satisfies the following formula: ; where P is the second defect depth of the third pixel point, r is the defect depth corrosion rate, is the first defect depth of the third pixel point, d(k, ) is the first defect depth of each of the four pixel points adjacent to the third pixel point, ; (i - 1, j), (i + 1, j), (i, j - 1), (i, j + 1) are the pixel points adjacent to the third pixel point respectively.
[0085] Optionally, r is 0.8.
[0086] S503. The defect recognition model training device for the storage tank bottom plate obtains the second defect image information according to the third pixel point and the second defect depth of the third pixel point.
[0087] It should be noted that the corrosion unit is defined as the combination of a pixel point and its defect depth, its area is 1, and it serves as the calculation basis for the corrosion diffusion process. The corrosion degree of the corrosion unit depends on its defect depth. The defect depth corrosion rate r characterizes the corrosion intensity per unit area per unit time. Each corrosion unit has at most five exposed surfaces (front, back, left, right, up). There is a corrosion effect above a pixel point (i, j) if and only if it has been corroded, that is, the defect depth d(i, j)>0. The corrosion diffusion degree depends on the influence of the adjacent pixels of the pixel point on it. If the defect depth of the adjacent corrosion unit is greater than that of the current unit, the adjacent unit will exert a corrosion effect on the current unit. The corrosion intensity is determined by the defect depth difference between the two units, and the exposed area is equal to the defect depth difference. The corrosion intensity of the exposed surface is proportional to its area and is related to the defect depth corrosion rate r. In other words, when the exposed surface area increases by 1 pixel unit, its corrosion intensity per unit time will increase by r. This indicates that a significant change in corrosion intensity requires a "quantitative change" in the exposed area first, that is, at least an increase of 1 pixel unit.
[0088] In some embodiments of the present application, in S303 above, according to the second defect depth of the pixel points in the second defect image information, color assignment processing is performed on the pixel points in the second defect image information to obtain a heat map simulating the storage tank bottom plate, including: S601. The defect identification model training device for the storage tank bottom plate determines the defect depth adjustment range according to the second defect depth of the pixel points in the second defect image information and the thickness of the simulated storage tank bottom plate.
[0089] It should be noted that the defect depth adjustment range can be obtained by dividing the second defect image information by the thickness T of the storage tank bottom plate, making it more suitable for mapping to the color space. The operation is expressed as: . A color bar contains a series of colors, and each color corresponds to a parameter interval. The number of colors in the color bar determines the division granularity of the parameter interval. To obtain a more detailed color distribution, the can be magnified by the magnification factor to obtain the magnified parameter interval: ; where k takes 10, and it can also be adjusted according to the actual situation.
[0090] Optionally, the thickness T of the storage tank bottom plate is 80 pixels.
[0091] S602. The defect identification model training device for the storage tank bottom plate 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.
[0092] Among them, the color bar includes at least one color, and the fourth pixel is any one of the pixel points in the second defect image information.
[0093] Among them, the value of the color of the fourth pixel satisfies the following formula: .
[0094] Among them, is the value of the color of the fourth pixel, x is the second defect depth of the fourth pixel, x i is the boundary value of the i-th defect depth adjustment range, x i+1 is the boundary value of the (i + 1)-th defect depth adjustment range, C i is the value of the color corresponding to x i , C i+1 is the value of the color corresponding to x i+1 , .
[0095] Optionally, the color bar may 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].
[0096] S603. The defect identification model training device for the storage tank bottom plate obtains a thermal image simulating the storage tank bottom plate according to the fourth pixel and the color of the fourth pixel.
[0097] Optionally, the defect identification model training device for the storage tank bottom plate generates a zero array with the same size as the depth image based on the second defect image information as the initialization image I o . Assign the calculated color value C interpolated to the red, green, and blue channels of the initialization image I o respectively to form the thermal image I heatmap . I heatmap (R,G,B) = [C interpolated (R), C interpolated (G), C interpolated (B),]. Repeat the above process to generate a specified number of thermal images as model training samples.
[0098] It should be noted that the number of colors in the color bar determines the division granularity of the parameter interval. To obtain a more detailed color distribution, the depth map can be adjusted by a magnification factor to obtain an enlarged parameter interval. According to the color bar and the enlarged parameter interval, the linear interpolation method is used to calculate the color corresponding to each depth value. Assign the calculated color values to the red, green, and blue channels of the initialization image respectively to form a thermal image. Repeat the above process to generate a preset number of thermal images as a simulated defect data set.
[0099] In some embodiments of the present application, in S304 above, training the defect identification model according to the thermal image simulating the storage tank bottom plate includes: S701. The defect identification model training device for the storage tank bottom plate obtains the defect data of the experimental storage tank bottom plate through an ultrasonic device.
[0100] It should be noted that the ultrasonic device can carry a 256-element phased array ultrasonic sensor. 18,000 ultrasonic thickness measurement values can be collected in each 929 square centimeter area and C-scan imaging can be performed. The defect data of the experimental storage tank bottom plate is obtained based on the scanning imaging result.
[0101] S702. The defect identification model training device for the storage tank bottom plate determines the heat map of the experimental storage tank bottom plate based on the defect data of the experimental storage tank bottom plate.
[0102] In a possible implementation, the defect identification model training device for the storage tank bottom plate inputs the defect data of the experimental storage tank bottom plate into the heat map software, and obtains the heat map of the experimental storage tank bottom plate based on the heat map software.
[0103] S703. The defect identification model training device for the storage tank bottom plate trains a defect identification model according to the heat map of the simulated storage tank bottom plate and the heat map of the experimental storage tank bottom plate.
[0104] It can be understood that the defect identification model training uses a data set composed of two parts: one is a simulated defect data set generated based on the single-point diffusion Markov chain, which is used to simulate real tank bottom defects; the other is a measured data set collected based on artificially processed defect templates, which is used to construct a real data set. This can not only enrich the number of the sample set, but also improve the accuracy of the sample set, thereby improving the training efficiency of the defect identification model.
[0105] It can be understood that to evaluate the effectiveness and accuracy of the defect identification algorithm, this application selects test pictures that have been manually annotated for testing. The trained model is loaded into the test environment, and the test pictures are input into the model to obtain the algorithm prediction results. The algorithm prediction results are compared with the manually annotated results to evaluate the algorithm accuracy rate, and the prediction results are analyzed to determine the weaknesses of the algorithm for targeted improvement.
[0106] In some embodiments of this application, after the above S304, using the defect identification model to identify the defect data of the storage tank bottom plate to be detected includes: S801. The defect identification model training device for the storage tank bottom plate obtains the defect data of the storage tank bottom plate to be detected through the ultrasonic device on the robot crawler.
[0107] Exemplarily, such as Figure 5As shown in the figure, a defect identification system for a storage tank bottom plate provided by an embodiment of the present application is composed of a robot crawler 501, an ultrasonic probe 5011, an ultrasonic board card 5012, and a robot console 502. Among them, the ultrasonic probe 5011 and the ultrasonic board card 5012 are carried on the robot crawler 501 and are used to transmit and receive ultrasonic signals. During the detection operation, the robot crawler 501 is inside the storage tank. The data collected by the ultrasonic probe 5011 is preliminarily processed by the ultrasonic board card 5012, and then transmitted from the robot end to the robot console 502 outside the tank through an optical fiber. The robot console 502 includes key components such as an optical-electric converter, a robot control computer, and an ultrasonic data processing computer. The optical-electric converter is responsible for converting the optical signal into an electrical signal for subsequent processing. The robot control computer runs robot control software and is responsible for the movement and operation control of the robot. The ultrasonic data processing computer runs ultrasonic data processing software and an intelligent recognition algorithm to deeply analyze and process the collected ultrasonic data to achieve accurate detection and evaluation of the internal situation of the storage tank. The robot control computer and the ultrasonic data processing computer communicate through a network port to exchange data and control signals to ensure the coordination and efficiency of the entire detection process.
[0108] S802. The defect identification model training device for the storage tank bottom plate inputs the defect data of the storage tank bottom plate to be detected into the defect identification model to obtain a defect identification map.
[0109] Optionally, the defect identification map includes the shape information of the defect, the color distribution of the defect, and the defect depth of the defect.
[0110] As Figure 6 shown, it is a structural schematic diagram of another defect identification model training device for the storage tank bottom plate provided by an embodiment of the present application. Figure 6The defect identification model training device for the storage tank bottom plate shown includes: a processing unit 601 and an acquisition unit 602; the processing unit 601 is configured to generate first defect image information simulating the storage tank bottom plate according to 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 configured 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 adjacent pixel points, so as to obtain second defect image information; the second defect image information includes the pixel points in the second defect image and the second defect depth of the pixel points; the second defect depth is the defect depth after corrosion diffusion processing; the processing unit 601 is configured to 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, so as to obtain a heat map of the simulated storage tank bottom plate; the heat map includes the pixel points in the heat map, the second defect depth of the pixel points, and the color values of the pixel points; the processing unit 601 is configured to train a defect identification model according to the heat map of the simulated storage tank bottom plate; the defect identification model is used to identify defects in the input defect identification map of the storage tank bottom plate.
[0111] In some embodiments, the processing unit 601 is specifically configured to: perform defect generation processing on each pixel point in the initial image of the simulated storage tank ground to obtain a first defect image; the defect generation processing 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 the number of selections based on preset defect features; 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 points 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 points and masking each pixel point in the second pixel points to obtain a first defect image; the first defect depth is less than a threshold.
[0112] In some embodiments, the processing unit 601 is specifically configured to: determine the first defect depths of the four pixel points adjacent to the third pixel point; the third pixel point is any one of the pixel points in the first defect image information; determine the second defect depth of the third pixel point according to the first defect depth of the third pixel point, the first defect depths of the four pixel points adjacent to the third pixel point, and the defect depth corrosion rate; obtain the second defect image information according to the third pixel point and the second defect depth of the third pixel point.
[0113] In some embodiments, the second defect depth of the third pixel point satisfies the following formula: ; where P is the second defect depth of the third pixel point, r is the defect depth corrosion rate, is the first defect depth of the third pixel point, d(k, ) is the first defect depth of each pixel among the four pixels adjacent to the third pixel point, ; (i - 1, j), (i + 1, j), (i, j - 1), and (i, j + 1) are the pixels adjacent to the third pixel point respectively.
[0114] In some embodiments, the processing unit 601 is specifically configured to: determine a defect depth adjustment range according to the second defect depth of the pixel points in the second defect image information and the thickness of the simulated storage tank bottom plate; determine 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; the color bar includes at least one color, and the fourth pixel is any one of the pixel points in the second defect image information; obtain a heat map of the simulated storage tank bottom plate according to the fourth pixel and the color of the fourth pixel.
[0115] In some embodiments, the value of the color of the fourth pixel satisfies the following formula: .
[0116] Wherein, is the value of the color of the fourth pixel, x is the second defect depth of the fourth pixel, x i is the boundary value of the i-th defect depth adjustment range, x i+1 is the boundary value of the (i + 1)-th defect depth adjustment range, C i is the color value corresponding to x i , C i+1 is the color value corresponding to x i+1 . .
[0117] In some embodiments, the acquisition unit 602 is configured to obtain defect data of the experimental storage tank bottom plate through an ultrasonic device; the processing unit 601 is configured to determine a heat map of the experimental storage tank bottom plate based on the defect data of the experimental storage tank bottom plate; the processing unit 601 is configured to train a defect recognition model according to the heat map of the simulated storage tank bottom plate and the heat map of the experimental storage tank bottom plate.
[0118] In some embodiments, the defect recognition model is a YOLOv8 model with an EfficientNet architecture.
[0119] In some embodiments, the acquisition unit 602 is configured to obtain defect data of the storage tank bottom plate to be detected through an ultrasonic device on a robot crawler; the processing unit 601 is configured to input the defect data of the storage tank bottom plate to be detected into the defect recognition model to obtain a defect recognition map.
[0120] The embodiments of the present application also provide a computer-readable storage medium, which includes computer-executable instructions. When the computer-executable instructions run on a computer, the computer is enabled to execute the method for training a defect identification model of a storage tank bottom plate as provided in the above embodiments.
[0121] The embodiments of the present application also provide a computer program product. The computer program product 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 method for training a defect identification model of a storage tank bottom plate as provided in the above embodiments. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that they can still modify or equivalently replace the technical solutions of the present application, and these modifications or equivalent replacements do not enable the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present application.
[0122] For the system provided in the above embodiments, only the division of the above function modules is used for illustration. In actual applications, the above functions can be allocated to different function modules according to needs, that is, the modules or steps in the embodiments of the present application can be decomposed or combined again. For example, the modules in the above embodiments can be combined into one module, or further split into multiple sub-modules to complete all or part of the functions described above. For the names of the modules and steps involved in the embodiments of the present application, they are only used to distinguish each module or step and are not regarded as an improper limitation of the present application.
[0123] Those skilled in the art should be able to realize that the modules and method steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. The programs corresponding to the software modules and method steps can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field. To clearly illustrate the interchangeability of electronic hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in the form of 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 the present application.
Claims
1. A defect recognition model training method 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 pixels in the first defect image and first defect depths of the pixels; According to the first defect depth of the pixel point in the first defect image information and the first defect depth of the adjacent pixel point, the pixel point in the first defect image is subjected to corrosion diffusion processing to obtain the 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 corrosion diffusion processing; According to the second defect depth of the pixel point in the second defect image information, color assignment processing is performed on 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; 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 an input defect recognition image of a tank bottom plate.
2. The method according to claim 1, characterized in that: The step of generating first defect image information of a simulated 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 the preset probability requirement from the initial image based on the preset probability; Based on the preset defect characteristics, determine the direction selection strategy and the number of selections; the direction selection strategy is used to characterize the probability of selecting the target direction; Taking the first pixel point as an initial point, accessing a second pixel point 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.
3. The method according to claim 1, characterized in that The step of performing 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 the second defect image information includes: Determine the first defect depths of four pixels adjacent to a third pixel; the third pixel is any one of the pixels in the first defect image information; Determine 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 and the second defect depth of the third pixel.
4. The method according to claim 3, characterized in that The second defect depth of the third pixel satisfies the following formula: ; Where 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 pixel in the four pixels adjacent to the third pixel, ; (i-1,j), (i+1,j), (i,j-1), and (i,j+1) are respectively the pixel points adjacent to the third pixel point.
5. The method according to claim 1, characterized in that 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; Determine the color of the fourth pixel according to the second defect depth of the fourth pixel, the defect depth adjustment range and a color bar; the color bar includes at least one color, and the fourth pixel is any one of the pixel points 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.
6. The method according to claim 5, 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, .
7. 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 by 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.
8. The method according to claim 1, characterized in that The defect recognition model is the YOLOv8 model of the EfficientNet architecture.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: The defect data of the bottom plate of the tank to be inspected is obtained through the ultrasonic device on the robot crawler; 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.
10. A defect recognition model training device for a tank bottom plate, characterized in that: including a processing unit; The processing unit is used to generate first defect image information of a simulated tank bottom plate according to preset defect features; 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 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 and the first defect depth of the adjacent pixel points in the first defect image information to obtain the second defect image information; the second defect image information includes the pixel points in the second defect image and the second defect depth of the pixel points; the second defect depth is the defect depth after the corrosion diffusion processing; The processing unit is used to 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, so as to obtain the thermal map of the simulated tank bottom plate; the thermal map includes the pixel points in the thermal map, the second defect depth of the pixel points and the color value of the pixel points; The processing unit is used to obtain a defect recognition model according to the thermal map of the simulated tank bottom plate; The defect recognition model is used to perform defect recognition on an input defect recognition image of a tank bottom plate.
11. 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 9.
12. 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 the tank bottom plate according to any one of claims 1 to 9.
Citation Information
Patent Citations
Storage tank bottom plate corrosion noncontact ultrasonic detection method based on dynamic wavelet fingerprint technology
CN104391039A
Cigarette case defect recognition method combining deep learning and image processing
CN112132196A
Method and device for detecting product defects
CN112288676A
Steel product surface defect detection method based on model compression
CN113706471A
Power image defect detection method based on dynamic activation thermodynamic diagram
CN115410024A
Cited By
Humanoid robot control method and system
CN120363221A