Liquid leakage detection method, system, model training method, medium and equipment

By processing and annotating continuous frame video images, the liquid leakage detection model is trained, and the problem of insufficient application of dynamic scenarios and generalization performance in the prior art is solved, and efficient and accurate liquid leakage detection is achieved.

CN117876916BActive Publication Date: 2025-02-25AI PRIME SHANGHAI CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311171732.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2025-02-25
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

The existing liquid leakage detection algorithm is not suitable for dynamic scenarios, and when there are fewer training data and scenarios, the generalization performance of the model is insufficient, which affects the detection speed and accuracy.

Method used

By acquiring continuous frame training video images, performing data annotation and processing, selecting video images with selected frames for image enhancement and stitching, and finally training the liquid leakage detection model based on these video images.

Benefits of technology

It realizes effective detection of liquid leakage in dynamic scenarios, improves the generalization performance and detection accuracy of the model, and simplifies the deployment and use process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117876916B_ABST
    Figure CN117876916B_ABST
Patent Text Reader

Abstract

The present application provides a liquid leakage detection method, system, model training method, medium and equipment, and the training method includes: obtaining continuous frame training video images; processing the continuous frame training video images to obtain video images of a selected number of frames; training the liquid leakage detection model based on the video images of the selected number of frames to obtain a trained liquid leakage detection model. The liquid leakage detection method, system, model training method, medium and equipment provided by the present application, through multi-frame information comparison and fusion, are no longer confined to static scenes, and are combined with dynamic scene data. They are easy to deploy and flexible to use, while ensuring efficiency and having good performance. At the same time, the present application uses image splicing to produce contrasting positive and negative samples in the same scene, avoids imbalance of single scene samples, and enables the liquid leakage detection model to correctly learn the key information of liquid leakage, thereby improving the generalization performance of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a detection method, and in particular to a liquid leakage detection method, system, model training method, medium and equipment. Background Art

[0002] In some industrial parks and urban infrastructure, liquid leakage is an abnormal phenomenon, even dangerous, affecting the safety of production and life. With the development of artificial intelligence deep learning, neural networks are gradually being used to judge liquid leakage detection. However, the target scene of the liquid leakage detection algorithm in the existing technology is a static scene, which is not suitable for dynamic scenes, and the steps are cumbersome and require a lot of deployment preparation. At the same time, when the existing model has less training data and scenes, the trained model will be closely linked to the scene, and the generalization performance is insufficient. In addition, the existing technology adopts liquid leakage detection on a single frame image, which makes data annotation difficult and the neural network has limited available information. This will affect the speed and accuracy of liquid leakage detection, which is not conducive to ensuring the safety of production and life. Summary of the invention

[0003] The purpose of the present application is to provide a liquid leakage detection method, system, model training method, medium and equipment, which are used to solve the problem that the existing technology is not applicable to dynamic scenes and cannot use the movement information of the liquid between multiple frames to determine the liquid leakage situation.

[0004] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides a training method for a liquid leakage detection model, comprising obtaining continuous frame training video images; processing the continuous frame training video images to obtain video images of a selected frame number; and training the liquid leakage detection model based on the video images of the selected frame number to obtain a trained liquid leakage detection model.

[0005] In an embodiment of the first aspect, obtaining continuous frame training video images includes: capturing continuous frame videos based on original video data; and performing data annotation based on the continuous frame videos to obtain the continuous frame training video images.

[0006] In an embodiment of the first aspect, processing the continuous frame training video images to obtain video images of a selected frame number includes: selecting video images of a selected frame number based on the continuous frame training video images; and performing image enhancement and stitching processing based on the video images of the selected frame number.

[0007] In an embodiment of the first aspect, training a liquid leakage detection model based on the selected frame number of video images includes: inputting the selected frame number of video images into the liquid leakage detection model to obtain a liquid leakage prediction score; performing a cross entropy loss calculation on the liquid leakage prediction score to obtain a loss value; and adjusting the liquid leakage detection model parameters based on the loss value to obtain a trained liquid leakage detection model.

[0008] The second aspect of the present application provides a liquid leakage detection method, including acquiring a video image; judging the liquid leakage situation of the video image based on the liquid leakage detection model; the liquid leakage detection model is a liquid leakage detection model trained by the training method described in the first aspect.

[0009] In an embodiment of the second aspect, judging the liquid leakage situation based on the liquid leakage detection model includes: extracting frame features of the video image frame by frame; obtaining a prediction score of liquid leakage based on the frame features of a selected number of frames; and judging the liquid leakage situation based on the prediction score.

[0010] In an embodiment of the second aspect, obtaining a prediction score for liquid leakage based on frame features of a selected number of frames includes: inputting the frame features of the selected number of frames into the liquid leakage detection model multiple times to obtain prediction scores for multiple liquid leakages; wherein a first frame interval between the selected number of frames input each time is not greater than the selected number of frames.

[0011] The third aspect of the present application provides a liquid leakage detection and correction system, including an acquisition module for acquiring video images; a judgment module for judging liquid leakage conditions in the video images based on the liquid leakage detection model; the liquid leakage detection model is a liquid leakage detection model trained by the training method described in the first aspect.

[0012] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the training method of the liquid leakage detection model described in the first aspect of the present application and / or the liquid leakage detection method described in the second aspect of the present application.

[0013] The fifth aspect of the present application provides an electronic device, comprising: a memory storing a computer program; a processor communicating with the memory, and executing the training method of the liquid leakage detection model described in the first aspect of the present application and / or the liquid leakage detection method described in the second aspect of the present application when calling the computer program.

[0014] As described above, the liquid leakage detection training method, error correction method, system, medium and device provided in the embodiments of the present application have the following beneficial effects:

[0015] First of all, through the designed liquid leakage detection model, through multi-frame information comparison and fusion, it is no longer restricted to static scenes. In combination with dynamic scene data, it can correctly learn the key information of liquid leakage and achieve good performance.

[0016] Secondly, the liquid leakage detection model provided in this application can output the liquid leakage score through two stages of single-frame image feature extraction and multi-frame feature fusion judgment. The model is easy to deploy and flexible to use, which not only utilizes the information of multiple frames but also achieves the efficiency of a single frame.

[0017] Finally, this application uses a rich data augmentation system to produce a large number of training samples even with only a small amount of training data, achieving better training results. In particular, through image stitching, positive and negative samples with contrast in the same scene can be produced to avoid imbalance of samples in a single scene, which causes the model to be unable to learn correct information, greatly improving the generalization performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Shown is a flow chart of a method for training a liquid leakage detection model in an embodiment of the present application.

[0019] Figure 2 Shown is a flow chart of a method for training a liquid leakage detection model in an embodiment of the present application.

[0020] Figure 3 Shown is a flow chart of a method for training a liquid leakage detection model in an embodiment of the present application.

[0021] Figure 4 Schematic diagram showing the splicing of the video image with the selected frame number and the normal data in the embodiment of the present application

[0022] Figure 5 Shown is a flow chart of a method for training a liquid leakage detection model in an embodiment of the present application.

[0023] Figure 6 Shown is a schematic flow chart of a liquid leakage detection method in an embodiment of the present application.

[0024] Figure 7 Shown is a flow chart of the liquid leakage detection method in the embodiment of the present application

[0025] Figure 8 Displayed are 16 consecutive frames of real-life images without liquid leakage in the embodiment of the present application.

[0026] Fig. 9 Displayed are 16 consecutive frames of real-life images of liquid leakage in an embodiment of the present application.

[0027] Fig.10Shown is a structural schematic diagram of a liquid leakage detection system in an embodiment of the present application.

[0028] Fig.11 Shown is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0030] It should be noted that the diagrams provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The diagrams only show the components related to the present application rather than the number, shape and size of the components in actual implementation. The type, quantity and proportion of each component in actual implementation can be changed at will, and the component layout type may also be more complicated. In addition, in this article, relational terms such as "first", "second", etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0031] The present application provides a liquid leakage detection method, system, model training method, medium and equipment. Through multi-frame information comparison and fusion, it is no longer limited to static scenes. It cooperates with dynamic scene data, is easy to deploy, flexible to use, and has good performance while ensuring efficiency. At the same time, the present application uses image splicing to produce contrasting positive and negative samples in the same scene, avoiding the imbalance of single scene samples, so that the liquid leakage detection model can correctly learn the key information of liquid leakage, greatly improving the generalization performance of the model.

[0032] Next, the liquid leakage detection method, system, model training method, medium and equipment provided by the present application will be described by way of specific embodiments and accompanying drawings.

[0033] like Figure 1 As shown, in one embodiment, the liquid leakage detection model training method of the present application includes steps S1 to S3:

[0034] S1: Obtain continuous frame training video images.

[0035] Specifically, Figure 2 As shown, step S1 includes step S11 and step S12.

[0036] S11: capturing continuous frame videos based on the original video data.

[0037] Specifically, existing surveillance video data is obtained and continuous frames are captured.

[0038] Specifically, in one embodiment, surveillance video data is acquired through fixed video surveillance or a mobile surveillance robot, and continuous frame capture is performed thereon, 80-128 frames are captured as a group as a training set, and 16 frames are captured as a group as a verification set and a test set.

[0039] It should be noted that in order to better ensure the training effect of the liquid leakage detection model, the video source of the test set should be different from the video source of the training set and the validation set.

[0040] S12: Performing data annotation based on the continuous frame video to obtain the continuous frame training video image.

[0041] Specifically, data annotation is performed on the continuous frame videos of the training set, the validation set, and the test set intercepted in step S11. The data annotation can be implemented by manual annotation.

[0042] Specifically, the continuous frame video is annotated into the following three types of data, including:

[0043] 1) Video images marked as liquid leakage: Continuous frame images in a group are all liquid leakage.

[0044] 2) Video images marked as normal data: There is no liquid leakage in the continuous frame images within a group.

[0045] 3) Discarded video images: There are leakage and non-leakage situations of consecutive frame images within a group.

[0046] It should be noted that, finally, the video images marked as liquid leakage and the video images marked as normal data are used as continuous frame training video images (training set).

[0047] It should be noted that the validation set and the test set also select video images marked as liquid leakage and video images marked as normal data.

[0048] S2: Processing the continuous frame training video images to obtain video images of a selected number of frames.

[0049] Specifically, Figure 3 As shown, step S2 includes steps S21 to S23.

[0050] S21: Selecting a selected number of video frames based on the continuous frame training video images.

[0051] Specifically, in one embodiment, in each round of training, 16 frames of images are randomly selected from 80-128 frames of images in each group at intervals of 1-5 frames as single training data (ie, video images of the selected number of frames).

[0052] Preferably, the selected frame number is 8-32 frames.

[0053] S22: Performing image enhancement based on the video image of the selected frame number.

[0054] Specifically, each round of training randomly performs image enhancement on the selected number of frames of video images, including random brightness changes, contrast changes, blur sharpening, edge cropping and other operations.

[0055] S23: Perform stitching processing based on the video images of the selected number of frames.

[0056] Specifically, in each round of training, the selected video images of the selected frames are randomly spliced ​​with another selected video images of the selected frames marked as normal data with a certain probability, so as to form a new selected video image of the selected frames.

[0057] It should be noted that the above image splicing probability is set according to requirements.

[0058] Preferably, the image splicing probability is set to 50%, that is, in each round of training, there is a 50% probability that each group of video images with a selected number of frames will be spliced ​​with normal data to form a new video image with a selected number of frames.

[0059] Specifically, in one embodiment, the selected 16 frames of images are spliced ​​into another 16 frames of images marked as normal data to form a new video image of the selected number of frames. Figure 4 As shown, the image after the first frame image in 16 frames is spliced ​​with the normal data image is shown.

[0060] S3: Training the liquid leakage detection model based on the video images of the selected frame number to obtain a trained liquid leakage detection model.

[0061] Specifically, Figure 5 As shown, step S3 includes steps S31 to S33.

[0062] S31: Inputting the video images of the selected number of frames into the liquid leakage detection model to obtain a liquid leakage prediction score.

[0063] Among them, the liquid leakage detection model includes a feature extraction network and a score output network.

[0064] Specifically, the feature extraction network includes a residual neural network model based on ResNet50.

[0065] Specifically, the score output network includes a feedforward neural network model based on a self-attention mechanism.

[0066] Specifically, the video images of the selected number of frames participating in the training are input into the liquid leakage detection model, and the frame features are extracted by the residual neural network frame by frame, and then the frame features of the selected number of frames are input into the feedforward neural network model to obtain the liquid leakage prediction score. That is, the liquid leakage detection model can output the liquid leakage score through the two stages of single-frame image feature extraction and multi-frame feature fusion judgment. The model is easy to deploy and flexible to use.

[0067] It should be noted that the feature extraction network is not limited to the ResNet50 network. Any network model structure that can extract features from the input image can be used as the feature extraction network in the liquid leakage detection model.

[0068] In one embodiment, the 16 frames of images involved in the training are passed through the residual neural network frame by frame in sequence to obtain the frame features corresponding to each frame, and then a group of frame features of 16 consecutive frames are sent to the feedforward neural network model to obtain the liquid leakage prediction score.

[0069] It should be noted that commonly used feature dimension values ​​are 256, 512, 1024, 2048, 4096, etc. The dimension of the frame features extracted by the feature extraction network is determined according to actual conditions.

[0070] S32: Performing a cross entropy loss calculation based on the liquid leakage prediction score and the video image of the selected number of frames to obtain a loss value.

[0071] Specifically, the liquid leakage prediction score is cross-entropy loss calculated with the label image data to obtain the loss value.

[0072] S33: Adjust the liquid leakage detection model parameters based on the loss value to obtain a trained liquid leakage detection model.

[0073] Specifically, the parameters in the liquid leakage monitoring model are gradually adjusted through back propagation to reduce the loss value continuously until the model converges.

[0074] It should be noted that steps S2 and S3 are repeated multiple times so that the continuous frame training video images of all groups in the training set participate in the above training process hundreds of times. During the training process, the performance is regularly verified on the verification data set, and the model with the best performance on the verification data set during the training process is saved to obtain a trained liquid leakage detection model.

[0075] like Figure 6 As shown, the present application also provides a liquid leakage detection method, comprising steps S4 to S5:

[0076] S4: Acquire video images.

[0077] Specifically, a video image is obtained from a video source.

[0078] Specifically, video sources include surveillance cameras and offline videos.

[0079] S5: Determine the liquid leakage situation of the video image based on the liquid leakage detection model.

[0080] Specifically, Figure 7 As shown, step S5 includes steps S51 to S53.

[0081] S51: Extracting frame features of the video image frame by frame.

[0082] Specifically, the video images are input into the residual neural network in the liquid leakage detection model frame by frame to obtain the frame features corresponding to each frame.

[0083] S52: Obtain a prediction score of liquid leakage based on the frame features of the selected number of frames.

[0084] Specifically, the frame features of the selected number of frames are input into the feedforward neural network model in the liquid leakage detection model to obtain the liquid leakage prediction score (the score range is 0-1).

[0085] Specifically, the frame features of the selected number of frames are input into the liquid leakage detection model for multiple times to obtain prediction scores of multiple liquid leakages, wherein the first frame interval between the selected number of frames input each time is not greater than the selected number of frames, that is, step S52 is repeatedly performed at intervals of n frames, and n is not greater than the selected number of frames.

[0086] It should be noted that n is the first frame interval between the selected frames executed each time.

[0087] In one embodiment, frame features of 16 consecutive frames in a video stream are repeatedly fed into a feedforward neural network based on a self-attention mechanism at intervals of n frames to obtain a liquid leakage prediction score.

[0088] For example, in the actual process of liquid leakage detection, the video image with the selected frame number is 16 frames of video images. At this time, n is set to 4, and when step S52 is executed for the first time, the frame features of 16 consecutive frames of video images of frames 1 to 16 are input into the feedforward neural network to obtain a prediction score of 1. When executed for the second time, the frame features of video images of frames 5 to 20 are input into the feedforward neural network to obtain a prediction score of 2. When executed for the third time, the frame features of video images of frames 9 to 24 are input into the feedforward neural network to obtain a prediction score of 3. When executed for the fourth time, the frame features of video images of frames 13 to 28 are input into the feedforward neural network to obtain a prediction score of 4, and this is repeated m times.

[0089] S53: Determine the liquid leakage situation based on the prediction score.

[0090] Specifically, based on the multiple prediction scores obtained in step S52, it is determined whether the scores of the m predictions are all greater than 0.5. If they are all greater than 0.5, it is considered that liquid leakage has occurred in the actual video.

[0091] It should be noted that the size of m is determined according to the actual required judgment accuracy.

[0092] like Figure 8 As shown, 16 consecutive frames of real-life images without liquid leakage are displayed.

[0093] like Fig. 9 As shown, 16 consecutive frames of real-life images of liquid leakage are displayed.

[0094] Therefore, the liquid leakage detection method provided by the present application utilizes the liquid leakage detection model, and can output the liquid leakage score through the two stages of single-frame image feature extraction and multi-frame feature fusion judgment, and then judge the liquid leakage situation in the dynamic scene (continuous frame video image). The method is easy to deploy and flexible to use, which not only utilizes the information of multiple frames, but also achieves the efficiency of a single frame, and can effectively ensure the safety of production and life.

[0095] The protection scope of the training method of the liquid leakage detection model and / or the liquid leakage detection method described in the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.

[0096] like Fig.10 As shown, the present application also provides a liquid leakage detection system, including an acquisition module 20 and a judgment module 30.

[0097] The acquisition module 20 is used to acquire video images.

[0098] The judgment module 30 is used to judge the liquid leakage situation of the video image based on the liquid leakage detection model; the liquid leakage detection model is the liquid leakage detection model trained by the above steps S1 to S3.

[0099] Specifically, in one embodiment, the acquisition module 20 acquires a video image from a video source. The judgment module 30 inputs the video image frame by frame into the residual neural network in the liquid leakage detection model, obtains the frame features corresponding to each frame, and then inputs the frame features of the selected number of frames into the feedforward neural network model in the liquid leakage detection model to obtain the liquid leakage prediction score (the score range is 0-1), and judges the liquid leakage situation based on the prediction score.

[0100] Specifically, in one embodiment, the judgment module 30 repeatedly sends the frame features of 16 consecutive frames in the video stream to a feedforward neural network based on a self-attention mechanism at intervals of n frames to obtain a liquid leakage prediction score, where n is the first frame interval between the selected frames executed each time.

[0101] It should be noted that n is not greater than the selected frame number.

[0102] For example, in the actual process of liquid leakage detection, the video image with the selected frame number is 16 frames of video images. At this time, n is set to 4, and when step S52 is executed for the first time, the frame features of 16 consecutive frames of video images of frames 1 to 16 are input into the feedforward neural network to obtain a prediction score of 1. When executed for the second time, the frame features of video images of frames 5 to 20 are input into the feedforward neural network to obtain a prediction score of 2. When executed for the third time, the frame features of video images of frames 9 to 24 are input into the feedforward neural network to obtain a prediction score of 3. When executed for the fourth time, the frame features of video images of frames 13 to 28 are input into the feedforward neural network to obtain a prediction score of 4, and this is repeated m times.

[0103] Specifically, the judgment module 30 judges whether the scores of the m prediction executions are all greater than 0.5. If they are all greater than 0.5, it is considered that liquid leakage has occurred in the actual video.

[0104] The present application also provides an electronic device. Fig.11 As shown, this embodiment provides an electronic device 90, which includes: a memory 901, configured to store a computer program; and a processor 902, which is communicatively connected to the memory 901 and configured to call the computer program to execute the training method of the liquid leakage detection model and / or the liquid leakage detection method.

[0105] The memory 901 includes: ROM (Read Only Memory image), RAM (Random Access Memory), a disk, a USB flash drive, a memory card or an optical disk, and other media that can store program codes.

[0106] The processor 902 is connected to the memory 901 and is used to execute the computer program stored in the memory 901 so that the electronic device executes the above-mentioned training method of the liquid leakage detection model and / or the liquid leakage detection method.

[0107] Preferably, the processor 902 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0108] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules or units, which can be electrical, mechanical or other forms.

[0109] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0110] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0111] The present application embodiment also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0112] The present application embodiment may also provide a computer program product, the computer program product including one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer or data center.

[0113] When the computer program product is executed by a computer, the computer executes the method described in the above method embodiment. The computer program product may be a software installation package, and when the above method is required, the computer program product may be downloaded and executed on a computer.

[0114] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0115] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A training method for a liquid leakage detection model, characterized in that: include: Acquire continuous frame training video images; Processing the continuous frame training video images to obtain video images of a selected number of frames; wherein the process includes performing a splicing process based on the video images of the selected number of frames; the splicing process includes randomly splicing the selected video images of the selected number of frames with another video image of the selected number of frames marked as normal data with a certain probability to form a new video image of the selected number of frames; The liquid leakage detection model is trained based on the video images of the selected frame number to obtain a trained liquid leakage detection model.

2. The training method of the liquid leakage detection model according to claim 1, characterized in that: Obtaining continuous frame training video images includes: Capturing continuous frame videos based on original video data; Data annotation is performed based on the continuous frame video to obtain the continuous frame training video image.

3. The training method of the liquid leakage detection model according to claim 1, characterized in that: Processing the continuous frame training video images to obtain video images of a selected number of frames includes: Selecting a selected number of frames of video images based on the continuous frame training video images; Image enhancement and splicing processing are performed based on the video images of the selected number of frames.

4. The training method of the liquid leakage detection model according to claim 3, characterized in that: Training the liquid leakage detection model based on the video images of the selected number of frames includes: Inputting the selected number of frames of video images into the liquid leakage detection model to obtain a liquid leakage prediction score; Performing cross entropy loss calculation on the liquid leakage prediction score to obtain a loss value; The liquid leakage detection model parameters are adjusted based on the loss value to obtain a trained liquid leakage detection model.

5. A liquid leakage detection method, characterized in that: include: Acquire video images; The liquid leakage situation of the video image is judged based on the liquid leakage detection model; the liquid leakage detection model is a liquid leakage detection model trained by the training method according to any one of claims 1 to 4.

6. The liquid leakage detection method according to claim 5, characterized in that: Judging the liquid leakage situation of the video image based on the liquid leakage detection model includes: Extracting frame features of the video image frame by frame; Obtaining a prediction score of liquid leakage based on frame features of a selected number of frames; The liquid leakage situation is determined based on the prediction score.

7. The liquid leakage detection method according to claim 6, characterized in that: The prediction score of liquid leakage is obtained based on the frame features of the selected number of frames including: The frame features of the selected number of frames are input into the liquid leakage detection model multiple times to obtain prediction scores of multiple liquid leakages; wherein the first frame interval between the selected number of frames input each time is not greater than the selected number of frames.

8. A liquid leakage detection system, characterized in that: include: An acquisition module, used for acquiring video images; A judgment module is used to judge the liquid leakage situation of the video image based on the liquid leakage detection model; the liquid leakage detection model is a liquid leakage detection model trained by the training method according to any one of claims 1 to 4.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the training method of the liquid leakage detection model described in any one of claims 1 to 4 and / or the liquid leakage detection method described in any one of claims 5 to 7 are implemented.

10. An electronic device, characterized in that: The device comprises: A memory storing a computer program; A processor is communicatively connected to the memory, and executes the training method of the liquid leakage detection model described in any one of claims 1 to 4 and / or the liquid leakage detection method described in any one of claims 5 to 7 when calling the computer program.

Citation Information

Patent Citations

  • Faster R-CNN-based VOCs gas leakage detection method and system, storage medium and equipment

    CN113963154A

  • Region generation network training method and device and readable storage medium

    CN115512181A