Model training method, substation defect detection method, equipment and storage medium
By generating the target generation image generated by the adversarial network model, the target detection model is trained, and the accuracy and efficiency of manual visual inspection in substation defect detection is solved, and defect detection is achieved with high accuracy and high efficiency.
Patent Information
- Application Number
- CN202411935326.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, substation defect detection relies on manual visual inspection, resulting in low detection accuracy and efficiency.
By acquiring historical substation images, obtaining positive and negative sample images, and generating target generation images based on the generation of adversarial network models, constructing training data, inputting them into the target detection model for training, and obtaining the target substation defect detection model.
It improves the detection accuracy and efficiency of substation defect detection and enhances the generalization ability of the target detection model.
Smart Images

Figure CN119850564A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer vision technology, and in particular, relates to a model training method, a substation defect detection method, a device and a storage medium. Background Art
[0002] Substations are a vital part of power systems, where voltage and current are transformed, electric energy is received and distributed. The status of substation equipment and the operation of staff are directly related to the normal operation of substations. Therefore, it is urgent to detect defects in substations.
[0003] At present, substation defect detection usually relies on manual visual inspection of substation images taken by surveillance cameras. The detection results are easily affected by the subjective experience of inspectors, resulting in low detection accuracy of substation defect detection. In addition, manual visual inspection leads to low detection efficiency of substation defect detection. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a model training method, a substation defect detection method, a device and a storage medium to overcome the above problems of the prior art.
[0005] In a first aspect, an embodiment of the present application provides a model training method, comprising: obtaining positive sample images and negative sample images based on historical substation images, wherein the positive sample images contain substation defect information, and the negative sample images do not contain the substation defect information; generating a target generated image based on a generative adversarial network model, wherein the target generated image contains the substation defect information; constructing training data based on the positive sample images, the negative sample images, and the target generated images; and inputting the training data into a target detection model for training to obtain a target substation defect detection model.
[0006] Among them, in some optional embodiments, constructing the training data based on the positive sample image, the negative sample image and the target generated image includes: pasting the target generated image into the negative sample image to obtain a fused sample image; and constructing the training data based on the fused sample image and the positive sample image.
[0007] Among them, in some optional embodiments, constructing the training data based on the fused sample image and the positive sample image includes: performing data enhancement on the positive sample image to obtain an enhanced sample image; and constructing the training data based on the enhanced sample image, the fused sample image and the positive sample image.
[0008] Among them, in some optional embodiments, the generative adversarial network model includes a generator and a discriminator, and generating a target generated image based on the generative adversarial network model includes: inputting random noise to the generator, so that the generator outputs an initial generated image according to the random noise; inputting the initial generated image and the positive sample image to the discriminator, so that the discriminator outputs the image matching degree between the initial generated image and the positive sample image; when the image matching degree is greater than or equal to a matching degree threshold, determining the initial generated image as the target generated image.
[0009] Among them, in some optional embodiments, the model training method also includes: when the image matching degree is less than the matching degree threshold, determining the optimization parameters of the generator; optimizing and updating the generator based on the optimization parameters; executing the step of inputting random noise to the generator so that the generator outputs an initial generated image according to the random noise, until when the image matching degree is greater than or equal to the matching degree threshold, determining the initial generated image as the target generated image.
[0010] Among them, in some optional embodiments, before the training data is input into the target detection model for training to obtain the target substation defect detection model, the model training method also includes: fusing the spatial deep conversion convolution module, the bidirectional feature pyramid network and the target detection model to obtain the initial substation defect detection model; the training data is input into the target detection model for training to obtain the target substation defect detection model, including: inputting the training data into the initial substation defect detection model for training to obtain the target substation defect detection model.
[0011] In a second aspect, an embodiment of the present application provides a substation defect detection method, comprising: obtaining a current substation image; inputting the current substation image into a target substation defect detection model to obtain a corresponding detection result; wherein the target substation defect detection model is trained based on the model training method provided in the first aspect above, and the detection result includes a first detection result for characterizing that the current substation image does not contain substation defect information, and a second detection result for characterizing that the current substation image contains the substation defect information.
[0012] Among them, in some optional embodiments, the substation defect detection method also includes: when the second detection result is obtained, generating alarm information.
[0013] In a third aspect, an embodiment of the present application provides a model training device, which includes a first acquisition module, a first generation module, a construction module, and a training module. The first acquisition module is used to acquire positive sample images and negative sample images based on historical substation images, wherein the positive sample images contain substation defect information, and the negative sample images do not contain the substation defect information; the first generation module is used to generate a target generated image based on a generative adversarial network model, wherein the target generated image contains the substation defect information; the construction module is used to construct training data based on the positive sample image, the negative sample image, and the target generated image; the training module is used to input the training data into a target detection model for training to obtain a target substation defect detection model.
[0014] In a fourth aspect, an embodiment of the present application provides a substation defect detection device, the substation defect detection device comprising a second acquisition module and an input module. The second acquisition module is used to acquire a current substation image; the input module is used to input the current substation image into a target substation defect detection model to obtain a corresponding detection result; wherein the target substation defect detection model is trained based on the model training method provided in the first aspect above, and the detection result comprises a first detection result for characterizing that the current substation image does not contain substation defect information, and a second detection result for characterizing that the current substation image contains the substation defect information.
[0015] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a memory; one or more processors coupled to the memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the model training method provided in the first aspect above, and / or the substation defect detection method provided in the second aspect.
[0016] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the model training method provided in the first aspect above, and / or the substation defect detection method provided in the second aspect.
[0017] In the seventh aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device executes the model training method provided in the first aspect above, and / or the substation defect detection method provided in the second aspect.
[0018] The model training method provided in the present application obtains positive sample images and negative sample images based on historical substation images, wherein the positive sample images contain substation defect information, while the negative sample images do not contain substation defect information, and generates a target generated image based on a generative adversarial network model, wherein the target generated image contains substation defect information, and constructs training data based on the positive sample images, the negative sample images, and the target generated image, and inputs the training data into a target detection model for training to obtain a target substation defect detection model. The target detection model is trained based on the training data constructed based on the historical substation images and the target generated image generated by the generative adversarial network model to obtain a target substation defect detection model. The detection accuracy and detection efficiency of defect detection of the substation based on the target substation defect detection model are both high, which is beneficial to improving the detection accuracy and detection efficiency of defect detection of the substation.
[0019] Furthermore, a target generated image containing substation defect information is generated based on the generative adversarial network model, which increases the number of defect samples used to train the target detection model and improves the generalization ability of the target substation defect detection model, which is conducive to improving the detection accuracy of substation defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 A schematic diagram of a scenario of a substation defect detection system provided in an embodiment of the present application is shown.
[0022] Figure 2 A flow chart of a model training method provided in an embodiment of the present application is shown.
[0023] Figure 3 A structural schematic diagram of the training data in the model training method provided in an embodiment of the present application is shown.
[0024] Figure 4 Another flow chart of the model training method provided in an embodiment of the present application is shown.
[0025] Figure 5 A flow chart of a substation defect detection method provided in an embodiment of the present application is shown.
[0026] Figure 6 A structural block diagram of a model training device provided in an embodiment of the present application is shown.
[0027] Figure 7 A structural block diagram of a substation defect detection device provided in an embodiment of the present application is shown.
[0028] Figure 8 A functional block diagram of an electronic device provided in an embodiment of the present application is shown.
[0029] Fig. 9 A computer-readable storage medium provided in an embodiment of the present application for storing or carrying program codes for implementing a model training method and / or a substation defect detection method provided in an embodiment of the present application is shown.
[0030] Fig.10 A computer program product provided in an embodiment of the present application is shown for storing or carrying program codes for implementing a model training method and / or a substation defect detection method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0033] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0034] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0035] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0036] Substations are a vital part of power systems, where voltage and current are transformed, electric energy is received and distributed. The status of substation equipment and the operation of staff are directly related to the normal operation of substations. Therefore, it is urgent to detect defects in substations.
[0037] At present, substation defect detection usually relies on manual visual inspection of substation images taken by surveillance cameras. The detection results are easily affected by the subjective experience of inspectors, resulting in low detection accuracy of substation defect detection. In addition, manual visual inspection leads to low detection efficiency of substation defect detection.
[0038] In response to the above problems, the model training method, substation defect detection method, device and storage medium provided in the embodiments of the present application obtain positive sample images and negative sample images based on historical substation images, the positive sample images contain substation defect information, and the negative sample images do not contain substation defect information, and generate target generated images based on the generative adversarial network model, the target generated images contain substation defect information, and construct training data based on the positive sample images, the negative sample images and the target generated images, and input the training data into the target detection model for training to obtain a target substation defect detection model, realize the training data based on the historical substation images and the target generated images generated by the generative adversarial network model, train the target detection model to obtain the target substation defect detection model, and the detection accuracy and detection efficiency of defect detection of substations based on the target substation defect detection model are high, which is conducive to improving the detection accuracy and detection efficiency of defect detection of substations.
[0039] Furthermore, a target generated image containing substation defect information is generated based on the generative adversarial network model, which increases the number of defect samples used to train the target detection model and improves the generalization ability of the target substation defect detection model, which is conducive to improving the detection accuracy of substation defect detection.
[0040] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0041] See also Figure 1 , which shows a schematic diagram of an application scenario of the substation defect detection system provided in an embodiment of the present application, which may include a substation 100, a camera 200 and a control device 300. The camera 200 is installed at a position where the substation image can be collected for the substation 100. The camera 200 is connected to the control device 300 via a network and exchanges data with the control device 300 via the network.
[0042] The substation 100 may include transformers, circuit breakers, capacitors, high-voltage switchgear, transformers, compensation device protection devices, relay protection devices and other equipment, which are not limited here.
[0043] The camera 200 may be any one of a wide-angle camera, a macro camera, an ultra-wide-angle camera or a panoramic camera, etc. The type of the camera 200 is not limited here and may be specifically set according to actual needs.
[0044] The control device 300 may be a terminal device or a server, etc. The type of the control device 300 is not limited here and may be specifically configured according to actual needs.
[0045] The terminal device can be a mobile terminal device (for example, a mobile phone, a personal digital assistant (PDA), a tablet computer (Tablet Personal Computer, Tablet PC), a laptop computer, a smart watch, a smart bracelet or a wearable device, etc.), or a fixed terminal device (desktop computer, smart panel, etc.), etc.
[0046] The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or any one of the cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), big data or artificial intelligence platforms, etc.
[0047] The network may be any one of a ZigBee network, a Bluetooth (BT) network, a Wireless Fidelity (Wi-Fi) network, a Thread network, a Long Range Radio (LoRa) network, a Low-Power Wide-Area Network (LPWAN), an infrared network, a Narrow Band Internet of Things (NB-IoT), a Controller Area Network (CAN), a Digital Living Network Alliance (DLNA) network, a Wide Area Network (WAN), a Local Area Network (LAN), a Metropolitan Area Network (MAN), or a Wireless Personal Area Network (WPAN), etc., without limitation here.
[0048] See also Figure 2 , which shows a flow chart of a model training method provided by an embodiment of the present application. In a specific embodiment, the model training method can be applied to Figure 1 The control device 300 in the substation defect detection system shown in FIG. Figure 2 The process shown is described in detail, and the model training method may include the following steps 110 to 140.
[0049] Step 110: Acquire positive sample images and negative sample images based on historical substation images.
[0050] In an embodiment of the present application, the control device may acquire historical substation images, and divide the historical substation images into positive sample images and negative sample images.
[0051] The historical substation image is a historical scene image of the substation. The historical substation image may include equipment images and character images, etc., which are not limited here.
[0052] The positive sample image contains the substation defect information, while the negative sample image does not contain the substation defect information.
[0053] Substation defect information may include substation equipment defect information (such as substation equipment defect type (rust defect, crack defect, oil leakage defect, damage defect, etc.), substation equipment defect location and substation equipment defect size, etc.), substation equipment abnormal operation information, staff unsafe behavior, etc. The type of substation defect information is not limited here, and can be set according to actual needs.
[0054] Regarding the process of the control device acquiring the historical substation image, in some implementation modes, the control device pre-stores the historical substation image, and the control device can read the pre-stored historical substation image.
[0055] Regarding the process of the control device acquiring the historical substation image, in some implementations, the control device may generate upload prompt information, and receive the historical substation image uploaded by the inspection personnel according to the upload prompt information.
[0056] Among them, the upload prompt information can be used to prompt the inspection personnel to upload the historical substation image to the control device according to the upload prompt information. The upload prompt information can be at least any one of text prompt information, sound prompt information or light prompt information, etc., which is not limited here.
[0057] Regarding the process of the above-mentioned control device acquiring historical substation images, in some embodiments, the substation defect detection system may also include a substation service platform, which pre-stores historical substation images. The substation service platform is connected to the control device via a network and exchanges data with the control device via the network.
[0058] The control device can send an acquisition instruction to the substation service platform through the network. The substation service platform receives and responds to the acquisition instruction, sends the historical substation image to the control device through the network, and the control device receives the historical substation image returned by the substation service platform.
[0059] Among them, the substation service platform can be an independent physical platform, or a platform cluster or distributed system composed of multiple physical platforms, or any one of the cloud platforms that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), big data or artificial intelligence platforms, etc., without limitation here.
[0060] Step 120: Generate a target generated image based on the generative adversarial network model.
[0061] In an embodiment of the present application, the control device can generate a target generated image based on a generative adversarial network (GAN) model.
[0062] Among them, the GAN model can include a generator and a discriminator. The generator and the discriminator are trained in an adversarial manner. The generator is used to generate realistic sample data, and the discriminator is used to determine whether the input data is real data or forged data generated by the generator.
[0063] The target generated image can be an image containing substation defect information generated by the GAN model according to the input random noise.
[0064] In some embodiments, the control device can input random noise to the generator, the generator receives and responds to the random noise, outputs an initial generated image, and inputs the initial generated image and the positive sample image to the discriminator, the discriminator receives and responds to the initial generated image and the positive sample image, matches the initial generated image with the positive sample image, outputs the image matching degree, and when the image matching degree is greater than or equal to the matching degree threshold, determines the initial generated image as the target generated image, and generates a target generated image containing substation defect information based on the GAN model, thereby increasing the number of defect samples used to train the target detection model, improving the generalization ability of the target substation defect detection model, and facilitating improving the detection accuracy of defect detection for substations.
[0065] Among them, the matching degree threshold can be used to characterize the minimum matching degree between the initial generated image and the positive sample image. The matching degree threshold can be a matching degree pre-set by the user, or a matching degree automatically generated by the control device according to the training process of multiple model trainings.
[0066] In some embodiments, the control device can input random noise to the generator, the generator receives and responds to the random noise, outputs an initial generated image, and inputs the initial generated image and the positive sample image to the discriminator, the discriminator receives and responds to the initial generated image and the positive sample image, matches the initial generated image with the positive sample image, outputs the image matching degree, and when the image matching degree is less than the matching degree threshold, determines the optimization parameters of the generator, and optimizes and updates the generator based on the optimization parameters, and executes the step of inputting random noise to the generator so that the generator outputs the initial generated image according to the random noise, until when the image matching degree is greater than or equal to the matching degree threshold, the initial generated image is determined as the target generated image, and when the generated image generated by the generator is significantly different from the positive sample image, the generator is optimized iteratively until the generated image generated by the generator is similar to the positive sample image, and the generated image is output, which is beneficial to improve the generation quality of the generated image.
[0067] Step 130: construct training data based on the positive sample images, negative sample images and target generated images.
[0068] In an embodiment of the present application, the control device may construct training data based on positive sample images, negative sample images, and target generated images.
[0069] In some embodiments, the control device can paste the target generated image into the negative sample image to obtain a fused sample image, and construct training data based on the fused sample image and the positive sample image, and fuse the target generated image and the negative sample image generated by the GAN model to obtain the fused sample image, thereby increasing the number of defect samples used to train the target detection model, which is beneficial to improving the generalization ability of the target substation defect detection model.
[0070] In some embodiments, the control device can paste the target generated image into the negative sample image to obtain a fused sample image, and perform data enhancement on the positive sample image to obtain an enhanced sample image, and construct training data based on the enhanced sample image, the fused sample image and the positive sample image. By performing data enhancement on the positive sample image, the amount of positive sample data in the training data is increased, which is beneficial to improving the robustness of the target substation defect detection model.
[0071] Among them, data enhancement may include at least any one of brightness enhancement, grayscale enhancement, contrast enhancement and transparency enhancement, etc. The type of data enhancement is not limited here and can be set according to actual needs.
[0072] In one application scenario, such as Figure 3 As shown, the control device can divide the historical substation image into positive sample images and negative sample images, and input random noise to the generator in the GAN model. The generator receives and responds to the random noise and outputs an initial generated image. The control device inputs the initial generated image and the positive sample image to the discriminator in the GAN model. The discriminator outputs the image matching degree between the initial generated image and the positive sample image. When the image matching degree is greater than or equal to the matching degree threshold, the control device pastes the initial generated image as the target generated image to the negative sample image to obtain a fused sample image.
[0073] The control device may also divide the positive sample image into a test set and other data sets, and may perform data enhancement on other data sets to obtain enhanced sample images, and determine the fused sample image, other data sets and enhanced sample images as training data.
[0074] The training data may include a training set and a validation set.
[0075] Step 140: Input training data to the target detection model for training to obtain a target substation defect detection model.
[0076] In an embodiment of the present application, the control device can input training data to the target detection model, the target detection model receives and responds to the training data, and is trained according to the training data to obtain a target substation defect detection model. The training data constructed based on the historical substation image and the target generated image generated by the generative adversarial network model is implemented to train the target detection model to obtain the target substation defect detection model. The detection accuracy and detection efficiency of defect detection of the substation based on the target substation defect detection model are high, which is conducive to improving the detection accuracy and detection efficiency of defect detection of the substation.
[0077] Furthermore, a target generated image containing substation defect information is generated based on the generative adversarial network model, which increases the number of defect samples used to train the target detection model and improves the generalization ability of the target substation defect detection model, which is conducive to improving the detection accuracy of substation defect detection.
[0078] The target detection model may be any one of a YOLOv5 model, a Faster-RCNN model, or a YOLOX model. The type of the target detection model is not limited here and may be set according to actual needs.
[0079] The YOLOv5 model includes four network structures. If you have high requirements for detection speed, you can choose YOLOv5s with the smallest depth and width as the basic network. If you have no requirements for detection speed, the YOLOv5m, YOLOv5l, and YOLOv5x networks with deeper depth and wider width will have improved detection accuracy but reduced speed accordingly. You can make an appropriate choice based on actual conditions.
[0080] The model training method provided in the present application obtains positive sample images and negative sample images based on historical substation images, wherein the positive sample images contain substation defect information, and the negative sample images do not contain substation defect information, and generates a target generated image based on a generative adversarial network model, wherein the generated image contains substation defect information, and constructs training data based on the positive sample images, the negative sample images, and the target generated image, and inputs the training data into a target detection model for training to obtain a target substation defect detection model, thereby realizing training the target detection model based on the training data constructed based on the historical substation images and the target generated image generated by the generative adversarial network model to obtain a target substation defect detection model, and the detection accuracy and detection efficiency of defect detection of the substation based on the target substation defect detection model are both high, which is beneficial to improving the detection accuracy and detection efficiency of defect detection of the substation.
[0081] Furthermore, a target generated image containing substation defect information is generated based on the generative adversarial network model, which increases the number of defect samples used to train the target detection model and improves the generalization ability of the target substation defect detection model, which is conducive to improving the detection accuracy of substation defect detection.
[0082] See also Figure 4 , which shows a flow chart of a model training method provided by another embodiment of the present application. In a specific embodiment, the model training method can be applied to Figure 1 The control device 300 in the substation defect detection system shown in FIG. Figure 4 The process shown is described in detail, and the model training method may include the following steps 210 to 250.
[0083] Step 210: Acquire positive sample images and negative sample images based on historical substation images.
[0084] Step 220: Generate a target generated image based on the generative adversarial network model.
[0085] Step 230: construct training data based on the positive sample images, negative sample images and target generated images.
[0086] In this embodiment, step 210, step 220 and step 230 may refer to the contents of the corresponding steps in the aforementioned embodiment, which will not be described again here.
[0087] Step 240: Integrate the spatial depth conversion convolution module, the bidirectional feature pyramid network and the target detection model to obtain an initial substation defect detection model.
[0088] In this embodiment, the control device can integrate the Symmetric PositiveDefinite Convolution (SPD-Conv) module, the Bidirectional Feature Pyramid Network (BiFPN) and the target detection model to obtain an initial substation defect detection model.
[0089] Among them, the target detection model combined with the SPD-Conv module can eliminate the loss of fine-grained feature information caused by the step size and pooling operations in conventional convolutional neural networks, and the Concat operation of the feature fusion layer combined with BiFPN can improve the feature fusion capability of the initial substation defect detection model for substation defects of different sizes, which is conducive to improving the detection accuracy of the target substation defect detection model.
[0090] In some implementations, the target detection model may be a YOLOv5 model, and the control device may fuse the SPD-Conv module, BiFPN, and the YOLOv5 model to obtain an initial substation defect detection model.
[0091] In some implementations, the target detection model may be a Faster-RCNN model, and the control device may fuse the SPD-Conv module, the BiFPN, and the Faster-RCNN model to obtain an initial substation defect detection model.
[0092] In some implementations, the target detection model may be a YOLOX model, and the control device may fuse the SPD-Conv module, BiFPN, and the YOLOX model to obtain an initial substation defect detection model.
[0093] Step 250: Input training data to the initial substation defect detection model for training to obtain a target substation defect detection model.
[0094] In this embodiment, the control device can input training data into the initial substation defect detection model. The initial substation defect detection model receives and responds to the training data, and is trained according to the training data to obtain a target substation defect detection model. The initial substation defect detection model constructed based on the SPD-Conv module, BiFPN and the target detection model is trained based on the training data to obtain the target substation defect detection model. The detection accuracy and detection efficiency of defect detection of the substation based on the target substation defect detection model are high, which is conducive to improving the detection accuracy and detection efficiency of defect detection of the substation.
[0095] Furthermore, an initial substation defect detection model is constructed based on the SPD-Conv module, BiFPN and target detection model, which improves the feature fusion capability of the initial substation defect detection model for substation defects of different scales, making small target substation defects easier to detect and improving the detection accuracy of substation defects.
[0096] The solution provided in this embodiment obtains positive sample images and negative sample images based on historical substation images, generates target generated images based on a generative adversarial network model, constructs training data based on the positive sample images, negative sample images and target generated images, and integrates a spatial deep conversion convolution module, a bidirectional feature pyramid network and a target detection model to obtain an initial substation defect detection model, and inputs the training data into the initial substation defect detection model for training to obtain a target substation defect detection model, and realizes training the initial substation defect detection model constructed based on the SPD-Conv module, BiFPN and the target detection model based on the training data to obtain the target substation defect detection model, and the detection accuracy and detection efficiency of defect detection of the substation based on the target substation defect detection model are high, which is conducive to improving the detection accuracy and detection efficiency of defect detection of the substation.
[0097] Furthermore, an initial substation defect detection model is constructed based on the SPD-Conv module, BiFPN and target detection model, which improves the feature fusion capability of the initial substation defect detection model for substation defects of different scales, making small target substation defects easier to detect and improving the detection accuracy of substation defects.
[0098] See also Figure 5 , which shows a flow chart of a substation defect detection method provided by an embodiment of the present application. In a specific embodiment, the substation defect detection method can be applied to Figure 1 The control device 300 in the substation defect detection system shown in FIG. Figure 5 The process shown is described in detail, and the substation defect detection method may include the following steps 310 to 320.
[0099] Step 310: Acquire the current substation image.
[0100] In this embodiment, when the inspection personnel need to perform defect detection on the substation, they can send a detection instruction to the control device. The control device receives and responds to the detection instruction and sends an image acquisition instruction to the camera through the network. The camera receives and responds to the image acquisition instruction, performs image acquisition on the substation, obtains the current substation image, and sends the current substation image to the control device through the network. The control device receives the current substation image returned by the camera.
[0101] In some embodiments, the control device may detect the operation of the inspector. When it is determined based on the detected operation of the inspector that the inspector has input a detection instruction for performing defect detection on the substation, the detection instruction for performing defect detection on the substation is received.
[0102] For example, when the inspectors need to perform defect detection on the substation, they can perform touch operations on the operation panel of the control device. The control device responds to the inspectors' touch operations, generates corresponding touch signals, and analyzes the touch signals. When it is determined that the touch signal is a preset detection signal for characterizing defect detection on the substation, it is determined that a detection instruction for defect detection on the substation has been received.
[0103] In some embodiments, the control device may be provided with a voice recognition module. When the inspectors need to perform defect detection on the substation, the inspectors may send voice information within the voice collection range of the voice recognition module. The voice recognition module collects the voice information sent by the inspectors, and performs voice recognition on the collected voice information. Based on the recognition results of the voice recognition, it is determined that the recognition results contain keywords for indicating defect detection on the substation, such as "substation defect detection", and for example, "substation" and "defect detection", etc., and it is determined that a detection instruction for defect detection on the substation has been received.
[0104] As an example, the voice message sent by the inspection personnel is: perform defect detection on the substation, and the recognition result of the voice recognition contains the keywords "substation" and "defect detection", then it is determined that the detection instruction for performing defect detection on the substation is received.
[0105] In some implementations, the substation defect detection system may further include a client, which is connected to the control device via a network and exchanges data with the control device via the network.
[0106] When the inspection personnel need to perform defect detection on the substation, they can send a detection instruction to the client, the client receives and responds to the detection instruction, forwards the detection instruction to the control device through the network, and the control device receives the detection instruction forwarded by the client.
[0107] Among them, the client can be any one of a mobile client (for example, a mobile phone client, a PDA client, a Tablet PC client, a laptop client, a smart watch client, a smart bracelet client or a wearable client, etc.) or a fixed client (for example, a desktop computer client, a smart panel client, etc.). The type of client is not limited here and can be set according to actual needs.
[0108] Step 320: Input the current substation image into the target substation defect detection model to obtain the corresponding detection result.
[0109] In this embodiment, the control device can input the current substation image into the target substation defect detection model. The target substation defect detection model receives and responds to the current substation image, performs defect detection on the substation according to the current substation image, obtains corresponding detection results, and outputs the detection results to the control device. The control device receives the detection results output by the target substation defect detection model, realizes defect detection of the substation based on the target substation defect detection model, and improves the detection accuracy and efficiency of defect detection on the substation.
[0110] Among them, the target substation defect detection model can be trained by the model training method in the aforementioned embodiment, and the detection results may include a first detection result used to characterize that the current substation image does not contain substation defect information, and a second detection result used to characterize that the current substation image contains substation defect information.
[0111] Furthermore, a target generated image containing substation defect information is generated based on the generative adversarial network model, which increases the number of defect samples used to train the target detection model, improves the generalization ability of the target substation defect detection model, and improves the detection accuracy of substation defect detection.
[0112] In some embodiments, the control device can input the current substation image into the target substation defect detection model, obtain the corresponding second detection result, and generate alarm information so that inspection personnel can process according to the alarm information, which is conducive to improving the operation safety of the substation.
[0113] The warning information may be at least one of text warning information, sound warning information, light warning information, etc. The type of the warning information is not limited here and can be set according to actual needs.
[0114] The solution provided in this embodiment obtains the corresponding detection result by acquiring the current substation image and inputting the current substation image into the target substation defect detection model, wherein the target substation defect detection model can be trained by the model training method in the aforementioned embodiment, thereby realizing defect detection of the substation based on the target substation defect detection model, and improving the detection accuracy and efficiency of defect detection of the substation.
[0115] Furthermore, a target generated image containing substation defect information is generated based on the generative adversarial network model, which increases the number of defect samples used to train the target detection model, improves the generalization ability of the target substation defect detection model, and improves the detection accuracy of substation defect detection.
[0116] See also Figure 6, which shows a model training device 500 provided by an embodiment of the present application. The model training device 500 can be applied to Figure 1 The control device 300 in the substation defect detection system shown in FIG. Figure 6 The model training device 500 shown is described in detail. The model training device 500 may include a first acquisition module 510, a first generation module 520, a construction module 530 and a training module 540.
[0117] The first acquisition module 510 can be used to obtain positive sample images and negative sample images based on historical substation images. The positive sample images may include substation defect information, and the negative sample images may not include substation defect information; the first generation module 520 can be used to generate a target generated image based on a generative adversarial network model, and the target generated image may include substation defect information; the construction module 530 can be used to construct training data based on the positive sample images, the negative sample images and the target generated images; the training module 540 can be used to input the training data into the target detection model for training to obtain a target substation defect detection model.
[0118] In some embodiments, the construction module 530 may include a pasting unit and a construction unit.
[0119] The pasting unit can be used to paste the target generated image into the negative sample image to obtain a fused sample image; the construction unit can be used to construct training data based on the fused sample image and the positive sample image.
[0120] In some embodiments, a building block may include an enhancer block and a building block.
[0121] The enhancement subunit can be used to perform data enhancement on the positive sample image to obtain an enhanced sample image; the construction subunit can be used to construct training data based on the enhanced sample image, the fused sample image and the positive sample image.
[0122] In some embodiments, the generative adversarial network model may include a generator and a discriminator, and the first generation module 520 may include a first input unit, a second input unit, and a determination unit.
[0123] The first input unit can be used to input random noise into the generator, so that the generator outputs an initial generated image according to the random noise; the second input unit can be used to input the initial generated image and the positive sample image into the discriminator, so that the discriminator outputs the image matching degree between the initial generated image and the positive sample image; the determination unit can be used to determine the initial generated image as the target generated image when the image matching degree is greater than or equal to the matching degree threshold.
[0124] In some implementations, the model training device 500 may further include a determination module, an update module, and an execution module.
[0125] The determination module can be used to determine the optimization parameters of the generator when the image matching degree is less than the matching degree threshold; the update module can be used to optimize and update the generator based on the optimization parameters; the execution module can be used to execute the steps of inputting random noise to the generator so that the generator outputs an initial generated image according to the random noise, until the image matching degree is greater than or equal to the matching degree threshold, and the initial generated image is determined as the target generated image.
[0126] In some embodiments, the model training device 500 may further include a fusion module.
[0127] The fusion module can be used for training module 540 to input training data into the target detection model for training. Before obtaining the target substation defect detection model, the spatial depth conversion convolution module, the bidirectional feature pyramid network and the target detection model are integrated to obtain the initial substation defect detection model.
[0128] In some implementations, the training module 540 may include a training unit.
[0129] The training unit can be used to input training data into the initial substation defect detection model for training to obtain a target substation defect detection model.
[0130] The solution provided in this embodiment obtains positive sample images and negative sample images based on historical substation images, the positive sample images contain substation defect information, and the negative sample images do not contain substation defect information, and generates a target generated image based on a generative adversarial network model, the target generated image contains substation defect information, and constructs training data based on the positive sample images, the negative sample images and the target generated images, and inputs the training data into a target detection model for training to obtain a target substation defect detection model. The solution implements training of the target detection model based on the historical substation images and the target generated images generated by the generative adversarial network model to obtain a target substation defect detection model. The detection accuracy and detection efficiency of defect detection of substations based on the target substation defect detection model are both high, which is beneficial to improving the detection accuracy and detection efficiency of defect detection of substations.
[0131] Furthermore, a target generated image containing substation defect information is generated based on the generative adversarial network model, which increases the number of defect samples used to train the target detection model and improves the generalization ability of the target substation defect detection model, which is conducive to improving the detection accuracy of substation defect detection.
[0132] See also Figure 7, which shows a substation defect detection device 600 provided by an embodiment of the present application. The substation defect detection device 600 can be applied to Figure 1 The control device 300 in the substation defect detection system shown in FIG. Figure 7 The substation defect detection device 600 shown is described in detail. The substation defect detection device 600 may include a second acquisition module 610 and an input module 620.
[0133] The second acquisition module 610 can be used to acquire the current substation image; the input module 620 can be used to input the current substation image into the target substation defect detection model to obtain the corresponding detection result;
[0134] Among them, the target substation defect detection model can be trained by the model training method in the aforementioned embodiment.
[0135] The detection result may include a first detection result used to indicate that the current substation image does not include substation defect information, and a second detection result used to indicate that the current substation image includes substation defect information.
[0136] In some implementations, the substation defect detection device 600 may further include a second generating module.
[0137] The second generating module can be used to generate warning information when the second detection result is obtained.
[0138] The solution provided in this embodiment obtains the corresponding detection result by acquiring the current substation image and inputting the current substation image into the target substation defect detection model, wherein the target substation defect detection model can be trained by the model training method in the aforementioned embodiment, thereby realizing defect detection of the substation based on the target substation defect detection model, and improving the detection accuracy and efficiency of defect detection of the substation.
[0139] Furthermore, a target generated image containing substation defect information is generated based on the generative adversarial network model, which increases the number of defect samples used to train the target detection model, improves the generalization ability of the target substation defect detection model, and improves the detection accuracy of substation defect detection.
[0140] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Any processing method described in the method embodiment can be implemented by the corresponding processing module in the device embodiment, and will not be repeated one by one in the device embodiment.
[0141] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0142] See also Figure 8 , which shows a functional block diagram of an electronic device 700 provided by an embodiment of the present application, and the electronic device 700 may include one or more of the following components: a memory 710, a processor 720, and one or more applications, wherein the one or more applications may be stored in the memory 710 and configured to be executed by the one or more processors 720, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.
[0143] The memory 710 may include a random access memory (RAM) or a read-only memory (ROM). The memory 710 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 710 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as obtaining a positive sample image, obtaining a negative sample image, generating a target generated image, constructing training data, inputting training data, training a target detection model, obtaining a target substation defect detection model, pasting a target generated image, obtaining a fused sample image, data enhancement, obtaining an enhanced sample image, inputting random noise, outputting an initial generated image, inputting an initial generated image, inputting a positive sample image, outputting an image matching degree, determining optimization parameters, optimizing and updating, fusing a model, obtaining an initial substation defect detection model, training an initial substation defect detection model, obtaining a current substation image, inputting a current substation image, obtaining a detection result, and generating an alarm message, etc.), instructions for implementing the following various method embodiments, etc. The data storage area can also store data created by the electronic device 700 during use (such as historical substation images, positive sample images, negative sample images, substation defect information, generative adversarial network models, target generated images, training data, target detection models, target substation defect detection models, fused sample images, enhanced sample images, generators, discriminators, random noise, initial generated images, image matching, matching thresholds, optimization parameters, spatial depth conversion convolution modules, bidirectional feature pyramid networks, initial substation defect detection models, current substation images, detection results, first detection results, second detection results, and alarm information), etc.
[0144] The processor 720 may include one or more processing cores. The processor 720 uses various interfaces and lines to connect various parts of the entire electronic device 700, and executes various functions and processes data of the electronic device 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 710, and calling data stored in the memory 710. Optionally, the processor 720 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (ProgrammableLogic Array, PLA), etc. The processor 720 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 720, and it can be implemented separately through a communication chip.
[0145] Please refer to Fig. 9 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable storage medium 800 stores a program code 810, which can be called by a processor to execute the method described in the above method embodiment.
[0146] The computer readable storage medium 800 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.
[0147] Please refer to Fig.10, which shows a structural block diagram of a computer program product 900 provided in an embodiment of the present application. The computer program product 900 includes a computer program / instruction 910, and the computer program / instruction 910 is stored in a computer-readable storage medium of a computer device. When the computer program product 900 is run on a computer device, a processor of the computer device reads the computer program / instruction 910 from the computer-readable storage medium, and the processor executes the computer program / instruction 910, so that the computer device performs the method described in the above method embodiment.
[0148] The model training method provided in this embodiment obtains positive sample images and negative sample images based on historical substation images, wherein the positive sample images include substation defect information, while the negative sample images do not include substation defect information, and generates a target generated image based on a generative adversarial network model, wherein the target generated image includes substation defect information, and constructs training data based on the positive sample images, the negative sample images, and the target generated image, and inputs the training data into a target detection model for training to obtain a target substation defect detection model. The target detection model is trained based on the training data constructed based on the historical substation images and the target generated image generated by the generative adversarial network model to obtain a target substation defect detection model. The detection accuracy and detection efficiency of defect detection of substations based on the target substation defect detection model are both high, which is beneficial to improving the detection accuracy and detection efficiency of defect detection of substations.
[0149] Furthermore, a target generated image containing substation defect information is generated based on the generative adversarial network model, which increases the number of defect samples used to train the target detection model and improves the generalization ability of the target substation defect detection model, which is conducive to improving the detection accuracy of substation defect detection.
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A model training method, characterized in that: include: According to the historical substation image, a positive sample image and a negative sample image are obtained, wherein the positive sample image contains the substation defect information, and the negative sample image does not contain the substation defect information; Generate a target generated image based on a generative adversarial network model, wherein the target generated image includes the substation defect information; Constructing training data based on the positive sample image, the negative sample image and the target generated image; The training data is input into the target detection model for training to obtain a target substation defect detection model.
2. The model training method according to claim 1, characterized in that: The constructing training data based on the positive sample image, the negative sample image and the target generated image includes: Paste the target generated image into the negative sample image to obtain a fused sample image; The training data is constructed based on the fused sample image and the positive sample image.
3. The model training method according to claim 2, characterized in that: The constructing the training data based on the fused sample image and the positive sample image includes: Performing data enhancement on the positive sample image to obtain an enhanced sample image; The training data is constructed based on the enhanced sample image, the fused sample image and the positive sample image.
4. The model training method according to claim 1, characterized in that: The generative adversarial network model includes a generator and a discriminator, and the generating a target generated image based on the generative adversarial network model includes: Inputting random noise to the generator so that the generator outputs an initial generated image according to the random noise; Inputting the initial generated image and the positive sample image into the discriminator, so that the discriminator outputs the image matching degree between the initial generated image and the positive sample image; When the image matching degree is greater than or equal to a matching degree threshold, the initial generated image is determined as the target generated image.
5. The model training method according to claim 4, characterized in that: Also includes: When the image matching degree is less than the matching degree threshold, determining the optimization parameters of the generator; Optimizing and updating the generator based on the optimization parameters; The step of inputting random noise to the generator so that the generator outputs an initial generated image according to the random noise is performed until the image matching degree is greater than or equal to the matching degree threshold, and the initial generated image is determined as the target generated image.
6. The model training method according to any one of claims 1 to 5, characterized in that: Before inputting the training data into the target detection model for training to obtain the target substation defect detection model, the model training method further includes: The initial substation defect detection model is obtained by integrating the spatial deep conversion convolution module, the bidirectional feature pyramid network and the target detection model; The inputting the training data into the target detection model for training to obtain the target substation defect detection model includes: The training data is input into the initial substation defect detection model for training to obtain the target substation defect detection model.
7. A method for detecting defects in a substation, characterized in that: include: Get the current substation image; Inputting the current substation image into the target substation defect detection model to obtain the corresponding detection result; Wherein, the target substation defect detection model is trained based on the model training method described in any one of claims 1 to 6, and the detection result includes a first detection result used to characterize that the current substation image does not contain substation defect information, and a second detection result used to characterize that the current substation image contains the substation defect information.
8. The substation defect detection method according to claim 7, characterized in that: Also includes: When the second detection result is obtained, an alarm message is generated.
9. An electronic device, characterized in that: include: Memory; One or more processors coupled to the memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the model training method as described in any one of claims 1 to 6, and / or the substation defect detection method as described in claim 7 or 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, and the program code can be called by a processor to execute the model training method described in any one of claims 1 to 6, and / or the substation defect detection method described in claim 7 or 8.
Citation Information
Cited By
Transformer substation defect detection method and device, terminal equipment and storage medium
CN121010556A
Defect detection method, detection device and equipment for substation equipment and storage medium
CN121032916A
Distribution network line multi-class image defect detection method and device based on small sample learning
CN121258998A