Methods, devices, computer equipment, and storage media for identifying oil leaks in transformer substations.
By combining a dual-stream feature extraction module using infrared and polarization images with a deformation attention fusion module, the problem of expensive and ineffective transformer box oil leakage detection equipment is solved, achieving efficient and accurate oil leakage identification.
Patent Information
- Application Number
- CN202310431671.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-04-12
AI Technical Summary
Existing methods for detecting oil leakage in transformer boxes suffer from problems such as expensive testing equipment and poor detection results, especially when the amount of oil is small or the temperature change is small, making it difficult to accurately identify oil leakage.
A dual-flow feature extraction module was used to train the oil leakage detection model. The model combined infrared and polarization image sets and used the dual-flow feature extraction module and deformation attention fusion module to perform feature fusion and identify the location of the oil leakage.
It improves the accuracy and efficiency of oil leak detection, enabling accurate location of oil leaks in different scenarios, reducing equipment costs and enhancing detection results.
Smart Images

Figure CN116580262B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of oil leakage identification technology, and in particular to a method, apparatus, computer equipment, and storage medium for identifying oil leakage in a transformer box. Background Technology
[0002] Transformer boxes typically contain a large number of electrical devices, such as transformers, circuit breakers, and disconnectors. These devices require special oils such as insulating oil or lubricating oil to ensure their normal operation and maintenance. However, leaks or seepage of these oils can cause serious harm to human health, the environment, and the equipment itself. Therefore, timely detection and handling of oil leaks in transformer boxes are crucial measures to protect human health, the environment, and equipment safety.
[0003] In traditional methods for identifying oil leaks in power supply equipment, researchers typically use a single data source for oil leak detection.
[0004] However, these methods not only involve expensive testing equipment, but also result in inaccurate results when using single-source data. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, device, computer equipment, computer-readable storage medium, and a training method for an oil leakage detection model that can efficiently and accurately detect and identify oil leakage in substations, addressing the aforementioned technical problems.
[0006] Firstly, this application provides a method for identifying oil leakage in a transformer box. The method includes:
[0007] Acquire a real-time image set carrying characteristics of the oil leak;
[0008] The pre-trained oil leak detection model is invoked; the oil leak detection model is trained using a dual-stream feature extraction module based on infrared image sets and polarization image sets carrying oil leak characteristics.
[0009] The oil leakage detection model is used to identify the oil leakage features in the real-time image set, thereby obtaining the location of the oil leakage in the real-time image set.
[0010] Secondly, this application provides a training method for an oil leakage detection model, used to train the oil leakage detection model as provided in the first aspect, the method comprising:
[0011] Obtain an infrared image set and a polarization image set carrying the characteristics of the oil leakage to obtain an oil leakage image set;
[0012] The location of the oil leak is marked in each image of the oil leak image set to obtain the marked image set;
[0013] The dual-stream feature extraction module is used to extract features from the marked image set, and the deformation attention fusion module is used to fuse the extracted feature images to obtain the oil leakage detection model.
[0014] In one embodiment, a dual-stream feature extraction module is used to extract features from a set of marked images, and a deformation attention fusion module is used to fuse the extracted feature images to obtain an oil leak detection model, including:
[0015] The labeled image set is input into the dual-stream feature extraction module, which outputs a feature image.
[0016] The feature image is input into the deformation attention fusion module, and the fused feature image is output.
[0017] A location code is generated based on the fused feature image;
[0018] The fused feature image and its positional encoding are input into the encoding module to obtain the first output value;
[0019] The first output value is restored to the feature layer size of the dual-stream feature extraction module to obtain the second output value;
[0020] The second output value is input into the prediction head module and the positive example matching module to obtain the calculated value of the loss function.
[0021] The model parameters are updated based on the calculated values of the loss function, and the oil leakage detection model is obtained based on the updated model parameters.
[0022] In one embodiment, the labeled image set is input into the dual-stream feature extraction module, and the output feature image includes:
[0023] Feature images are obtained using a dual-stream feature extraction module, which includes two lightweight networks. These two lightweight networks are used to extract features from the infrared image set and the polarization image set carrying the oil leakage feature in the labeled image set, respectively.
[0024] In one embodiment, inputting the fused feature image and the position code of the fused feature image into the encoding module to obtain the first output value includes:
[0025] The encoding module obtains the first output value based on the fused feature image and the position encoding of the fused feature image. The encoding module includes multiple encoders connected in sequence; each encoder includes a multi-head attention mechanism network, a residual network, a layer normalization network, and a feedforward network.
[0026] In one embodiment, each encoder, comprising a multi-head attention mechanism network, a residual network, a layer normalization network, and a feedforward network, includes:
[0027] Multi-head attention mechanism networks obtain output values through deformation multi-head attention mechanisms.
[0028] Thirdly, this application also provides a device for identifying oil leakage in a transformer box. The device includes:
[0029] The image set acquisition module is used to acquire a real-time image set carrying the characteristics of oil leakage;
[0030] The model calling module is used to call the pre-trained oil leakage detection model; the oil leakage detection model is trained using a dual-stream feature extraction module based on infrared image sets and polarization image sets carrying oil leakage characteristics.
[0031] The result acquisition module is used to identify the oil leakage features of the real-time image set through the oil leakage detection model, and obtain the location of the oil leakage in the real-time image set.
[0032] Fourthly, this application also provides a training apparatus for an oil leakage detection model, used to train the oil leakage detection model as provided in the first aspect, the apparatus comprising:
[0033] The reference image set acquisition module is used to acquire infrared image sets and polarization image sets carrying the characteristics of oil leakage, and obtain the oil leakage image set;
[0034] The image set labeling module is used to label the location of the oil leak in each image in the oil leak image set, thereby obtaining a labeled image set;
[0035] The model training module is used to extract features from the marked image set using the dual-stream feature extraction module and to fuse the extracted feature images using the deformation attention fusion module to obtain the oil leakage detection model.
[0036] Fifthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described method for identifying oil leakage in a transformer substation; or, to implement the steps of the above-described method for training an oil leakage detection model.
[0037] Sixthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method for identifying oil leakage in a transformer substation; or, implements the steps of the above-described method for training an oil leakage detection model.
[0038] The aforementioned method, device, computer equipment, and storage medium for identifying oil leakage in substations acquire a real-time image set carrying oil leakage characteristics, invoke a pre-trained oil leakage detection model, and identify the oil leakage characteristics in the real-time image set using the oil leakage detection model to obtain the location of the oil leakage in the real-time image set. This achieves automatic identification and judgment of the oil leakage situation, greatly improving the accuracy and efficiency of detection. Specifically, the oil leakage detection model is trained using a dual-stream feature extraction module based on an infrared image set and a polarization image set carrying oil leakage characteristics. This involves acquiring the infrared and polarization image sets to obtain the oil leakage image set, labeling the oil leakage location in each image in the oil leakage image set to obtain a labeled image set, using the dual-stream feature extraction module to extract features from the labeled image set, and using a deformation attention fusion module to fuse the extracted feature images to obtain the oil leakage detection model. This process innovatively uses multi-source data, including infrared and polarization images, to detect oil leaks. A feature fusion module is added to the traditional detection model to fuse features from multiple sources, which can fully combine the advantages of infrared and polarization images in the process of detecting oil leaks. Attached Figure Description
[0039] Figure 1 This is a flowchart illustrating a method for identifying oil leakage in a transformer box in one embodiment.
[0040] Figure 2 This is a flowchart illustrating the training method for an oil leakage detection model in one embodiment.
[0041] Figure 3 This is a schematic diagram of the modules of a transformer box oil leakage identification method in one embodiment;
[0042] Figure 4 This is a flowchart illustrating a method for identifying oil leakage from a transformer box in another embodiment.
[0043] Figure 5 This is a schematic diagram of the structure of a device for identifying oil leakage in a transformer box in one embodiment;
[0044] Figure 6 This is a schematic diagram of the structure of a training device for an oil leakage detection model in one embodiment;
[0045] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0046] Substations typically contain a large number of electrical devices, such as transformers, circuit breakers, and disconnect switches. These devices require special oils, such as insulating oils or lubricating oils, to ensure their normal operation and maintenance. However, leaks or seepage of these oils can cause serious harm to human health, the environment, and the equipment itself, primarily including harm to human health, environmental damage, and equipment damage.
[0047] First, there are the hazards to human health. Leaking insulating or lubricating oil releases harmful gases such as benzene, toluene, and xylene. These gases can affect the respiratory and nervous systems, and long-term exposure may lead to health problems such as respiratory illnesses and neurasthenia. Second, there are the environmental hazards. Leaking insulating or lubricating oil pollutes soil, groundwater, and surface water, affecting the ecological balance and endangering human health and the living environment of plants and animals. Furthermore, these oil stains are difficult to clean and may cause long-term environmental pollution. Finally, there are the hazards to equipment. Leaking insulating or lubricating oil corrodes metal and damages insulation materials, affecting the operational stability and lifespan of equipment. Moreover, oil stains may clog the equipment's heat dissipation vents, causing overheating and ultimately affecting the normal operation of the equipment.
[0048] Therefore, timely detection and handling of oil leakage problems in transformer boxes are important measures to protect human health, the environment, and equipment safety.
[0049] Traditional methods for detecting oil leaks in power supply equipment and oil stains on the ground mainly include the following technologies: infrared imaging, ultraviolet fluorescence, lidar, and acoustic wave technology. Infrared imaging uses an infrared camera to image the power supply equipment. By analyzing the temperature distribution in the infrared image, the location of the oil stain can be detected. This method has advantages such as high sensitivity and good real-time performance, but its detection effect is not ideal for small amounts of oil or small temperature changes. Ultraviolet fluorescence uses ultraviolet light to excite the oil stain to emit fluorescence. By analyzing the fluorescence signal, the location of the oil stain can be identified. This method has advantages such as high detection efficiency and high accuracy, but it is greatly affected by ambient light. Lidar technology uses lidar to scan the surface of the power supply equipment. By analyzing the intensity and distance of the reflected signal, the location of the oil stain can be identified. This method has advantages such as non-contact and high detection accuracy, but the equipment is expensive, and its recognition effect on oil stain depth and color is poor. Acoustic wave technology uses sound waves to scan the power supply equipment. By analyzing the characteristics of the echo signal, the location of the oil stain can be detected. This method has advantages such as non-contact and high sensitivity, but it is greatly affected by environmental noise.
[0050] Currently, researchers primarily use a single data source for oil leak detection, which involves expensive equipment, and sometimes the detection results from single-source data are not very good. Considering that polarization imaging can identify the properties of different substances through different polarization states, combining it with infrared imaging for oil leak detection can effectively avoid the problems of expensive equipment and poor detection results.
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] In one embodiment, such as Figure 1 As shown, a method for identifying oil leakage in a transformer box is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0053] Step 102: Obtain a real-time image set carrying the characteristics of the oil leakage.
[0054] Specifically, a real-time image set carrying characteristics of oil leakage is acquired through a camera. It is understood that in some cases, the real-time image set acquired through the camera may not carry characteristics of oil leakage.
[0055] Step 104: Call the pre-trained oil leakage detection model; the oil leakage detection model is trained using a dual-stream feature extraction module based on infrared image sets and polarization image sets carrying oil leakage characteristics.
[0056] Furthermore, the infrared and polarized image sets carrying oil leakage characteristics are labeled and preprocessed, and the processed infrared and polarized image sets are trained using a target detection model to obtain an oil leakage detection model. Specifically, the target detection model includes the Yolov7 target detection model.
[0057] Step 106: Identify the oil leakage features in the real-time image set using the oil leakage detection model to obtain the location of the oil leakage in the real-time image set.
[0058] Specifically, the real-time image set is input into the trained oil leakage detection model, which outputs the predicted bounding boxes. The non-maximum suppression algorithm is used to suppress duplicate boxes, and the output results are used as the final predicted boxes to obtain the location of the oil leakage in the real-time image set.
[0059] The aforementioned method for identifying oil leakage in substations involves acquiring a real-time image set carrying oil leakage characteristics and then calling a pre-trained oil leakage detection model. This model is trained using a dual-stream feature extraction module based on infrared and polarized image sets carrying oil leakage characteristics. By innovatively using multi-source data from infrared and polarized images to detect oil leakage, and adding a feature fusion module to the traditional detection model to fuse features from multiple sources, the method fully combines the advantages of both infrared and polarized images during oil leakage detection. The oil leakage detection model identifies the oil leakage characteristics in the real-time image set, determining the location of the oil leakage within the set. This enables automatic identification and determination of the oil leakage situation, significantly improving detection accuracy and efficiency, and demonstrating high application value and market potential.
[0060] In one embodiment, such as Figure 2 As shown, a training method for an oil leakage detection model is provided, the method comprising:
[0061] Step 202: Obtain an infrared image set and a polarization image set carrying the characteristics of the oil leakage to obtain an oil leakage image set.
[0062] Step 204: Mark the location of the oil leak in each image in the oil leak image set to obtain the marked image set.
[0063] Step 206: Use the dual-stream feature extraction module to extract features from the marked image set and use the deformation attention fusion module to fuse the extracted feature images to obtain the oil leakage detection model.
[0064] In one embodiment, a set of polarized images and a set of infrared images carrying characteristics of the oil leak are acquired by a camera to obtain an oil leak image set. Specifically, the polarized image set includes images with four polarization states, with polarization angles of 0°, 45°, 90°, and 135°, respectively.
[0065] In one embodiment, the locations of the leaking oil in the image set are labeled to obtain a labeled image set. Specifically, the location of the leaking oil is labeled as (x, y, w, h), where (x, y) represents the coordinates of the center point of the leaking oil region, w represents the width of the leaking oil region, and h represents the height of the leaking oil region. The category is labeled L, representing leaking oil. Further, the labeled image set is preprocessed, including data denoising, image enhancement, and other data augmentation operations.
[0066] In one embodiment, a dual-stream feature extraction module extracts features from the marked image set to obtain a feature image, and a deformation attention fusion module fuses the extracted feature images. Further, a position code is generated based on the fused feature image, and a first output value and a second output value are obtained based on the fused feature image and the position code, thereby obtaining a loss function value. The model parameters are updated based on the loss function value to obtain an oil leakage detection model.
[0067] In this embodiment, an oil leakage image set is obtained by acquiring an infrared image set and a polarization image set carrying oil leakage characteristics. The location of the oil leakage in each image in the oil leakage image set is labeled to obtain a labeled image set, which serves as a reference for training the oil leakage detection model. A dual-stream feature extraction module is used to extract features from the labeled image set, and a deformation attention fusion module is used to fuse the extracted feature images to obtain the oil leakage detection model. Unlike the traditional Ylolv7 model, a dual-stream feature extraction module is used in the feature extraction part. This allows for the combination of the advantages of infrared and polarization images, and through the feature integration capabilities of Transformer (a deep learning model based on an attention mechanism), oil leakage can be detected more efficiently and accurately.
[0068] In one embodiment, a dual-stream feature extraction module is used to extract features from a set of marked images, and a deformation attention fusion module is used to fuse the extracted feature images to obtain an oil leak detection model, including:
[0069] The labeled image set is input into the dual-stream feature extraction module, which outputs a feature image.
[0070] The feature image is input into the deformation attention fusion module, and the fused feature image is output.
[0071] A location code is generated based on the fused feature image;
[0072] The fused feature image and its positional encoding are input into the encoding module to obtain the first output value;
[0073] The first output value is restored to the feature layer size of the dual-stream feature extraction module to obtain the second output value;
[0074] The second output value is input into the prediction head module and the positive example matching module to obtain the calculated value of the loss function.
[0075] The model parameters are updated based on the calculated values of the loss function, and the oil leakage detection model is obtained based on the updated model parameters.
[0076] In one embodiment, after the data-amplified labeled image set is input into the dual-stream feature extraction module, the dual-stream feature extraction module outputs a feature image. Further, the deformation attention fusion module concatenates the feature images output by the dual-stream feature extraction module after the dual-stream feature extraction module to obtain a fused feature image, and performs position encoding on the fused feature image. Optionally, the position encoding is calculated as shown in formulas (1) and (2):
[0077] (1)
[0078] (2)
[0079] Where PE is the positional encoding, pos is the position of the pixel in the feature image, i represents the dimension of the feature image, and d model This represents the vector dimension set in the model; different dimensions are calculated in different ways.
[0080] In one embodiment, the fused feature image and its positional encoding are input into an encoding module to obtain a first output value. The encoding module consists of six encoders connected sequentially within a Transformer network. In the first encoder, the input feature image... and position encoding The encoder outputs a value, and then inputs that value into the next encoder. The next encoder outputs a value, and so on, until the last encoder outputs the first value.
[0081] Furthermore, the first output value is restored to the same size as the feature layer of the dual-stream feature extraction module, and a second output value is obtained. This second output value is then input into the prediction head module and the positive example matching module. The loss function is calculated based on the output values of these modules, and then backpropagated through gradients. The parameters of the target detection model are updated based on the calculated loss function value. Finally, the updated parameters are imported into the target detection model to obtain the trained dual-stream fusion Yolov7 target detection model. Specifically, the oil leak detection model is a dual-stream fusion Yolov7 target detection model.
[0082] In this embodiment, a set of labeled images is input into a dual-stream feature extraction module, which outputs a feature image. This feature image is then input into a deformation attention fusion module, which outputs a fused feature image. A positional code is then generated based on the fused feature image. This process innovatively utilizes both infrared and polarization images for oil leak detection and innovatively applies a deformation attention fusion module to fuse features from different source data. The fused feature image and its positional code are then input into an encoding module to obtain a first output value. This first output value is restored to the feature layer size of the dual-stream feature extraction module to obtain a second output value. This second output value is input into a prediction head module and a positive example matching module to obtain a loss function calculation value. The model parameters are updated based on the loss function calculation value, and an oil leak detection model is obtained based on the updated model parameters. By obtaining corresponding output values from the fused feature image and positional code, and then updating the model parameters, an oil leak detection model capable of identifying oil leaks is obtained.
[0083] In one embodiment, the labeled image set is input into the dual-stream feature extraction module, and the output feature image includes:
[0084] Feature images are obtained using a dual-stream feature extraction module, which includes two lightweight networks. These two lightweight networks are used to extract features from the infrared image set and the polarization image set carrying the oil leakage feature in the labeled image set, respectively.
[0085] Specifically, the lightweight network includes the MobileNet v2 network. The dual-stream feature extraction module consists of two MobileNet v2 networks, each responsible for feature extraction of one type of data, where the polarization image corresponds to an input dimension of (w, h, 4), and the infrared image input dimension is (w, h, 1).
[0086] In this embodiment, MobileNet v2 is used to extract features from the infrared image set and polarized image set carrying oil leakage characteristics in the labeled image set. Since the MobileNet v2 network is more lightweight, it can ensure the testing speed of the target detection model in practical applications.
[0087] In one embodiment, inputting the fused feature image and the position code of the fused feature image into the encoding module to obtain the first output value includes:
[0088] The encoding module obtains the first output value based on the fused feature image and the position encoding of the fused feature image. The encoding module includes multiple encoders connected in sequence; each encoder includes a multi-head attention mechanism network, a residual network, a layer normalization network, and a feedforward network.
[0089] Specifically, the encoding module includes six encoders connected in sequence to the Transformer network. Each encoder includes a multi-head attention mechanism network, a residual network, a layer normalization network, a feedforward network, a residual network, and a layer normalization network connected in sequence.
[0090] Here we introduce the concepts of Query, Key, and Value. Query (Q) represents a query; Key (K) is the key used to compare with the query to be queried, and the comparison results in a relevance or similarity score. This score is multiplied by Value (V) to obtain the final result.
[0091] The input parameter Q of a multi-head self-attention network is the output value of the previous encoder plus the position code. If the current encoder is the first encoder, then the input parameter Q is the feature image. Add positional encoding; K is the output value of the previous encoder plus the positional encoding. If the current encoder is the first encoder, then K is the feature image. Add position encoding; V is the output value of the previous encoder, or the V feature image if the current encoder is the first encoder. .
[0092] The feedforward network is a two-layer fully connected network. The activation function of the first layer is ReLU, and no activation function is used in the second layer. The output matrix of the feedforward network has the same dimension as the input matrix, and the formula for calculating the output matrix is shown in formula (3):
[0093] (3)
[0094] Where X represents the input value, W1 represents the matrix in the fully connected layer, b1 represents the bias term, max() represents the maximum value function, W2 represents the matrix in the fully connected layer, and b2 represents the bias term.
[0095] In this embodiment, the encoding module obtains a first output value based on the fused feature image and its position encoding. The encoding module includes six encoders connected in sequence. Each encoder includes a multi-head attention mechanism network, a residual network, a layer normalization network, and a feedforward network. The first output value is obtained through the networks in the encoders, especially the multi-head attention mechanism network and the feedforward network, preparing for obtaining the second output value and the loss function calculation value, and further preparing for updating the model parameters and obtaining the oil leakage detection model.
[0096] In one embodiment, each encoder, comprising a multi-head attention mechanism network, a residual network, a layer normalization network, and a feedforward network, includes:
[0097] Multi-head attention mechanism networks obtain output values through deformation multi-head attention mechanisms.
[0098] Specifically, the multi-head attention mechanism network is computed using a multi-head deformable attention mechanism.
[0099] In this embodiment, a deformation multi-head attention mechanism is innovatively applied to the calculation of the output value, in order to prepare for obtaining the first output value.
[0100] In one embodiment, after acquiring the location of the oil leak in the real-time image set, the alarm module issues an alarm signal. Based on the oil leak alarm, technicians can take timely measures to ensure the normal operation and safety of the transmission line. Furthermore, an alarm threshold is set in the alarm module to prevent false alarms and missed alarms regarding oil leaks.
[0101] In one embodiment, such as Figure 3 The diagram illustrates a module schematic for a method to identify oil leaks in a transformer box. After acquiring an image set of oil leaks, the location of the oil leak in each image is labeled to obtain a labeled image set. The labeled image set is preprocessed and then input into a dual-stream feature extraction module to obtain feature images. These feature images are then input into a deformation attention fusion module to obtain fused feature images. Location codes are obtained from the fused feature images, and a first and second output value are further obtained. The second output value is input into a prediction head module to obtain a predicted value, which is then input into a positive example matching module to obtain its output value. A classification regression loss value (i.e., the loss function calculation value) is calculated based on the output value of the positive example matching module. This loss function calculation value is then backpropagated through gradients to update the parameters of the target detection model, resulting in an oil leak detection model. This process constitutes the model training module. A real-time image set carrying oil leak features is acquired. The oil leak detection model judges the oil leak features in the real-time image set. If an oil leak is detected, the detection result is fed back; otherwise, the real-time image set is acquired again. This process is the practical application module.
[0102] In another embodiment, such as Figure 4 The diagram shows a flowchart of a method for identifying oil leakage in a transformer box.
[0103] Step 402: Obtain an infrared image set and a polarization image set carrying the characteristics of the oil leakage to obtain an oil leakage image set.
[0104] Step 404: Mark the location of the oil leak in each image in the oil leak image set to obtain the marked image set.
[0105] Step 406: Use the dual-stream feature extraction module to obtain feature images. The dual-stream feature extraction module includes two lightweight networks, which are used to extract features from the infrared image set and polarization image set carrying the oil leakage features in the labeled image set, respectively.
[0106] Step 408: Input the feature image into the deformation attention fusion module and output the fused feature image.
[0107] Step 410: Generate a position code based on the fused feature image.
[0108] Step 412: The encoding module obtains the first output value based on the fused feature image and the position encoding of the fused feature image. The encoding module includes multiple encoders connected in sequence; each encoder includes a deformation multi-head attention mechanism, a residual network, a layer normalization network, and a feedforward network.
[0109] Step 414: Restore the first output value to the feature layer size of the dual-stream feature extraction module and obtain the second output value.
[0110] Step 416: Input the second output value into the prediction head module and the positive example matching module to obtain the loss function calculation value.
[0111] Step 418: Update the model parameters based on the calculated value of the loss function, and obtain the oil leakage detection model based on the updated model parameters.
[0112] Step 420: Obtain a real-time image set carrying the characteristics of the oil leakage.
[0113] Step 422: Call the pre-trained oil leakage detection model; the oil leakage detection model is trained using a dual-stream feature extraction module based on infrared image sets and polarization image sets carrying oil leakage characteristics.
[0114] Step 424: The oil leakage characteristics of the real-time image set are identified by the oil leakage detection model to obtain the location of the oil leakage in the real-time image set.
[0115] The method for identifying oil leaks in substations provided in this embodiment employs deep learning technology based on visible infrared multi-source data. This technology can automatically identify and determine oil leak conditions, significantly improving detection accuracy and efficiency, and possesses high application value and market potential. It innovatively uses multi-source data from infrared and polarization images to detect oil leaks and adds a feature fusion module to the original detection model. This method overcomes the difficulty of detecting leaks using infrared and polarization images in different scenarios. For example, infrared images are difficult to detect when temperatures are similar, while polarization images can detect leaks through material analysis. Furthermore, polarization image detection is difficult under poor imaging conditions, but temperature inversion can accurately locate the oil leak, thereby improving the detection rate.
[0116] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0117] Based on the same inventive concept, this application also provides a device for identifying oil leakage in a transformer box, which implements the aforementioned method for identifying oil leakage in a transformer box. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the device for identifying oil leakage in a transformer box provided below can be found in the limitations of the method for identifying oil leakage in a transformer box described above, and will not be repeated here.
[0118] In one embodiment, such as Figure 5 As shown, a device for identifying oil leakage in a transformer box is provided, comprising: an image set acquisition module 502, a model calling module 504, and a result acquisition module 506, wherein:
[0119] Image set acquisition module 502 is used to acquire a real-time image set carrying the characteristics of oil leakage.
[0120] Model calling module 504 is used to call the pre-trained oil leakage detection model; the oil leakage detection model is trained using a dual-stream feature extraction module based on an infrared image set and a polarization image set carrying oil leakage characteristics.
[0121] The result acquisition module 506 is used to identify the oil leakage features of the real-time image set through the oil leakage detection model, and obtain the location of the oil leakage in the real-time image set.
[0122] The modules in the aforementioned transformer box oil leakage identification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0123] Based on the same inventive concept, this application also provides a training device for an oil leakage detection model to implement the training method for the oil leakage detection model described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more training device embodiments for oil leakage detection models provided below can be found in the limitations of the training method for oil leakage detection models described above, and will not be repeated here.
[0124] In one embodiment, such as Figure 6 As shown, a training device for an oil leakage detection model is provided, comprising: a reference image set acquisition module 602, an image set labeling module 604, and a model training module 606, wherein:
[0125] The reference image set acquisition module 602 is used to acquire an infrared image set and a polarization image set carrying the characteristics of the oil leakage, and obtain an oil leakage image set.
[0126] The image set labeling module 604 is used to label the location of the oil leakage in each image in the oil leakage image set to obtain a labeled image set.
[0127] The model training module 606 is used to extract features from the marked image set using the dual-stream feature extraction module and to fuse the extracted feature images using the deformation attention fusion module to obtain the oil leakage detection model.
[0128] In one embodiment, the device further includes:
[0129] The feature image acquisition module is used to input the labeled image set into the dual-stream feature extraction module and output the feature image.
[0130] The feature image fusion module is used to input the feature image into the deformation attention fusion module and output the fused feature image.
[0131] The location encoding generation module is used to generate location codes based on the fused feature image.
[0132] The first output value acquisition module is used to input the fused feature image and the position code of the fused feature image into the encoding module to obtain the first output value.
[0133] The second output value acquisition module is used to restore the first output value to the feature layer size of the dual-stream feature extraction module and acquire the second output value.
[0134] The loss function calculation value acquisition module is used to input the second output value into the prediction head module and the positive example matching module to obtain the loss function calculation value.
[0135] The parameter update module is used to update the model parameters based on the calculated values of the loss function, and to obtain the oil leakage detection model based on the updated model parameters.
[0136] In one embodiment, the device further includes:
[0137] A lightweight network feature extraction module is used to acquire feature images using a dual-stream feature extraction module. The dual-stream feature extraction module includes two lightweight networks, which are used to extract features from infrared image sets and polarization image sets carrying oil leakage features in the labeled image set, respectively.
[0138] In one embodiment, the device further includes:
[0139] The encoder output module is used by the encoding module to obtain the first output value based on the fused feature image and the position encoding of the fused feature image. The encoding module includes multiple encoders connected in sequence; each encoder includes a multi-head attention mechanism network, a residual network, a layer normalization network and a feedforward network.
[0140] In one embodiment, the device further includes:
[0141] The Deformation Multi-Head Attention Mechanism module is used by multi-head attention mechanism networks to obtain output values through deformation multi-head attention mechanisms.
[0142] Each module in the training device for the aforementioned oil leakage detection model can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the operations corresponding to each module.
[0143] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for identifying oil leakage in a transformer substation and a method for training an oil leakage detection model. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0144] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0145] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0146] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0147] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0148] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0149] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0150] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for identifying oil leakage from a transformer tank, characterized by, The method includes: Acquire a real-time image set carrying characteristics of the oil leak; The pre-trained oil leakage detection model is invoked; the oil leakage detection model is trained using a dual-stream feature extraction module based on a set of infrared images and a set of polarized images carrying oil leakage characteristics. The oil leakage detection model identifies the oil leakage features in the real-time image set to obtain the location of the oil leakage in the real-time image set. The training method for the oil leakage detection model includes: The infrared image set and polarized image set carrying the characteristics of the oil leakage are obtained to obtain the oil leakage image set; The location of the oil leak in each image in the oil leak image set is labeled to obtain the labeled image set; The labeled image set is input into the dual-stream feature extraction module, which outputs a feature image. The feature image is input into the deformation attention fusion module, and the fused feature image is output. A location code is generated based on the fused feature image; The fused feature image and its position code are input into the encoding module to obtain the first output value; The first output value is restored to the feature layer size of the dual-stream feature extraction module to obtain the second output value; The second output value is input into the prediction head module and the positive example matching module to obtain the loss function calculation value; The model parameters are updated based on the calculated value of the loss function, and the oil leakage detection model is obtained based on the updated model parameters.
2. The method according to claim 1, characterized in that, The step of inputting the labeled image set into the dual-stream feature extraction module and outputting feature images includes: The feature image is obtained using a dual-stream feature extraction module, wherein the dual-stream feature extraction module includes two lightweight networks, which are used for feature extraction of infrared image sets and polarization image sets carrying oil leakage features in the labeled image set, respectively.
3. The method of claim 1, wherein, The step of inputting the fused feature image and the position encoding of the fused feature image into the encoding module to obtain the first output value includes: The encoding module obtains a first output value based on the fused feature image and the position encoding of the fused feature image. The encoding module includes multiple encoders connected in sequence. Each encoder includes a multi-head attention mechanism network, a residual network, a layer normalization network, and a feedforward network.
4. The method of claim 3, wherein, Each encoder includes a multi-head attention mechanism network, a residual network, a layer normalization network, and a feedforward network, comprising: Multi-head attention mechanism networks obtain output values through deformation multi-head attention mechanisms.
5. A device for identifying oil leakage from a transformer tank, characterized in that, The device includes: The image set acquisition module is used to acquire a real-time image set carrying the characteristics of oil leakage; The model invocation module is used to invoke a pre-trained oil leakage detection model; the oil leakage detection model is trained using a dual-stream feature extraction module based on an infrared image set and a polarization image set carrying oil leakage characteristics. The result acquisition module is used to identify the oil leakage features of the real-time image set through the oil leakage detection model, and obtain the location of the oil leakage in the real-time image set. The training method for the oil leakage detection model includes: The infrared image set and polarized image set carrying the characteristics of the oil leakage are obtained to obtain the oil leakage image set; The location of the oil leak in each image in the oil leak image set is labeled to obtain the labeled image set; The labeled image set is input into the dual-stream feature extraction module, which outputs a feature image. The feature image is input into the deformation attention fusion module, and the fused feature image is output. A location code is generated based on the fused feature image; The fused feature image and its position code are input into the encoding module to obtain the first output value; The first output value is restored to the feature layer size of the dual-stream feature extraction module to obtain the second output value; The second output value is input into the prediction head module and the positive example matching module to obtain the loss function calculation value; The model parameters are updated based on the calculated value of the loss function, and the oil leakage detection model is obtained based on the updated model parameters. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-5. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Floating hazardous chemical detection method based on polarization differential magnification image processing
CN108230316A
Cloud detection method based on polarized image
CN108399363A
