Substation equipment defect detection method and device, electronic equipment and storage medium
By applying the target defect detection model based on the universal inverted bottleneck module and the YOLOv8 model in substation equipment, the problem of detection accuracy and inefficiency caused by manual visual inspection is solved, and more efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202411699288.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-25
AI Technical Summary
In the prior art, the detection of defects of substation equipment relies on manual visual inspection, resulting in low detection accuracy and efficiency.
Defect detection is performed by acquiring the image of the substation equipment and inputting it to the target defect detection model built on the universal inverted bottleneck module and the YOLOv8 model. The model is based on the replacement of depth-separable convolution and ordinary convolution, reducing the amount of parameters and reducing the computational complexity.
It improves the accuracy and efficiency of defect detection of substation equipment and reduces the computational complexity of the detection model.
Smart Images

Figure CN119693307A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of relay protection of electric power systems, and in particular, relates to a method and device for detecting defects in substation equipment, an electronic device, and a storage medium. Background Art
[0002] Substations are places in power systems that transform voltage and current, receive and distribute electric energy, and are a vital component of power systems. With long-term operation, power equipment in substations may suffer from equipment defects such as surface corrosion, oil leakage, and damage due to their own characteristics or poor manufacturing processes, improper maintenance during inspection and testing, external damage, and natural disasters. In order to ensure the stable operation of substation equipment, it is necessary to detect equipment defects and hidden dangers in a timely manner to prevent them from happening.
[0003] At present, defect detection of substation equipment usually relies on manual visual inspection, and the detection results are easily affected by the subjective experience of inspectors, resulting in low detection accuracy of defect detection of substation equipment. In addition, manual visual inspection leads to low detection efficiency of defect detection of substation equipment. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a substation equipment defect detection method and device, electronic device and storage medium to overcome the above problems of the prior art.
[0005] In a first aspect, an embodiment of the present application provides a method for detecting defects in substation equipment, including: obtaining an image of a substation equipment to be detected; inputting the image of the substation equipment to be detected into a target defect detection model to obtain a detection result, wherein the target defect detection model is obtained by replacing the bottleneck layer in the YOLOv8 model based on a general inverted bottleneck module, and the detection result includes a first detection result for characterizing that the image of the substation equipment to be detected does not contain defect information of the substation equipment, and a second detection result for characterizing that the image of the substation equipment to be detected contains defect information of the substation equipment.
[0006] Among them, in some optional embodiments, before obtaining the image of the substation equipment to be detected, the substation equipment defect detection method also includes: replacing the bottleneck layer in the YOLOv8 model based on the universal inverted bottleneck module to obtain an initial defect detection model; training the initial defect detection model to obtain the target defect detection model.
[0007] Among them, in some optional embodiments, the bottleneck layer in the YOLOv8 model is replaced based on the universal inverted bottleneck module to obtain an initial defect detection model, including: fusing the C2f module of the YOLOv8 model and the universal inverted bottleneck module to obtain a fusion model; deleting the bottleneck layer of the C2f module in the fusion model to obtain the initial defect detection model.
[0008] Among them, in some optional embodiments, the training of the initial defect detection model to obtain the target defect detection model includes: obtaining historical substation equipment images; obtaining a corresponding sample set based on the historical substation equipment images, wherein the sample set includes at least an initial training set; inputting the initial training set into the initial defect detection model for training to obtain the target defect detection model.
[0009] Among them, in some optional embodiments, before the inputting of the initial training set to the initial defect detection model for training to obtain the target defect detection model, the substation equipment defect detection method also includes: performing data enhancement processing on the initial training set to obtain an enhanced training set; the inputting of the initial training set to the initial defect detection model for training to obtain the target defect detection model includes: inputting the enhanced training set to the initial defect detection model for training to obtain the target defect detection model.
[0010] Among them, in some optional embodiments, the sample set also includes a test set, and before obtaining the image of the substation equipment to be detected, the substation equipment defect detection method also includes: determining whether the target defect detection model converges according to the test set; obtaining the image of the substation equipment to be detected includes: when it is determined that the target defect detection model converges according to the test set, obtaining the image of the substation equipment to be detected.
[0011] Among them, in some optional embodiments, before inputting the image of the substation equipment to be inspected into the target defect detection model to obtain the detection result, the substation equipment defect detection method also includes: performing sliding slicing processing on the image of the substation equipment to be inspected to obtain multiple slice images; inputting the image of the substation equipment to be inspected into the target defect detection model to obtain the detection result includes: inputting the multiple slice images and the image of the substation equipment to be inspected into the target defect detection model to obtain the detection result.
[0012] In the second aspect, the embodiment of the present application provides a substation equipment defect detection device, which includes an acquisition module and an input module. The acquisition module is used to acquire the substation equipment image to be detected; the input module is used to input the substation equipment image to be detected into the target defect detection model to obtain a detection result, the target defect detection model is obtained by replacing the bottleneck layer in the general inverted bottleneck module and the YOLOv8 model, and the detection result includes a first detection result for characterizing that the substation equipment image to be detected does not contain the substation equipment defect information, and a second detection result for characterizing that the substation equipment image to be detected contains the substation equipment defect information.
[0013] In a third 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 substation equipment defect detection method provided in the first aspect above.
[0014] In a fourth 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 substation equipment defect detection method provided in the first aspect above.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer device, enables the computer device to execute the substation equipment defect detection method provided in the first aspect above.
[0016] The solution provided in the present application obtains an image of the substation equipment to be detected and inputs the image of the substation equipment to be detected into a target defect detection model to obtain a detection result. The target defect detection model is obtained by replacing the bottleneck layer in the YOLOv8 model based on a universal inverted bottleneck module. The detection result includes a first detection result for characterizing that the image of the substation equipment to be detected does not contain defect information of the substation equipment, and a second detection result for characterizing that the image of the substation equipment to be detected contains defect information of the substation equipment. The target defect detection model constructed based on the universal inverted bottleneck module and the YOLOv8 model is used to perform defect detection on the substation equipment, thereby improving the detection accuracy and efficiency of defect detection on the substation equipment.
[0017] Furthermore, the bottleneck layer in the YOLOv8 model is replaced based on the universal inverted bottleneck module to obtain the target defect detection model. Since the universal inverted bottleneck module adopts depthwise separable convolution and the bottleneck layer adopts two layers of ordinary convolution, when the number of input and output channels of the universal inverted bottleneck module and the bottleneck layer is the same, the parameter amount of the depthwise separable convolution is smaller than the parameter amount of the ordinary convolution. Therefore, the parameter amount of the target defect detection model is reduced, which is beneficial to reducing the computational complexity of the target detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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.
[0019] Figure 1 A scenario schematic diagram of a substation equipment defect detection system provided in an embodiment of the present application is shown.
[0020] Figure 2 A flow chart of a method for detecting defects in substation equipment provided in an embodiment of the present application is shown.
[0021] Figure 3 A structural schematic diagram of a UIB module in a substation equipment defect detection method provided in an embodiment of the present application is shown.
[0022] Figure 4 Another flow chart of the substation equipment defect detection method provided in an embodiment of the present application is shown.
[0023] Figure 5 A structural schematic diagram of an unimproved C2f module in the substation equipment defect detection method provided in an embodiment of the present application is shown.
[0024] Figure 6 A structural schematic diagram of an improved C2f module in the substation equipment defect detection method provided in an embodiment of the present application is shown.
[0025] Figure 7 Another flow chart of the substation equipment defect detection method provided in the embodiment of the present application is shown.
[0026] Figure 8 Another flow chart of the substation equipment defect detection method provided in the embodiment of the present application is shown.
[0027] Fig. 9 Another flow chart of the substation equipment defect detection method provided in the embodiment of the present application is shown.
[0028] Fig.10 A structural block diagram of a substation equipment defect detection device provided in an embodiment of the present application is shown.
[0029] Fig.11 A functional block diagram of an electronic device provided in an embodiment of the present application is shown.
[0030] Fig.12 A computer-readable storage medium provided in an embodiment of the present application for storing or carrying program code for implementing a method for detecting defects in substation equipment provided in an embodiment of the present application is shown.
[0031] Fig.13 A computer program product provided in an embodiment of the present application and used to store or carry program codes for implementing a method for detecting defects in substation equipment provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0032] 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.
[0033] 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.
[0034] 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.
[0035] 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.
[0036] 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.
[0037] Substations are places in power systems that transform voltage and current, receive and distribute electric energy, and are a vital component of power systems. With long-term operation, power equipment in substations may suffer from equipment defects such as surface corrosion, oil leakage, and damage due to their own characteristics or poor manufacturing processes, improper maintenance during inspection and testing, external damage, and natural disasters. In order to ensure the stable operation of substation equipment, it is necessary to detect equipment defects and hidden dangers in a timely manner to prevent them from happening.
[0038] At present, defect detection of substation equipment usually relies on manual visual inspection, and the detection results are easily affected by the subjective experience of inspectors, resulting in low detection accuracy of defect detection of substation equipment. In addition, manual visual inspection leads to low detection efficiency of defect detection of substation equipment.
[0039] In response to the above problems, the substation equipment defect detection method and its device, electronic device and storage medium provided in the embodiments of the present application obtain a detection result by acquiring an image of the substation equipment to be detected and inputting the image of the substation equipment to be detected into a target defect detection model. The target defect detection model is obtained by replacing the bottleneck layer in the YOLOv8 model based on a universal inverted bottleneck module. The detection result includes a first detection result used to characterize that the image of the substation equipment to be detected does not contain the defect information of the substation equipment, and a second detection result used to characterize that the image of the substation equipment to be detected contains the defect information of the substation equipment. This realizes defect detection of the substation equipment based on the target defect detection model constructed based on the universal inverted bottleneck module and the YOLOv8 model, thereby improving the detection accuracy and efficiency of defect detection of the substation equipment.
[0040] Furthermore, the bottleneck layer in the YOLOv8 model is replaced based on the universal inverted bottleneck module to obtain the target defect detection model. Since the universal inverted bottleneck module adopts depthwise separable convolution and the bottleneck layer adopts two layers of ordinary convolution, when the number of input and output channels of the universal inverted bottleneck module and the bottleneck module is the same, the parameter amount of the depthwise separable convolution is smaller than the parameter amount of the ordinary convolution. Therefore, the parameter amount of the target defect detection model is reduced, which is beneficial to reducing the computational complexity of the target detection model.
[0041] 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.
[0042] See also Figure 1, which shows a schematic diagram of an application scenario of the substation equipment defect detection system provided in an embodiment of the present application, which may include a substation equipment 100, a camera 200 and a control device 300. The camera 200 is installed at a position where it can collect images of the substation equipment 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.
[0043] Among them, the substation equipment may include at least any one of a transformer, a circuit breaker, a capacitor, a high-voltage switchgear, a mutual inductor, a compensation device protection device and a relay protector, etc. The type of the substation equipment 100 is not limited here and can be specifically set according to actual needs.
[0044] 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.
[0045] 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.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] See also Figure 2 , which shows a flow chart of a substation equipment defect detection method provided by an embodiment of the present application. In a specific embodiment, the substation equipment defect detection method can be applied to Figure 1 The control device 300 in the substation equipment defect detection system shown in FIG. Figure 2 The process shown is described in detail, and the substation equipment defect detection method may include the following steps 110 to 120.
[0050] Step 110: Acquire an image of the substation equipment to be inspected.
[0051] In an embodiment of the present application, when inspection personnel need to perform defect detection on substation equipment, they can send a detection instruction to the control device, the control device receives and responds to the detection instruction, 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 equipment, obtains the image of the substation equipment to be inspected, and sends the image of the substation equipment to be inspected to the control device through the network, and the control device receives the image of the substation equipment to be inspected returned by the camera.
[0052] In some embodiments, the control device may detect the operation of the inspector, and when it is determined that the inspector has input a detection instruction for performing defect detection on the substation equipment based on the detected operation of the inspector, the detection instruction for performing defect detection on the substation equipment is received. For example, when the inspector needs to perform defect detection on the substation equipment, the inspector may perform a touch operation on the operation panel of the control device, and the control device responds to the touch operation of the inspector, generates a corresponding touch signal, and analyzes the touch signal. When it is determined that the touch signal is a preset detection signal for representing defect detection on the substation equipment, it is determined that the detection instruction for performing defect detection on the substation equipment is received.
[0053] 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 equipment, 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 equipment, such as "substation equipment defect detection", and for example, "substation equipment" and "defect detection", etc., and it is determined that a detection instruction for defect detection on the substation equipment has been received.
[0054] As an example, the voice message sent by the inspection personnel is: perform defect detection on substation equipment, and the recognition result of the voice recognition contains the keywords "substation equipment" and "defect detection", then it is determined that the detection instruction for performing defect detection on substation equipment has been received.
[0055] In some implementations, the defect detection system for substation equipment 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.
[0056] When the inspection personnel need to perform defect detection on the substation equipment, 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.
[0057] 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.
[0058] Step 120: Input the substation equipment image to be inspected into the target defect detection model to obtain the inspection result.
[0059] In an embodiment of the present application, after the control device obtains the image of the substation equipment to be detected, the image of the substation equipment to be detected can be input into the target defect detection model. The target defect detection model receives and responds to the image of the substation equipment to be detected, performs defect detection on the substation equipment according to the image of the substation equipment to be detected, obtains the corresponding detection result, and outputs the detection result to the control device. The control device receives the detection result output by the target defect detection model. The target defect detection model can be obtained by replacing the Bottleneck layer in the YOLOv8 model based on the Universal Inverted Bottleneck (UIB) module, thereby realizing defect detection of the substation equipment by the target defect detection model constructed based on the UIB module and the YOLOv8 model, thereby improving the detection accuracy and efficiency of defect detection of the substation equipment.
[0060] Furthermore, the Bottleneck layer in the YOLOv8 model is replaced based on the UIB module to obtain the target defect detection model. Since the UIB module adopts depthwise separable convolution and the Bottleneck layer adopts two layers of ordinary convolution, when the number of input and output channels of the UIB module and the Bottleneck layer is the same, the parameter amount of the depthwise separable convolution is smaller than that of the ordinary convolution. Therefore, the parameter amount of the target defect detection model is reduced, which is beneficial to reducing the computational complexity of the target detection model.
[0061] The detection result may include a first detection result used to characterize that the image of the substation equipment to be detected does not contain the defect information of the substation equipment, and a second detection result used to characterize that the image of the substation equipment to be detected contains the defect information of the substation equipment.
[0062] Substation equipment defect information may include substation equipment defect type (rust defect, crack defect, oil leakage defect, damage defect, etc.), substation equipment defect location and substation equipment defect size, etc. The type of substation equipment defect information is not limited here and can be set according to actual needs.
[0063] The UIB module belongs to the MobileNetv4 network, which is a lightweight convolutional neural network. Figure 3As shown, the UIB module may include an input module, a start depthwise convolution module, an expand convolution module, a middle depthwise convolution module, a projection convolution module, a layer scale module, and an output module connected in sequence.
[0064] The input module is used to input the first feature map to the start depthwise convolution module; the start depthwise convolution module is used to convolve each input channel of the first feature map separately to obtain the second feature map, and input the second feature map to the expand convolution module.
[0065] The expand convolution module uses 1×1 convolution to expand the number of input channels of the second feature map to expand_channels, obtains the third feature map, and inputs the third feature map to the middle depthwise convolution module. expand_channels is a multiple of the number of input channels, and expand_channels is determined by the preset expand_ratio.
[0066] The middledepthwise convolution module uses a preset size of depthwise separable convolution to process the third feature map to obtain a fourth feature map, and inputs the fourth feature map to the projection convolution module. The middledepthwise convolution module can adjust the spatial size of the feature map and perform downsampling.
[0067] The projection convolution module uses 1×1 convolution to restore the number of channels of the fourth feature map to the number of output channels, obtains the fifth feature map, and outputs the fifth feature map to the layer scale module.
[0068] The layer scale module scales the size of the fifth feature map by specific parameters to obtain the sixth feature map, and outputs the sixth feature map to the output module.
[0069] The input module is further used to output the first feature map to the output module through a residual connection (shortcut). The output module is used to fuse the first feature map and the sixth feature map to obtain the seventh feature map, and output the seventh feature map.
[0070] Since the UIB module uses depthwise separable convolution and 1×1 convolution operations, the number of parameters of the UIB module is relatively small.
[0071] In some embodiments, the detection result may be a second detection result. The control device inputs the image of the substation equipment to be detected into the target defect detection model. After obtaining the corresponding second detection result, the remaining service life of the corresponding substation equipment can be determined according to the second detection result, so that inspection personnel can maintain the substation equipment in time according to the remaining service life of the substation equipment, which is conducive to improving the operational safety of the power system.
[0072] As an implementation mode, the control device may input the second detection result into a pre-trained remaining service life prediction model, and the remaining service life prediction model receives and responds to the second detection result and outputs the remaining service life of the corresponding substation equipment.
[0073] Among them, the remaining service life prediction model can be obtained based on historical substation equipment defect information and historical remaining service life training. The remaining service life prediction model can be a convolutional neural network (CNN) model, a deep belief network (DBN) model, a stacked auto encoder network (SAE) model, a recurrent neural network (RNN) model, a deep neural network (DNN) model, a long short-term memory (LSTM) network model or a gated recurring unit (GRU) model, etc. The type of the remaining service life prediction model is not limited here, and it can be set according to actual needs.
[0074] As an implementation method, the control device can search the preset remaining service life table according to the second detection result to obtain the remaining service life of the corresponding substation equipment. The preset remaining service life table can be used to characterize the corresponding relationship between the remaining service life of the substation equipment and the defect information of the substation equipment.
[0075] In some embodiments, the detection result may be a second detection result. The control device inputs the image of the substation equipment to be detected into the target defect detection model. After obtaining the corresponding second detection result, a warning message may be generated so that inspection personnel can check and process the substation equipment according to the warning information, which is beneficial to improving the operational safety of the power system.
[0076] The warning information may be at least one of sound warning information, text warning information, light warning information, etc. The type of warning information is limited here and can be set according to actual needs.
[0077] The solution provided in the present application obtains an image of the substation equipment to be detected and inputs the image of the substation equipment to be detected into a target defect detection model to obtain a detection result. The target defect detection model is obtained by replacing the bottleneck layer in the YOLOv8 model based on a universal inverted bottleneck module. The detection result includes a first detection result for characterizing that the image of the substation equipment to be detected does not contain defect information of the substation equipment, and a second detection result for characterizing that the image of the substation equipment to be detected contains defect information of the substation equipment. The target defect detection model constructed based on the universal inverted bottleneck module and the YOLOv8 model is used to perform defect detection on the substation equipment, thereby improving the detection accuracy and efficiency of defect detection on the substation equipment.
[0078] Furthermore, the bottleneck layer in the YOLOv8 model is replaced based on the universal inverted bottleneck module to obtain the target defect detection model. Since the universal inverted bottleneck module adopts depthwise separable convolution and the bottleneck layer adopts two layers of ordinary convolution, when the number of input and output channels of the universal inverted bottleneck module and the bottleneck layer is the same, the parameter amount of the depthwise separable convolution is smaller than the parameter amount of the ordinary convolution. Therefore, the parameter amount of the target defect detection model is reduced, which is beneficial to reducing the computational complexity of the target detection model.
[0079] See also Figure 4 , which shows a flow chart of a method for detecting substation equipment defects provided by another embodiment of the present application. In a specific embodiment, the method for detecting substation equipment defects can be applied to Figure 1 The control device 300 in the substation equipment defect detection system shown in FIG. Figure 4 The process shown is described in detail, and the substation equipment defect detection method may include the following steps 210 to 240.
[0080] Step 210: Replace the bottleneck layer in the YOLOv8 model based on the general inverted bottleneck module to obtain an initial defect detection model.
[0081] In this embodiment, the control device can fuse the C2f (Convolution to Fully Connected) module and the UIB module of the YOLOv8 model to obtain a fusion model, and delete the Bottleneck layer of the C2f module in the fusion model to obtain an initial defect detection model, and replace the Bottleneck layer in the YOLOv8 model based on the UIB module, thereby reducing the number of parameters of the initial defect detection model.
[0082] Among them, the YOLOv8 model consists of two parts: the backbone network and the head network. In the backbone network, the C2f module is mainly used to extract features. Therefore, improving the C2f module will have a positive impact on the entire network structure of the YOLOv8 model.
[0083] In one application scenario, such as Figure 5 As shown, the C2f module may include a first convolutional layer, a split layer, a plurality of Bottleneck layers, a fusion layer, and a second convolutional layer connected in sequence.
[0084] The first and second convolutional layers are both 1×1 convolutions. The split layer is used to double the number of channels of the input feature map. Each Bottleneck layer can contain multiple convolutional layers. The concat layer is used to concatenate the output feature maps of multiple Bottleneck layers with the original feature maps. The C2f module concatenates the outputs of different Bottleneck layers with the original feature maps to achieve multi-scale feature aggregation.
[0085] The UIB module and the C2f module can be integrated, and the Bottleneck layer in the C2f module can be deleted to obtain the initial defect detection model (i.e., the improved C2f module), as shown in Figure 6 shown.
[0086] Step 220: Train the initial defect detection model to obtain a target defect detection model.
[0087] In this embodiment, the control device replaces the Bottleneck layer in the YOLOv8 model based on the UIB module to obtain an initial defect detection model, and then trains the initial defect detection model to obtain a target defect detection model.
[0088] Specifically, the control device replaces the Bottleneck layer in the YOLOv8 model based on the UIB module. After obtaining the initial defect detection model, the historical substation equipment image can be obtained, and the corresponding sample set can be obtained based on the historical substation equipment image. The sample set includes an initial training set and a test set, and the initial training set is input into the initial defect detection model for training to obtain a target defect detection model. The target defect detection model is constructed based on the UIB module and the YOLOv8 model, which is beneficial to improving the detection accuracy and efficiency of defect detection of substation equipment according to the target defect detection model.
[0089] Among them, the control device can annotate the historical substation equipment images to obtain corresponding annotated images, and divide the annotated images according to preset division rules to obtain initial training sets and test sets corresponding to the annotated images.
[0090] When the control device annotates the historical substation equipment image, it mainly annotates the substation equipment defect type, substation equipment defect location, and substation equipment defect size in the historical substation equipment image. For example, the control device can annotate the substation equipment defect type in the historical substation equipment image with an annotation box, annotate the corner point coordinates of the annotation box, and annotate the size of the annotation box.
[0091] The preset division rule may be an artificial rule, for example, the preset division rule may be an artificial rule of initial training set: test set = 8:5, when the sample set contains 13,000 annotated images, the initial training set is 8,000, and the test set is 5,000; the preset division rule may also be an artificial rule of initial training set: test set = 1:1, when the sample set contains 20,000 annotated images, the initial training set is 10,000, and the test set is 10,000. The type of preset division rule is not limited here, and it can be set according to actual needs.
[0092] Step 230: Acquire an image of the substation equipment to be inspected.
[0093] Step 240: Input the substation equipment image to be inspected into the target defect detection model to obtain the inspection result.
[0094] In this embodiment, step 230 and step 240 may refer to the contents of the corresponding steps in the aforementioned embodiment, which will not be described in detail here.
[0095] The solution provided in this embodiment replaces the bottleneck layer in the YOLOv8 model based on the universal inverted bottleneck module to obtain an initial defect detection model, and trains the initial defect detection model to obtain a target defect detection model, obtains the image of the substation equipment to be detected, and inputs the image of the substation equipment to be detected into the target defect detection model to obtain the detection result, realizes the construction of the target defect detection model based on the UIB module and the YOLOv8 model, and performs defect detection on the substation equipment according to the target defect detection model, thereby improving the detection accuracy and efficiency of defect detection on the substation equipment.
[0096] See also Figure 7 , which shows a flow chart of a method for detecting defects in substation equipment provided by another embodiment of the present application. In a specific embodiment, the method for detecting defects in substation equipment can be applied to Figure 1 The control device 300 in the substation equipment defect detection system shown in FIG. Figure 7 The process shown is described in detail, and the substation equipment defect detection method may include the following steps 310 to 370.
[0097] Step 310: Replace the bottleneck layer in the YOLOv8 model based on the general inverted bottleneck module to obtain an initial defect detection model.
[0098] Step 320: Acquire historical substation equipment images.
[0099] Step 330: Obtain a corresponding sample set based on historical substation equipment images.
[0100] In this embodiment, step 310, step 320 and step 330 may refer to the contents of the corresponding steps in the aforementioned embodiment, which will not be described in detail here.
[0101] Step 340: Perform data enhancement processing on the initial training set to obtain an enhanced training set.
[0102] In this embodiment, after the control device obtains the corresponding sample set based on the historical substation equipment images, it can perform data enhancement processing on the initial training set to obtain an enhanced training set, thereby avoiding the situation where the initial training set is small due to the small number of historical substation equipment images containing substation equipment defect information.
[0103] Among them, data enhancement processing may include at least any one of brightness enhancement processing, grayscale enhancement processing, contrast enhancement processing, and transparency enhancement processing. The type of data enhancement processing is not limited here and can be set according to actual needs.
[0104] Step 350: Input the enhanced training set to the initial defect detection model for training to obtain a target defect detection model.
[0105] In this embodiment, the control device performs data enhancement processing on the initial training set. After obtaining the enhanced training set, the enhanced training set can be input into the initial defect detection model. The initial defect detection model receives and responds to the enhanced training set, and is trained according to the enhanced training set to obtain the corresponding target defect detection model. The initial defect detection model is trained according to the enhanced training set, thereby avoiding the situation where the robustness of the target defect detection model obtained by training the initial defect detection model with a small initial training set is low due to the small number of historical substation equipment images containing substation equipment defect information, thereby increasing the robustness of the target defect detection model.
[0106] Step 360: Acquire the image of the substation equipment to be inspected.
[0107] Step 370: Input the substation equipment image to be inspected into the target defect detection model to obtain the inspection result.
[0108] In this embodiment, step 360 and step 370 may refer to the contents of the corresponding steps in the aforementioned embodiment, which will not be described in detail here.
[0109] The solution provided in this embodiment replaces the bottleneck layer in the YOLOv8 model based on the general inverted bottleneck module to obtain an initial defect detection model, obtains historical substation equipment images, and obtains corresponding sample sets based on the historical substation equipment images, and performs data enhancement processing on the initial training set to obtain an enhanced training set, and inputs the enhanced training set to the initial defect detection model for training to obtain a target defect detection model, and obtains substation equipment images to be detected, and inputs the substation equipment images to be detected to the target defect detection model to obtain detection results, thereby realizing the training of the initial defect detection model according to the enhanced training set, avoiding the low robustness of the target defect detection model obtained by training the initial defect detection model with a small number of initial training sets due to the small number of historical substation equipment images containing substation equipment defect information, and increasing the robustness of the target defect detection model.
[0110] See also Figure 8 , which shows a flow chart of a method for detecting defects in substation equipment provided by another embodiment of the present application. In a specific embodiment, the method for detecting defects in substation equipment can be applied to Figure 1 The control device 300 in the substation equipment defect detection system shown in FIG. Figure 8 The process shown is described in detail, and the substation equipment defect detection method may include the following steps 410 to 470.
[0111] Step 410: Replace the bottleneck module in the YOLOv8 model based on the general inverted bottleneck module to obtain an initial defect detection model.
[0112] Step 420: Acquire historical substation equipment images.
[0113] Step 430: Obtain a corresponding sample set based on historical substation equipment images.
[0114] Step 440: Input the initial training set to the initial defect detection model for training to obtain a target defect detection model.
[0115] In this embodiment, step 410, step 420, step 430 and step 440 may refer to the contents of the corresponding steps in the aforementioned embodiments, which will not be described in detail here.
[0116] Step 450: Determine whether the target defect detection model converges according to the test set.
[0117] In this embodiment, the control device inputs the initial training set into the initial defect detection model for training. After the target defect detection model is obtained, it can be determined whether the target defect detection model converges according to the test set.
[0118] Specifically, the control device inputs an initial training set to the initial defect detection model for training. After obtaining the target defect detection model, the test set can be input to the target defect detection model. The target defect detection model receives and responds to the test set, performs testing according to the test set, obtains corresponding test results, and determines the test accuracy corresponding to the test results based on the test results and the test set, and determines whether the target defect detection model converges based on the test accuracy.
[0119] When the test accuracy is greater than or equal to the preset accuracy threshold, it is determined that the target defect detection model has converged; when the test accuracy is less than the preset accuracy threshold, it is determined that the target defect detection model has not converged.
[0120] Among them, the preset accuracy threshold can be used to characterize the minimum accuracy corresponding to the convergence of the target defect detection model. The preset accuracy threshold can be an accuracy pre-set by the user, or it can be an accuracy automatically generated by the control device according to the detection process of multiple defect detections on substation equipment. The setting method of the preset accuracy threshold is not limited here, and it can be set according to actual needs.
[0121] Step 460: When it is determined according to the test set that the target defect detection model converges, an image of the substation equipment to be detected is obtained.
[0122] In this embodiment, when the control device determines that the target defect detection model has converged according to the test set, the image of the substation equipment to be detected can be obtained, so that when the target defect detection model is determined to have converged, defect detection of the substation equipment is performed based on the target defect detection model. Since the target defect detection model has high stability, it is beneficial to improve the detection credibility of defect detection of substation equipment according to the target defect detection model.
[0123] Step 470: Input the substation equipment image to be inspected into the target defect detection model to obtain the inspection result.
[0124] In this embodiment, step 470 may refer to the contents of the corresponding steps in the aforementioned embodiments, which will not be described in detail here.
[0125] The solution provided in this embodiment replaces the bottleneck module in the YOLOv8 model based on the general inverted bottleneck module to obtain an initial defect detection model, obtain historical substation equipment images, and obtain corresponding sample sets based on the historical substation equipment images, and input the initial training set into the initial defect detection model for training to obtain a target defect detection model, and determine whether the target defect detection model converges based on the test set, and when it is determined that the target defect detection model converges based on the test set, obtain the image of the substation equipment to be detected, and input the image of the substation equipment to be detected into the target defect detection model to obtain the detection result, so that when it is determined that the target defect detection model converges, defect detection of the substation equipment is performed based on the target defect detection model, and since the target defect detection model has high stability, it is beneficial to improve the detection credibility of defect detection of the substation equipment based on the target defect detection model.
[0126] See also Fig. 9 , which shows a flow chart of a method for detecting defects in substation equipment provided by another embodiment of the present application. In a specific embodiment, the method for detecting defects in substation equipment can be applied to Figure 1 The control device 300 in the substation equipment defect detection system shown in FIG. Fig. 9 The process shown is described in detail, and the substation equipment defect detection method may include the following steps 510 to 530.
[0127] Step 510: Acquire an image of the substation equipment to be inspected.
[0128] In this embodiment, step 510 may refer to the contents of the corresponding steps in the aforementioned embodiments, which will not be described in detail here.
[0129] Step 520: Perform sliding slicing processing on the substation equipment image to be inspected to obtain multiple slice images.
[0130] In this embodiment, after the control device acquires the image of the substation equipment to be detected, the image of the substation equipment to be detected can be processed by sliding slicing to obtain multiple sliced images.
[0131] Among them, any two adjacent sliced images in the multiple sliced images partially overlap. Using sliding slicing preserves the partial information repetition of any two adjacent sliced images, which can avoid small target defects being cut at the edge and resulting in non-detection, and is beneficial to improving the detection rate of small target defects in substation equipment.
[0132] In an application scenario, the size of the image of the substation equipment to be detected is H pixels * W pixels, and the slicing window for sliding slicing processing is h pixels * w pixels, that is, the image of the substation equipment to be detected is processed by sliding slicing with a slicing window of h pixels * w pixels to obtain multiple sliced images.
[0133] The sliding step of the slicing window is set to s, where s < h and s < w, which can ensure that any two adjacent sliced images in the multiple sliced images partially overlap.
[0134] In the W-pixel direction of the image of the substation equipment to be detected, the number of sliced images obtained by sliding slicing processing is m, where is the ceiling symbol.
[0135] In the H-pixel direction of the image of the substation equipment to be detected, the number of sliced images obtained by sliding slicing processing is n,
[0136] Finally, the number of multiple sliced images after the image of the substation equipment to be detected is processed by sliding slicing is m * n.
[0137] Step 530: Input the multiple sliced images and the image of the substation equipment to be detected into the target defect detection model to obtain the detection result.
[0138] In this embodiment, the control device performs sliding slicing processing on the substation equipment image to be detected, and after obtaining multiple slice images, the multiple slice images and the substation equipment image to be detected can be input into the target defect detection model, the target defect detection model receives and responds to the multiple slice images and the substation equipment image to be detected, performs defect detection on the substation equipment according to the multiple slice images and the substation equipment image to be detected, obtains the detection result, and performs defect detection on the substation equipment according to the multiple slice images obtained by sliding slicing the substation equipment image to be detected, which can avoid the loss of small target substation equipment defect information caused by cropping the substation equipment image to be detected in the process of defect detection of the substation equipment according to the substation equipment image to be detected, thereby improving the detection rate of small target defects of the substation equipment. And the multiple slice images and the substation equipment image to be detected are input into the target defect detection model together, and the detected small target defects can be mapped back to the substation equipment image to be detected, which is convenient for the inspection personnel to quickly locate the position of the small target defects.
[0139] The solution provided in this embodiment obtains the image of the substation equipment to be detected, performs sliding slicing processing on the image of the substation equipment to be detected, obtains multiple slice images, and inputs the multiple slice images and the image of the substation equipment to be detected into the target defect detection model to obtain the detection result, thereby realizing defect detection of the substation equipment according to the multiple slice images obtained by sliding slicing the image of the substation equipment to be detected, which can avoid the loss of small target substation equipment defect information caused by cropping the image of the substation equipment to be detected in the process of defect detection of the substation equipment according to the image of the substation equipment to be detected, thereby improving the detection rate of small target defects of the substation equipment. And by inputting the multiple slice images and the image of the substation equipment to be detected into the target defect detection model together, the detected small target defects can be mapped back to the image of the substation equipment to be detected, which is convenient for the inspection personnel to quickly locate the position of the small target defects.
[0140] See also Fig.10 , which shows a substation equipment defect detection device 600 provided by an embodiment of the present application. The substation equipment defect detection device 600 can be applied to Figure 1 The control device 300 in the substation equipment defect detection system shown in FIG. Fig.10 The substation equipment defect detection device 600 shown is described in detail. The substation equipment defect detection device 600 may include an acquisition module 610 and an input module 620.
[0141] The acquisition module 610 can be used to acquire the image of the substation equipment to be detected; the input module 620 can be used to input the image of the substation equipment to be detected into the target defect detection model to obtain the detection result. The target defect detection model can be obtained by replacing the bottleneck layer in the YOLOv8 model based on the general inverted bottleneck module. The detection result may include a first detection result used to characterize that the image of the substation equipment to be detected does not contain the defect information of the substation equipment, and a second detection result used to characterize that the image of the substation equipment to be detected contains the defect information of the substation equipment.
[0142] In some implementations, the substation equipment defect detection device 600 may further include a replacement module and a training module.
[0143] The replacement module can be used to replace the bottleneck layer in the YOLOv8 model based on the general inverted bottleneck module before the acquisition module 610 acquires the image of the substation equipment to be detected, so as to obtain an initial defect detection model; the training module can be used to train the initial defect detection model to obtain a target defect detection model.
[0144] In some embodiments, the replacement module may include a fusion unit and a deletion unit.
[0145] The fusion unit can be used to fuse the C2f module and the general inverted bottleneck module of the YOLOv8 model to obtain a fusion model; the deletion unit can be used to delete the bottleneck layer of the C2f module in the fusion model to obtain an initial defect detection model.
[0146] In some implementations, the training module may include a first acquisition unit, a second acquisition unit, and a first input unit.
[0147] The first acquisition unit can be used to acquire historical substation equipment images; the second acquisition unit can be used to acquire a corresponding sample set based on the historical substation equipment images, and the sample set can include at least an initial training set; the first input unit can be used to input the initial training set into the initial defect detection model for training to obtain a target defect detection model.
[0148] In some implementations, the substation equipment defect detection device 600 may further include a first processing module.
[0149] The first processing module can be used for the first input unit to input the initial training set to the initial defect detection model for training, and before obtaining the target defect detection model, perform data enhancement processing on the initial training set to obtain an enhanced training set.
[0150] In some embodiments, the first input unit may include an input sub-unit.
[0151] The input subunit can be used to input the enhanced training set into the initial defect detection model for training to obtain the target defect detection model.
[0152] In some implementations, the sample set may further include a test set, and the substation equipment defect detection apparatus 600 may further include a determination module.
[0153] The determination module may be used to determine whether the target defect detection model converges according to the test set before the acquisition module 610 acquires the image of the substation equipment to be detected.
[0154] In some implementations, the acquisition module 610 may include a third acquisition unit.
[0155] The third acquisition unit may be configured to acquire the image of the substation equipment to be detected when it is determined according to the test set that the target defect detection model converges.
[0156] In some implementations, the substation equipment defect detection device 600 may further include a second processing module.
[0157] The second processing module can be used for the input module 620 to input the substation equipment image to be inspected into the target defect detection model, and before obtaining the detection result, the substation equipment image to be inspected is subjected to sliding slicing processing to obtain multiple slice images.
[0158] In some embodiments, the input module 620 may include a second input unit.
[0159] The second input unit can be used to input multiple slice images and images of substation equipment to be detected into the target defect detection model to obtain detection results.
[0160] The solution provided in this embodiment obtains the image of the substation equipment to be detected and inputs the image of the substation equipment to be detected into the target defect detection model to obtain the detection result. The target defect detection model is obtained by replacing the bottleneck layer in the YOLOv8 model based on the universal inverted bottleneck module. The detection result includes a first detection result used to characterize that the image of the substation equipment to be detected does not contain the defect information of the substation equipment, and a second detection result used to characterize that the image of the substation equipment to be detected contains the defect information of the substation equipment. The target defect detection model constructed based on the universal inverted bottleneck module and the YOLOv8 model is used to perform defect detection on the substation equipment, thereby improving the detection accuracy and efficiency of defect detection on the substation equipment.
[0161] Furthermore, the bottleneck layer in the YOLOv8 model is replaced based on the universal inverted bottleneck module to obtain the target defect detection model. Since the universal inverted bottleneck module adopts depthwise separable convolution and the bottleneck layer adopts two layers of ordinary convolution, when the number of input and output channels of the universal inverted bottleneck module and the bottleneck layer is the same, the parameter amount of the depthwise separable convolution is smaller than the parameter amount of the ordinary convolution. Therefore, the parameter amount of the target defect detection model is reduced, which is beneficial to reducing the computational complexity of the target detection model.
[0162] 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.
[0163] 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.
[0164] See also Fig.11 , 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.
[0165] 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 an image of a substation device to be detected, inputting an image of a substation device to be detected, obtaining a detection result, replacing a bottleneck layer, obtaining an initial defect detection model, training an initial defect detection model, obtaining a target defect detection model, fusing a C2f module and a general inverted bottleneck module, obtaining a fusion model, deleting a bottleneck layer, obtaining a historical substation device image, obtaining a sample set, inputting an initial training set, data enhancement processing, obtaining an enhanced training set, inputting an enhanced training set, determining whether the target defect detection model converges, determining whether the target defect detection model converges, sliding slice processing, obtaining multiple slice images, and inputting multiple slice images and substation device images to be detected, 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 substation equipment images to be detected, target defect detection models, detection results, general inverted bottleneck modules, YOLOv8 models, bottleneck layers, substation equipment defect information, first detection results, second detection results, initial defect detection models, C2f modules, fusion models, historical substation equipment images, sample sets, initial training sets, enhanced training sets, test sets, and multiple slice images), etc.
[0166] 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.
[0167] Please refer to Fig.12 , 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.
[0168] 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.
[0169] Please refer to Fig.13, 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.
[0170] The solution provided in this embodiment obtains the image of the substation equipment to be detected and inputs the image of the substation equipment to be detected into the target defect detection model to obtain the detection result. The target defect detection model is obtained by replacing the bottleneck layer in the YOLOv8 model based on the universal inverted bottleneck module. The detection result includes a first detection result used to characterize that the image of the substation equipment to be detected does not contain the defect information of the substation equipment, and a second detection result used to characterize that the image of the substation equipment to be detected contains the defect information of the substation equipment. The target defect detection model constructed based on the universal inverted bottleneck module and the YOLOv8 model is used to perform defect detection on the substation equipment, thereby improving the detection accuracy and efficiency of defect detection on the substation equipment.
[0171] Furthermore, the bottleneck layer in the YOLOv8 model is replaced based on the universal inverted bottleneck module to obtain the target defect detection model. Since the universal inverted bottleneck module adopts depthwise separable convolution and the bottleneck layer adopts two layers of ordinary convolution, when the number of input and output channels of the universal inverted bottleneck module and the bottleneck layer is the same, the parameter amount of the depthwise separable convolution is smaller than the parameter amount of the ordinary convolution. Therefore, the parameter amount of the target defect detection model is reduced, which is beneficial to reducing the computational complexity of the target detection model.
[0172] 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 method for detecting defects in substation equipment, characterized in that: include: Acquire images of substation equipment to be inspected; The substation equipment image to be inspected is input into the target defect detection model to obtain a detection result. The target defect detection model is obtained by replacing the bottleneck layer in the YOLOv8 model based on the general inverted bottleneck module. The detection result includes a first detection result used to characterize that the substation equipment image to be inspected does not contain the substation equipment defect information, and a second detection result used to characterize that the substation equipment image to be inspected contains the substation equipment defect information.
2. The method for detecting defects in substation equipment according to claim 1, characterized in that: Before acquiring the image of the substation equipment to be detected, the substation equipment defect detection method further includes: Replacing the bottleneck layer in the YOLOv8 model based on the universal inverted bottleneck module to obtain an initial defect detection model; The initial defect detection model is trained to obtain the target defect detection model.
3. The method for detecting defects in substation equipment according to claim 2, characterized in that: The step of replacing the bottleneck layer in the YOLOv8 model based on the universal inverted bottleneck module to obtain an initial defect detection model includes: Fusing the C2f module of the YOLOv8 model and the universal inverted bottleneck module to obtain a fusion model; The bottleneck layer of the C2f module in the fusion model is deleted to obtain the initial defect detection model.
4. The method for detecting defects in substation equipment according to claim 2, characterized in that: The training of the initial defect detection model to obtain the target defect detection model includes: Obtain historical substation equipment images; According to the historical substation equipment image, a corresponding sample set is obtained, wherein the sample set at least includes an initial training set; The initial training set is input into the initial defect detection model for training to obtain the target defect detection model.
5. The method for detecting defects in substation equipment according to claim 4, characterized in that: Before inputting the initial training set into the initial defect detection model for training to obtain the target defect detection model, the substation equipment defect detection method further includes: Performing data enhancement processing on the initial training set to obtain an enhanced training set; The inputting the initial training set into the initial defect detection model for training to obtain the target defect detection model includes: The enhanced training set is input into the initial defect detection model for training to obtain the target defect detection model.
6. The method for detecting defects in substation equipment according to claim 4, characterized in that: The sample set also includes a test set. Before acquiring the image of the substation equipment to be detected, the substation equipment defect detection method further includes: Determining whether the target defect detection model converges according to the test set; The step of obtaining the image of the substation equipment to be detected includes: When it is determined according to the test set that the target defect detection model converges, the image of the substation equipment to be detected is acquired.
7. The method for detecting defects in substation equipment according to any one of claims 1 to 6, characterized in that: Before inputting the substation equipment image to be detected into the target defect detection model to obtain the detection result, the substation equipment defect detection method further includes: Performing sliding slicing processing on the substation equipment image to be inspected to obtain a plurality of slice images; The step of inputting the substation equipment image to be detected into the target defect detection model to obtain the detection result includes: The multiple slice images and the substation equipment image to be inspected are input into the target defect detection model to obtain the inspection result.
8. A substation equipment defect detection device, characterized in that: include: An acquisition module, used to acquire images of substation equipment to be detected; An input module is used to input the substation equipment image to be detected into a target defect detection model to obtain a detection result. The target defect detection model is obtained by replacing the bottleneck layer in the YOLOv8 model based on a general inverted bottleneck module. The detection result includes a first detection result used to characterize that the substation equipment image to be detected does not contain the substation equipment defect information, and a second detection result used to characterize that the substation equipment image to be detected contains the substation equipment defect information.
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 are configured to be executed by one or more processors, and the one or more applications are configured to execute the substation equipment defect detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, and the program codes can be called by a processor to execute the substation equipment defect detection method according to any one of claims 1 to 7.
Citation Information
Cited By
Concrete defect detection method and device, electronic equipment and storage medium
CN120431029A