Substation ground oil pollution identification method, device, electronic equipment and storage medium
Through the semantic recognition model of the full convolution network and residual network combined with the random weight averaging method, the problem of slow recognition speed and low accuracy of ground oil pollution in the substation is solved, and automatic identification and timely feedback of ground oil pollution in the substation is realized, which improves the recognition accuracy and equipment safety.
Patent Information
- Application Number
- CN202210557795.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-05-19
AI Technical Summary
In the prior art, the identification of ground oil pollution in substations relies on manual detection, which is slow, poor real-time and low accuracy, making it difficult to detect oil leakage problems in a timely manner, affecting the life of the equipment and the safety of the power system.
The ground oil-film semantic recognition model based on full convolutional network and residual network is adopted, and the model parameters are trained in combination with the random weight averaging method, and the oil-film area and oil leakage degree are automatically identified and output. The semantic segmentation network combines shallow position information and deep semantic information to improve the recognition accuracy and speed.
It realizes efficient automatic identification of oil pollution on the substation, improves identification accuracy and speed, promptly feedback on oil leakage, supports rapid maintenance, and improves the safety and equipment life of the substation.
Smart Images

Figure CN114943895B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to oil pollution detection technology, and in particular to a method, device, electronic equipment and storage medium for identifying oil pollution on the ground of a substation. Background Art
[0002] In the field of power systems, if oil leakage occurs in a transformer and is not discovered in time, it will affect the service life of the transformer and the safe operation of the power system.
[0003] Existing technologies typically rely on manual inspection or the use of brightness characteristics to identify oil stains. This manual approach is slow, lacks real-time performance, and consumes significant manpower. Oil stain identification based on brightness characteristics requires extensive coverage, resulting in poor real-time performance and low accuracy. Summary of the Invention
[0004] The embodiments of the present invention provide a method, device, electronic device and storage medium for identifying ground oil pollution in a substation, so as to achieve the technical effect of improving the accuracy and speed of identifying ground oil pollution.
[0005] In a first aspect, an embodiment of the present invention provides a method for identifying oil pollution on the ground of a substation, the method comprising:
[0006] Acquire a ground image of the substation to be tested;
[0007] Inputting the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image; wherein the ground oil pollution semantic recognition model is constructed based on a fully convolutional network and a residual network, and the model parameters in the ground oil pollution semantic recognition model are determined based on a random weighted averaging method;
[0008] If the target ground image is marked with at least one ground oil stain, the target ground image is output to the management platform of the substation to be tested.
[0009] In a second aspect, an embodiment of the present invention further provides a substation ground oil pollution identification device, the device comprising:
[0010] A ground image acquisition module to be tested, used to acquire a ground image to be tested of the substation to be tested;
[0011] A target ground image acquisition module is used to input the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image; wherein the ground oil pollution semantic recognition model is constructed based on a fully convolutional network and a residual network, and the model parameters in the ground oil pollution semantic recognition model are determined based on a random weighted average method;
[0012] The information output module is used to output the target ground image to the management platform of the substation to be tested if the target ground image is marked with at least one ground oil stain.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising:
[0014] one or more processors;
[0015] a storage device for storing one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the substation ground oil pollution identification method as described in any one of the embodiments of the present invention.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for identifying ground oil pollution in a substation as described in any one of the embodiments of the present invention.
[0018] The embodiment of the present invention provides a method for identifying oil pollution on the ground of a substation, which is used to develop a defect identification system. Due to the irregularity of the oil pollution area, by averaging the model parameters of multiple random gradient descents, the oil pollution characteristics of all training samples are taken into account, and the problem of low recognition accuracy caused by the complex shape of the ground oil pollution is solved, which is more conducive to improving the recognition rate of the model. In addition, the oil pollution area and the degree of oil leakage are automatically identified, and the degree of oil leakage, target equipment and target ground image are output to the management platform of the substation to be tested, achieving the technical effect of timely feedback and reminder. The method for identifying oil pollution on the ground of a substation is also a method for constructing a semantic recognition model for ground oil pollution. The semantic segmentation network adopts a jump-layer structure to combine shallow location information and deep semantic information to obtain a more robust model, which solves the problem of low accuracy of substation ground oil pollution identification due to inaccurate oil pollution information identification, and achieves the effect of improving the recognition accuracy of ground oil pollution identification, so that the model can be used more widely in oil pollution identification in the industrial field. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings introduced here only illustrate some of the embodiments to be described by the present invention, and are not exhaustive. A person skilled in the art can derive other drawings based on these drawings without inventive effort.
[0020] Figure 1A schematic flow chart of a method for identifying oil pollution on the ground of a substation provided in the first embodiment of the present invention;
[0021] Figure 2 A schematic flow chart of a method for identifying oil pollution on the ground of a substation provided in the second embodiment of the present invention;
[0022] Figure 3 A flowchart of a method for training a ground oil pollution semantic recognition model provided in the third embodiment of the present invention;
[0023] Figure 4 A flowchart of a method for using a ground oil pollution semantic recognition model provided in the third embodiment of the present invention;
[0024] Figure 5 This is a schematic diagram of the structure of a substation ground oil pollution identification device provided by the fourth embodiment of the present invention;
[0025] Figure 6 This is a structural diagram of an electronic device provided in Example 5 of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0027] Example 1
[0028] Figure 1 This is a flow chart of a method for identifying oil pollution on the ground of a substation provided in the first embodiment of the present invention. This embodiment is applicable to the situation of identifying oil pollution on the ground within a substation. The method can be performed by a substation ground oil pollution identification device, which can be implemented in the form of software and / or hardware. The hardware can be an electronic device. Optionally, the electronic device can be a mobile terminal, a server, a PC, etc.
[0029] like Figure 1 The method of this embodiment specifically includes the following steps:
[0030] S110: Acquire a ground image of the substation to be tested.
[0031] The substation to be tested may be any one or more substations that need to be tested for oil leakage. The ground image to be tested may be a ground image of the substation to be tested obtained by photographing.
[0032] Specifically, the ground image of the substation to be tested can be obtained by mobile phone photography, robot inspection or fixed camera photography, so as to be used for subsequent judgment of whether there is oil pollution in the ground image to be tested.
[0033] S120 , inputting the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image.
[0034] The ground oil stain semantic recognition model is constructed using a fully convolutional network and a residual network, and its model parameters are determined using a random weighted averaging method. The target ground image can be the output image of the ground oil stain semantic recognition model. If the ground image to be detected contains ground oil stains, the image annotated with the ground oil stains in the ground image to be detected is determined as the target ground image. If the ground image to be detected does not contain ground oil stains, the ground image to be detected is determined as the target ground image.
[0035] Specifically, the ground image to be detected is input into a pre-trained ground oil pollution semantic recognition model, the ground image to be detected is processed by the ground oil pollution semantic recognition model, and the processed image is used as the target ground image.
[0036] It should be noted that the ground oil spill semantic recognition model uses a semantic segmentation method that uses fully convolutional networks (FCN) for pixel-level prediction, and a residual network (ResNet) as the backbone network for feature extraction. Furthermore, the model parameters in the ground oil spill semantic recognition model are determined using a random weight averaging method. By averaging the weight parameters of multiple stochastic gradient descent methods, the loss function is prevented from falling into a single minimum point. This solves the weight oscillation problem of traditional gradient descent during the reverse process and improves the model's generalization ability.
[0037] S130: If the target ground image is marked with at least one ground oil stain, the target ground image is output to a management platform of the substation to be tested.
[0038] Among them, the management platform of the substation to be tested can be a platform for supervising the operation status of each operating equipment in the substation to be tested, or it can be management software installed in the mobile terminal of the manager, etc. It can be any form of management platform and is not specifically limited in this embodiment.
[0039] Specifically, if the target ground image is marked with at least one ground oil stain, it means that there is an oil leak in the equipment. The target ground image can be pushed to the management platform of the substation to be tested, so that the management personnel of the substation to be tested can analyze the target ground image upon receiving it, determine the specific location of the leaking equipment and the extent of the oil leakage, and facilitate rapid maintenance.
[0040] The technical solution of the embodiment of the present invention obtains a ground image to be detected of the substation to be tested, and inputs the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image. If the target ground image is marked with at least one ground oil pollution, the target ground image is output to the management platform of the substation to be tested, thereby solving the problems of slow speed, high cost and poor real-time performance of manual ground oil pollution recognition, and achieving the technical effect of improving the accuracy and speed of identifying ground oil pollution.
[0041] Example 2
[0042] Figure 2 This is a flow chart of a method for identifying oil contamination on the ground surface of a substation, provided in Example 2 of the present invention. This embodiment builds upon the previous embodiments. The technical solutions of this embodiment are provided for the methods of acquiring the ground image to be detected, constructing the ground oil contamination semantic recognition model, and outputting the target ground image. Explanations of terms that are identical or corresponding to those in the previous embodiments are omitted here.
[0043] like Figure 2 The method of this embodiment specifically includes the following steps:
[0044] S210 : Acquire an original ground image of the substation to be tested based on a photographing device, perform image preprocessing on the original ground image, and obtain a ground image to be tested.
[0045] Image preprocessing includes at least one of image sharpening, scaling, and normalization. The camera can be any one or more devices for capturing images, such as a camera in a mobile phone, a camera in an inspection robot, a fixed-mounted camera, or a drone camera. The original ground image can be an unprocessed ground image of the substation under test captured by the camera. The ground image to be tested can be an image obtained by performing image preprocessing on the original ground image.
[0046] Specifically, a camera is used to capture a raw ground image of the substation to be tested. This image is then preprocessed. For example, image sharpening can highlight the edges of oil stains, increasing image contrast and making defects more visible, making them easier to identify. Scaling can correct image distortion. Normalization can standardize the image for easier recognition. The resulting image is used as the ground image to be tested.
[0047] S220. Build an initial semantic recognition model based on a fully convolutional network and a residual network.
[0048] The initial semantic recognition model may be a semantic recognition model constructed based on a default network architecture and default model parameters.
[0049] Specifically, an initial semantic recognition model is constructed based on a fully convolutional network of the default network structure and a residual network of the default network structure, wherein the model parameters can be random or default settings and can be iteratively adjusted later.
[0050] Optionally, an initial semantic recognition model can be constructed based on the following method:
[0051] Step 1: Build a semantic segmentation network based on the convolutional network and upsampling network.
[0052] The convolutional network can be a convolutional neural network, with the final fully connected layer of the convolutional neural network replaced by a convolutional layer to accept image inputs of any size. The upsampling network can be a deconvolutional layer used to restore the image output by the convolutional network to its original size. The semantic segmentation network can be a network used to extract deep semantic information.
[0053] Step 2: Construct a feature extraction network based on the residual network.
[0054] The feature extraction network may be a network for extracting shallow position information.
[0055] Step 3: Build an initial semantic recognition model based on the semantic segmentation network and feature extraction network.
[0056] Among them, the initial semantic recognition model is used to combine shallow location information and deep semantic information.
[0057] It's important to note that after a series of processing steps, such as convolution and pooling, in a fully convolutional network and a residual network, the resulting feature map has a much lower resolution than the original image. This results in a one-to-one correspondence between pixels in the feature map and those in the original image, making it impossible to predict each pixel. Therefore, upsampling the feature map is necessary to increase its resolution. A fully convolutional network can accept source images of any size. To obtain a segmentation map of the same size as the original image, a deconvolution layer is used to upsample the feature map from the last convolutional layer, restoring it to the same size as the original image. This allows for a prediction of each pixel. This preserves the spatial information in the original image. Finally, pixel-by-pixel classification is performed on the upsampled feature map, and the loss function is calculated pixel by pixel. While a fully convolutional network can localize the target region through convolution and deconvolution, the output image after operations like deconvolution is actually very rough, losing much detail. Using a jump-layer architecture to combine shallow positional information with deep semantic information can yield more robust results.
[0058] S230. Train the initial semantic recognition model based on the pre-labeled sample ground image, and perform weighted averaging of the model parameters during the training process based on the total number of iterations required for the loss function to converge during the training process to obtain target model parameters.
[0059] The sample ground image may be a ground image used for model training, including annotated oil-contaminated areas. The total number of iterations may be the number of iterations during model training at which the loss function converges. The target model parameters may be the weighted average of the total model parameters from each iteration.
[0060] Specifically, the initial semantic recognition model is trained based on pre-labeled sample ground images to better identify oil-contaminated areas. During training, a random weighted averaging method is used to average the weight parameters of stochastic gradient descent across iterations, preventing the loss function from falling into a single minimum. The parameter model obtained through this weighted averaging is then used as the target model parameters.
[0061] It should be noted that the model training process is a process of continuously learning and adjusting model parameters, and optimizing and minimizing the loss function. The loss function is used to measure the loss function between the calculated output of the sample ground image and the actual output of the sample ground image. Its optimization process is usually completed step by step through the stochastic gradient descent method (SGD). Traditional SGD is to find a single local optimal solution. This method usually uses a learning rate with a decay coefficient. First, the learning rate is set to a large value, and the loss function will drop rapidly. In order to prevent the model from oscillating back and forth in the area near the minimum point or crossing the minimum point, a learning rate decay strategy is generally adopted. As the learning rate decreases, the loss function eventually converges. However, the stochastic weight averaging method (SWA) used in this embodiment averages the weight parameters of multiple stochastic gradient descents, so that the loss function will not fall into a single minimum point. SWA adds a periodic sliding average to limit the change of weights, which solves the weight oscillation problem of traditional gradient descent in the reverse process, and achieves the effect of improving the generalization ability of the deep learning model.
[0062] Optionally, a sample ground image can be obtained based on the following methods:
[0063] An original sample image is acquired based on a photographing device, and the oily area in the original sample image is annotated based on an annotation tool to obtain a sample ground image.
[0064] The oily area includes at least one of oily stained cobblestones, oily stained cement surfaces, and oily stained artesian surfaces. The original sample image may be a ground image of the oily area captured by a camera. The annotation tool may be a tool for image annotation, such as Labelme.
[0065] Specifically, an image of the substation to be tested with oil stains on the ground is captured by a camera as the original sample image. During the semantic segmentation task, an annotation tool is used to annotate the oil stain areas in the original sample image, and the annotated image is used as the sample ground image.
[0066] It should be noted that when the oil stain is divided into multiple areas by obstructions, each area needs to be labeled sequentially to avoid introducing unnecessary background features. When the oil stain is composed of multiple points of uneven size or a cluster of lines, due to its small size, irregular dispersion, and close distance, it is best to use a single polygon to label the oil stain area.
[0067] Since a large number of original sample images are required during training, there may be a problem of insufficient sample size. Therefore, the sample can be expanded in the following ways:
[0068] The original sample image is expanded based on the sample expansion method.
[0069] The sample expansion method includes at least one of cropping, flipping and Gaussian noise.
[0070] Specifically, any one or more of cropping, flipping, and Gaussian noise processing can be performed on each original sample image to obtain a sample expansion image, so as to expand the sample and facilitate subsequent training.
[0071] Optionally, to determine the target model parameters more accurately, the target model parameters can be obtained by weighted averaging the model parameters during training using the following steps:
[0072] Step 1: Determine the first and second iterations based on the total number of iterations required for the loss function to converge during training.
[0073] The first number of iterations may be the number of iterations for training using a learning rate decay method. The second number of iterations may be the number of iterations for training using a periodic learning method. The sum of the first number of iterations and the second number of iterations is the total number of iterations.
[0074] Specifically, the total number of iterations is divided into a first number of iterations and a second number of iterations, which are used for training using different learning methods respectively.
[0075] For example, if the total number of iterations required for the loss function to converge is N, the first 0.75N iterations during the training process are used as the first iteration number, and the remaining 0.25N iterations are used as the second iteration number. The specific values of the first and second iteration numbers can be set according to the actual training situation and are not specifically limited in this embodiment.
[0076] Optionally, the first iteration number is greater than or equal to the second iteration number.
[0077] Step 2: Based on the first number of iterations, the model parameters trained by the learning rate decay method are weighted averaged to obtain the first model parameters, and based on the second number of iterations, the model parameters trained by the periodic learning method are weighted averaged to obtain the second model parameters.
[0078] The first model parameter may be a model parameter obtained by weighted averaging the model parameters used for the first iteration number, and the second model parameter may be a model parameter obtained by weighted averaging the model parameters used for the second iteration number.
[0079] Specifically, in the first iteration, the learning rate decay strategy is used for training, and the weighted average of each model number in the first iteration is taken to obtain the first model parameters. In the second iteration, the periodic learning rate strategy is used for training, and the weighted average of each model parameter in the second iteration is taken to obtain the second model parameters.
[0080] Optionally, the first model parameter can be obtained by:
[0081] For each iterative training in the first number of iterations, based on a preset initial learning rate, training is performed by a learning rate decay method to obtain a first sub-parameter; and a weighted average is performed based on each first sub-parameter to obtain a first model parameter.
[0082] The initial learning rate may be the first learning rate when using the gradient descent method, and subsequent learning rates are obtained based on the decay of the initial learning rate. The first sub-parameter may be a model parameter determined based on the current iteration.
[0083] Specifically, during each iterative training process, training is performed using a learning rate decay method based on a preset initial learning rate, and the model parameters obtained from this training are used as the first sub-model parameters. The learning rate decay method can be exponential decay, fixed step size decay, multi-step size decay, cosine annealing decay, etc. The first sub-parameters obtained from each iterative training in the first number of iterations are weighted averaged to obtain the first model parameters.
[0084] Optionally, the second model parameters can be obtained by:
[0085] For each iterative training in the second iteration number, based on the preset maximum learning rate and the preset minimum learning rate, the second sub-parameters are trained by periodic oscillation learning; and the second model parameters are obtained by weighted averaging the second sub-parameters.
[0086] The maximum learning rate and the minimum learning rate may be boundary limiting values when periodic oscillation learning is used, and the subsequent learning rate is obtained by oscillating between the maximum learning rate and the minimum learning rate.
[0087] Specifically, during each iterative training process, training is performed using a periodic oscillation learning method with a preset maximum learning rate and a preset minimum learning rate as oscillation boundaries, and the model parameters obtained from this training are used as the second sub-model parameters. The periodic oscillation learning method can include periodic oscillation learning with unchanged boundaries, periodic oscillation learning with halved boundaries, periodic oscillation learning with exponentially reduced boundaries, and the like. The second sub-parameters obtained from each iterative training in the second number of iterations are weighted averaged to obtain the second model parameters.
[0088] Step 3: Determine the target model parameters based on the first model parameters and the second model parameters.
[0089] Specifically, after the first model parameters and the second model parameters are determined, the first model parameters and the second model parameters may be fused, for example, by weighted superposition, to obtain new model parameters as target model parameters.
[0090] S240: Determine a ground oil pollution semantic recognition model based on the target model parameters.
[0091] Specifically, the model parameters in the initial semantic recognition model are updated to the target model parameters, and then the updated model is determined as the ground oil pollution semantic recognition model.
[0092] It should be noted that S220-S240 are all processes for determining the ground oil stain semantic recognition model. This process can also be completed before S210, as long as the model is constructed before using it. Furthermore, the ground oil stain semantic recognition model only needs to be constructed once and does not need to be rebuilt for each recognition. However, the ground oil stain semantic recognition model can be iteratively updated based on newly added ground images, which is not specifically limited in this embodiment.
[0093] S250: Input the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image.
[0094] S260: If the target ground image is marked with at least one ground oil stain, each ground oil stain in the target ground image is analyzed to determine the extent of the oil leakage, and the target device corresponding to the target ground image is determined based on the target ground image.
[0095] The oil leakage degree may be a level or value used to measure the severity of oil leakage of equipment in the substation to be tested based on the area of oil pollution on the ground. The target device may be the device corresponding to the ground area captured by the target ground image.
[0096] Specifically, if the target ground image is marked with at least one oil stain, an area analysis can be performed for each oil stain to determine the amount of oil spill corresponding to each stain, and thus the extent of the spill. Furthermore, the corresponding target device can be determined based on the target ground image. This can be done by determining the target device based on the location information corresponding to the ground image to be inspected that corresponds to the target ground image, or by performing image analysis on a portion of the device captured in the ground image to be inspected that corresponds to the target ground image.
[0097] S270: Output the oil leakage extent, target equipment, and target ground image to the management platform of the substation to be tested.
[0098] Specifically, after determining the extent of the oil leak and the target equipment corresponding to the target ground image, the leak, target equipment, and target ground image are sent to the management platform of the substation under test. Upon receiving this information, the management platform can determine the urgency based on the extent of the oil leak and the location for repair based on the target equipment. The management platform can then verify the accuracy of the automatic analysis using the received target ground image, allowing for the rapid and accurate location of the target equipment within the substation under test and subsequent repair.
[0099] The technical solution of the embodiment of the present invention obtains the ground image of the substation to be tested by capturing an original ground image of the substation to be tested using a camera, performing image preprocessing on the original ground image, and obtaining the ground image to be tested. Furthermore, an initial semantic recognition model is constructed based on a fully convolutional network and a residual network. The initial semantic recognition model is trained based on pre-labeled sample ground images. Based on the total number of iterations required for the loss function to converge during training, the model parameters during training are weighted averaged to obtain target model parameters. Furthermore, a ground oil pollution semantic recognition model is determined based on the target model parameters. The ground image to be tested is input into the pre-trained ground oil pollution semantic recognition model to obtain a target ground image. If the target ground image is labeled with at least one ground oil pollution, each ground oil pollution in the target ground image is analyzed to determine the extent of the oil spill. Based on the target ground image, the target device corresponding to the target ground image is determined, and the extent of the oil spill, target device, and target ground image are output to the management platform of the substation to be tested. This solves the problems of poor recognition performance and slow model training speed when using deep learning models to identify ground oil pollution, achieving the technical effect of improving the accuracy of ground oil pollution identification and the speed of model training and recognition.
[0100] Example 3
[0101] As an optional implementation scheme of the above embodiments, Figure 3 This is a flow chart of a method for training a ground oil pollution semantic recognition model provided by the third embodiment of the present invention. The explanations of the terms that are the same as or corresponding to those in the above embodiments are not repeated here.
[0102] like Figure 3 The method of this embodiment specifically includes the following steps:
[0103] 1. Sample collection: Images of oily ground near the substation to be tested are obtained as training samples (original sample images) through mobile phone photography, robot inspection, or camera photography. The ground oily ground includes oily ground on cobblestones, oily ground on cement, and oily ground on gravity surfaces.
[0104] 2. Sample Labeling: Use the Labelme tool (labeling tool) to perform polygonal labeling on the oil stains on the ground. The oil leakage area (oil stain area) should be marked. When the oil leakage area is divided into multiple areas by an obstruction, multiple defects need to be labeled sequentially to avoid introducing unnecessary background features. When the oil leakage area is composed of multiple points or linear clusters of uneven sizes, due to their small size, irregular dispersion, and close distance, it is best to use a single polygon to label the oil leakage area.
[0105] 3. Preprocessing: Based on the coordinates in the annotation file (sample ground image), the oil leakage area in the image is captured. The training set is expanded by cropping, flipping, and adding Gaussian noise to improve the generalization of the model. Image preprocessing is performed using methods such as scaling and normalization.
[0106] 4. Model training: A semantic segmentation network based on the SWA optimizer (random weighted averaging method) is used for model training to obtain the SWA model (ground oil pollution semantic recognition model).
[0107] Figure 4 This is a flowchart of a method for using a ground oil pollution semantic recognition model provided by the third embodiment of the present invention. The explanations of the terms that are the same as or corresponding to the above embodiments are not repeated here.
[0108] like Figure 4 The method of this embodiment specifically includes the following steps:
[0109] 1. Based on the image acquisition module, the ground oil pollution image of the substation to be tested (the ground image to be tested) is obtained through the inspection robot or fixed camera, and the ground image to be tested is transmitted online to the image recognition module of the background server.
[0110] 2. Based on the image recognition module, image sharpening is first performed. Then, the sharpened image is preprocessed by scaling and normalization. The preprocessed image is passed through a pre-trained ground oil pollution semantic recognition model and a series of convolutional layers, pooling layers, and other calculations to finally obtain the recognition result.
[0111] The reason for image sharpening is that the images of oil stains on the ground may have problems such as poor display of defects and weak contrast due to reasons such as light and shadow. Image sharpening can highlight the edge areas of the oil stains on the ground, making the image contrast stronger and the defects more obvious, making them easier to identify.
[0112] 3. Based on the recognition result output module, the picture of the oil-contaminated area (target ground image) is pushed to the display platform (the management platform of the substation to be tested).
[0113] It should be noted that the reason for using the ground oil pollution semantic recognition model trained by the SWA method for ground oil pollution recognition instead of the traditional SGD method is:
[0114] Due to the fluidity of oil, irregular oil pollution areas will be formed, resulting in different oil pollution characteristics between different samples. During the model training process, if only the traditional SGD method is used to continuously update the model parameters, this will cause some oil pollution characteristics learned in the early stage to be lost. However, the SWA method is used to average the model parameters of multiple stochastic gradient descents. This will take into account the oil pollution characteristics of all training samples, which is more conducive to improving the model recognition rate.
[0115] The technical solution of the embodiments of the present invention proposes a method for identifying oil contamination on the ground of a substation, which achieves automatic identification of target defects, solves the problems of low accuracy and low speed in identifying oil contamination on the ground of a substation, and improves the accuracy and speed of ground oil contamination identification. The technical solution of the embodiments of the present invention also proposes a method for constructing a semantic recognition model for ground oil contamination, which improves the model's recognition accuracy by combining a semantic segmentation network with a feature extraction network. Furthermore, the model parameters are determined by weighted averaging, which improves the model's robustness and stability.
[0116] Among them, the substation ground oil pollution identification method, due to the irregularity of the oil pollution area, takes into account the oil pollution characteristics of all training samples by averaging multiple random gradient descent model parameters. This solves the problem of low recognition accuracy caused by the complex shape of the ground oil pollution, which is more conducive to improving the model recognition rate. In addition, the oil pollution area and the extent of the oil leakage are automatically identified, and the extent of the oil leakage, target equipment, and target ground images are output to the management platform of the substation under test, achieving the technical effect of timely feedback and reminders. The method for constructing a ground oil pollution semantic recognition model combines shallow location information and deep semantic information through a semantic segmentation network using a jump-layer structure to obtain a more robust model. This solves the problem of low accuracy in substation ground oil pollution identification due to inaccurate oil pollution information identification, achieves the effect of improving the recognition accuracy of ground oil pollution identification, and makes the model more widely used in oil pollution identification in the industrial field.
[0117] The technical solution of the embodiment of the present invention trains the model parameters of the ground oil pollution semantic recognition model through the random weighted averaging method, and uses the trained ground oil pollution semantic recognition model to recognize the ground oil pollution image of the substation, and determines the recognition result and pushes it to the display platform, thereby solving the problems of slow speed, high cost and poor real-time performance of manual ground oil pollution recognition, and achieving the technical effect of improving the accuracy and speed of identifying ground oil pollution.
[0118] Example 4
[0119] Figure 5 This is a structural diagram of a substation ground oil pollution identification device provided by the fourth embodiment of the present invention. The device includes: a ground image acquisition module 310 to be detected, a target ground image acquisition module 320 and an information output module 330.
[0120] Among them, the ground image acquisition module 310 to be detected is used to obtain the ground image to be detected of the substation to be tested; the target ground image acquisition module 320 is used to input the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image; wherein, the ground oil pollution semantic recognition model is constructed based on a fully convolutional network and a residual network, and the model parameters in the ground oil pollution semantic recognition model are determined based on a random weighted averaging method; the information output module 330 is used to output the target ground image to the management platform of the substation to be tested if the target ground image is marked with at least one ground oil pollution.
[0121] Optionally, the device also includes: a ground oil pollution semantic recognition model construction module, which is used to construct an initial semantic recognition model based on a fully convolutional network and a residual network; the initial semantic recognition model is trained based on pre-labeled sample ground images, and based on the total number of iterations required for the loss function to converge during the training process, the model parameters in the training process are weighted averaged to obtain target model parameters; based on the target model parameters, the ground oil pollution semantic recognition model is determined.
[0122] Optionally, the ground oil pollution semantic recognition model construction module is also used to construct a semantic segmentation network based on the convolutional network and the upsampling network; construct a feature extraction network based on the residual network; and construct an initial semantic recognition model based on the semantic segmentation network and the feature extraction network.
[0123] Optionally, the ground oil pollution semantic recognition model construction module is also used to determine the first number of iterations and the second number of iterations based on the total number of iterations required for the loss function to converge during the training process; based on the first number of iterations, the model parameters trained by the learning rate decay method are weighted averaged to obtain the first model parameters, and based on the second number of iterations, the model parameters trained by the periodic learning method are weighted averaged to obtain the second model parameters; based on the first model parameters and the second model parameters, the target model parameters are determined.
[0124] Optionally, the first number of iterations is greater than or equal to the second number of iterations.
[0125] Optionally, the ground oil pollution semantic recognition model construction module is also used to train each iterative training in the first number of iterations, based on a preset initial learning rate, to obtain the first sub-parameter by training through learning rate decay; and to obtain the first model parameter by weighted averaging based on each of the first sub-parameters.
[0126] Optionally, the ground oil pollution semantic recognition model construction module is also used to train each iteration in the second iteration number, based on a preset maximum learning rate and a preset minimum learning rate, to obtain the second sub-parameter through periodic oscillation learning; and to perform weighted averaging based on each of the second sub-parameters to obtain the second model parameter.
[0127] Optionally, the device also includes: a sample ground image acquisition module, which is used to acquire the original sample image based on the shooting device, and mark the oil pollution area in the original sample image based on the annotation tool to obtain a sample ground image; wherein, the oil pollution area includes at least one of cobblestone ground oil pollution, cement ground oil pollution and self-leveling surface oil pollution.
[0128] Optionally, the device further includes: a sample expansion module, configured to expand the original sample image based on a sample expansion method, wherein the sample expansion method includes at least one of cropping, flipping, and Gaussian noise.
[0129] Optionally, the ground image acquisition module 310 to be detected is also used to obtain the original ground image of the substation to be tested based on the shooting device; perform image preprocessing based on the original ground image to obtain the ground image to be detected; wherein the image preprocessing includes at least one of image sharpening, scale transformation and normalization.
[0130] Optionally, the information output module 330 is also used to analyze each ground oil stain in the target ground image, determine the extent of the oil leakage, and determine the target device corresponding to the target ground image based on the target ground image; and output the oil leakage extent, the target device and the target ground image to the management platform of the substation to be tested.
[0131] The technical solution of the embodiment of the present invention obtains a ground image to be detected of the substation to be tested, and inputs the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image. If the target ground image is marked with at least one ground oil pollution, the target ground image is output to the management platform of the substation to be tested, thereby solving the problems of slow speed, high cost and poor real-time performance of manual ground oil pollution recognition, and achieving the technical effect of improving the accuracy and speed of identifying ground oil pollution.
[0132] The substation ground oil pollution identification device provided by the embodiment of the present invention can execute the substation ground oil pollution identification method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0133] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the embodiments of the present invention.
[0134] Example 5
[0135] Figure 6 This is a structural diagram of an electronic device provided in Example 5 of the present invention. Figure 6 A block diagram of an exemplary electronic device 40 suitable for implementing exemplary embodiments of the present invention is shown. Figure 6 The electronic device 40 shown is only an example and should not limit the functionality and scope of use of the embodiments of the present invention.
[0136] like Figure 6 As shown, electronic device 40 is a general-purpose computing device. Components of electronic device 40 may include, but are not limited to, one or more processors or processing units 401, system memory 402, and a bus 403 connecting various system components (including system memory 402 and processing unit 401).
[0137] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0138] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.
[0139] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 Not shown, often called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data media interfaces. System memory 402 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
[0140] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in system memory 402. Such program modules 407 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.
[0141] The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 40, and / or any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 411. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 412. As shown, the network adapter 412 communicates with other modules of the electronic device 40 via the bus 403. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0142] The processing unit 401 executes various functional applications and data processing by running the programs stored in the system memory 402, such as implementing the substation ground oil pollution identification method provided by the embodiment of the present invention.
[0143] Example 6
[0144] Embodiment 6 of the present invention further provides a storage medium containing computer-executable instructions. When the computer-executable instructions are executed by a computer processor, they are used to perform a method for identifying oil pollution on the ground of a substation. The method includes:
[0145] Acquire a ground image of the substation to be tested;
[0146] Inputting the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image; wherein the ground oil pollution semantic recognition model is constructed based on a fully convolutional network and a residual network, and the model parameters in the ground oil pollution semantic recognition model are determined based on a random weighted averaging method;
[0147] If the target ground image is marked with at least one ground oil stain, the target ground image is output to the management platform of the substation to be tested.
[0148] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0149] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0150] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0151] The computer program code for performing the operations of the embodiments of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0152] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for identifying oil pollution on the ground of a substation, characterized in that: include: Acquire a ground image of the substation to be tested; Inputting the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image; wherein the ground oil pollution semantic recognition model is constructed based on a fully convolutional network and a residual network, and the model parameters in the ground oil pollution semantic recognition model are determined based on a random weighted averaging method; If the target ground image is marked with at least one ground oil stain, the target ground image is output to the management platform of the substation to be tested; An initial semantic recognition model is constructed based on a fully convolutional network and a residual network, wherein the initial semantic recognition model combines shallow position information and deep semantic information based on a jump-layer structure; Training the initial semantic recognition model based on pre-labeled sample ground images, and determining a first number of iterations and a second number of iterations based on a total number of iterations required for convergence of a loss function during the training process; Based on the first number of iterations, performing weighted averaging on the model parameters trained by the learning rate decay method to obtain first model parameters, and based on the second number of iterations, performing weighted averaging on the model parameters trained by the periodic learning method to obtain second model parameters; determining target model parameters based on the first model parameters and the second model parameters; Based on the target model parameters, a ground oil pollution semantic recognition model is determined.
2. The method according to claim 1, characterized in that The initial semantic recognition model is constructed based on the fully convolutional network and the residual network, including: Construct a semantic segmentation network based on convolutional network and upsampling network; Construct a feature extraction network based on the residual network; An initial semantic recognition model is constructed based on the semantic segmentation network and the feature extraction network.
3. The method according to claim 1, characterized in that The first number of iterations is greater than or equal to the second number of iterations.
4. The method according to claim 1, wherein The step of performing weighted averaging on the model parameters trained by the learning rate decay method based on the first number of iterations to obtain the first model parameters includes: For each iterative training in the first number of iterations, based on the preset initial learning rate, the first sub-parameter is obtained by training through a learning rate decay method; A weighted average is performed based on each of the first sub-parameters to obtain a first model parameter.
5. The method according to claim 1, characterized in that The step of performing weighted averaging on the model parameters trained by the periodic learning method based on the second number of iterations to obtain the second model parameters includes: For each iterative training in the second iteration number, based on a preset maximum learning rate and a preset minimum learning rate, a second sub-parameter is obtained by training through periodic oscillation learning; A weighted average is performed based on each of the second sub-parameters to obtain a second model parameter.
6. The method according to claim 1, characterized in that Also includes: An original sample image is acquired based on a photographing device, and the oily area in the original sample image is annotated based on an annotation tool to obtain a sample ground image; wherein the oily area includes at least one of oily stains on a cobblestone ground, oily stains on a cement ground, and oily stains on a self-leveling surface.
7. The method according to claim 6, characterized in that Also includes: The original sample image is expanded based on a sample expansion method, wherein the sample expansion method includes at least one of cropping, flipping, and Gaussian noise.
8. The method according to claim 1, characterized in that The step of obtaining a ground image of the substation to be tested includes: Acquire an original ground image of the substation to be tested based on a shooting device; Image preprocessing is performed on the original ground image to obtain a ground image to be detected; wherein the image preprocessing includes at least one of image sharpening, scale transformation and normalization.
9. The method according to claim 1, characterized in that The step of outputting the target ground image to the management platform of the substation to be tested includes: Analyze each ground oil stain in the target ground image to determine the extent of the oil spill, and determine the target device corresponding to the target ground image based on the target ground image; The oil leakage extent, the target equipment, and the target ground image are output to a management platform of the substation to be tested.
10. A ground oil pollution identification device for a substation, characterized in that: include: A ground image acquisition module to be tested, used to acquire a ground image to be tested of the substation to be tested; A target ground image acquisition module is used to input the ground image to be detected into a pre-trained ground oil pollution semantic recognition model to obtain a target ground image; wherein the ground oil pollution semantic recognition model is constructed based on a fully convolutional network and a residual network, and the model parameters in the ground oil pollution semantic recognition model are determined based on a random weighted average method; an information output module, configured to output the target ground image to the management platform of the substation to be tested if the target ground image is marked with at least one ground oil stain; A ground oil pollution semantic recognition model construction module is used to construct an initial semantic recognition model based on a fully convolutional network and a residual network, wherein the initial semantic recognition model combines shallow position information and deep semantic information based on a jump layer structure; the initial semantic recognition model is trained based on pre-labeled sample ground images, and the model parameters in the training process are weighted averaged based on the total number of iterations required for the loss function to converge during the training process to obtain target model parameters; and the ground oil pollution semantic recognition model is determined based on the target model parameters; The ground oil pollution semantic recognition model construction module is also used to determine the first number of iterations and the second number of iterations based on the total number of iterations required for the loss function to converge during the training process; based on the first number of iterations, the model parameters trained by the learning rate decay method are weighted averaged to obtain the first model parameters, and based on the second number of iterations, the model parameters trained by the periodic learning method are weighted averaged to obtain the second model parameters; based on the first model parameters and the second model parameters, the target model parameters are determined.
11. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the substation ground oil pollution identification method as described in any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for identifying oil pollution on the ground of a substation as described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Rare earth mine exploitation identification method, device and equipment and storage medium
CN110147778A
Target tracking method based on residual channel attention and multilevel classification regression
CN113706581A
Cited By
Mama and frequency domain cooperative oil stain identification method and system under U-shaped structure
CN122024166A