Transformer oil tank abnormity detection method and device, computer equipment, readable storage medium and program product
Through the object detection model, feature extraction and feature fusion of transformer oil tank images are solved, which solves the problem of low manual detection efficiency, realizes accurate detection of small abnormalities in transformer oil tanks, and improves the detection accuracy and efficiency of electrical equipment .
Patent Information
- Application Number
- CN202411077444.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-01
AI Technical Summary
In the prior art, the detection of transformer oil tanks relies on manual detection, which is low efficiency and time-consuming and labor-intensive, making it difficult to accurately detect small abnormalities.
The object detection model is used to extract and fuse the transformer oil tank image. A larger-sized object detection map is obtained through upsampling processing to detect small abnormal parts in the transformer oil tank image.
It improves the accuracy and efficiency of transformer fuel tank detection, can detect small abnormalities that are not easily noticed by the naked eye, and improves the detection accuracy and efficiency of electrical equipment.
Smart Images

Figure CN118887418A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for detecting anomalies of a transformer oil tank. Background Art
[0002] With the development of power technology, there are a large number of electrical equipment in the power system. In order to ensure the normal operation of the power system, electrical equipment needs to be regularly inspected and maintained. However, manual inspection is usually used to check whether there are defects in the electric starting equipment. The manual inspection method requires a lot of manpower and material resources, is time-consuming and labor-intensive, and has low efficiency. Summary of the invention
[0003] Based on this, it is necessary to provide a transformer oil tank abnormality detection method, device, computer equipment, computer readable storage medium and computer program product that can improve the efficiency of oil tank abnormality detection and improve the detection accuracy of oil tank surface abnormalities in order to solve the above technical problems.
[0004] In a first aspect, the present application provides a method for detecting an abnormality of a transformer oil tank, comprising:
[0005] Acquire the image of the transformer oil tank to be inspected;
[0006] Performing feature extraction on the transformer oil tank image based on the target detection model to obtain multiple feature extraction graphs;
[0007] Performing feature fusion processing on the plurality of feature extraction graphs based on the target detection model to obtain a plurality of feature fusion graphs;
[0008] Determine a target feature fusion map from the plurality of feature fusion maps, perform upsampling processing on the target feature fusion map, and obtain a target detection map based on the upsampled feature map and the target feature extraction map, wherein the size of the target feature extraction map is the same as the size of the upsampled feature map;
[0009] The target detection is performed on the target detection image based on the detection network of the target detection model to obtain an abnormal part in the transformer oil tank image, where the area of the abnormal part is smaller than a preset area.
[0010] In one embodiment, the obtaining a plurality of feature fusion graphs based on the plurality of feature extraction graphs comprises:
[0011] After performing feature extraction processing on the first feature extraction map, a first intermediate feature map is obtained;
[0012] Performing upsampling processing on the first intermediate feature map to obtain a first upsampling result;
[0013] The first upsampling result is spliced and fused with the second feature extraction map to obtain a first spliced fusion map, and the first spliced fusion map is subjected to feature extraction processing to obtain a second intermediate feature map;
[0014] Performing upsampling processing on the second intermediate feature map to obtain a second upsampling result;
[0015] The second upsampling result is spliced and fused with the third feature extraction map to obtain a second spliced fusion map, and a third feature fusion map is obtained based on the second spliced fusion map;
[0016] Performing feature extraction processing on the third feature fusion graph to obtain a third feature extraction result;
[0017] Obtaining a second feature fusion map based on the feature extraction result and the second intermediate feature map;
[0018] Performing feature extraction processing on the second feature fusion graph to obtain a second feature extraction result;
[0019] A first feature fusion map is obtained based on the second feature extraction result and the first intermediate feature map.
[0020] In one of the embodiments, determining a target feature fusion map from the plurality of feature fusion maps includes: obtaining the target feature fusion map based on the third feature fusion map.
[0021] In one of the embodiments, obtaining a target detection map based on an upsampled feature map and a target feature extraction map includes: splicing and fusing the upsampled feature map and the target feature extraction map to obtain a third spliced and fused map; and performing feature extraction on the third spliced and fused map to obtain the target detection map.
[0022] In one of the embodiments, before inputting the transformer oil tank image into the feature extraction layer, the steps include: segmenting the transformer oil tank image to obtain a plurality of segmented images, and respectively inputting each of the segmented images into the feature extraction layer to obtain a corresponding third feature fusion map; and performing target detection on the plurality of third feature fusion maps based on the detection network to obtain an abnormal part in each segmented image.
[0023] In one embodiment, before inputting the transformer oil tank image into the feature extraction layer, the method includes: fusing a plurality of segmented images to obtain a fused image; and inputting the fused image into the feature extraction layer to obtain an abnormal portion in the fused image.
[0024] In one of the embodiments, before performing target detection on the target detection image based on the detection network, the steps include: obtaining multiple preset anchor frame numbers; obtaining anchor frame sizes corresponding to different anchor frame numbers based on a clustering algorithm; obtaining, for each anchor frame number, the overlap rate between multiple anchor frames corresponding to the anchor frame number and the corresponding real target frame; obtaining the number of target anchor frames and the corresponding anchor frame size based on the overlap rate corresponding to each anchor frame number; and constructing the detection network based on the target anchor frame number and the corresponding anchor frame size.
[0025] In a second aspect, the present application also provides a transformer oil tank abnormality detection device, comprising:
[0026] An acquisition module, used for acquiring an image of a transformer oil tank to be detected;
[0027] A feature extraction module, used for performing feature extraction on the transformer oil tank image based on a target detection model to obtain a plurality of feature extraction graphs;
[0028] A feature fusion module, used for performing feature fusion processing on the plurality of feature extraction graphs based on the target detection model to obtain a plurality of feature fusion graphs;
[0029] A determination module, configured to determine a target feature fusion map from the plurality of feature fusion maps, perform upsampling processing on the target feature fusion map, and obtain a target detection map based on the upsampled feature map and the target feature extraction map, wherein the size of the target feature extraction map is the same as the size of the upsampled feature map;
[0030] A detection module is used to perform target detection on the target detection image based on the detection network of the target detection model to obtain an abnormal part in the transformer oil tank image, wherein the area of the abnormal part is smaller than a preset area.
[0031] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method when executing the computer program.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps in the above method when executed by a processor.
[0033] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps in the above method when executed by a processor.
[0034] The above-mentioned transformer oil tank abnormality detection method, device, computer equipment, computer-readable storage medium and computer program product obtain a transformer oil tank image to be detected, extract features of the transformer oil tank image based on the target detection model, and obtain multiple feature extraction graphs; and perform feature fusion processing on the multiple feature extraction graphs based on the target detection model to obtain multiple feature fusion graphs. In this way, more and deeper features of the transformer oil tank image can be obtained. In order to improve the detection accuracy, a target feature fusion graph is also determined from the multiple feature fusion graphs, and the target feature fusion graph is upsampled to obtain a target detection graph based on the upsampled feature graph and the target feature extraction graph. The target detection graph obtained by upsampling has a larger size, so that the small abnormal part in the transformer oil tank image can be obtained when the target detection is performed on the target detection graph later. Through the above method, some small abnormalities that are not easily perceived by the naked eye can also be detected, thereby improving the detection efficiency of electrical equipment and the detection accuracy of electrical equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0036] FIG1 is a diagram showing an application environment of a method for detecting an abnormality of a transformer oil tank in one embodiment;
[0037] FIG2 is a schematic flow chart of a method for detecting an abnormality of a transformer oil tank in one embodiment;
[0038] FIG3 is a schematic diagram of a flow chart of a feature fusion step in one embodiment;
[0039] FIG4 is a partial structural diagram of a model corresponding to a method for detecting an abnormality of a transformer oil tank in one embodiment;
[0040] FIG5 is a schematic diagram of a process of obtaining a target detection map in one embodiment;
[0041] FIG6 is a schematic flow chart of the steps of obtaining an abnormal portion of an image in one embodiment;
[0042] FIG7 is a structural block diagram of a device for detecting an abnormality of a transformer oil tank in one embodiment;
[0043] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] As the core component of the power system substation, the transformer is a static electrical device. Its main working principle is to achieve the transfer of electric energy and the change between different voltage levels through electromagnetic coupling between different windings. The transformer structure is relatively complex and consists of many parts. Its main components are: transformer body, transformer oil tank, transformer cooling device, transformer non-electrical quantity protection device and transformer outlet device.
[0046] In the power system, transformers play a very important role. Among the four links of power generation, power transmission, power distribution and power consumption, transformers appear in the first three links. In the power generation link, power transformers transmit the electric energy generated by the power plant to the power grid, and increase the output voltage of the power plant to meet the rated high voltage requirements of the power transmission grid. The transformer used here is a step-up transformer. In the power transmission link, it is used for voltage conversion between power grids of different voltage levels. In the distribution link, the voltage is reduced by power transformers at all levels at the end of power transmission to meet the voltage requirements of the distribution network.
[0047] The main transformer, referred to as the main transformer, is a total step-down transformer mainly used for power transmission and transformation in a unit or substation, and is also the core part of the substation. The transformer is the core equipment of the electric locomotive traction power supply system, and is also the key equipment to ensure the safe and stable operation of the traction power supply system.
[0048] The capacity of the main transformer is generally large, and it is required to work with high reliability. Although the failure rate of the main transformer is not high, once a failure occurs, it will cause significant losses. At the least, it may cause equipment failure; at the worst, it may cause a fire, endangering normal transportation safety.
[0049] The oil tank is the outer shell of the transformer, which contains the iron core and coil and is filled with transformer oil, so that the iron core and coil are immersed in the oil. Transformer oil plays the role of insulation and heat dissipation, and plays an important role in protecting the transformer.
[0050] Common faults of the main transformer include abnormal oil temperature, abnormal oil level, and abnormal odor, color and sound. These abnormal conditions will have subtle manifestations on the appearance of the oil tank, such as slight deformation, cracks, discoloration, etc. of the tank.
[0051] For the oil tank of the main transformer, the traditional maintenance process, whether it is a box-type oil tank or a bell-type oil tank, requires relatively cumbersome lifting operations. This manual inspection method that relies on a lot of manpower and material resources is time-consuming and laborious. With the continuous development of computer vision technology, the anomaly detection method based on machine learning is gradually introduced in the anomaly detection of key equipment in power plants, which can effectively detect the status of equipment.
[0052] The method for detecting transformer oil tank abnormalities provided in an embodiment of the present application can be applied in an application environment as shown in FIG. 1 . The terminal 102 communicates with the server 104 via a network. The terminal 102 can be, for example, an image acquisition device. The terminal 102 is arranged near the transformer for photographing the transformer. The terminal 102 sends the acquired oil tank image of the transformer to the server 104. After receiving the oil tank image, the server 104 processes the image to detect small abnormalities of the oil tank. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 can be an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, or it can be a cloud server that provides cloud computing services.
[0053] In an exemplary embodiment, as shown in FIG2 , a method for detecting an abnormality of a transformer oil tank is provided, and the method is applied to the server in FIG1 as an example for description, and includes the following steps 202 to 206. Among them:
[0054] Step 202: Acquire an image of the transformer oil tank to be inspected.
[0055] The transformer oil tank image refers to an image obtained by photographing the transformer oil tank. By detecting the image, possible defects of the transformer oil tank can be found.
[0056] Step 204 , extracting features from the transformer tank image based on the target detection model to obtain a plurality of feature extraction graphs.
[0057] Among them, object detection models are deep learning algorithms used to identify and locate one or more objects in an image or video. These models can identify the location (usually represented by a bounding box) and category of the object.
[0058] In order to process image data more effectively and improve the accuracy and efficiency of detection, it is necessary to extract the features of the image first. This is because: 1. The amount of information contained in the original image is very large. Directly processing this information is not only computationally complex, but also difficult to extract useful patterns. Through feature extraction, the key information in the image can be abstracted into a more concise and representative feature vector, which is convenient for subsequent processing. 2. Image data is usually high-dimensional. For example, a color image may contain thousands of pixels. Feature extraction can reduce the dimension of the data and make the calculation more efficient. 3. The feature extraction process can filter out features that are helpful for the target detection task, such as edges, textures, shapes, etc., while ignoring irrelevant information, such as background noise. 4. By extracting the common features of the image, the model can be better generalized to different images and scenes, even images that have not appeared directly in the training data. 5. Before the advent of deep learning, traditional target detection methods relied on manually designed feature extraction algorithms that are designed to reduce the amount of computation in subsequent processing steps. Even in deep learning, structures such as convolutional neural networks (CNNs) gradually reduce the size and complexity of data through hierarchical feature extraction. 6. Network structures such as CNN can capture different levels of features from low-level to high-level through multi-layer processing. For example, the initial layer of the network may only detect edges and textures, while deeper layers can recognize more complex shapes and structures. 7. Feature extraction makes the model's decision-making process more explainable. By analyzing the features of different layers, we can understand how the model recognizes and locates the target. 8. The extracted features can be used for a variety of different tasks, such as classification, segmentation, detection, etc. Once the features are extracted, they can be used by different models or algorithms.
[0059] Step 206: Perform feature fusion processing on the multiple feature extraction images based on the target detection model to obtain multiple feature fusion images.
[0060] Since objects in the real world vary in size, the target detection model can better identify objects of different sizes by performing detection on feature fusion maps of different scales. Feature fusion allows the model to combine features from different layers that correspond to different scales, thereby improving the accuracy of detection. In addition, feature maps of lower layers contain more information about object details, such as edges and textures, while feature maps of higher layers contain more abstract semantic information. By fusing these features, the model can obtain a more comprehensive and rich representation of objects. Therefore, this embodiment also performs feature fusion processing on multiple feature extraction maps based on the target detection model to obtain multiple feature fusion maps.
[0061] Step 208, determining a target feature fusion map from the multiple feature fusion maps, performing upsampling processing on the target feature fusion map, and obtaining a target detection map based on the upsampled feature map and the target feature extraction map.
[0062] Among them, the size of the target feature extraction map is the same as the size of the upsampled feature map.
[0063] In order to obtain a larger feature map to detect abnormal targets with a smaller area, the feature fusion map with the largest size can be upsampled. In order to improve the accuracy of detection, the upsampled feature map can be further fused to obtain the target detection map.
[0064] In one embodiment, the up-sampled feature map and the target feature extraction map may be spliced and fused to obtain a third spliced fused map, and then feature extraction may be performed on the third spliced fused map to obtain a target detection map.
[0065] Step 210: Perform target detection on the target detection image based on the detection network of the target detection model to obtain abnormal parts in the transformer tank image.
[0066] The area of the abnormal part is smaller than the preset area.
[0067] Since it is necessary to detect anomalies with a smaller area, and compared with the target detection model, this embodiment adds a feature extraction layer to process image features, the detection network can be reconfigured so that the number and size of the detection boxes can better detect small anomalies.
[0068] In some embodiments, in order to obtain the number and size of the configured detection frames, multiple preset anchor frame numbers can be obtained, and then based on the clustering algorithm, the anchor frame sizes corresponding to different anchor frame numbers are obtained. For each anchor frame number, the overlap rate of multiple anchor frames corresponding to the anchor frame number and the corresponding real target frame is obtained. Based on the overlap rate corresponding to each anchor frame number, the number of target anchor frames and the corresponding anchor frame size are obtained. Among them, the overlap rate can be the ratio of the overlap area between the anchor frame and the real target frame to the real target frame.
[0069] After configuring the detection network, in order to accurately frame the target in the image, the detection network needs to be trained based on the configuration data (the number and size of the detection boxes) and the training data set.
[0070] In the above detection method, by obtaining the transformer oil tank image to be detected, the transformer oil tank image is subjected to feature extraction based on the target detection model to obtain multiple feature extraction graphs; and the multiple feature extraction graphs are subjected to feature fusion processing based on the target detection model to obtain multiple feature fusion graphs. In this way, more and deeper features of the transformer oil tank image can be obtained. In order to improve the detection accuracy, the target feature fusion graph is also determined from the multiple feature fusion graphs, and the target feature fusion graph is upsampled, and the target detection graph is obtained based on the upsampled feature graph and the target feature extraction graph. The target detection graph obtained by upsampling is larger in size, so that the small abnormal parts in the transformer oil tank image can be obtained when the target detection graph is subsequently performed on the target detection graph. Through the above method, some small abnormalities that are not easily perceived by the naked eye can also be detected, thereby improving the detection efficiency of electrical equipment and the detection accuracy of electrical equipment.
[0071] In an exemplary embodiment, the process of extracting features from an image to obtain a feature extraction graph and the step of fusing features from the feature extraction graph can refer to the Backbone structure of the yolov5 model. As shown in Figures 3 and 4, obtaining multiple feature fusion graphs based on multiple feature extraction graphs includes steps 302 to 306. Among them:
[0072] Step 302: After performing feature extraction processing on the first feature extraction map, a first intermediate feature map is obtained.
[0073] Step 304: upsample the first intermediate feature map to obtain a first upsampling result.
[0074] Step 306: The first upsampling result is concatenated and fused with the second feature extraction map to obtain a first concatenated fused map, and feature extraction is performed on the first concatenated fused map to obtain a second intermediate feature map.
[0075] Step 308: upsample the second intermediate feature map to obtain a second upsampling result.
[0076] Step 310: splice and fuse the second upsampling result with the third feature extraction map to obtain a second spliced fusion map, and obtain a third feature fusion map based on the second spliced fusion map.
[0077] Step 312: perform feature extraction processing on the third feature fusion image to obtain a third feature extraction result.
[0078] Step 314, obtaining a second feature fusion map based on the feature extraction result and the second intermediate feature map.
[0079] Step 316, performing feature extraction processing on the second feature fusion image to obtain a second feature extraction result.
[0080] Step 318: Obtain a first feature fusion map based on the second feature extraction result and the first intermediate feature map.
[0081] In this embodiment, through the above steps, the multi-scale feature extraction map can be fused, so that the feature information at different levels can be combined, including both detail features and semantic features, which helps to improve the accuracy and robustness of detection. And it not only includes a top-down path, but also a bottom-up path, which can strengthen the transmission of features so that the underlying detail information can be better used by the upper layer. By fusing features of different scales, it helps to improve the accuracy of detection, especially when the target size and proportion vary greatly.
[0082] In one embodiment, in order to obtain a larger feature map to detect smaller abnormal parts in the image, the third feature fusion map may be determined as the target feature fusion map, wherein the third feature fusion map is larger in size than the first feature fusion map and the second feature fusion map.
[0083] In one embodiment, as shown in FIG5 , the step of obtaining the target detection map based on the up-sampled feature map and the target feature extraction map includes steps 502 to 504. Among them:
[0084] Step 502: splice and fuse the upsampled feature map and the target feature extraction map to obtain a third spliced fusion map.
[0085] Step 504: extract features from the third spliced fusion image to obtain a target detection image.
[0086] The upsampled feature map is a feature map obtained by upsampling the third feature fusion map. Therefore, the size of the upsampled feature map is larger than that of the third feature fusion map. In this way, a target detection map with a larger size than the third feature fusion map can be obtained, and then a small target can be obtained based on the large-size target detection map, thereby realizing the detection of small targets and improving the precision and accuracy of the detection.
[0087] In one embodiment, the large-resolution image can also be detected based on the Yolt algorithm. The large-resolution image is first segmented, and then the segmented image with a smaller area is detected, so that the detection accuracy can be improved. As shown in FIG6, the steps before the transformer tank image is input into the feature extraction layer include steps 602 to 604. Among them:
[0088] Step 602: segment the transformer oil tank image to obtain a plurality of segmented images, and input each segmented image into a feature extraction layer to obtain a corresponding third feature fusion image.
[0089] Step 604: Perform target detection on the plurality of third feature fusion images based on the detection network to obtain abnormal parts in each segmented image.
[0090] The segmented image is a partial image of the transformer tank image.
[0091] In this embodiment, by inputting the segmented image with less content after segmentation into the model for target detection processing, the detection efficiency can be improved and the level of detail of the target detected in the segmented image can be improved. The image before segmentation may be interfered by background noise, so the interference can be reduced and the detection accuracy of small targets can be improved.
[0092] In one embodiment, in order to obtain the number of target anchor frames that can detect small targets and the corresponding anchor frame sizes, multiple preset anchor frame numbers can be obtained; based on a clustering algorithm, the anchor frame sizes corresponding to different anchor frame numbers are obtained; for each anchor frame number, the overlap rate of multiple anchor frames corresponding to the anchor frame number and the corresponding real target frame is obtained; based on the overlap rate corresponding to each anchor frame number, the number of target anchor frames and the corresponding anchor frame size are obtained; and the detection network is trained based on the number of target anchor frames and the corresponding anchor frame sizes.
[0093] For example, the number of preset anchor boxes obtained is 7, 10, and 12. For each preset number of anchor boxes, the following steps are performed: A number of bounding boxes equal to the preset number of anchor boxes can be randomly selected as the initial cluster centers. For each bounding box, calculate its distance from each cluster center (usually using the Euclidean distance) and assign it to the nearest cluster center. Calculate the average of all bounding boxes for each cluster and use it as the new cluster center. Repeat the assignment and update steps until the change in the cluster center is less than a certain threshold or the preset number of iterations is reached. Analyze the bounding box size represented by each cluster center. These cluster centers will represent the optimal size of the detection box. A histogram of the bounding box size corresponding to each cluster center can be drawn to intuitively observe the distribution of clusters. According to the clustering results, the bounding box corresponding to each cluster center is selected as the anchor box. Compare the overlap rates under each preset number of anchor boxes, and select the preset number of anchor boxes corresponding to the largest overlap rate as the number of target detection boxes. The corresponding bounding box size is the size of the target detection box.
[0094] It is understandable that in order to obtain the number and size of the target detection box, it is necessary to first obtain a training data set containing a large number of annotated targets, and these annotations include the bounding box coordinates of each target. And before clustering, the width and height of all annotated bounding boxes are extracted from the data set to facilitate the subsequent acquisition of the cluster center and then the target anchor box.
[0095] In an exemplary embodiment, for some abnormalities that can be traced on the surface of the equipment, the abnormal information of the electrical equipment can be obtained by taking a photo of the electrical equipment based on the obtained image. For example, when the oil temperature of the oil tank of the transformer is abnormal, the surface may be slightly deformed. Therefore, in order to improve the efficiency of inspecting the transformer or other electrical equipment, the image of the oil tank of the transformer can be processed to obtain the abnormal part of the oil tank, and then the defect information of the oil tank can be obtained based on the abnormal part.
[0096] In order to find the defects of the oil tank as early as possible, the detection accuracy of the image should be improved so that the abnormal part of the image with a smaller area can be detected. To achieve the above purpose, detection can be performed based on the target detection model. The target detection model can be a yolov5 model. First, the server can first obtain the transformer oil tank image to be detected, and then extract the features of the transformer oil tank image based on the target detection model to obtain multiple feature extraction graphs. Based on the target detection model, in order to extract deeper features, it is also necessary to fuse the obtained features to obtain corresponding multiple feature fusion graphs. Specifically, after the first feature extraction graph is subjected to feature extraction processing, a first intermediate feature graph is obtained. The first intermediate feature graph is subjected to upsampling processing to obtain a first upsampling result. The first upsampling result is spliced and fused with the second feature extraction graph to obtain a first spliced fusion graph, and the first spliced fusion graph is subjected to feature extraction processing to obtain a second intermediate feature graph. The second intermediate feature graph is subjected to upsampling processing to obtain a second upsampling result. The second upsampling result is spliced and fused with the third feature extraction graph to obtain a second spliced fusion graph, and a third feature fusion graph is obtained based on the second spliced fusion graph. The third feature fusion map is subjected to feature extraction processing to obtain the third feature extraction result. The second feature fusion map is obtained based on the feature extraction result and the second intermediate feature map. The second feature fusion map is subjected to feature extraction processing to obtain the second feature extraction result. The first feature fusion map is obtained based on the second feature extraction result and the first intermediate feature map. In this way, feature fusion maps of multiple sizes can be obtained. In order to detect the abnormal part with a smaller area, the feature fusion map with the largest size should be processed. Therefore, the target feature fusion map with the largest size is determined from the feature fusion maps of multiple sizes. For example, the input image is subjected to small target segmentation detection. Taking the input image of 608×608 as an example, YOLOv5 performs 5 downsamplings, and the sizes of the feature fusion maps obtained are 19×19, 38×38 and 76×76 respectively. The largest of the three, 76×76, is responsible for detecting small targets. Corresponding to 608×608, the size of the perception field of each feature map is 8×8. That is, a target feature fusion map of 76×76 is selected from the three feature fusion maps. Then, the target feature fusion map is upsampled to obtain an upsampled feature map of size 152×152. The upsampled feature map and the target feature extraction map are spliced and fused to obtain a third spliced fusion map; feature extraction is performed on the third spliced fusion map to obtain a target detection map. The size of the target feature extraction map is also 152×152 accordingly.
[0097] After obtaining the target detection map, the detection network based on the target detection model performs target detection on the target detection map to obtain the abnormal part in the transformer tank image. Among them, since the detection layer detection image fusion may not have a detection frame recognition when the larger feature map is fused, it is necessary to configure the detection network (the network in the target detection model) so that the targets in the target detection map have detection frame recognition. When configuring the detection network, the number and size of the optimal detection frame can be obtained. To obtain the number and size, the following steps can be performed: obtain multiple preset anchor frame numbers; based on the clustering algorithm, obtain the anchor frame size corresponding to different anchor frame numbers; for each anchor frame number, obtain the overlap rate of multiple anchor frames corresponding to the anchor frame number and the corresponding real target frame; based on the overlap rate corresponding to each anchor frame number, obtain the number of target anchor frames and the corresponding anchor frame size. For example, the calculation anchor frame that comes with YOLOv5 has only 9 detection frames, which is likely to cause missed detection and false detection when encountering more subtle anomalies that do not meet the anchor frame size. Therefore, it is necessary to recalculate the number and size of the anchor box externally. The algorithm used is k-means clustering algorithm, and the most suitable number and size of adaptive anchor boxes are calculated through the labeled target box information (ground truth) on the self-made data set. In other words, after obtaining the optimal size and number of detection boxes, the detection network with the number of target anchor boxes and the corresponding anchor box size needs to be trained based on the data of the self-made data set to obtain an improved detection network to detect small targets in the image.
[0098] Through the above steps, the problem of adding detection layers and fusion of detection images to form a larger feature map without detection frame recognition, as well as the problem of small anomalies being difficult to detect can be solved, and the accuracy of small target detection can be improved.
[0099] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0100] Based on the same inventive concept, the embodiment of the present application also provides a transformer oil tank abnormality detection device for implementing the transformer oil tank abnormality detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more transformer oil tank abnormality detection devices provided below can refer to the limitations of the transformer oil tank abnormality detection method above, and will not be repeated here.
[0101] In an exemplary embodiment, as shown in FIG7 , a transformer oil tank abnormality detection device 700 is provided, comprising: an acquisition module 701, a feature extraction module 702, a feature fusion module 703, a determination module 704 and a detection module 705, wherein:
[0102] An acquisition module 701 is used to acquire an image of a transformer oil tank to be detected;
[0103] A feature extraction module 702 is used to extract features from the transformer tank image based on the target detection model to obtain multiple feature extraction graphs;
[0104] A feature fusion module 703 is used to perform feature fusion processing on multiple feature extraction images based on the target detection model to obtain multiple feature fusion images;
[0105] A determination module 704 is used to determine a target feature fusion map from multiple feature fusion maps, perform upsampling processing on the target feature fusion map, and obtain a target detection map based on the upsampled feature map and the target feature extraction map, wherein the size of the target feature extraction map is the same as the size of the upsampled feature map;
[0106] The detection module 705 is used to perform target detection on the target detection image based on the detection network of the target detection model to obtain an abnormal part in the transformer tank image, and the area of the abnormal part is smaller than a preset area.
[0107] In some embodiments, the feature extraction module is used to perform feature extraction processing on the first feature extraction map to obtain a first intermediate feature map; upsample the first intermediate feature map to obtain a first upsampling result; splice and fuse the first upsampling result with the second feature extraction map to obtain a first spliced fusion map, and perform feature extraction processing on the first spliced fusion map to obtain a second intermediate feature map; upsample the second intermediate feature map to obtain a second upsampling result; splice and fuse the second upsampling result with the third feature extraction map to obtain a second spliced fusion map, and obtain a third feature fusion map based on the second spliced fusion map; perform feature extraction processing on the third feature fusion map to obtain a third feature extraction result; obtain a second feature fusion map based on the feature extraction result and the second intermediate feature map; perform feature extraction processing on the second feature fusion map to obtain a second feature extraction result; and obtain the first feature fusion map based on the second feature extraction result and the first intermediate feature map.
[0108] In some embodiments, the determination module is used to determine that the third feature fusion map is the target feature fusion map.
[0109] In some embodiments, the determination module is further used to splice and fuse the upsampled feature map and the target feature extraction map to obtain a third spliced and fused map; and perform feature extraction on the third spliced and fused map to obtain a target detection map.
[0110] In some embodiments, the preprocessing module is also used to segment the transformer oil tank image to obtain multiple segmented images, and then input each segmented image into the feature extraction layer to obtain a corresponding third feature fusion map; and perform target detection on the multiple third feature fusion maps based on the detection network to obtain abnormal parts in each segmented image.
[0111] In some embodiments, the preprocessing module is further used to fuse multiple segmented images to obtain a fused image; and input the fused image into the feature extraction layer to obtain an abnormal part in the fused image.
[0112] In some embodiments, the training module is used to obtain multiple preset anchor frame numbers; based on a clustering algorithm, obtain the anchor frame sizes corresponding to different anchor frame numbers; for each anchor frame number, obtain the overlap rate between the multiple anchor frames corresponding to the anchor frame number and the corresponding real target frame; based on the overlap rate corresponding to each anchor frame number, obtain the number of target anchor frames and the corresponding anchor frame size; and train the detection network based on the target anchor frame number and the corresponding anchor frame size.
[0113] Each module in the above transformer oil tank abnormality detection device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0114] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the operation data required for detection, the target detection model data and the data related to the abnormality of the image. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting abnormalities of a transformer oil tank is implemented.
[0115] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0116] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0118] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0119] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0120] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 application.
[0121] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for detecting an abnormality of a transformer oil tank, characterized in that: The method comprises: Acquire the image of the transformer oil tank to be inspected; Performing feature extraction on the transformer oil tank image based on the target detection model to obtain multiple feature extraction graphs; Performing feature fusion processing on the plurality of feature extraction graphs based on the target detection model to obtain a plurality of feature fusion graphs; Determine a target feature fusion map from the plurality of feature fusion maps, perform upsampling processing on the target feature fusion map, and obtain a target detection map based on the upsampled feature map and the target feature extraction map, wherein the size of the target feature extraction map is the same as the size of the upsampled feature map; The target detection is performed on the target detection image based on the detection network of the target detection model to obtain an abnormal part in the transformer oil tank image, where the area of the abnormal part is smaller than a preset area.
2. The method according to claim 1, characterized in that The performing feature fusion processing on the plurality of feature extraction graphs based on the target detection model to obtain a plurality of feature fusion graphs includes: After performing feature extraction processing on the first feature extraction map, a first intermediate feature map is obtained; Performing upsampling processing on the first intermediate feature map to obtain a first upsampling result; The first upsampling result is spliced and fused with the second feature extraction map to obtain a first spliced fusion map, and the first spliced fusion map is subjected to feature extraction processing to obtain a second intermediate feature map; Performing upsampling processing on the second intermediate feature map to obtain a second upsampling result; Splicing and fusing the second upsampling result with the third feature extraction map to obtain a second splicing and fusion map, and obtaining a third feature fusion map based on the second splicing and fusion map; Performing feature extraction processing on the third feature fusion graph to obtain a third feature extraction result; Obtaining a second feature fusion map based on the third feature extraction result and the second intermediate feature map; Performing feature extraction processing on the second feature fusion graph to obtain a second feature extraction result; A first feature fusion map is obtained based on the second feature extraction result and the first intermediate feature map.
3. The method according to claim 2, characterized in that The determining a target feature fusion map from the plurality of feature fusion maps comprises: The target feature fusion map is obtained based on the third feature fusion map.
4. The method according to claim 1, characterized in that The method of obtaining a target detection map based on the up-sampled feature map and the target feature extraction map includes: The up-sampled feature map and the target feature extraction map are spliced and fused to obtain a third spliced fusion map; Perform feature extraction on the third spliced fusion image to obtain the target detection image.
5. The method according to claim 1, characterized in that The step of inputting the transformer tank image into the feature extraction layer includes: Segmenting the transformer oil tank image to obtain a plurality of segmented images, and inputting each of the segmented images into a feature extraction layer to obtain a corresponding third feature fusion map; Based on the detection network, target detection is performed on multiple third feature fusion images to obtain abnormal parts in each segmented image.
6. The method according to claim 1, characterized in that Before performing target detection on the target detection graph based on the detection network, the method includes: Get multiple preset anchor box numbers; Based on a clustering algorithm, obtaining an anchor frame size corresponding to the preset number of anchor frames; For each preset number of anchor frames, obtaining the overlap rate between multiple anchor frames corresponding to the preset number of anchor frames and the corresponding real target frame; The number of target anchor frames and the corresponding anchor frame size are obtained based on the overlap rate corresponding to each preset number of anchor frames; The detection network is trained based on the number of target anchor boxes and the corresponding sizes of the anchor boxes.
7. A transformer oil tank abnormality detection device, characterized in that: The device comprises: An acquisition module, used for acquiring an image of a transformer oil tank to be detected; A feature extraction module, used for performing feature extraction on the transformer oil tank image based on a target detection model to obtain a plurality of feature extraction graphs; A feature fusion module, used for performing feature fusion processing on the plurality of feature extraction graphs based on the target detection model to obtain a plurality of feature fusion graphs; A determination module, configured to determine a target feature fusion map from the plurality of feature fusion maps, perform upsampling processing on the target feature fusion map, and obtain a target detection map based on the upsampled feature map and the target feature extraction map, wherein the size of the target feature extraction map is the same as the size of the upsampled feature map; A detection module is used to perform target detection on the target detection image based on the detection network of the target detection model to obtain an abnormal part in the transformer oil tank image, wherein the area of the abnormal part is smaller than a preset area.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
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 steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
