Substation equipment defect detection method and device, computer device and storage medium
By using an encoder network iterative training method and learning features from unlabeled substation equipment sample images, an equipment defect detection model is constructed, which solves the problem of high cost of traditional manual inspection and achieves low-cost and high-efficiency equipment defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN POWER SUPPLY BUREAU
- Filing Date
- 2022-12-23
- Publication Date
- 2026-04-24
AI Technical Summary
Traditional manual inspection of substation equipment is costly and inefficient, and cannot effectively monitor equipment defects.
An iterative training method based on encoder networks is adopted to learn features from unlabeled substation equipment sample images, construct an equipment defect detection model, train the defect detection model using a target encoder network, and optimize the model by combining labeled sample images, thereby reducing the cost of manual annotation.
It achieves efficient and low-cost substation equipment defect detection, reduces labor costs, and ensures the performance of the detection model.
Smart Images

Figure CN116245805B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to a method, apparatus, computer equipment, and storage medium for detecting defects in substation equipment. Background Technology
[0002] In recent years, the national economy has developed rapidly, leading to an increasing demand for electricity. Consequently, the number of substations, which transform voltage and current, receive electrical energy, and distribute it within the power system, has also increased. Substations contain a wide variety of equipment, and ensuring the normal operation of this equipment is crucial.
[0003] Traditionally, equipment in substations is inspected manually to ensure its normal operation. However, given the large scale and number of substations, this manual inspection method inevitably incurs high labor costs. Summary of the Invention
[0004] Therefore, it is necessary to provide an image recognition model processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can reduce losses in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a method for detecting defects in substation equipment. The method includes:
[0006] During this round of iterative training, based on the unlabeled sample image of the first substation equipment, a first similarity and a second similarity are determined. The first similarity is the similarity between the encoded features generated in this round of iterative training and the reference features in this round. The second similarity is the similarity between the encoded features in this round and each reference feature in the reference feature set. The encoded features in this round are extracted by the first encoder network from the sample image of the first substation equipment. The reference features in this round are obtained by the second encoder network in this round based on feature extraction from the sample image of the first substation equipment.
[0007] Based on the first and second similarities of this round, the parameters of the first encoder network and the second encoder network of this round are tuned, the reference features of this round are added to the reference feature set, and the next round of iteration training continues;
[0008] The second encoder network obtained when the iteration stops is determined as the target encoder network, and the equipment defect detection model is trained based on the target encoder network; the trained equipment defect detection model is used to detect defects in substation equipment.
[0009] In one embodiment, the device defect detection model trained based on the target encoder network includes:
[0010] An initial device defect detection model to be trained is determined based on the target encoder network; the parameters of the backbone network in the initial device defect detection model are the parameters of the target encoder network.
[0011] The initial equipment defect detection model is iteratively trained based on multiple labeled sample images of second substation equipment; the trained target defect detection model is then used to detect defects in substation equipment.
[0012] In one embodiment, the plurality of labeled second substation equipment sample images are plurality of labeled rusted equipment sample images;
[0013] The iterative training of the initial equipment defect detection model based on the labeled sample images of equipment in the second substation includes:
[0014] The initial equipment defect detection model is iteratively optimized based on multiple sample images of corroded equipment to obtain a trained target defect detection model; the target defect detection model is used to detect equipment corrosion in substation operation and maintenance images.
[0015] In one embodiment, the parameter tuning of the first encoder network and the second encoder network in the current round based on the first similarity and the second similarity of the current round includes:
[0016] The first encoder network and the second encoder network are tuned in a direction that increases the first similarity in the current round and decreases the second similarity in the current round.
[0017] In one embodiment, the parameter tuning of the first encoder network and the second encoder network includes:
[0018] Determine the first update gradient corresponding to the first encoder network;
[0019] The second update gradient corresponding to the second encoder network is determined based on the preset update coefficients and the first update gradient.
[0020] The first encoder network is tuned based on the first update gradient, and the second encoder network is tuned based on the second update gradient.
[0021] In one embodiment, the reference feature set is a reference feature queue; adding the current round of reference features to the reference feature set and continuing the next round of iterative training includes:
[0022] The reference features of this round are added to the reference feature queue, and the next round of iteration training continues until the preset number of iterations is reached and the iteration stops.
[0023] In one embodiment, the method further includes:
[0024] The sample image of the first substation equipment is transformed to obtain the transformed sample image;
[0025] The second encoder network in this round extracts features from the transformed sample image to obtain the reference features for this round.
[0026] Secondly, this application also provides a substation equipment defect detection device. The device includes:
[0027] The parameter tuning module is used during the current iteration training process to determine the first similarity and the second similarity based on the unlabeled sample image of the first substation equipment. The first similarity is the similarity between the encoded features generated in this iteration and the reference features in this iteration. The second similarity is the similarity between the encoded features in this iteration and each reference feature in the reference feature set. The encoded features in this iteration are extracted by the first encoder network from the sample image of the first substation equipment. The reference features in this iteration are obtained by the second encoder network based on the sample image of the first substation equipment. Based on the first and second similarities in this iteration, the parameters of the first encoder network and the second encoder network in this iteration are tuned, the reference features in this iteration are added to the reference feature set, and the next iteration training continues.
[0028] The determination module is used to determine the second encoder network obtained when the iteration stops as the target encoder network, and to train the equipment defect detection model based on the target encoder network; the trained equipment defect detection model is used to perform defect detection on substation equipment.
[0029] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described above.
[0030] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0031] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described method.
[0032] The aforementioned substation equipment defect detection method, device, computer equipment, storage medium, and computer program product iteratively train a first encoder network and a second encoder network based on the similarity between the current round of encoded features and the current round of reference features, as well as the similarity between the current round of encoded features and each reference feature in the reference feature set, to learn knowledge from unlabeled sample images of the first substation equipment. The second encoder network obtained when the iteration stops is then determined as the target encoder network. The equipment defect detection model is trained based on the target encoder network. Using the second encoder network, which has already learned knowledge from the sample images of the first substation equipment, as the target encoder network for training ensures the performance of the trained equipment defect detection model. By using the trained equipment defect detection model to detect defects in substation equipment, labor costs can be reduced. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating a substation equipment defect detection method in one embodiment;
[0034] Figure 2 This is a flowchart illustrating the training steps of a device defect detection model in one embodiment.
[0035] Figure 3 This is a flowchart illustrating the training steps of the equipment defect detection model in another embodiment;
[0036] Figure 4 This is a structural block diagram of a substation equipment defect detection device in one embodiment;
[0037] Figure 5 This is an internal structural diagram of a computer device in one embodiment;
[0038] Figure 6 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0040] In one embodiment, such as Figure 1 As shown, a method for detecting defects in substation equipment is provided. Taking the application of this method to computer equipment as an example, it can be understood that this method can be applied to terminals, servers, or systems including both terminals and servers, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0041] S102, during this round of iterative training, the first similarity and second similarity of this round are determined based on the unlabeled sample images of the first substation equipment.
[0042] The first similarity is the similarity between the encoded features generated in this iteration of training and the reference features in this iteration. The second similarity is the similarity between the encoded features in this iteration and each reference feature in the reference feature set. The encoded features in this iteration are extracted by the first encoder network from the sample images of the first substation equipment. The reference features in this iteration are obtained by the second encoder network in this iteration based on the sample images of the first substation equipment.
[0043] The first substation equipment sample image refers to images collected from equipment inside the substation. For example, the first substation equipment sample image could be an image collected during the operation and maintenance of equipment inside the substation. It can be understood that a large number of unlabeled images generated during substation operation and maintenance can serve as training data for self-supervised learning. The purpose of the first or second encoder network in the self-supervised learning method is to enable the initial equipment defect detection model to extract features from various types of equipment inside the substation. These extracted features provide a foundation for subsequent defect detection functions.
[0044] For example, during the current iteration of training, the computer device can determine the current round of first substation equipment sample images from multiple unlabeled first substation equipment sample images. The computer device can use the current round of first substation equipment sample images as input to the current round's first encoder network and the current round's second encoder network to obtain the current round's encoded features output by the first encoder network and the current round's reference encoded features output by the second encoder network.
[0045] In one embodiment, the sample diagram of the first substation equipment is different for each round.
[0046] In one embodiment, the terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. The server can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0047] S104: Based on the first and second similarities of this round, the parameters of the first encoder network and the second encoder network of this round are tuned, the reference features of this round are added to the reference feature set, and the next round of iteration training continues.
[0048] For example, the computer device can tune the first and second encoder networks for the current round, aiming to make the first similarity of the current round as greater than the second similarity of the current round as possible, to obtain the tuned first and second encoder networks for the next round. The computer device can then add the reference features of the current round to the reference feature set and continue with the next round of iterative training.
[0049] In one embodiment, the computer device can determine the output obtained by using the sample image of the first substation equipment in this round as the input of the parameter-tuned second encoder network, that is, the reference features of the output of the parameter-tuned second encoder network are added to the reference feature set, and the next round of iterative training continues.
[0050] It is understandable that the reference features in this round and the reference features in the reference feature set are all references to the coding features in this round. In order for the first encoder network and the second encoder network to learn the correlation between substation equipment of the same category and the differences between substation equipment of different categories, the similarity between the coding features in this round and the reference features in this round should be as great as possible greater than the similarity between the coding features in this round and other reference features.
[0051] S106, the second encoder network obtained when the iteration stops is determined as the target encoder network, and the equipment defect detection model is trained based on the target encoder network; the trained equipment defect detection model is used to detect defects in substation equipment.
[0052] For example, the computer device can determine a pre-trained first encoder network and a pre-trained second encoder network when iteration stops. The computer device can determine the pre-trained second encoder network as the target encoder network and determine an initial equipment defect detection model based on the target encoder network. The computer device can train the initial equipment defect detection model based on labeled sample images of second substation equipment to obtain a trained equipment defect detection model.
[0053] It is understandable that a small number of labeled sample images of equipment from the second substation cannot effectively optimize the numerous parameters in the equipment defect detection model, and labeling a large dataset requires significant manual labor. By learning the features of a massive number of unlabeled sample images of equipment from the first substation through a second encoder network, the performance of the equipment defect detection model can be maintained while reducing manual labor costs.
[0054] In one embodiment, the computer device may identify the pre-trained first encoder network as the target encoder network.
[0055] In one embodiment, the computer device can use the substation equipment image to be processed as input to the trained equipment defect detection model, extract feature maps from the substation equipment image through the backbone network, classify the feature maps through the branch network, and obtain the defect category corresponding to the equipment in the substation equipment image to be processed as output by the equipment defect detection model.
[0056] In the aforementioned substation equipment defect detection method, the first encoder network and the second encoder network are iteratively trained based on the similarity between the current round of encoded features and the current round of reference features, as well as the similarity between the current round of encoded features and each reference feature in the reference feature set, to learn knowledge from the unlabeled sample images of the first substation equipment. Then, the second encoder network obtained when the iteration stops is determined as the target encoder network. The equipment defect detection model is trained based on the target encoder network. Using the second encoder network, which has already learned knowledge from the sample images of the first substation equipment, as the target encoder network for training ensures the performance of the trained equipment defect detection model. By using the trained equipment defect detection model to detect defects in substation equipment, labor costs can be reduced.
[0057] In one embodiment, such as Figure 2 The diagram shows a flowchart illustrating the training steps of a device defect detection model. This embodiment includes the following steps:
[0058] S202, determine the initial device defect detection model to be trained based on the target encoder network.
[0059] In the initial equipment defect detection model, the parameters of the backbone network are the same as those of the target encoder network.
[0060] For example, a computer device can determine the parameters of the target encoder network as the parameters of the backbone network in an initial device defect model. It can be understood that the target encoder network has the same structure as the backbone network.
[0061] In one embodiment, both the first encoder network and the second encoder network have the same structure as the backbone network.
[0062] In one embodiment, the device defect detection model may include an object detector. For example, the device defect detection model may include a single-stage detector (RetinaNet). The object detector may include a backbone network responsible for computing feature maps, a first sub-network responsible for calculating the object classification through convolution based on the feature maps output by the backbone network, and a second sub-network responsible for calculating the regression values of bounding boxes through convolution.
[0063] In one embodiment, the backbone network can be a residual network, such as ResNet50.
[0064] S204, the initial equipment defect detection model is iteratively trained based on multiple labeled sample images of equipment in the second substation.
[0065] The trained target defect detection model is used to detect defects in substation equipment.
[0066] For example, the computer device can use sample images of each second substation equipment as input to the initial equipment defect model, and iteratively train the initial equipment defect model in the direction of reducing the difference between the output of the equipment defect detection model and the labels of the sample images of the second substation equipment to obtain the trained target defect detection model.
[0067] In one embodiment, the labels on the second substation equipment sample diagram may include labels for characterizing defect categories, labels for characterizing equipment types, etc.
[0068] In this embodiment, an initial equipment defect detection model to be trained is determined based on the target encoder network; the initial equipment defect detection model is iteratively trained based on multiple labeled sample images of second substation equipment; and the trained equipment defect detection model is used to detect defects in substation equipment, which can reduce labor costs.
[0069] In one embodiment, the multiple labeled sample images of second substation equipment are multiple labeled sample images of corroded equipment; iteratively training the initial equipment defect detection model based on the labeled sample images of second substation equipment includes: iteratively optimizing the initial equipment defect detection model based on the multiple sample images of corroded equipment to obtain a trained target defect detection model; the target defect detection model is used to detect equipment corrosion in substation operation and maintenance images.
[0070] For example, the computer device can use the sample images of each corroded device as input to the initial device defect model, and iteratively optimize the initial device defect model in the direction of reducing the difference between the output of the device defect detection model and the label of the corroded device sample image to obtain the trained target defect detection model.
[0071] In this embodiment, the initial equipment defect detection model is iteratively optimized based on multiple sample images of corroded equipment to obtain a trained target defect detection model. The target defect detection model can detect the corrosion of equipment, avoid the adverse effects of equipment corrosion on the substation, and effectively reduce labor costs.
[0072] In one embodiment, tuning the first encoder network and the second encoder network for the current round based on the first similarity and the second similarity of the current round includes tuning the first encoder network and the second encoder network in a direction that increases the first similarity of the current round and decreases the second similarity of the current round.
[0073] For example, the computer device can perform matrix multiplication on the current round's encoded features and the current round's reference features to obtain a first similarity. The computer device can then perform matrix multiplication on the current round's encoded features with each reference feature in the reference feature set to obtain a second similarity for each reference feature. The computer device can sum the multiple second similarities to obtain a total second similarity. The computer device then tunes the first encoder network and the second encoder network of the current round in a direction that increases the first similarity of the current round and decreases the total second similarity, resulting in the tuned first encoder network and second encoder network for the next round.
[0074] In one embodiment, the computer device can use the current round's encoded features and the current round's reference features as inputs to the encoding network's loss function to obtain the encoding network loss value. The computer device can then tune the first encoder network and the second encoder network in a direction that reduces the encoding network loss value.
[0075] In one embodiment, as shown in Equation (1), is the loss function of the encoding network.
[0076]
[0077] Where τ is used to adjust the distribution of the loss function of the encoding network, it can be taken as 0.7. q·k q This can represent the first similarity. q represents the encoded features of this round, and k... q This serves as a reference feature for this round. q·k i This can characterize the second similarity. k i The reference features in the reference feature set are characterized.
[0078] In one embodiment, the computer device may add the current reference feature to the reference feature set and remove the first added reference feature from the reference feature set.
[0079] In one embodiment, a computer device can use a machine learning library to calculate the gradient of the first encoder network based on the direction in which the loss value of the current encoder network decreases, thereby obtaining the first update gradient corresponding to the first encoder network. The first update gradient is used to indicate the direction of parameter update of the first encoder network.
[0080] In this embodiment, the parameters of the first encoder network and the second encoder network are tuned in the direction of increasing the first similarity and decreasing the second similarity in the current round. The second encoder network learns the features of a large number of unlabeled sample images of the first substation equipment, which can reduce labor costs while ensuring the performance of the equipment defect detection model.
[0081] In one embodiment, parameter tuning of the first encoder network and the second encoder network includes: determining a first update gradient corresponding to the first encoder network; determining a second update gradient corresponding to the second encoder network based on preset update coefficients and the first update gradient; and tuning the parameters of the first encoder network based on the first update gradient and the second encoder network based on the second update gradient.
[0082] The preset update coefficient is used to indicate the ratio of the second update gradient to the first update gradient.
[0083] For example, a computer device can use a machine learning library to calculate the gradient of a first encoder network based on the direction in which the first similarity increases and the second similarity decreases in the current round, thus obtaining a first update gradient for the first encoder network. The computer device can determine a second update gradient for the second encoder network based on preset update coefficients and the first update gradient. The computer device can then tune the parameters of the first encoder network in the direction indicated by the first update gradient and the second encoder network in the direction indicated by the second update gradient. The machine learning library can be PyTorch.
[0084] In one embodiment, Equation (2) is used to characterize the relationship between the first update gradient and the second update gradient.
[0085] θ d ←mθ d +(1-m)θ e (2)
[0086] Where θd represents the second update gradient, θe represents the first update gradient, and m represents the preset update coefficient. To ensure the consistency of each reference feature in the reference feature set, m must be greater than (1-m). For example, m = 0.999 means that the second update gradient is 0.001 times the first update gradient, which ensures that the constructed reference feature set uses a consistent second encoder network.
[0087] In this embodiment, a first update gradient corresponding to the first encoder network is determined; a second update gradient corresponding to the second encoder network is determined based on the preset update coefficient and the first update gradient; the first encoder network is tuned based on the first update gradient, and the second encoder network is tuned based on the second update gradient. By learning the features of a large number of unlabeled sample images of first substation equipment through the second encoder network, the performance of the equipment defect detection model can be guaranteed while reducing labor costs.
[0088] In one embodiment, the reference feature set is a reference feature queue; adding the current round of reference features to the reference feature set and continuing the next round of iterative training includes: adding the current round of reference features to the reference feature queue and continuing the next round of iterative training until the preset number of iterative training cycles is reached and the iteration stops.
[0089] For example, the computer device can add the reference feature of the current round to the reference feature queue, delete the reference feature that was added first in the reference feature queue, and continue to the next round of iterative training until the preset number of iterations is reached and the iteration stops.
[0090] It is understandable that the current round of encoded features is equivalent to a query, the reference feature object is equivalent to a dictionary, and the current round of reference features in the dictionary is equivalent to the key value corresponding to the query.
[0091] In one embodiment, f e Characterizing the first encoder network, f d Denotes the second encoder network, x q This represents a sample diagram of equipment in the first substation, k. i This represents a reference feature in the reference feature queue. Where i = 1, 2, ..., n. n represents the length of the reference feature queue, which can be 16384. The encoding feature for this round is q = f. e (x q ). x q Image x after image transformation (e.g., random cropping, flipping, rotation, etc.) q The reference feature for this round is k. q =fd(x q ′).
[0092] In this embodiment, the reference features of the current round are added to the reference feature queue, and the next round of iterative training continues until the preset number of iterations is reached and the iteration stops. By learning the features of a large number of unlabeled first substation equipment sample images through the second encoder network, the performance of the equipment defect detection model can be guaranteed while reducing labor costs.
[0093] In one embodiment, the method further includes: transforming the sample image of the first substation equipment to obtain a transformed sample image; and extracting features from the transformed sample image through the second encoder network of this round to obtain reference features for this round.
[0094] For example, the computer device can perform image transformation on the sample image of the first substation to obtain a transformed sample image. The image transformation may include at least one of transformations such as random cropping, flipping, or rotation. The computer device can use the transformed sample image as input to the second encoder network of the current round, and perform feature extraction through the second encoder network of the current round to obtain the reference features output by the second encoder network of the current round.
[0095] In this embodiment, the sample image of the first substation equipment is transformed to obtain a transformed sample image. The second encoder network in this round extracts features from the transformed sample image to obtain reference features for this round. Compared with directly using the sample image of the first substation, using the transformed sample image makes the second encoder network more adaptable, thereby improving the tolerance of the equipment defect detection model to data changes.
[0096] In one embodiment, such as Figure 3 The diagram illustrates the training steps of the equipment defect detection model. The computer equipment acquires unlabeled sample images of equipment in a first substation and constructs a first encoder network and a second encoder network. Both the first and second encoder networks have the same backbone network structure as the equipment defect detection model. The computer equipment iteratively trains the first and second encoder networks to obtain the target encoder network. The computer equipment uses the parameters of the target encoder network as the parameters of the backbone network of the equipment defect detection model and trains the initial equipment defect detection model based on labeled rust sample images, thus obtaining the trained equipment defect detection model.
[0097] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0098] Based on the same inventive concept, this application also provides a substation equipment defect detection device for implementing the substation equipment defect detection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the substation equipment defect detection device provided below can be found in the limitations of the substation equipment defect detection method described above, and will not be repeated here.
[0099] In one embodiment, such as Figure 4 As shown, a substation equipment defect detection device 400 is provided, including: a parameter adjustment module 402 and a determination module 404, wherein:
[0100] The parameter tuning module 402 is used to determine the first similarity and the second similarity in this round of iterative training based on the unlabeled sample image of the first substation equipment. The first similarity is the similarity between the encoded features generated in this round of iterative training and the reference features in this round. The second similarity is the similarity between the encoded features in this round and each reference feature in the reference feature set. The encoded features in this round are extracted by the first encoder network from the sample image of the first substation equipment. The reference features in this round are obtained by the second encoder network in this round based on the feature extraction of the sample image of the first substation equipment. Based on the first similarity and the second similarity in this round, the parameters of the first encoder network and the second encoder network in this round are tuned, the reference features in this round are added to the reference feature set, and the next round of iterative training continues.
[0101] The determination module 404 is used to determine the second encoder network obtained when the iteration stops as the target encoder network, and to train the equipment defect detection model based on the target encoder network; the trained equipment defect detection model is used to perform defect detection on substation equipment.
[0102] In one embodiment, the determining module 404 is used to determine an initial equipment defect detection model to be trained based on the target encoder network; the parameters of the backbone network in the initial equipment defect detection model are the parameters of the target encoder network; the initial equipment defect detection model is iteratively trained based on multiple labeled sample images of second substation equipment; the trained target defect detection model is used to detect defects in substation equipment.
[0103] In one embodiment, the multiple labeled sample images of second substation equipment are multiple sample images of rusted equipment with labels; the determination module 404 is used to iteratively optimize the initial equipment defect detection model based on the multiple sample images of rusted equipment to obtain a trained target defect detection model; the target defect detection model is used to detect the equipment corrosion in the substation operation and maintenance images.
[0104] In one embodiment, the parameter tuning module 402 is used to tune the first encoder network and the second encoder network in a direction that increases the first similarity of the current round and decreases the second similarity of the current round.
[0105] In one embodiment, the parameter tuning module 402 is used to determine the first update gradient corresponding to the first encoder network; determine the second update gradient corresponding to the second encoder network according to the preset update coefficient and the first update gradient; tune the parameters of the first encoder network based on the first update gradient; and tune the parameters of the second encoder network based on the second update gradient.
[0106] In one embodiment, the reference feature set is a reference feature queue; the parameter tuning module 402 is used to add the reference features of the current round to the reference feature queue and continue the next round of iterative training until the preset number of iterative training is reached and the iteration stops.
[0107] In one embodiment, the parameter tuning module 402 is used to transform the sample image of the first substation equipment to obtain the transformed sample image; and to extract features from the transformed sample image through the second encoder network of this round to obtain the reference features of this round.
[0108] Each module in the aforementioned substation equipment defect detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0109] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores sample diagrams of equipment from a first substation and a second substation. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for detecting defects in substation equipment.
[0110] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for detecting defects in substation equipment. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0111] Those skilled in the art will understand that Figure 5 or Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0112] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0113] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0114] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0116] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0118] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for detecting defects in substation equipment, characterized in that, The method includes: During this round of iterative training, based on the unlabeled sample images of the first substation equipment, a first similarity and a second similarity are determined. The first similarity is the similarity between the encoded features generated in this round of iterative training and the reference features in this round. The second similarity is the similarity between the encoded features in this round and each reference feature in the reference feature set. The encoded features in this round are extracted from the sample images of the first substation equipment by the first encoder network in this round. The reference features in this round are obtained by the second encoder network in this round based on the feature extraction of the sample images of the first substation equipment. Based on the first and second similarities of this round, the parameters of the first encoder network and the second encoder network of this round are tuned, the reference features of this round are added to the reference feature set, and the next round of iteration training continues; The second encoder network obtained when the iteration stops is determined as the target encoder network. An initial equipment defect detection model to be trained is determined based on the target encoder network. The parameters of the backbone network in the initial equipment defect detection model are the parameters of the target encoder network. The initial equipment defect detection model is iteratively optimized based on multiple labeled rusted equipment sample images to obtain a trained target defect detection model. The target defect detection model is used to detect equipment rust in substation operation and maintenance images.
2. The method according to claim 1, characterized in that, The parameter tuning of the first encoder network and the second encoder network in this round based on the first similarity and the second similarity of this round includes: The first encoder network and the second encoder network are tuned in a direction that increases the first similarity in the current round and decreases the second similarity in the current round.
3. The method according to claim 2, characterized in that, The parameter tuning of the first encoder network and the second encoder network includes: Determine the first update gradient corresponding to the first encoder network; The second update gradient corresponding to the second encoder network is determined based on the preset update coefficients and the first update gradient. The first encoder network is tuned based on the first update gradient, and the second encoder network is tuned based on the second update gradient.
4. The method according to claim 1, characterized in that, The reference feature set is a reference feature queue; adding the reference features of this round to the reference feature set and continuing to the next round of iteration training includes: The reference features of this round are added to the reference feature queue, and the next round of iteration training continues until the preset number of iterations is reached and the iteration stops.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The sample image of the first substation equipment is transformed to obtain the transformed sample image; The second encoder network in this round extracts features from the transformed sample image to obtain the reference features for this round.
6. A defect detection device for substation equipment, characterized in that, The device includes: The parameter tuning module is used during the current iteration training process to determine the first similarity and the second similarity based on the unlabeled sample image of the first substation equipment. The first similarity is the similarity between the encoded features generated in this iteration and the reference features in this iteration. The second similarity is the similarity between the encoded features in this iteration and each reference feature in the reference feature set. The encoded features in this iteration are extracted by the first encoder network from the sample image of the first substation equipment. The reference features in this iteration are obtained by the second encoder network based on the sample image of the first substation equipment. Based on the first and second similarities in this iteration, the parameters of the first encoder network and the second encoder network in this iteration are tuned, the reference features in this iteration are added to the reference feature set, and the next iteration training continues. The determination module is used to determine the second encoder network obtained when the iteration stops as the target encoder network, and to determine the initial equipment defect detection model to be trained based on the target encoder network. The parameters of the backbone network in the initial equipment defect detection model are the parameters of the target encoder network. The initial equipment defect detection model is iteratively optimized based on multiple labeled rusted equipment sample images to obtain the trained target defect detection model. The target defect detection model is used to detect equipment rust in substation operation and maintenance images.
7. The apparatus according to claim 6, characterized in that, The parameter tuning module is further configured to tune the first encoder network and the second encoder network in a direction that increases the first similarity of the current round and decreases the second similarity of the current round.
8. The apparatus according to claim 7, characterized in that, The parameter tuning module is further configured to determine the first update gradient corresponding to the first encoder network; determine the second update gradient corresponding to the second encoder network based on the preset update coefficient and the first update gradient; tune the parameters of the first encoder network based on the first update gradient; and tune the parameters of the second encoder network based on the second update gradient.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Equipment defect detection method and device for transformer substation
CN111199213A
Contact net part defect detection method and device
CN114581388A