A method, device and equipment for detecting small hardware defects in a power transmission line

By using the improved YOLOX target detection model and sliding window technology, the contradiction between detection speed and accuracy in existing networks has been resolved, enabling efficient detection of small fitting defects in power transmission lines.

CN115239642BActive Publication Date: 2026-02-06HUAYAN INTELLIGENT TECH (GRP) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210779218.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2026-02-06
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

Existing target detection networks either reduce detection accuracy at high detection speeds or reduce detection speed at high detection accuracy, making it impossible to maintain a high detection speed and accuracy when detecting defects in small fittings in power transmission lines.

Method used

An improved YOLOX target detection model is adopted. By improving the feature extraction layer, feature fusion layer and detection layer, and combining sliding window clipping and adjustment, multi-scale feature extraction and detection results merging of inspection images are achieved, thereby improving detection accuracy and speed.

Benefits of technology

While maintaining a relatively fast detection speed, it achieves high detection accuracy in detecting defects in small fittings in power transmission lines, thereby improving the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115239642B_ABST
    Figure CN115239642B_ABST
Patent Text Reader

Abstract

The application provides a method, device and equipment for detecting small hardware defects in a power transmission line, the method comprising: acquiring an inspection image of a target power transmission line, and performing sliding window clipping on the inspection image to obtain a plurality of inspection sub-images; inputting the inspection image and the inspection sub-images into a pre-trained small hardware defect detection model respectively to obtain a large image detection result and a sub-image detection result; the small hardware defect detection model is trained using the inspection image and the inspection sub-images; adjusting the sub-image detection result output by each inspection sub-image using the coordinates of the sliding window to obtain a sub-image adjustment result corresponding to the sub-image detection result on the inspection image; and performing merging processing on the large image detection result and the sub-image adjustment result to obtain a detection result of the small hardware defects in the inspection image. Through the method, the detection of small hardware defects can be realized at a high detection accuracy while maintaining a fast detection speed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of transmission line defect detection, in particular to a detection method, a detection device and equipment for small hardware defects in a transmission line. BACKGROUND

[0002] Small hardware is a metal accessory made of iron or aluminum widely used in transmission lines, which is related to the safety of conductors or towers. Even a damaged one can cause a failure of the transmission line. Therefore, timely and accurate detection of faulty small hardware can maintain the normal operation of the transmission line.

[0003] At present, target detection technology based on deep learning and machine vision has been applied to the field of transmission line defect detection. However, due to the small proportion of small hardware defect targets relative to the original inspection image, the small hardware pixel information contained in the image is small. The existing one-stage target detection network does not need candidate regions, so it reduces the detection accuracy while maintaining a high detection speed. When applied to the detection of small hardware defects in transmission lines, the discovery rate of small hardware with defects is low and the false positive rate of the detection result is high. In addition, in the two-stage target detection network with high detection accuracy, candidate regions are needed, so the detection accuracy is improved while the detection speed is reduced.

[0004] In summary, the existing target detection network reduces the detection accuracy while maintaining a high detection speed, and reduces the detection speed while maintaining a high detection accuracy. Therefore, the existing target detection network cannot maintain a high detection speed while achieving high detection accuracy for small hardware defects. SUMMARY

[0005] Therefore, the embodiments of the present application aim to provide a detection method, a detection device and equipment for small hardware defects in a transmission line, which can achieve detection of small hardware defects with high detection accuracy while maintaining a fast detection speed.

[0006] In a first aspect, the embodiments of the present application provide a detection method for small hardware defects in a transmission line, which comprises:

[0007] Obtaining an inspection image of a target transmission line, and performing sliding window clipping on the inspection image to obtain a plurality of inspection sub-images;

[0008] For each inspection image, inputting the inspection image into a pre-trained small hardware defect detection model to obtain a large image detection result output by the small hardware defect detection model for the inspection image;

[0009] input the plurality of inspection sub-images corresponding to the inspection image into a pre-trained small gold fitting defect detection model in sequence, to obtain a sub-image detection result output by the small gold fitting defect detection model for each inspection sub-image;

[0010] adjust the sub-image detection result output for each inspection sub-image using the coordinates of the sliding window, to obtain a sub-image adjustment result corresponding to the sub-image detection result on the inspection image;

[0011] merge the large image detection result and the sub-image adjustment result, to obtain a detection result of a small gold fitting defect in the inspection image.

[0012] Optionally, the adjusting the sub-image detection result output for each inspection sub-image using the coordinates of the sliding window, to obtain a sub-image adjustment result corresponding to the sub-image detection result on the inspection image, comprises:

[0013] for each inspection sub-image, obtaining an upper-left corner coordinate of a sliding window corresponding to the inspection sub-image;

[0014] obtaining a coordinate of a detection box of each small gold fitting in the inspection sub-image;

[0015] adjusting the coordinate of the detection box of each small gold fitting in the inspection sub-image using the upper-left corner coordinate of the sliding window, to obtain a coordinate of an adjusted detection box of the small gold fitting;

[0016] displaying the adjusted detection box of the small gold fitting on the inspection image according to the coordinate of the adjusted detection box of the small gold fitting, to obtain a sub-image adjustment result corresponding to the sub-image detection result on the inspection image.

[0017] Optionally, the small gold fitting defect detection model is obtained by training in the following manner:

[0018] obtaining a training set sample image;

[0019] extracting a plurality of sample images from the training set sample image, to obtain an original training subset sample image;

[0020] for each sample image in the original training subset sample image, performing sliding window cropping, to obtain a plurality of sample sub-images;

[0021] adding the plurality of sample sub-images to the original training subset sample image, to obtain a training subset sample image;

[0022] training an initial small gold fitting defect detection model using the training set sample image, to obtain a pre-trained small gold fitting defect detection model;

[0023] The pre-trained small accessory defect detection model is trained by using the training subset sample image, to obtain a small accessory defect detection model.

[0024] Optionally, the small accessory defect detection model comprises a feature extraction layer, a feature fusion layer and a detection layer; the inputting of the inspection image into the pre-trained small accessory defect detection model to obtain a large image detection result output by the small accessory defect detection model for the inspection image comprises:

[0025] The inspection image is input into the feature extraction layer to perform feature extraction on the inspection image, to obtain a first feature image; the first feature image comprises a first scale feature image, a second scale feature image and a third scale feature image;

[0026] The first feature image is input into the feature fusion layer to perform feature fusion on the first feature image, to obtain a second feature image; the second feature image comprises a fourth scale feature image, a fifth scale feature image and a sixth scale feature image;

[0027] The second feature image is input into the detection layer to perform detection on the second feature image, to obtain a large image detection result output by the small accessory defect detection model for the inspection image.

[0028] Optionally, the feature extraction layer comprises a first convolutional layer and a second convolutional layer group; the second convolutional layer group comprises a third convolutional layer group and a fourth convolutional layer; the third convolutional layer group comprises N fifth convolutional layers; the inputting of the inspection image into the feature extraction layer to perform feature extraction on the inspection image to obtain a first feature image comprises:

[0029] The inspection image is input into the first convolutional layer to perform convolutional operation on the target inspection image, to obtain a first sub-feature image;

[0030] The first sub-feature image is input into the third convolutional layer group to obtain a second sub-feature image group; the second sub-feature image group comprises second sub-feature images output by an N-1th fifth convolutional layer and an Nth fifth convolutional layer;

[0031] The second sub-feature image output by the Nth fifth convolutional layer is input into the fourth convolutional layer to obtain a third sub-feature image;

[0032] The second sub-feature image and the third sub-feature image included in the second sub-feature image group are determined as the first feature image.

[0033] Optionally, each fifth convolutional layer comprises a down-sampling layer and a CSPNET network layer; the CSPNET network layer comprises a plurality of cascaded ConvNeXt Block residual structures;

[0034] inputting the first sub-feature image into a third convolutional layer group to obtain a second sub-feature image group, comprising:

[0035] inputting the first sub-feature image into the third convolutional layer group, obtaining a first down-sampling image through a down-sampling layer in an N-1th fifth convolutional layer, inputting the first down-sampling image into a CSPNET network layer in the fifth convolutional layer to perform a channel increasing operation, and obtaining a second sub-feature image output by the N-1th fifth convolutional layer;

[0036] inputting the second sub-feature image output by the N-1th fifth convolutional layer into an Nth fifth convolutional layer, obtaining a second down-sampling image through a down-sampling layer in the fifth convolutional layer, inputting the second down-sampling image into a CSPNET network layer in the fifth convolutional layer to perform a channel increasing operation, and obtaining a second sub-feature image output by the Nth fifth convolutional layer;

[0037] taking the second sub-feature image output by the N-1th fifth convolutional layer and the second sub-feature image output by the Nth fifth convolutional layer as a second sub-feature image group;

[0038] Optionally, the fourth convolutional layer comprises a down-sampling layer, a pooling layer and a CSPNET network layer; and inputting the second sub-feature image output by the Nth fifth convolutional layer into the fourth convolutional layer to obtain a third sub-feature image comprises:

[0039] inputting the second sub-feature image output by the Nth fifth convolutional layer into the down-sampling layer to perform down-sampling processing, and obtaining a third down-sampling feature image;

[0040] inputting the third down-sampling feature image into the pooling layer to perform maximum pooling processing, and obtaining a pooled feature image;

[0041] inputting the pooled feature image into the CSPNET network layer to perform a channel increasing operation, and obtaining a third sub-feature image.

[0042] Optionally, the feature fusion layer comprises a top-down feature pyramid network, a plurality of self-processing layers and a bottom-up path enhancement pyramid network; and inputting the first feature image into the feature fusion layer to perform feature fusion on the first feature image to obtain a second feature image comprises:

[0043] inputting the first feature image into the top-down feature pyramid network to perform down-fusion processing, and obtaining a shallow layer fusion feature image output by each layer pyramid network in the top-down feature pyramid network;

[0044] For each shallow fusion feature image output by the pyramid network, the shallow fusion feature image output by the pyramid network is input into a corresponding self-processing layer for convolution processing, to obtain a self-processing feature image output by the corresponding self-processing layer of each pyramid network in the bottom-up path enhancement pyramid network;

[0045] The self-processing feature image is input into the bottom-up path enhancement pyramid network for up-fusion processing, to obtain a deep fusion feature image output by each pyramid network in the bottom-up path enhancement pyramid network;

[0046] The deep fusion feature image output by each pyramid network in the bottom-up path enhancement pyramid network is taken as a second feature image.

[0047] Optionally, the detection layer includes three detection heads; each detection head includes two attention mechanism structure groups; each attention mechanism structure group includes a plurality of attention mechanism structures.

[0048] The second feature image is input into the detection layer for detection, to obtain a large image detection result output by the small hardware defect detection model for the inspection image, including:

[0049] The second feature image is input into the detection head for image perception, to obtain three scale perception images; each scale perception image includes a regression feature image and a classification feature image.

[0050] For each scale perception image, the scale perception image is input into a corresponding regression and classification detection network for regression and classification processing, to obtain a regression result and a classification result of the scale perception image.

[0051] According to the regression result and the classification result, a large image detection result output by the small hardware defect detection model for the inspection image is obtained.

[0052] In a second aspect, an embodiment of the present application provides a small hardware defect detection device in a power transmission line, the detection device including:

[0053] An acquisition module is configured to acquire an inspection image of a target power transmission line, and perform sliding window clipping on the inspection image to obtain a plurality of inspection sub-images.

[0054] A large image detection module is configured to input each inspection image into a pre-trained small hardware defect detection model, to obtain a large image detection result output by the small hardware defect detection model for the inspection image.

[0055] a small drawing detection module, configured to input a plurality of inspection sub-drawings corresponding to the inspection drawing into a pre-trained small fitting defect detection model in sequence, and obtain sub-drawing detection results output by the small fitting defect detection model for each inspection sub-drawing;

[0056] an adjusting module, configured to adjust the sub-drawing detection results output for each inspection sub-drawing by using coordinates of the sliding window, and obtain sub-drawing adjustment results corresponding to the sub-drawing detection results on the inspection drawing;

[0057] a merging detection module, configured to perform merging processing on the large-drawing detection result and the sub-drawing adjustment result, and obtain a detection result of the small fitting defect in the inspection drawing.

[0058] In a third aspect, an electronic device is provided, including a processor, a memory, and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the processor executes the machine readable instructions to perform the steps of the method for detecting small fitting defects in a power transmission line according to any one of the first aspect.

[0059] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium stores a computer program, when the computer program is run by a processor, the steps of the method for detecting small fitting defects in a power transmission line according to any one of the first aspect are performed.

[0060] The method for detecting small fitting defects in a power transmission line, the detection device, and the electronic device provided by the embodiments of the present application can detect small fittings in a power transmission line based on the improved YOLOX target detection model, and realize detection of small fitting defects with high detection accuracy while maintaining fast detection speed. BRIEF DESCRIPTION OF DRAWINGS

[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0062] Figure 1 a flowchart of a method for detecting small fitting defects in a power transmission line provided by an embodiment of the present application is shown;

[0063] Figure 2 a network structure schematic diagram of a small fitting defect detection model improved based on YOLOX provided by an embodiment of the present application is shown;

[0064] Figure 3 A flowchart of a step of obtaining, by the small hardware defect detection model, a large image detection result output by the small hardware defect detection model for the inspection image is shown;

[0065] Figure 4 A structural schematic diagram of a feature extraction layer is shown;

[0066] Figure 5 A flowchart of a step of feature extraction of the inspection image by the feature extraction layer to obtain a first feature image is shown;

[0067] Figure 6 A structural schematic diagram of a first convolutional layer is shown;

[0068] Figure 7 A structural schematic diagram of a CSPNET network layer is shown;

[0069] Figure 8 A structural schematic diagram of a ConvNeXt Block residual structure is shown;

[0070] Figure 9 A structural schematic diagram of a pooling layer is shown;

[0071] Figure 10 A network structural schematic diagram of a feature fusion layer is shown;

[0072] Figure 11 A flowchart of a step of feature fusion of the first feature image by the feature fusion layer to obtain a second feature image is shown;

[0073] Figure 12 A structural schematic diagram of a detection head of a detection layer is shown;

[0074] Figure 13 A flowchart of a step of obtaining, by the detection layer, a large image detection result output by the small hardware defect detection model for the inspection image is shown;

[0075] Figure 14 A schematic diagram of a detection method of a small hardware defect in a power transmission line is shown;

[0076] Figure 15 A structural schematic diagram of a detection device of a small hardware defect in a power transmission line is shown;

[0077] Figure 16 Fig. 1 shows a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0078] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for 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 and are not all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0079] At present, the deep learning algorithms commonly used in the field of defect detection of power transmission lines include two-stage detectors such as Fast-RCNN, Libra R-CNN, Faster-RCNN, Cascade-RCNN, and one-stage detectors such as RetinaNet, SSD, YOLO and its improved series. The two types of algorithms have their own advantages and disadvantages. Generally, the two-stage algorithm has higher accuracy, but the detection speed is slow; while the one-stage algorithm has fast detection speed, but the accuracy is slightly lower. In engineering applications, on the one hand, the target detection network needs to have good detection effect, and on the other hand, the detection speed and real-time performance of the network should also meet the actual demand.

[0080] Based on this, the embodiments of the present application provide a detection method, a detection device and equipment for small hardware defects in a power transmission line, which are described below through embodiments.

[0081] In order to facilitate the understanding of the present embodiment, first, a detection method for small hardware defects in a power transmission line disclosed by the embodiments of the present application is described in detail. Referring to Figure 1 shown, Figure 1 Fig. 1 shows a structural schematic diagram of an electronic device provided by an embodiment of the present application. Figure 1 shown, the detection method for small hardware defects provided by the embodiments of the present application includes the following steps:

[0082] S1, obtaining a patrol image of a target power transmission line, and performing sliding window clipping on the patrol image to obtain a plurality of patrol sub-images.

[0083] Here, the target transmission line is a transmission line in a pre-selected inspection area, and the inspection image can be a plurality of inspection images taken for the target transmission line.

[0084] In this step, specifically, for each inspection image, a sliding window cropping is performed to obtain a plurality of inspection sub-images corresponding to the inspection image.

[0085] As an example, the sliding window cropping can be performed according to a sequence from top to bottom and from left to right. As an example, the size of the sliding window can be one-half, one-fourth, one-eighth, etc. of the length of the short side of the inspection image. As an example, the step length of the sliding window can be one-half, one-fourth, one-eighth, etc. of the size of the sliding window.

[0086] S2, for each of the inspection images, inputting the inspection image into a pre-trained small fitting defect detection model to obtain a large image detection result output by the small fitting defect detection model for the inspection image.

[0087] As an example, the small fitting defect detection model is obtained by training in the following manner:

[0088] First, a training set sample image is obtained, then a plurality of sample images are extracted from the training set sample image to obtain an original training subset sample image, then for each sample image in the original training subset sample image, a sliding window cropping is performed to obtain a plurality of sample sub-images, then the plurality of sample sub-images are added to the original training subset sample image to obtain a training subset sample image, then the training set sample image is used to train an initial small fitting defect detection model to obtain a pre-trained small fitting defect detection model, and finally the training subset sample image is used to train the pre-trained small fitting defect detection model to obtain a small fitting defect detection model.

[0089] Here, as an example, a plurality of inspection images can be taken for the target transmission line, then a part of the inspection images are used as detection images and another part of the inspection images are used as training set sample images.

[0090] Here, after obtaining the training set sample image, the training set sample image is input into an initial small fitting defect detection model for iterative optimization of parameters, and when the number of iterations reaches a pre-set first number of iterations, the training is stopped to obtain a pre-trained small fitting defect detection model. After obtaining the pre-trained small fitting defect detection model, the training subset sample image is input into the pre-trained small fitting defect detection model for iterative optimization of parameters, and when the number of iterations reaches a pre-set second number of iterations, the training is stopped to obtain a small fitting defect detection model.

[0091] Here, the initial small accessory defect detection model is an improved YOLOX target detection network based on an existing YOLOX target detection network. Based on this, the small accessory defect detection model in the embodiments of the present application is obtained by training based on the improved YOLOX target detection network.

[0092] Specifically, please refer to Figure 2 , Figure 2 The network structure diagram of the small accessory defect detection model improved based on YOLOX provided by the embodiments of the present application is shown.

[0093] As Figure 2 shown, the small accessory defect detection model in the embodiments of the present application includes a feature extraction layer, a feature fusion layer and a detection layer.

[0094] The original YOLOX target detection network is composed of a CSPDarknet feature extraction layer, a PAFPN feature fusion layer and a detection head layer. In the embodiments of the present application, the CSPDarknet feature extraction layer is improved to obtain the feature extraction layer in the embodiments of the present application, the PAFPN feature fusion layer is improved to obtain the feature fusion layer in the embodiments of the present application, and the detection head layer is improved to obtain the detection layer in the embodiments of the present application.

[0095] Next, how to obtain the large map detection result output by the small accessory defect detection model for the inspection image through the small accessory defect detection model in step S2 will be introduced in combination with Figure 3

[0096] Specifically, please refer to Figure 3 , Figure 3 The flowchart of obtaining the large map detection result output by the small accessory defect detection model for the inspection image through the small accessory defect detection model provided by the embodiments of the present application is shown.

[0097] As Figure 3 shown, in step S21, the inspection image is input to the feature extraction layer to perform feature extraction on the inspection image, and a first feature image is obtained; the first feature image includes a first scale feature image, a second scale feature image and a third scale feature image.

[0098] Please refer to Figure 4 , Figure 4 The structure diagram of the feature extraction layer provided by the embodiments of the present application is shown. As Figure 4 ​As shown, the feature extraction layer includes: a first convolutional layer and a second convolutional layer group; the second convolutional layer group includes a third convolutional layer group and a fourth convolutional layer; the third convolutional layer group includes N fifth convolutional layers; each of the fifth convolutional layers includes: a down-sampling layer and a CSPNET network layer, and the fourth convolutional layer includes: a down-sampling layer, a pooling layer and a CSPNET network layer, where the CSPNET network layer includes a plurality of cascaded ConvNeXt Block residual structures.

[0099] As shown in Figure 5 , Figure 5 A flowchart of a step of extracting features of the inspection image by the feature extraction layer to obtain a first feature image is shown.

[0100] As shown in Figure 5 , in step S211, the inspection image is input to the first convolutional layer to perform convolutional operation on the target inspection image to obtain a first sub-feature image.

[0101] Specifically, as shown in Figure 6 , Figure 6 A structural diagram of the first convolutional layer is shown. Figure 6 As shown, the first convolutional layer replaces the Focus stem layer in the original YOLOX network with a simple convolutional network, as an example, the convolutional network can be composed of a convolutional kernel (d) with a size of 6x6 and a step of s=2, it should be noted that the size and step of the convolutional kernel of the convolutional network can be other sizes and steps, and the present application does not limit this.

[0102] In this step, first, the image with an input of HxWx3 is transformed into a feature layer with a size of H / 2xW / 2x64 by the convolutional kernel, then the feature layer is normalized and nonlinearly mapped using Layer Norm and GELU activation function to obtain the first sub-feature image.

[0103] Through the first convolutional layer in the embodiment of the present application, the space-to-depth operation caused by the original Focus stem layer can be avoided, and the FLOPs and complexity of the network are reduced.

[0104] In step S212, the first sub-feature image is input to the third convolutional layer group to obtain a second sub-feature image group; the second sub-feature image group includes the second sub-feature images output by the N-1th fifth convolutional layer and the Nth fifth convolutional layer.

[0105] As an example, the step can include: step a, inputting the first sub-feature image into a third convolutional layer group, obtaining a first down-sampling image through a down-sampling layer in an N-1th fifth convolutional layer, inputting the first down-sampling image into a CSPNET network layer in the fifth convolutional layer to perform an up-channel operation, and obtaining a second sub-feature image output by the N-1th fifth convolutional layer.

[0106] Step b, inputting the second sub-feature image output by the N-1th fifth convolutional layer into an Nth fifth convolutional layer, obtaining a second down-sampling image through a down-sampling layer in the fifth convolutional layer, inputting the second down-sampling image into a second CSPNET network layer in the fifth convolutional layer to perform an up-channel operation, and obtaining a second sub-feature image output by the Nth fifth convolutional layer.

[0107] Step c, taking the second sub-feature image output by the N-1th fifth convolutional layer and the second sub-feature image output by the Nth fifth convolutional layer as a second sub-feature image group.

[0108] Specifically, please refer to Figure 7 , Figure 7 A structure diagram of the CSPNET network layer provided by the embodiment of the application is shown, as shown in Figure 7 The CSPNET network layer includes a plurality of cascaded ConvNeXt Block residual structures.

[0109] Please refer to Figure 8 , Figure 8 A structure diagram of the ConvNeXt Block residual structure provided by the embodiment of the application is shown.

[0110] The ConvNeXt Block residual structure is a reverse bottle-neck residual structure composed of one convolutional layer with a convolution kernel size of 7x7 and two convolutional layers with a convolution kernel size of 1x1. For an input feature layer of HxWxC, a 1x1 convolution is first used to increase the channel number to 4 times the original, i.e., HxWx4C, and finally a 1x1 convolution is used to reduce it to the same channel number C as the input feature layer, so that information loss caused by compression of the channel dimension can be avoided when information is converted in different channel feature spaces.

[0111] The core structure of the CSPNET network layer is a stack of N ConvNeXt Block residual structure blocks, and in the left and right two parts of the network: one part is composed of N ConvNeXt Block residual structure blocks; the other part can be regarded as a large residual edge, and the output features of the large residual edge are directly spliced with the output features of the other part in the channel dimension, and finally a 1x1 convolutional layer is used to adjust the channel and output.

[0112] In step S213, the second sub-feature image output by the Nth fifth convolutional layer is input to a fourth convolutional layer to obtain a third sub-feature image.

[0113] Specifically, the step includes:

[0114] Step (1), inputting the second sub-feature image output by the Nth fifth convolutional layer to a down-sampling layer for down-sampling processing to obtain a third down-sampled feature image;

[0115] Step (2), inputting the third down-sampled feature image to the pooling layer for maximum pooling processing to obtain a pooled feature image;

[0116] Step (3), inputting the pooled feature image to the CSPNET network layer for channel up-sampling to obtain a third sub-feature image.

[0117] Specifically, refer to Figure 9 , Figure 9 FIG. 1 shows a structural schematic diagram of a pooling layer provided by an embodiment of the present application. Figure 9 As shown in FIG. 1, the pooling layer adopts a fast cascaded spatial pooling structure SPPF with a small FLOPs.

[0118] The SPPF is mainly composed of three maximum pooling layers Maxpool with the same size of pooling kernels, and performs feature extraction through maximum pooling to improve the receptive field of the network. Compared with the spatial pooling structure SPP used in the original YOLOx, experiments show that the SPPF has a faster inference speed while maintaining the detection accuracy.

[0119] In step S214, the second sub-feature image and the third sub-feature image included in the second sub-feature image group are determined as a first feature image.

[0120] Here, the second sub-feature image output by the N-1th fifth convolutional layer, the second sub-feature image output by the Nth fifth convolutional layer, and the third sub-feature image are respectively a first scale feature image, a second scale feature image, and a third scale feature image.

[0121] Please continue to refer to Figure 3 In step S22, the first feature image is input to the feature fusion layer for feature fusion to obtain a second feature image; the second feature image includes a fourth scale feature image, a fifth scale feature image, and a sixth scale feature image.

[0122] Specifically, refer to Figure 10 , Figure 10 FIG. 2 shows a network structure schematic diagram of a feature fusion layer provided by an embodiment of the present application.

[0123] AsFigure 10 As shown, the feature fusion layer includes: a top-down feature pyramid network, a plurality of self-processing layers, and a bottom-up path augmentation pyramid network.

[0124] Here, the self-processing layer is composed of N cascaded ConvNeXt Block residual structure blocks.

[0125] In the original YOLOX network, the PAFPN feature fusion layer is connected after the output of the top-down feature pyramid network FPN. However, the fusion mode of the PAFPN feature fusion layer is the fusion between different scale feature layers across layers, such as the direct fusion of the P5 feature layer and the feature layer of the up-sampled N4, and the direct fusion of the N3 feature layer and the P4 feature layer after up-sampling. The direct fusion between the feature layers across layers does not fully utilize the information of different scale features. Based on this, the embodiments of the present application improve the PAFPN feature fusion layer. In the original YOLOX network, a self-processing layer is added after each pyramid network of the top-down feature pyramid network, and the information is deeply fused through self-processing, which can fully utilize the information of different scale features compared with the PAFPN feature fusion layer.

[0126] Specifically, please refer to Figure 11 , Figure 11 The flowchart of the step of performing feature fusion on the first feature image by the feature fusion layer to obtain a second feature image is shown.

[0127] As shown in Figure 11 , the step S22 includes:

[0128] Step S221, input the first feature image into the top-down feature pyramid network for down-fusion processing to obtain a shallow layer fusion feature image output by each pyramid network in the top-down feature pyramid network.

[0129] Step S222, for the shallow layer fusion feature image output by each pyramid network, input the shallow layer fusion feature image output by the pyramid network into the corresponding self-processing layer for convolution processing to obtain a self-processing feature image output by the corresponding self-processing layer of each pyramid network.

[0130] Step S223, input the self-processing feature image into the bottom-up path augmentation pyramid network for up-fusion processing to obtain a deep layer fusion feature image output by each pyramid network in the bottom-up path augmentation pyramid network.

[0131] Step S224, the deep fusion feature image output by each layer of the bottom-up path enhancement pyramid network is taken as a second feature image.

[0132] Please continue to refer to Figure 3 In step S23, the second feature image is input to the detection layer to detect the second feature image, and a large map detection result output by the small accessory defect detection model for the inspection image is obtained.

[0133] Please refer to Figure 12 , Figure 12 A structure diagram of a detection head in a detection layer provided by an embodiment of the present application is shown.

[0134] Here, the detection layer includes three detection heads; each detection head includes two attention mechanism structure groups; each attention mechanism structure group includes a plurality of attention mechanism structures, wherein each attention mechanism structure includes a scale perception module, a spatial perception module and a task perception module.

[0135] Here, in the detection layer of the original YOLOX target detection network, a plurality of ordinary convolution layers are directly stacked after the output of each layer of the bottom-up feature fusion pyramid network, and then a regression convolution subnetwork and a classification convolution subnetwork are respectively connected after the convolution layers. The original YOLOX detection head layer is improved in the embodiment of the present application, and the detection head including a plurality of attention mechanism structure groups is used to replace the original stacked plurality of ordinary convolution layers. The detection layer in the embodiment of the present application introduces attention mechanisms among feature layers, spatial positions of feature layers and feature channels, respectively, for scale perception, spatial position perception and task perception of the target detection task, and significantly improves the representation ability of the detection head without increasing the amount of calculation.

[0136] Please refer to Figure 13 , Figure 13 A flowchart of a step of obtaining a large map detection result output by the small accessory defect detection model for the inspection image through the detection layer is shown.

[0137] As Figure 13 shown, in step S231, the second feature image is input to the detection head for image perception to obtain three scale perception images; each scale perception image includes a regression feature image and a classification feature image.

[0138] In step S232, for each scale perception image, the scale perception image is input to the corresponding regression and classification detection network for regression and classification processing to obtain the regression result and the classification result of the scale perception image.

[0139] At step S233, according to the regression result and the classification result, a large image detection result output by the small accessory defect detection model for the inspection image is obtained.

[0140] Please continue to refer to Figure 1 At step S3, a plurality of inspection sub-images corresponding to the inspection image are sequentially input into the pre-trained small accessory defect detection model, and a sub-image detection result output by the small accessory defect detection model for each inspection sub-image is obtained.

[0141] Here, the step of obtaining the sub-image detection result output by the small accessory defect detection model for each inspection sub-image by the pre-trained small accessory defect detection model is the same as the step of obtaining the large image detection result, and thus will not be repeated.

[0142] At step S4, the sub-image detection result output for each inspection sub-image is adjusted by using the coordinates of the sliding window, and a sub-image adjustment result corresponding to the sub-image detection result on the inspection image is obtained.

[0143] As an example, at this step, first, for each inspection sub-image, the upper left corner coordinates of the sliding window corresponding to the inspection sub-image can be obtained;

[0144] For example, the upper left corner coordinates of the nth sliding window can be [shift_x nl ,shift_y nl ];

[0145] Then, the coordinates of the detection frame of each small accessory in the inspection sub-image are obtained;

[0146] For example, the coordinates of the detection frame of each small accessory can be [x nl i ,y nl i ,x nr i ,y nr i ];

[0147] Here, x nl i is the horizontal coordinate of the upper left corner of the detection frame of the ith small accessory in the inspection sub-image corresponding to the nth sliding window; y nl i is the vertical coordinate of the upper left corner of the detection frame of the ith small accessory in the inspection sub-image corresponding to the nth sliding window; x nr i is the horizontal coordinate of the lower right corner of the detection frame of the ith small accessory in the inspection sub-image corresponding to the nth sliding window; and y nr iThe right lower corner vertical coordinate of the detection frame of the i-th small fitting in the i-th sub-inspection image corresponding to the n-th sliding window.

[0148] Then, the coordinates of the detection frame of each small fitting in the sub-inspection image are adjusted by using the left upper corner coordinates of the sliding window, to obtain the coordinates of the adjusted detection frame of the small fitting.

[0149] For example, the coordinates of the adjusted detection frame of the small fitting can be obtained by using the following formula:

[0150] box=[x nl i +shift_x nl ,y nl i +shift_y nl ,x nr i +shift_x nl ,y nr i +shift_y nl ];

[0151] Finally, the adjusted detection frame of the small fitting is displayed on the inspection image according to the coordinates of the adjusted detection frame of the small fitting, to obtain the subgraph adjustment result corresponding to the subgraph detection result on the inspection image.

[0152] For example, if there is one detection frame of the small fitting in the inspection image, there are four sub-inspection images, and there is one detection frame of the small fitting in each sub-inspection image, then there are four adjusted detection frames of the small fitting. The subgraph adjustment result is that four adjusted detection frames of the small fitting and the original one detection frame of the small fitting are displayed on the inspection image.

[0153] In step S5, the large graph detection result and the subgraph adjustment result are merged to obtain the detection result of the small fitting defects in the inspection image.

[0154] Here, the merging process includes non-maximum suppression, large-scale non-maximum suppression, non-maximum fusion, etc., to filter or fuse the overlapped detection frames after merging, to obtain the final detection result.

[0155] Here, the detection result of the small fitting defects includes a detection frame, detection frame coordinates and a label, and the label includes defects and non-defects.

[0156] Next, how to detect the small fitting defects will be introduced in a specific example. Figure 14

[0157] Please refer to Figure 14 , Figure 14 ​This illustration shows a schematic diagram of a method for detecting defects in small fittings in power transmission lines, provided in an embodiment of this application.

[0158] like Figure 14 As shown, in the detection module based on sliding window clipping, firstly, the inspection images M1, M2...M of the target transmission line are acquired. N Each inspection image is then cropped using a sliding window to obtain multiple inspection sub-images. These multiple inspection sub-images include the inspection sub-images corresponding to each inspection image. For example, a sliding window is cropped for inspection image M1 to obtain the corresponding inspection sub-images m1, m2, ... m1. n ;

[0159] Then, for each of the inspection images, for example, for inspection image M1, the inspection image M1 is input into the pre-trained small hardware defect detection model to obtain the large image detection result output by the small hardware defect detection model for the inspection image M1.

[0160] Then, the multiple inspection sub-images corresponding to the inspection image M1, namely inspection sub-images m1, m2, ... m... n The data are sequentially input into a pre-trained small hardware defect detection model to obtain the sub-image detection results output by the small hardware defect detection model for each inspection sub-image.

[0161] Then, for each inspection sub-image, for example, for inspection sub-image m1, the coordinates of the upper left corner of the sliding window corresponding to inspection sub-image m1 are obtained, and the coordinates of the detection frame of each small hardware in inspection sub-image m1 are obtained. Then, the coordinates of the detection frame of each small hardware in inspection sub-image m1 are adjusted using the coordinates of the upper left corner of the sliding window to obtain the adjusted coordinates of the detection frame of the small hardware. Then, the adjusted detection frame of the small hardware is displayed on inspection image M1 according to the adjusted coordinates of the detection frame of the small hardware, so as to obtain the sub-image adjustment result corresponding to the sub-image detection result on inspection image M1.

[0162] Finally, the detection results of the large image and the adjustment results of the sub-image are merged (e.g., non-maximum suppression) to obtain the detection results of small hardware defects in the inspection image. Here, the training and fine-tuning model module based on sliding window clipping is used to train the small hardware defect detection model. Figure 14 As shown, in the sliding window-based clipping training and fine-tuning model module, the small fitting defect detection model is trained in the following way:

[0163] First, obtain the training set sample images P1, P2, P3...P... n Then, from the training set sample images P1, P2, P3...P nA plurality of sample images, such as P1, P2, are extracted to obtain original training subset sample images, and then for each sample image in the original training subset sample images, such as for sample image P1, a sliding window clipping is performed to obtain a plurality of sample sub-images p1, p2, and then the plurality of sample sub-images p1, p2 are added to the original training subset sample images to obtain training subset sample images P1, P2, p1, p2, and then the training set sample images P1, P2, P3, …, P n The initial small hardware defect detection model is trained to obtain a pre-trained small hardware defect detection model, and then the training subset sample images P1, P2, p1, p2 are used to train the pre-trained small hardware defect detection model to obtain a small hardware defect detection model.

[0164] In the embodiments of the present application, the detection of small hardware defects can be realized with high detection accuracy while maintaining a fast detection speed.

[0165] Based on the same inventive concept, the embodiments of the present application also provide a small hardware defect detection device in a power transmission line corresponding to the small hardware defect detection method in a power transmission line.

[0166] Referring to Figure 15 As shown in the figure, Figure 15 A structure diagram of a small hardware defect detection device in a power transmission line provided by the embodiments of the present application is shown. The small hardware defect detection device 100 in the power transmission line comprises:

[0167] The acquisition module 101 is configured to acquire an inspection image of a target power transmission line, and perform sliding window clipping on the inspection image to obtain a plurality of inspection sub-images.

[0168] The large image detection module 102 is configured to input each inspection image into a pre-trained small hardware defect detection model to obtain a large image detection result output by the small hardware defect detection model for the inspection image.

[0169] The small image detection module 103 is configured to input the plurality of inspection sub-images corresponding to the inspection image into the pre-trained small hardware defect detection model in sequence to obtain a sub-image detection result output by the small hardware defect detection model for each inspection sub-image.

[0170] The adjustment module 104 is configured to adjust the sub-image detection result output for each inspection sub-image using the coordinates of the sliding window to obtain a sub-image adjustment result corresponding to the sub-image detection result on the inspection image.

[0171] The merging detection module 105 is configured to merge the large image detection result and the sub image adjustment result to obtain a detection result of the small accessory defect in the inspection image.

[0172] In a possible implementation, the adjustment module 104 is specifically configured to:

[0173] For each inspection sub image, obtain the top-left corner coordinate of the sliding window corresponding to the inspection sub image;

[0174] Obtain the coordinates of the detection box of each small accessory in the inspection sub image;

[0175] Adjust the coordinates of the detection box of each small accessory in the inspection sub image by using the top-left corner coordinate of the sliding window to obtain the coordinates of the detection box of the adjusted small accessory;

[0176] Display the detection box of the adjusted small accessory on the inspection image according to the coordinates of the detection box of the adjusted small accessory to obtain the sub image adjustment result corresponding to the sub image detection result on the inspection image.

[0177] In a possible implementation, the power transmission line small accessory defect detection apparatus 100 further includes a training module 106 (not shown in the figure).

[0178] The training module 106 is specifically configured to obtain a training set sample image.

[0179] Extract a plurality of sample images from the training set sample image to obtain an original training subset sample image;

[0180] For each sample image in the original training subset sample image, perform sliding window clipping to obtain a plurality of sample sub images;

[0181] Add the plurality of sample sub images to the original training subset sample image to obtain a training subset sample image;

[0182] Train an initial small accessory defect detection model by using the training set sample image to obtain a pre-trained small accessory defect detection model;

[0183] Train the pre-trained small accessory defect detection model by using the training subset sample image to obtain a small accessory defect detection model.

[0184] In a possible implementation, the large image detection module 102 is specifically configured to input the inspection image into the feature extraction layer to perform feature extraction on the inspection image to obtain a first feature image; the first feature image includes a first scale feature image, a second scale feature image and a third scale feature image.

[0185] inputting the first feature image into the feature fusion layer to perform feature fusion on the first feature image to obtain a second feature image; the second feature image comprises a fourth scale feature image, a fifth scale feature image and a sixth scale feature image;

[0186] inputting the second feature image into the detection layer to perform detection on the second feature image to obtain the large image detection result output by the small accessory defect detection model for the inspection image.

[0187] In a possible implementation, the large image detection module 102 is further configured to:

[0188] inputting the target inspection image into the first convolutional layer to perform convolutional operation on the target inspection image to obtain a first sub-feature image;

[0189] inputting the first sub-feature image into a third convolutional layer group to obtain a second sub-feature image group; the second sub-feature image group comprises a second sub-feature image output by an N-1th fifth convolutional layer and an Nth fifth convolutional layer;

[0190] inputting the second sub-feature image output by the Nth fifth convolutional layer into a fourth convolutional layer to obtain a third sub-feature image;

[0191] determining the second sub-feature image and the third sub-feature image comprised in the second sub-feature image group as the first feature image.

[0192] In a possible implementation, the large image detection module 102 is further configured to:

[0193] The inputting the first sub-feature image into the third convolutional layer group to obtain the second sub-feature image group comprises:

[0194] inputting the first sub-feature image into the third convolutional layer group, obtaining a first down-sampling image through a down-sampling layer in an N-1th fifth convolutional layer, inputting the first down-sampling image into a CSPNET network layer in the fifth convolutional layer to perform channel increasing operation to obtain a second sub-feature image output by the N-1th fifth convolutional layer;

[0195] inputting the second sub-feature image output by the N-1th fifth convolutional layer into an Nth fifth convolutional layer, obtaining a second down-sampling image through a down-sampling layer in the fifth convolutional layer, inputting the second down-sampling image into a CSPNET network layer in the fifth convolutional layer to perform channel increasing operation to obtain a second sub-feature image output by the Nth fifth convolutional layer;

[0196] The second sub-feature image output by the Nth fifth convolutional layer is input to a down-sampling layer for down-sampling processing to obtain a third down-sampled feature image.

[0197] In a possible implementation, the large image detection module 102 is further configured to:

[0198] The second sub-feature image output by the Nth fifth convolutional layer is input to a down-sampling layer for down-sampling processing to obtain a third down-sampled feature image.

[0199] The third down-sampled feature image is input to the pooling layer for maximum pooling processing to obtain a pooled feature image.

[0200] The pooled feature image is input to the CSPNET network layer for channel increasing operation to obtain a third sub-feature image.

[0201] In a possible implementation, the large image detection module 102 is further configured to:

[0202] The first feature image is input to the top-down feature pyramid network for down-fusion processing to obtain a shallow layer fusion feature image output by each pyramid network layer in the top-down feature pyramid network.

[0203] For the shallow layer fusion feature image output by each pyramid network layer, the shallow layer fusion feature image output by the pyramid network layer is input to a corresponding self-processing layer for convolution processing to obtain a self-processing feature image output by the corresponding self-processing layer of each pyramid network.

[0204] The self-processing feature image is input to the bottom-up path enhancement pyramid network for up-fusion processing to obtain a deep layer fusion feature image output by each pyramid network layer in the bottom-up path enhancement pyramid network.

[0205] The deep layer fusion feature image output by each pyramid network layer in the bottom-up path enhancement pyramid network is taken as a second feature image.

[0206] In a possible implementation, the large image detection module 102 is further configured to:

[0207] The inputting of the second feature image to the detection layer detects the second feature image to obtain a large image detection result output by the small accessory defect detection model for the inspection image, including:

[0208] The second feature image is input to the detection head for image perception to obtain three scale perception images; each scale perception image includes a regression feature image and a classification feature image.

[0209] For each scale perception image, the scale perception image is input into a corresponding regression and classification detection network for regression and classification processing to obtain a regression result and a classification result of the scale perception image;

[0210] According to the regression result and the classification result, a large image detection result output by the small gold fitting defect detection model for the inspection image is obtained.

[0211] The detection device for small gold fitting defects in a power transmission line provided by the embodiments of the present application can detect small gold fittings in the power transmission line based on the improved YOLOX target detection model, and realize detection of small gold fitting defects with high detection accuracy while maintaining fast detection speed.

[0212] Referring to Figure 16 , as shown in the drawings, Figure 16 The electronic device 200 provided by the embodiments of the present application includes a processor 201, a memory 202 and a bus 203. The memory 202 stores machine readable instructions executable by the processor 201. When the electronic device is running, the processor 201 and the memory 202 communicate through the bus 203. The processor 201 executes the machine readable instructions to perform the steps of the detection method for small gold fitting defects in a power transmission line as described above.

[0213] Specifically, the memory 202 and the processor 201 can be general memory and processor, which are not specifically limited here. When the processor 201 runs the computer program stored in the memory 202, it can execute the detection method for small gold fitting defects in a power transmission line as described above.

[0214] Corresponding to the detection method for small gold fitting defects in a power transmission line, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, the steps of the detection method for small gold fitting defects in a power transmission line as described above are executed.

[0215] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here. In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the modules is only a logical function division, and there can be another division in actual implementation. For example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed mutual elements can be indirect coupling or communication connection through some communication interfaces, devices or modules, and can be electrical, mechanical or other forms.

[0216] The modules described as separate components can or can not be physically separate, and the components displayed as modules can or can not be physical modules, i.e. can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.

[0217] In addition, the functional modules in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.

[0218] If the functions are realized in the form of software function modules and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art or the part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and various program codes that can be stored in the medium.

[0219] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any skilled person in the art can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features, within the technical scope disclosed by the present application. The modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for detecting a defect of a small fitting in a power transmission line, characterized by, The detection method comprises: obtaining an inspection image of a target power transmission line, and performing sliding window clipping on the inspection image to obtain a plurality of inspection sub-images; for each of the inspection images, inputting the inspection image into a pre-trained small hardware defect detection model to obtain a large image detection result output by the small hardware defect detection model for the inspection image, the small hardware defect detection model comprising a feature extraction layer, a feature fusion layer and a detection layer, specifically, inputting the inspection image into the feature extraction layer to perform feature extraction on the inspection image to obtain a first feature image; the first feature image comprises a first scale feature image, a second scale feature image and a third scale feature image; inputting the first feature image into the feature fusion layer to perform feature fusion on the first feature image to obtain a second feature image; the second feature image comprises a fourth scale feature image, a fifth scale feature image and a sixth scale feature image; inputting the second feature image into the detection layer to perform detection on the second feature image to obtain the large image detection result output by the small hardware defect detection model for the inspection image; wherein the first feature image is input into a top-down feature pyramid network for down-fusion processing to obtain a shallow layer fusion feature image output by each layer of the top-down feature pyramid network; for the shallow layer fusion feature image output by each layer of the top-down feature pyramid network, the shallow layer fusion feature image output by the layer is input into a corresponding self-processing layer for convolution processing to obtain a self-processing feature image output by the corresponding self-processing layer of each layer of the top-down feature pyramid network; the self-processing feature image is input into a bottom-up path enhancement pyramid network for up-fusion processing to obtain a deep layer fusion feature image output by each layer of the bottom-up path enhancement pyramid network; the deep layer fusion feature image output by each layer of the bottom-up path enhancement pyramid network is taken as the second feature image; the plurality of inspection sub-images corresponding to the inspection image are sequentially input into the pre-trained small hardware defect detection model to obtain a sub-image detection result output by the small hardware defect detection model for each inspection sub-image; adjust the sub-image detection result output for each inspection sub-image using the coordinates of the sliding window to obtain a sub-image adjustment result corresponding to the sub-image detection result on the inspection image; merge the large image detection result and the sub-image adjustment result to obtain a detection result of a small hardware defect in the inspection image.

2. The detection method according to claim 1, characterized in that, The adjustment of the sub-image detection result output for each inspection sub-image using the coordinates of the sliding window to obtain a sub-image adjustment result corresponding to the sub-image detection result on the inspection image comprises: for each inspection sub-image, obtaining the coordinates of the top-left corner of the sliding window corresponding to the inspection sub-image; obtaining the coordinates of the detection box of each small hardware in the inspection sub-image; Adjusting coordinates of the detection frame of each small accessory fitting in the inspection sub-image by using the top-left corner coordinates of the sliding window, to obtain adjusted coordinates of the detection frame of the small accessory fitting; Displaying the adjusted detection frame of the small accessory fitting on the inspection image according to the adjusted coordinates of the detection frame of the small accessory fitting, to obtain a sub-image adjustment result corresponding to the sub-image detection result on the inspection image.

3. The method of claim 1, wherein The small accessory fitting defect detection model is obtained by training in the following manner: Obtaining a training set sample image; Extracting a plurality of sample images from the training set sample image to obtain original training subset sample images; For each sample image in the original training subset sample images, performing sliding window clipping to obtain a plurality of sample sub-images; Adding the plurality of sample sub-images to the original training subset sample images to obtain training subset sample images; Training an initial small accessory fitting defect detection model by using the training set sample images to obtain a pre-trained small accessory fitting defect detection model; Training the pre-trained small accessory fitting defect detection model by using the training subset sample images to obtain a small accessory fitting defect detection model.

4. The detection method according to claim 3, characterized in that, The feature extraction layer comprises a first convolutional layer and a second convolutional layer group; the second convolutional layer group comprises a third convolutional layer group and a fourth convolutional layer; the third convolutional layer group comprises N fifth convolutional layers; the feature extraction of the inspection image is performed by inputting the inspection image into the feature extraction layer to obtain a first feature image, comprising: Performing convolutional operation on the inspection image by inputting the inspection image into the first convolutional layer to obtain a first sub-feature image; Inputting the first sub-feature image into the third convolutional layer group to obtain a second sub-feature image group; the second sub-feature image group comprises second sub-feature images output by the N-1th fifth convolutional layer and the Nth fifth convolutional layer; Inputting the second sub-feature image output by the Nth fifth convolutional layer into the fourth convolutional layer to obtain a third sub-feature image; Determining the second sub-feature images included in the second sub-feature image group and the third sub-feature image as the first feature image.

5. The detection method according to claim 4, characterized in that, Each fifth convolutional layer comprises a down-sampling layer and a CSPNET network layer; the CSPNET network layer comprises a plurality of cascaded ConvNeXt Block residual structures; The inputting of the first sub-feature image into the third convolutional layer group to obtain the second sub-feature image group comprises: Inputting the first sub-feature image into the third convolutional layer group, obtaining a first down-sampling image through the down-sampling layer in the N-1th fifth convolutional layer, and inputting the first down-sampling image into the CSPNET network layer in the fifth convolutional layer to perform channel increasing operation, to obtain the second sub-feature image output by the N-1th fifth convolutional layer; Inputting the second sub-feature image output by the N-1th fifth convolutional layer into the Nth fifth convolutional layer, obtaining a second down-sampling image through the down-sampling layer in the fifth convolutional layer, and inputting the second down-sampling image into the CSPNET network layer in the fifth convolutional layer to perform channel increasing operation, to obtain the second sub-feature image output by the Nth fifth convolutional layer; The second sub-feature image output by the Nth fifth convolutional layer is input into a fourth convolutional layer to obtain a third sub-feature image. 6.The detection method of claim 4, wherein the fourth convolutional layer comprises: The downsampling layer, the pooling layer, and the CSPNET network layer; The second sub-feature image output by the Nth fifth convolutional layer is input into a fourth convolutional layer to obtain a third sub-feature image. The second sub-feature image output by the Nth fifth convolutional layer is input into a downsampling layer for downsampling processing to obtain a third downsampling feature image. The third downsampling feature image is input into the pooling layer for maximum pooling processing to obtain a pooled feature image. The pooled feature image is input into the CSPNET network layer for channel increasing operation to obtain a third sub-feature image.

7. The method of claim 1, wherein, The detection layer includes three detection heads; each detection head includes two layers of attention mechanism structure groups; each layer of attention mechanism structure group includes a plurality of attention mechanism structures; The second feature image is input into the detection layer for detection to obtain a large image detection result output by the small gold fitting defect detection model for the inspection image, including: The second feature image is input into the detection head for image perception to obtain three scale perception images; each scale perception image includes a regression feature image and a classification feature image; For each scale perception image, the scale perception image is input into a corresponding regression and classification detection network for regression and classification processing to obtain a regression result and a classification result of the scale perception image; According to the regression result and the classification result, a large image detection result output by the small gold fitting defect detection model for the inspection image is obtained.

8. A device for detecting defects in small fittings in power transmission lines, characterized in that, The device includes: An acquisition module is configured to acquire an inspection image of a target power transmission line and crop the inspection image by a sliding window to obtain a plurality of inspection sub-images. A large image detection module is configured to input each inspection image into a pre-trained small gold fitting defect detection model to obtain a large image detection result output by the small gold fitting defect detection model for the inspection image. The small gold fitting defect detection model includes a feature extraction layer, a feature fusion layer, and a detection layer. Specifically, the inspection image is input into the feature extraction layer to extract features of the inspection image and obtain a first feature image. The first feature image includes a first scale feature image, a second scale feature image, and a third scale feature image. The first feature image is input into the feature fusion layer to fuse features of the first feature image and obtain a second feature image. The second feature image includes a fourth scale feature image, a fifth scale feature image, and a sixth scale feature image. The second feature image is input into the detection layer to detect the second feature image and obtain a large image detection result output by the small gold fitting defect detection model for the inspection image. The first feature image is input into a top-down feature pyramid network for down fusion processing to obtain a shallow layer fusion feature image output by each layer of pyramid network in the top-down feature pyramid network; for the shallow layer fusion feature image output by each layer of pyramid network, the shallow layer fusion feature image output by the layer of pyramid network is input into a corresponding self-processing layer for convolution processing to obtain a self-processing feature image output by the corresponding self-processing layer of each layer of pyramid network; the self-processing feature image is input into a bottom-up path enhancement pyramid network for up fusion processing to obtain a deep layer fusion feature image output by each layer of pyramid network in the bottom-up path enhancement pyramid network; and the deep layer fusion feature image output by each layer of pyramid network in the bottom-up path enhancement pyramid network is taken as a second feature image. The small-fixture defect detection model is used for detecting small-fixture defects in the inspection image. The adjustment module is configured to adjust the subgraph detection result output by each inspection subgraph by using the coordinates of the sliding window to obtain a subgraph adjustment result corresponding to the subgraph detection result on the inspection image. The merging detection module is configured to merge the large-graph detection result and the subgraph adjustment result to obtain a detection result of small-fixture defects in the inspection image.

9. An electronic device, comprising: The processor, the memory and the bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, the machine readable instructions are executed by the processor to execute the steps of the transmission line small-fixture defect detection method as claimed in any one of claims 1 to 7. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to execute the steps of the transmission line small-fixture defect detection method as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Defect detection method applied to motor coil based on cascade expansion FCN network

    CN111738338A

  • SAR image target detection method based on context information

    CN112766108A