Power line insulator defect identification method, device and equipment based on Mobive-yolo deep learning algorithm, medium and product
By introducing mobilevit module and attention module in the yolov4-tiny network model and using the EIOU loss function, the problem of complex background and insignificant defect characteristics in insulator defect detection is solved, and the accurate identification and precise positioning of insulator defects is achieved.
Patent Information
- Application Number
- CN202411288455.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-20
AI Technical Summary
During the inspection of transmission line, insulator defect detection has problems such as complex background, small defect target size, and insignificant defect characteristics. The existing deep learning algorithm cannot accurately identify the location of the insulator defect.
Using the method based on Mobilevit-yolo deep learning algorithm, the mobilevit module and attention module are introduced into the yolov4-tiny network model and the EIOU loss function is used to train the Mobilevit-yolo network model to enhance network feature extraction capabilities and target positioning. Accuracy.
Accurate identification of insulator defects is achieved, the problems of complex background and inconspicuous defect characteristics are solved, and detection accuracy and efficiency are improved.
Smart Images

Figure CN119169433A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power transmission line inspection, and in particular to a method, device, equipment, medium and product for defect identification of power line insulators based on the Mobilevit-yolo deep learning algorithm. Background Art
[0002] In the process of power transmission line inspection, it is increasingly important to simplify the inspection process and improve the inspection efficiency. As an important device for supporting cables and electrical isolation, insulator beads are subject to long-term environmental erosion, and most insulators will inevitably have defects such as self-explosion and damage. This will seriously affect the stable operation of the transmission line and even cause huge economic losses.
[0003] In order to ensure the safe and stable operation of power production, the inspection of transmission line insulator beads is becoming more and more important. In the task of insulator defect detection, deep learning algorithm detection is gradually replacing the traditional recognition method. However, insulator defect detection has problems such as complex background, small defect target size, and unclear defect features. The existing deep learning algorithm cannot accurately identify the location of the insulator defect. Summary of the invention
[0004] The purpose of this application is to provide a defect identification method, device, equipment, medium and product for power line insulators based on the Mobilevit-yolo deep learning algorithm, which can solve the problems of complex background, small defect target size and unclear defect characteristics in insulator defect detection, and accurately identify the location of insulator defects.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides a defect identification method for power line insulators based on the Mobilevit-yolo deep learning algorithm, the defect identification method comprising:
[0007] Constructing a Mobilevit-yolo network model; the Mobilevit-yolo network model is obtained by introducing a mobilevit module into a backbone feature extraction network of a yolov4-tiny network model, and introducing an attention module into a feature fusion network of a yolov4-tiny network model;
[0008] Constructing a power line insulator defect recognition sample set; the samples in the power line insulator defect recognition sample set are power line insulator images with defect identifications;
[0009] Based on the power line insulator defect recognition sample set, the EIOU loss function is used to train the Mobilevit-yolo network model to obtain the trained Mobilevit-yolo network model;
[0010] The trained Mobilevit-yolo network model is used to identify defects in power line insulators.
[0011] Optionally, the mobilevit module is introduced into the backbone feature extraction network of the yolov4-tiny network model as follows:
[0012] Replace the last CBL module of the backbone network of the yolov4-tiny network model with the mobilevit module.
[0013] Optionally, the mobilevit module includes: a first n×n convolution, a first 1×1 convolution, an Unfold module, a Transformer module, a Fold module, a second 1×1 convolution, and a second n×n convolution;
[0014] The first n×n convolution is used to learn local spatial information of the first input feature map; the first input feature map is an input feature map of the mobilevit module;
[0015] The first 1×1 convolution is used to project the tensor of local spatial information into a d-dimensional space to obtain a d-dimensional spatial feature map;
[0016] The Unfold module is used to expand the d-dimensional spatial feature map into N pixel blocks;
[0017] The Transformer module is used to encode each pixel p in each pixel block to obtain an encoded feature map of each pixel block;
[0018] The Fold module is used to fold the coding feature map of each pixel block to obtain a folded coding feature map;
[0019] The second 1×1 convolution is used to project the folded encoding feature map into a C-dimensional space to obtain a C-dimensional space encoding feature map;
[0020] The second n×n convolution fuses the C-dimensional spatial encoding feature map with the first input feature map.
[0021] Optionally, the way to introduce the attention module into the feature fusion network of the yolov4-tiny network model is:
[0022] Introduce the first attention module at one input of the feature fusion network;
[0023] Introduce a second attention module at the other input end of the feature fusion network;
[0024] A third attention module is introduced at the input of the CBL+UpSample module of the feature fusion network.
[0025] Optionally, the first attention module, the second attention module and the third attention module all include: a horizontal pooling layer, a vertical pooling layer, a splicing module, a horizontal convolution, a vertical convolution, a horizontal Sigmoid activation function and a vertical Sigmoid activation function;
[0026] The horizontal pooling layer and the vertical pooling layer are used to perform pooling operations on the second input feature map in the horizontal direction and the vertical direction, respectively, to obtain the pooled horizontal feature map and the vertical feature map; the second input feature map is the input feature map of the first attention module, the second attention module or the third attention module;
[0027] The splicing module is used to splice the pooled horizontal feature map and the vertical feature map to obtain a spliced feature map;
[0028] The horizontal convolution and the vertical convolution are used to perform a horizontal convolution operation and a vertical convolution operation on the spliced feature map, respectively, to obtain a horizontal feature map after convolution and a vertical feature map after convolution;
[0029] The horizontal Sigmoid activation function is used to activate the horizontal feature map after convolution to obtain the attention weight in the horizontal direction;
[0030] The vertical Sigmoid activation function is used to activate the vertical feature map after convolution to obtain the attention weight in the vertical direction;
[0031] The horizontal attention weight and the vertical attention weight are applied to the second input feature map to obtain the output feature map of the first attention module, the second attention module or the third attention module.
[0032] Optionally, the EIOU loss function is:
[0033]
[0034] Among them, L EIOU is the EIOU loss function, IOU is the intersection-over-union ratio between the predicted box and the real box, b is the center point of the predicted box, ω and h are the width and height of the predicted box respectively, b gt is the center point of the real frame, ω gt and h gtare the width and height of the real box, c is the diagonal length of the minimum circumscribed rectangular box between the predicted box and the real box, c ω and c h are the width and height of the minimum bounding rectangle of the predicted box and the real box, respectively, 2 (·,·) is the Euclidean distance calculation function.
[0035] In a second aspect, the present application provides a defect identification device for power line insulators based on the Mobilevit-yolo deep learning algorithm, the defect identification device comprising:
[0036] A model building module, used for building a Mobilevit-yolo network model; the Mobilevit-yolo network model is obtained by introducing a mobilevit module into a backbone feature extraction network of a yolov4-tiny network model, and introducing an attention module into a feature fusion network of the yolov4-tiny network model;
[0037] A sample set construction module is used to construct a power line insulator defect recognition sample set; the samples in the power line insulator defect recognition sample set are power line insulator images with defect identifications;
[0038] A training module is used to train the Mobilevit-yolo network model based on a sample set of power line insulator defect recognition and adopt an EIOU loss function to obtain a trained Mobilevit-yolo network model;
[0039] The defect recognition module is used to identify defects of power line insulators using the trained Mobilevit-yolo network model.
[0040] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned defect identification method.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned defect identification method when executed by a processor.
[0042] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the above-mentioned defect identification method when executed by a processor.
[0043] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0044] The present application provides a method, device, equipment, medium and product for defect identification of power line insulators based on the Mobilevit-yolo deep learning algorithm. The mobilevit module is introduced into the backbone feature extraction network part of the yolov4-tiny network model, and the mobilevit module is used to effectively combine the advantages of the inductive bias of convolution and the global receptive field capability of Transformer to enhance the network feature extraction capability; the attention module (Coordinate Attention, CA) is added to the feature fusion network of the yolov4-tiny network model, so that the network can more accurately locate the target of interest, and the EIOU loss function is used instead of the CIOU loss function of the yolov4-tiny network, which accelerates the convergence speed and improves the regression accuracy. The present application can solve the problems of complex background, small defect target size and unclear defect features in insulator defect detection, and accurately identify the location of the insulator defect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments 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 creative work.
[0046] Figure 1 This is an application environment diagram of a method for identifying defects in power line insulators based on the Mobilevit-yolo deep learning algorithm in one embodiment of the present application;
[0047] Figure 2 A schematic flow chart of a method for defect identification of power line insulators based on the Mobilevit-yolo deep learning algorithm provided in one embodiment of the present application;
[0048] Figure 3 A schematic diagram of the structure of a mobilevit module provided in an embodiment of the present application;
[0049] Figure 4 A schematic diagram of the structure of an attention module provided in one embodiment of the present application;
[0050] Figure 5 A schematic diagram of the structure of the Mobilevit-yolo network model provided in one embodiment of the present application;
[0051] Figure 6 A schematic diagram of the test results of insulator defects photographed by a drone in different network models provided in an embodiment of the present application;
[0052] Figure 7 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0055] The defect identification method of power line insulator based on Mobilevit-yolo deep learning algorithm provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, or it can be integrated on the server 104, or it can be placed on the cloud or other servers. The terminal 102 can send the image of the power line insulator to the server 104. After the server 104 receives the image of the power line insulator, the server 104 uses the trained Mobilevit-yolo network model to identify the defects of the power line insulator for the power line insulator image. The server 104 can feedback the obtained recognition results to the terminal 102. In addition, in some embodiments, the method for identifying the defects of the power line insulator using the trained Mobilevit-yolo network model can also be implemented separately by the server 104 or the terminal 102, such as the terminal 102 can directly process the image of the power line insulator, or the server 104 can obtain the image of the power line insulator from the data storage system, and identify the defects of the power line insulator for the power line insulator image.
[0056] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.
[0057] In an exemplary embodiment, Figure 2As shown, a method for defect identification of power line insulators based on the Mobilevit-yolo deep learning algorithm is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps 201 to 204. Among them:
[0058] Step 201, constructing a Mobilevit-yolo network model; the Mobilevit-yolo network model is obtained by introducing a mobilevit module into a backbone feature extraction network of a yolov4-tiny network model, and introducing an attention module into a feature fusion network of a yolov4-tiny network model.
[0059] Step 202, constructing a power line insulator defect recognition sample set; the samples in the power line insulator defect recognition sample set are power line insulator images with defect identifications.
[0060] Step 203: Based on the power line insulator defect recognition sample set, the Mobilevit-yolo network model is trained using the EIOU loss function to obtain a trained Mobilevit-yolo network model.
[0061] Step 204, using the trained Mobilevit-yolo network model to identify defects in power line insulators.
[0062] The implementation of the above steps 201 to 204 can solve the problems of complex background, small defect target size and unclear defect characteristics in insulator defect detection, and accurately identify the location of the insulator defect.
[0063] In another exemplary embodiment of the present application, the improvement method of the yolov4-tiny network model involved in the above step 101 specifically includes:
[0064] First, replace the last CBL (Conv-BN-LeakyRelu) module of the backbone network of the yolov4-tiny network model with the mobilevit module to enhance the feature extraction capability of the backbone network. The mobilevit module includes: the first n×n convolution, the first 1×1 convolution, the Unfold module, the Transformer module, the Fold module, the second 1×1 convolution, and the second n×n convolution, where n is the convolution kernel size, and its value is related to the size of the input image. The specific operations of the mobilevit module are as follows:
[0065] For a given input (i.e. the first input feature map) (H and W represent the height and width of the feature map, and C represents the number of channels). Mobilevit first uses the first n×n convolution to learn the local spatial information, and then uses the first 1×1 convolution to project the tensor into the d-dimensional space to obtain the d-dimensional spatial feature map. Where d>C. Then X L Expand into N pixel blocks, and get Where P = w × h, w and h represent the width and height of the pixel block, and N is the number of pixel blocks. Use the Transformer module to encode each pixel p in the pixel block P to obtain the encoded feature map As shown in formula (1):
[0066] X G (p) = Transformer(X Unfold (p)),1≤p≤P(1)
[0067] In order to avoid losing the order between pixel blocks, Fold to get the folded encoding feature map Then use the second 1×1 convolution to convert X Fold After being projected into the C-dimensional space and concatenated with the input X, we get Finally, the second n×n convolution is used to fuse the local features and the global features to obtain the output. The structure of the mobilevit module is as follows: Figure 3 shown.
[0068] Then, the attention module (CoordinateAttention, CA) is introduced into the feature fusion network to increase the network's attention to the location information of the defect. Traditional channel attention uses the global average pooling method to encode empty information, but it is difficult to retain the location information after the global average pooling compresses the information. The CA attention mechanism adds location information to the channel attention mechanism, so that the network model can not only capture channel information, but also capture location information, which will help the network to more accurately locate the target of interest. The introduction of the attention mechanism is equivalent to the feature selection mechanism introduced in traditional machine learning, which simplifies the model structure and improves the generalization ability of the network, thereby improving the test accuracy. The attention module includes: horizontal pooling layer, vertical pooling layer, splicing module, horizontal convolution, vertical convolution, horizontal Sigmoid activation function and vertical Sigmoid activation function. The specific operations of the attention module are as follows:
[0069] The input feature map is pooled in the horizontal direction X and the vertical direction Y, and then the pooled feature map is spliced and convolved. Finally, the feature map is activated by the Sigmoid function to generate the attention weights in the horizontal and vertical directions to get the output. Its structure is as follows Figure 4 shown.
[0070] The above structure of the yolov4-tiny network model is improved, and the structure of the Mobilevit-yolo network model is obtained as follows Figure 5 shown.
[0071] In another exemplary embodiment of the present application, the improvement of the loss function in the model training process involved in the above step 103 specifically includes:
[0072] In order to improve the network convergence speed, the EIOU loss function is used instead of the original loss function CIOU. The yolov4-tiny network uses the CIOU loss function. CIOU takes into account the overlapping area, center point distance and aspect ratio of the predicted box and the true box. The specific definition is as shown in Equation (2)-Equation (4).
[0073]
[0074] In the formula, ρ 2 (b,b gt ) represents the Euclidean distance between the center point of the predicted box and the real box, c represents the diagonal length of the smallest circumscribed rectangular box between the predicted box and the real box, v represents the parameter for measuring the consistency of the aspect ratio, ω and h are the width and height of the predicted box, ω gt 、h gt is the width and height of the real box, and α is used to weigh the parameters. However, this aspect ratio calculation method is a relative value, which can only represent the fuzzy difference between the real box and the predicted box, but cannot represent their actual error. Based on this, this application uses the EIOU loss function to replace the CIOU loss function. The EIOU loss function formula is as shown in formula (5).
[0075]
[0076] In the formula, ρ 2 (ω,ω gt ) is the Euclidean distance between the predicted box and the real box width, ρ 2 (h,h gt ) is the Euclidean distance between the predicted box and the real box height, c ω 、c h It is the width and height of the minimum bounding rectangle of the predicted box and the true box. Since the EIOU loss function calculates the difference between the width and height instead of the aspect ratio, it further accelerates the convergence speed and improves the regression accuracy.
[0077] In another exemplary embodiment of the present application, the above steps 102 and 103 are the process of model training, which can be implemented by the following steps:
[0078] The obtained power line insulator dataset was expanded and trained under the above network structure built under the Pytorch framework. The specific experimental parameters were set as follows: the batch size was set to 64, the Adam optimization strategy was adopted, the learning rate was initialized to 0.001, and the network model was trained for a total of 100 epochs.
[0079] In another exemplary embodiment of the present application, the above step 104 is an application process, that is, an identification process, which can be implemented in the following manner:
[0080] 1. Input image preprocessing: First, scale the input image to the input size required by the model. The input image size of the above Mobilevit-yolo network model is 416×416, so scale the image to 416×416.
[0081] 2. Feature extraction. Figure 5 The Backbone network (backbone feature extraction network) in the image is used for image feature extraction. This network structure can extract common feature representations in images and provide key information for subsequent target recognition.
[0082] 3. Feature fusion and enhancement. After extracting features, use Figure 5 The feature fusion part in the network is used to further improve the diversity and robustness of features. This network structure can fuse feature maps of different scales and enhance the feature extraction capability of the network through top-down and bottom-up methods.
[0083] 4. Target detection and output. Figure 5 The DetectionHead network in is responsible for outputting the target detection results. This network structure can predict the location, size, and category of the target in the image. During the prediction process, the model generates a series of bounding boxes, each of which corresponds to a possible target and has a corresponding confidence score. Through post-processing steps such as non-maximum suppression (NMS), the model selects the most representative bounding box as the final detection result.
[0084] In order to verify the effectiveness and superiority of the improved model, the improved model is compared with the current mainstream detection models Faster-rcnn and yolov4-tiny. The experimental results are as follows Figure 7 shown.
[0085] The present application also provides an application scenario, which applies the above-mentioned defect recognition method for power line insulators based on the Mobilevit-yolo deep learning algorithm. Specifically: The defect recognition method for power line insulators based on the Mobilevit-yolo deep learning algorithm provided in this embodiment can be applied in the transmission line inspection scenario. The transmission line inspection scenario includes an image acquisition link and an image recognition link. The defect recognition method for power line insulators based on the Mobilevit-yolo deep learning algorithm provided in this embodiment belongs to the image recognition link.
[0086] The insulator missing defect and broken defect of this application are proposed to use an improved lightweight yolov4-tiny network model to detect the location of insulator defects. First, the mobilevit module is introduced in the backbone feature extraction network part. The mobilevit module effectively combines the advantages of the inductive bias of convolution and the global receptive field capability of Transformer, thereby enhancing the network feature extraction capability. Secondly, the attention module (CoordinateAttention, CA) is added to the feature fusion network part so that the network can more accurately locate the target of interest. Finally, the improved loss function is used to replace the loss function CIOU of the yolov4-tiny network, which accelerates the convergence speed and improves the regression accuracy. In order to verify the effectiveness of the algorithm of this application, the algorithm is compared with the current mainstream Faster-rcnn algorithm, SSD algorithm, yolov3 algorithm, and yolov4-tiny algorithm. Figure 6 As shown, a schematic diagram of the comparison results of the improved lightweight yolov4-tiny algorithm of the embodiment of the present application with the Faster-rcnn algorithm and the yolov4-tiny algorithm is shown. Figure 6 (a), (b), and (c) are schematic diagrams of the detection results of missing insulators by the Faster-rcnn algorithm, the yolov4-tiny algorithm, and the improved lightweight yolov4-tiny algorithm of the embodiment of the present application, respectively. Figure 6 (d), (e), and (f) are schematic diagrams of the detection results of damaged insulators by the Faster-rcnn algorithm, the yolov4-tiny algorithm, and the improved lightweight yolov4-tiny algorithm of the embodiment of the present application. The experimental results show that the algorithm proposed in the present application is superior to the above algorithms in terms of detection accuracy. At the same time, compared with the traditional yolov4-tiny algorithm, the mean average precision (mAP) value is increased by 1.64%, the average precision (AP) of insulator missing defects is increased by 0.32%, and the average precision AP of insulator damaged defects is increased by 4.96%.
[0087] Based on the same inventive concept, the embodiment of the present application also provides a device for implementing the above-mentioned defect identification of power line insulators based on the Mobilevit-yolo deep learning algorithm. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more defect identification devices for power line insulators based on the Mobilevit-yolo deep learning algorithm provided below can be found in the above limitations on the defect identification method for power line insulators based on the Mobilevit-yolo deep learning algorithm, which will not be repeated here.
[0088] In an exemplary embodiment, a defect identification device for a power line insulator based on the Mobilevit-yolo deep learning algorithm is provided, and the defect identification device comprises:
[0089] A model building module is used to build a Mobilevit-yolo network model; the Mobilevit-yolo network model is obtained by introducing a mobilevit module into a backbone feature extraction network of a yolov4-tiny network model, and introducing an attention module into a feature fusion network of the yolov4-tiny network model.
[0090] The sample set construction module is used to construct a power line insulator defect recognition sample set; the samples in the power line insulator defect recognition sample set are power line insulator images with defect identifications.
[0091] The training module is used to train the Mobilevit-yolo network model based on the power line insulator defect recognition sample set and adopt the EIOU loss function to obtain the trained Mobilevit-yolo network model.
[0092] The defect recognition module is used to identify defects of power line insulators using the trained Mobilevit-yolo network model.
[0093] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned defect identification method. In an exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store images of power line insulators. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a defect identification method for power line insulators based on the Mobilevit-yolo deep learning algorithm is implemented.
[0094] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0095] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0096] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0097] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0098] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0099] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0100] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0101] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A defect identification method for power line insulators based on Mobilevit-yolo deep learning algorithm, characterized in that: The defect identification method comprises: Constructing a Mobilevit-yolo network model; the Mobilevit-yolo network model is obtained by introducing a mobilevit module into a backbone feature extraction network of a yolov4-tiny network model, and introducing an attention module into a feature fusion network of a yolov4-tiny network model; Constructing a power line insulator defect recognition sample set; the samples in the power line insulator defect recognition sample set are power line insulator images with defect identifications; Based on the power line insulator defect recognition sample set, the EIOU loss function is used to train the Mobilevit-yolo network model to obtain the trained Mobilevit-yolo network model; The trained Mobilevit-yolo network model is used to identify defects in power line insulators.
2. The defect identification method of power line insulator based on Mobilevit-yolo deep learning algorithm according to claim 1 is characterized in that: The way to introduce the mobilevit module into the backbone feature extraction network of the yolov4-tiny network model is: Replace the last CBL module of the backbone network of the yolov4-tiny network model with the mobilevit module.
3. The defect identification method of power line insulator based on Mobilevit-yolo deep learning algorithm according to claim 1 or 2 is characterized in that: The mobilevit module includes: a first n×n convolution, a first 1×1 convolution, an Unfold module, a Transformer module, a Fold module, a second 1×1 convolution, and a second n×n convolution; The first n×n convolution is used to learn local spatial information of the first input feature map; the first input feature map is an input feature map of the mobilevit module; The first 1×1 convolution is used to project the tensor of local spatial information into a d-dimensional space to obtain a d-dimensional spatial feature map; The Unfold module is used to expand the d-dimensional spatial feature map into N pixel blocks; The Transformer module is used to encode each pixel in each pixel block to obtain an encoding feature map of each pixel block; The Fold module is used to fold the coding feature map of each pixel block to obtain a folded coding feature map; The second 1×1 convolution is used to project the folded encoding feature map into a C-dimensional space to obtain a C-dimensional space encoding feature map; The second n×n convolution is used to fuse the C-dimensional spatial encoding feature map and the first input feature map.
4. The defect identification method of power line insulator based on Mobilevit-yolo deep learning algorithm according to claim 1 is characterized in that: The way to introduce the attention module into the feature fusion network of the yolov4-tiny network model is: Introduce the first attention module at one input of the feature fusion network; Introduce a second attention module at the other input end of the feature fusion network; A third attention module is introduced at the input of the CBL+UpSample module of the feature fusion network.
5. The defect identification method of power line insulator based on Mobilevit-yolo deep learning algorithm according to claim 4 is characterized in that: The first attention module, the second attention module and the third attention module all include: a horizontal pooling layer, a vertical pooling layer, a splicing module, a horizontal convolution, a vertical convolution, a horizontal Sigmoid activation function and a vertical Sigmoid activation function; The horizontal pooling layer and the vertical pooling layer are used to perform pooling operations on the second input feature map in the horizontal direction and the vertical direction, respectively, to obtain the pooled horizontal feature map and the vertical feature map; the second input feature map is the input feature map of the first attention module, the second attention module or the third attention module; The splicing module is used to splice the pooled horizontal feature map and the vertical feature map to obtain a spliced feature map; The horizontal convolution and the vertical convolution are used to perform a horizontal convolution operation and a vertical convolution operation on the spliced feature map, respectively, to obtain a horizontal feature map after convolution and a vertical feature map after convolution; The horizontal Sigmoid activation function is used to activate the horizontal feature map after convolution to obtain the attention weight in the horizontal direction; The vertical Sigmoid activation function is used to activate the vertical feature map after convolution to obtain the attention weight in the vertical direction; The horizontal attention weight and the vertical attention weight are applied to the second input feature map to obtain the output feature map of the first attention module, the second attention module or the third attention module.
6. The defect identification method of power line insulator based on Mobilevit-yolo deep learning algorithm according to claim 1 is characterized in that: The EIOU loss function is: Among them, L EIOU is the EIOU loss function, IOU is the intersection-over-union ratio between the predicted box and the real box, b is the center point of the predicted box, ω and h are the width and height of the predicted box respectively, b gt is the center point of the real frame, ω gt and h gt are the width and height of the real box, c is the diagonal length of the minimum circumscribed rectangular box between the predicted box and the real box, c ω and c h are the width and height of the minimum bounding rectangle of the predicted box and the real box, respectively, 2 (·,·) is the Euclidean distance calculation function.
7. A defect identification device for power line insulators based on Mobilevit-yolo deep learning algorithm, characterized in that: The defect recognition device comprises: A model building module, used for building a Mobilevit-yolo network model; the Mobilevit-yolo network model is obtained by introducing a mobilevit module into a backbone feature extraction network of a yolov4-tiny network model, and introducing an attention module into a feature fusion network of the yolov4-tiny network model; A sample set construction module is used to construct a power line insulator defect recognition sample set; the samples in the power line insulator defect recognition sample set are power line insulator images with defect identifications; A training module is used to train the Mobilevit-yolo network model based on a sample set of power line insulator defect recognition and adopt an EIOU loss function to obtain a trained Mobilevit-yolo network model; The defect recognition module is used to identify defects of power line insulators using the trained Mobilevit-yolo network model.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the defect identification method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the defect identification method described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the defect identification method described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Target detection algorithm of improved YOLOv4-tiny network
CN115035333A
Method for detecting surface defects of hot rolled strip steel based on improved YOLOv4
CN116012337A
Shaving board surface defect detection method and device based on improved YOLOv5
CN117058077A
PCB surface defect detection method based on improved YOLOv7-tiny
CN117911350A
Rice disease identification method based on improved MobileViT network
CN117935017A
