Overhead wire detection method and system based on knowledge graph and improved YOLOv10
By combining the YOLOv10 model with sample expansion and improvement of training data, the problem of single hidden danger type detection in the existing technology is solved, the accurate detection of diversified hidden danger types is achieved, and the operation reliability of overhead wires is improved.
Patent Information
- Application Number
- CN202510741282.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-05
AI Technical Summary
When the existing technology uses deep learning network to automatically detect overhead wire images, it can only identify a single type of hidden danger, which is difficult to meet the detection needs of diverse types of hidden dangers, reducing the reliability of overhead wire operation.
The pre-trained generative network is used to sample expansion processing on the training overhead wire data, generate a wire feature set, and use the wire feature set to train the improved YOLOv10 defect detection model, and combine the wire knowledge graph to detect diverse potential hazard types.
It improves the accuracy of the overhead wire detection model, can accurately identify various types of hidden dangers, and enhances the reliability of overhead wire operation.
Smart Images

Figure CN120259309B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of overhead wire detection technology, and in particular to a method and system for detecting overhead wires based on a knowledge graph and an improved YOLOv10. Background Art
[0002] With the rapid development of power systems, overhead conductors, as a core component of power transmission, are crucial for ensuring safe and stable operation of power supply. However, overhead conductors are prone to various hidden dangers during operation due to various environmental factors and operational issues, such as substandard conductor sag, tilted towers, and damaged insulators. If these hazards are not promptly detected and addressed, they can lead to line failures, power outages, and even major accidents. Therefore, accurately and efficiently detecting hidden dangers in overhead conductors has become a pressing technical challenge.
[0003] At present, existing technologies mainly use deep learning networks to automatically detect overhead wire images and identify and locate hidden dangers, but they only identify a single type of hidden danger, which makes it difficult to meet the detection needs of diverse hidden danger types on overhead wires, reducing the reliability of overhead wire operation. Summary of the Invention
[0004] The present invention provides a method and system for detecting overhead wires based on a knowledge graph and an improved YOLOv10. This method solves the technical problem that the existing technology mainly uses a deep learning network to automatically detect overhead wire images and identify and locate hidden dangers, but only identifies a single hidden danger type, making it difficult to meet the detection needs of diverse hidden danger types on overhead wires, thereby reducing the reliability of overhead wire operation.
[0005] The first aspect of the present invention provides a method for detecting overhead wires based on a knowledge graph and an improved YOLOv10, comprising:
[0006] Acquire multiple training overhead conductor data and acceptance criteria information, and use a pre-trained generative network to perform sample expansion processing on each of the training overhead conductor data to obtain a conductor feature set;
[0007] The wire feature set is input into a preset YOLOv10 defect detection model for training to generate a target defect detection model and target feature data;
[0008] Constructing a conductor knowledge graph using the target feature data and the acceptance criteria information;
[0009] When receiving an image of an overhead wire to be tested, inputting the image of the overhead wire to be tested into the target defect detection model to obtain feature data to be tested;
[0010] The feature data to be tested is input into the conductor knowledge graph to obtain the overhead conductor detection result.
[0011] Optionally, the step of using a pre-trained generative network to perform sample expansion processing on each of the training overhead conductor data to obtain a conductor feature set includes:
[0012] Performing image preprocessing on each defective overhead wire image of the training overhead wire data to obtain a plurality of first sample images;
[0013] Inputting the normal overhead wire images of each of the training overhead wire data into a pre-trained generation network to obtain a plurality of second sample images;
[0014] A wire feature set is constructed using each of the first sample images and each of the second sample images.
[0015] Optionally, the generation network includes a generator and a discriminator, and the step of inputting each normal overhead wire image of the training overhead wire data into a pre-trained generation network to obtain a plurality of second sample images includes:
[0016] Inputting normal overhead wire images and preset attribute control data of each of the training overhead wire data into the generator to obtain multiple wire hidden danger images, wherein the convolution layer in the generator is connected to an adaptive noise injection module;
[0017] fusing the conductor hidden danger images and the normal overhead conductor images respectively to obtain a plurality of initial hidden danger sample images;
[0018] Each of the initial hidden danger sample images is input into the discriminator for screening to obtain a plurality of second sample images.
[0019] Optionally, the step of using the wire feature set to input a preset YOLOv10 defect detection model for training to generate a target defect detection model and target feature data includes:
[0020] The wire feature set is input into a preset YOLOv10 defect detection model for training until a preset stop condition is met, thereby obtaining a target defect detection model;
[0021] The wire feature set is input into the target defect detection model to obtain target feature data.
[0022] Optionally, the target defect detection model includes a backbone network, an intermediate module, and a detection head group. The step of inputting the image of the overhead wire to be tested into the target defect detection model to obtain the feature data to be tested includes:
[0023] Using the backbone network to extract features from the image of the overhead wire to be tested, and outputting a plurality of wire feature maps group by group;
[0024] Continuously downsampling the plurality of wire feature maps through the intermediate module to obtain a plurality of fused feature maps;
[0025] The detection head group is used to perform defect detection on various fused feature maps to obtain feature data to be tested.
[0026] Optionally, the backbone network includes a first convolution group, a second convolution group, and a third convolution group, and the step of using the backbone network to extract features from the image of the overhead wire to be tested and outputting a plurality of wire feature maps group by group includes:
[0027] Performing feature extraction on the overhead wire image to be tested through the first convolution group to obtain a first wire feature map, wherein the first convolution group includes a convolution layer, a star operation module, a convolution layer, a star operation module and a convolution layer connected in sequence;
[0028] Performing feature extraction on the first wire feature map through the second convolution group to obtain a second wire feature map, wherein the second convolution group includes a star operation module and a convolution layer connected in sequence;
[0029] Feature extraction is performed on the second wire feature map through the third convolution group to obtain a third wire feature map, wherein the third convolution group includes a star operation module, a convolution layer, a spatial pyramid pooling module and a partial attention module connected in sequence.
[0030] Optionally, the star operation module includes a depthwise separable convolution layer, a first fully connected layer, a second fully connected layer, a feature fusion layer, a fully connected layer, and a depthwise separable convolution layer, and the step of extracting features from the first wire feature map through the second convolution group to obtain the second wire feature map includes:
[0031] Performing feature extraction on the first wire feature map through a depthwise separable convolutional layer to obtain a first depthwise wire feature map;
[0032] Performing a linear transformation on the first depth wire feature map through a first fully connected layer to obtain a second depth wire feature map;
[0033] Performing a linear transformation on the first depth wire feature map through a second fully connected layer to obtain a third depth wire feature map;
[0034] Using a feature fusion layer to perform feature fusion on the second depth wire feature map and the third depth wire feature map to obtain a fourth depth wire feature map;
[0035] Feature extraction is performed on the fourth depthwise wire feature map through a fully connected layer and a depthwise separable convolutional layer in sequence to obtain a second wire feature map.
[0036] Optionally, the intermediate module includes a first fusion module, a second fusion module, a downsampling module, and a third fusion module. The step of continuously downsampling the multiple wire feature maps through the intermediate module to obtain multiple fused feature maps is characterized by comprising:
[0037] Performing feature fusion on the third wire feature map and the second wire feature map through the first fusion module to obtain a first wire fusion feature map, wherein the first fusion module includes an upsampling module and a feature fusion layer;
[0038] performing feature fusion on the first wire fusion feature map and the first wire feature through the second fusion module to obtain a first fusion feature map, wherein the second fusion module includes a first cross-stage fusion module, an upsampling module, a feature fusion layer, and a first cross-stage fusion module;
[0039] Performing a downsampling operation on the first wire fusion feature map through the downsampling module to obtain a second fusion feature map, wherein the downsampling module includes a first basic module, a splicing module, and a first cross-stage fusion module connected in sequence;
[0040] The second fused feature map and the third wire feature map are subjected to feature fusion by the third fusion module to obtain a third fused feature map, wherein the third fusion module includes a channel downsampling module, a feature fusion layer and a second cross-stage fusion module.
[0041] Optionally, the step of using the detection head group to perform defect detection on various fused feature maps to obtain feature data to be tested includes:
[0042] Matching a corresponding detection head from the detection head group according to the resolution of the fused feature map;
[0043] The detection head is used to perform defect detection on the fused feature map to obtain feature data to be tested, wherein the detection head includes a first group normalized convolution module, a second group normalized convolution module, a second group normalized convolution module and a prediction convolution module connected in sequence.
[0044] Optionally, the prediction box convolution module in the prediction convolution module is connected to a scaling module.
[0045] Optionally, the step of performing a downsampling operation on the first wire fusion feature map by the downsampling module to obtain a second fusion feature map includes:
[0046] Performing feature extraction on the first wire fusion feature map through the first basic module to obtain a first target fusion feature map, wherein the first basic module includes a two-dimensional convolution layer, a batch normalization layer, and a SiLU activation function layer connected in sequence;
[0047] The first target fusion feature map is sequentially subjected to feature extraction by a splicing module and a first cross-stage fusion module to obtain a second fusion feature map.
[0048] Optionally, the step of performing feature fusion on the second fused feature map and the third wire feature map by the third fusion module to obtain a third fused feature map includes:
[0049] A channel downsampling module is used to perform a sampling operation on the second fusion feature map to obtain a target sampling feature map;
[0050] Performing feature fusion on the target sampling feature map and the third wire feature map through a feature fusion layer to obtain an intermediate fusion feature map;
[0051] The intermediate fusion feature map is subjected to feature extraction by a second cross-stage fusion module to obtain a third fusion feature map.
[0052] The second aspect of the present invention provides an overhead wire detection system based on a knowledge graph and an improved YOLOv10, comprising:
[0053] An expansion module is used to obtain a plurality of training overhead conductor data and acceptance standard information, and use a pre-trained generation network to perform sample expansion processing on each of the training overhead conductor data to obtain a conductor feature set;
[0054] A training module is used to use the wire feature set to input a preset YOLOv10 defect detection model for training to generate a target defect detection model and target feature data;
[0055] A construction module, configured to construct a wire knowledge graph using the target feature data and the acceptance criteria information;
[0056] a response module, configured to, upon receiving an image of an overhead wire to be tested, input the image of the overhead wire to be tested into the target defect detection model to obtain feature data to be tested;
[0057] The detection module is used to input the feature data to be tested into the conductor knowledge graph to obtain the overhead conductor detection result.
[0058] A third aspect of the present invention provides an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor performs the steps of the overhead wire detection method based on the knowledge graph and the improved YOLOv10 as described in any one of the above items.
[0059] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the overhead wire detection method based on knowledge graph and improved YOLOv10 as described in any one of the above items.
[0060] It can be seen from the above technical solutions that the present invention has the following advantages:
[0061] The present invention uses a pre-trained generative network to perform sample expansion processing on each training overhead conductor data to obtain a conductor feature set. The conductor feature set is then used to train a preset YOLOv10 defect detection model to generate a target defect detection model and target feature data. A conductor knowledge graph is constructed based on the target feature data and acceptance criteria information. When an overhead conductor image to be tested is received, defect detection is performed on the image using the target defect detection model and the conductor knowledge graph to obtain an overhead conductor detection result. This overcomes the technical problem that existing technologies primarily use deep learning networks to automatically detect overhead conductor images and identify and locate hidden dangers, but only identify a single hidden danger type, making it difficult to meet the diverse hidden danger detection needs on overhead conductors and reducing the reliability of overhead conductor operation. Compared with traditional defect detection methods, the present invention uses a pre-trained generative network to perform sample expansion processing on each training overhead conductor data to obtain a conductor feature set, enriching the training samples of the preset YOLOv10 defect detection model. This enables the target defect detection model to accurately identify various hidden danger types, improves the detection accuracy of the target defect detection model, and improves the reliability of overhead conductor operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0063] Figure 1 A flowchart of a method for detecting overhead wires based on a knowledge graph and improved YOLOv10 is provided in accordance with the first embodiment of the present invention;
[0064] Figure 2A flowchart of a method for detecting overhead wires based on a knowledge graph and improved YOLOv10 is provided in accordance with the second embodiment of the present invention;
[0065] Figure 3 A schematic diagram of the structure of a generation network provided in the second embodiment of the present invention;
[0066] Figure 4 A schematic diagram of the structure of a target defect detection model provided in the second embodiment of the present invention;
[0067] Figure 5 A schematic diagram of the structure of a star operation module provided in the second embodiment of the present invention;
[0068] Figure 6 A schematic structural diagram of a detection head provided in the second embodiment of the present invention;
[0069] Figure 7 This is a structural block diagram of an overhead wire detection system based on a knowledge graph and improved YOLOv10 provided in Example 3 of the present invention;
[0070] Figure 8 This is a structural block diagram of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0071] The embodiments of the present invention provide a method and system for detecting overhead wires based on a knowledge graph and an improved YOLOv10, which is used to solve the technical problem that the existing technology mainly uses a deep learning network to automatically detect overhead wire images and identify and locate hidden dangers, but only identifies a single type of hidden danger, which makes it difficult to meet the detection needs of diverse hidden danger types on overhead wires and reduces the reliability of overhead wire operation.
[0072] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0073] See also Figure 1 , Figure 1 This is a flowchart of the steps of a method for detecting overhead wires based on a knowledge graph and improved YOLOv10, provided in Example 1 of the present invention.
[0074] The present invention provides a method for detecting overhead wires based on a knowledge graph and an improved YOLOv10, comprising:
[0075] Step 101: Acquire multiple training overhead conductor data and acceptance criteria information, and use a pre-trained generative network to perform sample expansion processing on each training overhead conductor data to obtain a conductor feature set;
[0076] It should be noted that the training overhead wire data includes normal overhead wire images and defective overhead wire images.
[0077] In this embodiment of the present invention, an unmanned aerial vehicle (UAV) equipped with a high-definition camera captures images of overhead conductors on a power transmission line. These images are then screened and classified to obtain multiple images of normal and defective overhead conductors, along with acceptance criteria information. Each defective overhead conductor image is then preprocessed to obtain multiple first sample images. The multiple normal overhead conductor images and preset attribute control data are then input into a pretrained generative network to obtain multiple second sample images. A conductor feature set is constructed using each of the first and second sample images.
[0078] It should be noted that attribute control data refers to predefined rules or parameters used to automatically manage the physical or electrical characteristics of the conductor.
[0079] It should be noted that the acceptance criteria information includes but is not limited to the overhead conductor defect type, equipment type, specifications, solutions corresponding to each defect type, and defect severity assessment criteria.
[0080] Step 102: Using the wire feature set to input a preset YOLOv10 defect detection model for training, to generate a target defect detection model and target feature data;
[0081] In this embodiment of the present invention, a preset YOLOv10 defect detection model is trained using a wire feature set until a preset stop condition is met, at which point training of the preset YOLOv10 defect detection model is terminated to generate a target defect detection model. The wire feature set is then input into the target defect detection model for feature extraction, obtaining target feature data.
[0082] Step 103: construct a conductor knowledge graph using target feature data and acceptance criteria information;
[0083] In this embodiment of the present invention, knowledge extraction is performed on the acceptance criteria information to obtain entities, their relationships, and their attributes. A knowledge graph structure is then constructed based on a preset graph model and the entities, their relationships, and their attributes. (The knowledge graph structure includes a structural hierarchy and semantic organization. The structural hierarchy includes the device layer, parameter layer, and standard layer, and the semantic organization includes device classification, parameter constraints, and standard applicability.) A knowledge graph is then generated in the data storage system. The target features in the target feature data are then associated with the entities in the knowledge graph to obtain a conductor knowledge graph.
[0084] Step 104: When the image of the overhead wire to be tested is received, the image of the overhead wire to be tested is input into the target defect detection model to obtain feature data to be tested;
[0085] The feature data to be measured refers to the features of the overhead wire detected from the image of the overhead wire to be measured.
[0086] In an embodiment of the present invention, when an image of an overhead wire to be tested is received, the image of the overhead wire to be tested is used as an input of a target defect detection model to obtain feature data to be tested.
[0087] Step 105: Input the feature data to be tested into the conductor knowledge graph to obtain the overhead conductor detection result.
[0088] In an embodiment of the present invention, the feature data to be measured is input into the conductor knowledge graph for retrieval, and the overhead conductor detection result corresponding to the overhead conductor image to be measured is matched.
[0089] In an embodiment of the present invention, a pre-trained generative network is used to perform sample expansion processing on each training overhead conductor data to obtain a conductor feature set. The conductor feature set is then used to train a preset YOLOv10 defect detection model to generate a target defect detection model and target feature data. A conductor knowledge graph is constructed based on the target feature data and acceptance criteria information. When an image of an overhead conductor to be tested is received, defect detection is performed on the image using the target defect detection model and the conductor knowledge graph to obtain an overhead conductor detection result. This overcomes the technical problem that existing technologies primarily utilize deep learning networks to automatically detect overhead conductor images and identify and locate hidden dangers, but only identify a single hidden danger type, making it difficult to meet the diverse hidden danger detection needs on overhead conductors and reducing the reliability of overhead conductor operation. Compared with traditional defect detection methods, the present invention uses a pre-trained generative network to perform sample expansion processing on each training overhead conductor data to obtain a conductor feature set, enriching the training samples of the preset YOLOv10 defect detection model. This enables the target defect detection model to accurately identify various hidden danger types, improves the detection accuracy of the target defect detection model, and improves the reliability of overhead conductor operation.
[0090] See also Figure 2 , Figure 2 A flowchart of the steps of a method for detecting overhead wires based on a knowledge graph and improved YOLOv10 is provided in Example 2 of the present invention.
[0091] The present invention provides a method for detecting overhead wires based on a knowledge graph and an improved YOLOv10, comprising:
[0092] Step 201: Acquire multiple training overhead conductor data and acceptance standard information, perform image preprocessing on defective overhead conductor images of each training overhead conductor data, and obtain multiple first sample images;
[0093] In an embodiment of the present invention, a plurality of training overhead conductor data and acceptance standard information on the overhead conductor are acquired by a drone, and image preprocessing is performed on defective overhead conductor images of each training overhead conductor data to obtain a plurality of first sample images.
[0094] It is worth mentioning that the training overhead wire data collected by the drone covers overhead wire images in various weather conditions and different time periods, and simultaneously obtains positive and negative samples to ensure that the training overhead wire data can cover a variety of lighting conditions, different scenes and background changes.
[0095] It should be noted that the image preprocessing process specifically involves the following steps: A1. Select defective overhead conductor images that meet the requirements from the defective overhead conductor images in the training overhead conductor data. A2. Perform image enhancement on each defective overhead conductor image to obtain multiple first sample images. Image enhancement operations include horizontal and vertical flipping, image blurring, and random transformations of hue and saturation. Image enhancement operations effectively increase the diversity of the dataset, thereby reducing reliance on large-scale annotated data. This significantly improves the robustness and accuracy of the target defect detection model in various environments and conditions, meeting the requirements of practical applications.
[0096] Notably, horizontal and vertical flipping operations improve the model's ability to recognize objects from various viewing angles by simulating the state of power lines in different orientations. Introducing a certain degree of image blur helps the model adapt to the low-resolution images that may appear on power lines, enhancing its ability to detect objects in blurred images. Randomly adjusting the image's hue and saturation to account for variations in lighting conditions ensures that the model maintains good detection performance in a variety of lighting environments.
[0097] Step 202: Input each normal overhead wire image of each training overhead wire data into a pre-trained generation network to obtain a plurality of second sample images;
[0098] Furthermore, the generation network includes a generator and a discriminator, and step 202 includes the following sub-steps:
[0099] S11, inputting normal overhead wire images and preset attribute control data of each training overhead wire data into a generator to obtain multiple wire hidden danger images, wherein the convolution layer in the generator is connected to an adaptive noise injection module;
[0100] In the embodiment of the present invention, see Figure 3As shown, normal overhead wire images of each training overhead wire data and preset attribute control data (i.e., attribute control data includes time series observation data, random noise vectors and attribute control charts) are input into the generator (the generator is a pre-trained MDN (Mozilla Developer Network) generator (i.e., metadata network generator)), and multiple conductor hidden danger images are obtained, wherein the convolution layer in the generator is connected to an adaptive noise injection module.
[0101] It is worth mentioning that time series observation data: provides information related to time. For example, in image generation tasks, if the images are associated with the time dimension (such as continuous frame related tasks in videos), this part of the data can provide relevant time feature information to help the generator generate content that matches the time information. Random noise vector: introduces randomness so that the generator can generate diverse results. Just like when generating images, different noise vectors will make the generator produce images with different appearances, thereby ensuring the richness of the generated samples. Attribute control chart: used to control the attributes of the generated results. For example, in image generation, you can control the color, style, object shape and other attributes of the generated image. Through this part of the input, the user can specify certain specific attributes that he wants the generated sample to have.
[0102] It is worth mentioning that the MDN generator can simulate the posterior distribution, thereby providing non-Gaussian posterior predictions, allowing the generative network to generate a prediction distribution with multiple modalities. Traditional GAN models usually only generate a single point estimate. The traditional GAN model input is (observed values) and ,in, is a set of samples sampled from a normal distribution. and Under these conditions, the predicted likelihood of the input conditions is directly modeled to obtain the traditional GAN model.
[0103] The likelihood function of the traditional GAN model can be expressed as:
[0104]
[0105] in, is the mixing coefficient, is the mean, is the standard deviation, m is the number of mixture components, To generate data, is the observed value, is a sample set sampled from a normal distribution, i is the sample index, t is the time, y t is the target value at time t, N i is the ith normal distribution.
[0106] The discriminator also depends on , the input of the discriminator model is designed to be ,in, For the observed The standard deviation of the set. Time series data value (i.e. target value at time t), is maximized, the generator attempts to generate (Generate data) to deceive the discriminator so that is maximized.
[0107] The loss function of the discriminator of the traditional GAN model is as follows: It consists of two parts, one is the loss of real data (i.e. real images), and the other is the loss of generated data (i.e. fake images):
[0108]
[0109] in, is the expected value of the time series set, is the expected value of the sample set sampled from the state distribution.
[0110] When the calculated loss function is greater than the preset loss threshold, the generated data (i.e., the forged image) is judged to be true, and the forged image is used as the wire hidden danger image. When the calculated loss function is less than or equal to the preset loss threshold, the generated data is judged to be false.
[0111] It should be noted that, see Figure 3 As shown, the generator of the present invention incorporates an adaptive noise injection module after each convolutional layer in the encoder-decoder architecture, explicitly injecting Gaussian noise into the feature map after each convolutional layer. For each noise injection, the network learns an independent scalar to adjust the intensity of the injected noise. By explicitly reflecting the random variations of defects, the generator network can generate more realistic and diverse defect samples.
[0112] It is worth mentioning that the adaptive noise injection module can generate a Gaussian noise matrix of the same size for each feature map. Assume that the size of the feature map F is , we generate a noise matrix N from a Gaussian distribution:
[0113]
[0114] Introducing a learnable scalar parameter To control the intensity of the noise, the adjusted noise matrix Expressed as:
[0115]
[0116] Add the adjusted noise matrix N′ to the feature map F to obtain the noisy feature map F′:
[0117]
[0118] Among them, the formula for Gaussian noise is:
[0119]
[0120] Where x is a random variable, is the mean, is the standard deviation, is the variance, is Gaussian noise.
[0121] It should be noted that, see Figure 3 As shown in Figure 1, the attribute control map of the attribute control data is used to provide better attribute control for the generator. The attribute control map adds specific types of defects to specific locations, where Indicates the presence of defects at the corresponding location, and C represents the number of defect categories. The attribute control map A is incorporated into the network through SPADE normalization (i.e., spatially adaptive normalization) and input into each module of the decoder. After introducing the spatial and attribute control map A, the prediction likelihood function of the generator is adjusted to:
[0122]
[0123] It is worth mentioning that by introducing spatial and category-controlled generative networks, the generated prediction distribution can be more precisely controlled, especially when predictions of a specific category need to be generated at a specific location. This not only improves the flexibility of the generative network, but also enhances its application potential in complex defect generation.
[0124] S12, fusing each conductor hidden danger image with each normal overhead conductor image to obtain a plurality of initial hidden danger sample images;
[0125] In the embodiment of the present invention, each conductor hidden danger image and each normal overhead conductor image are synthesized by alpha blending technology to obtain a plurality of initial hidden danger sample images.
[0126] It should be noted that alpha blending is a commonly used image fusion method that achieves a smooth transition between two images in space by introducing a transparency coefficient. and Add them in a certain ratio to get the fused image. The formula is as follows:
[0127]
[0128] in, The fused image is at position The value of is the transparency coefficient, with a value range of [0,1]. During image synthesis, an alpha gradient can be defined for the edges of the potential danger area, with transparency gradually decreasing from the center to the edge. Based on the defined alpha value, the potential danger area is blended with the normal image, achieving a natural overlay of the potential danger area.
[0129] S13: Input each initial hidden danger sample image into the discriminator for screening to obtain a plurality of second sample images.
[0130] In the embodiment of the present invention, each initial hidden danger sample image is screened by a discriminator to obtain a plurality of second sample images.
[0131] Step 203: construct a wire feature set using each first sample image and each second sample image.
[0132] In this embodiment of the present invention, a standard system is used to manually annotate the hazardous areas of each first sample image and each second sample image. Weeds in each first sample image and each second sample image are also annotated using a minimum bounding rectangle (MBR), resulting in multiple annotated images. (The category and coordinate information of the annotated box in each annotated image is recorded as the center point coordinates (x, y) and the width and height (w, h) of the annotated box to determine the relative position of the weeds in the image.) Each annotated image is divided into a training set and a validation set in an 8:2 ratio to obtain a wire feature set.
[0133] Step 204: Using the wire feature set to input a preset YOLOv10 defect detection model for training, to generate a target defect detection model and target feature data;
[0134] Furthermore, step 204 includes the following sub-steps:
[0135] S21, using the wire feature set to input a preset YOLOv10 defect detection model for training until a preset stop condition is met, thereby obtaining a target defect detection model;
[0136] In an embodiment of the present invention, a preset YOLOv10 defect detection model is trained using a training set of a conductor feature set to obtain training conductor feature data. A loss value of the training set is calculated based on the training conductor feature data. A determination is made as to whether the loss value is less than a preset loss threshold. If the loss value is greater than or equal to the loss threshold, a grid search method or a random search method is used to adjust network parameters of the preset YOLOv10 defect detection model. The process then skips to the step of training the preset YOLOv10 defect detection model using the training set of the conductor feature set to obtain training conductor feature data until the loss value is less than the loss threshold. If the loss value is less than the loss threshold, a target defect detection model is generated.
[0137] It is worth mentioning that after obtaining the target defect detection model, the target defect detection model can be evaluated using the validation set of the wire feature set. The validation set is used to evaluate the target defect detection model to obtain evaluation wire feature data. Based on the evaluation wire feature data, the accuracy of the validation set (accuracy is the ratio of correct predictions among all predicted positive samples), recall (recall is the proportion of all actual positive examples that the model correctly identifies as positive), and average precision are calculated based on the evaluation wire feature data. The network structure and network parameters of the target defect detection model are adjusted based on the accuracy (P), recall (R), average precision (mAP), frames per second (FPS) of the evaluation wire feature data, GFLOPS (giga floating-point operations per second), and model parameter Pare (M).
[0138] The accuracy expression is:
[0139]
[0140] in, is the accuracy, To test the accurate number of weeds in the capacitor bank fence, The number of errors detected in the experiment.
[0141] The recall expression is:
[0142]
[0143] in, is the recall rate, is the number of missed images that the experiment cannot detect.
[0144] The average precision expression is:
[0145]
[0146]
[0147] in, is the average precision, i is the category number, is the total number of categories, is the average precision of the i-th category.
[0148] It's worth noting that the default YOLOv10 defect detection model is an improved YOLOv10 model that introduces large kernel convolution and a partial self-attention module (PSA). Large kernel depthwise convolution effectively expands the model's receptive field and enhances its ability to capture global information. However, simply using large kernel convolution in all stages can lead to shallow feature contamination (affecting the detection of small objects). Therefore, large kernel convolution is only used in small-scale models to reduce additional computational overhead. Furthermore, the improved YOLOv10 model employs a technique called "star operation" to implicitly implement high-dimensional feature mapping in the input low-dimensional feature space. Similar to traditional kernel function methods, star operation enriches the dimensionality of the feature space through nonlinear transformations without increasing explicit computation, enabling the model to more effectively extract fine-grained features in detection tasks. The improved YOLOv10 model recursively expands the dimensionality of implicit features through multiple layers of star operation, simulating extremely high-dimensional feature spaces. This multi-level feature expansion method is equivalent to increasing the complexity and expressiveness of features in the model layer by layer, ensuring that the model has sufficient feature capture capabilities in complex scenarios, especially the ability to extract subtle features.
[0149] Star operation usually refers to element-wise multiplication. In neural networks, it can be expressed as the fusion of two linearly transformed features. For example, there are two linearly transformed features. and , the star operation can be expressed as:
[0150]
[0151] in, is the first weight matrix, is the second weight matrix, is the first bias term, is the second bias term, is the input feature.
[0152] Combine the weight matrix and bias into a single entity W and define X as a vector containing input features and a constant term. In this way, the star operation can be simplified to:
[0153]
[0154] Unlike traditional neural networks that increase dimensions by increasing network width, star operations are stacked layer by layer, with each layer bringing exponential growth to the implicit dimensional complexity.
[0155] S22. Input the wire feature set into the target defect detection model to obtain target feature data.
[0156] In an embodiment of the present invention, the wire feature set is used as an input of a target defect detection model to obtain target feature data.
[0157] Step 205: construct a conductor knowledge graph using target feature data and acceptance criteria information;
[0158] In an embodiment of the present invention, knowledge extraction and structured representation are performed on acceptance criteria information to obtain entities, relationships between entities, and entity attributes. A knowledge graph structure (including structural hierarchies and semantic organization, wherein the structural hierarchies include equipment layers, parameter layers, and standard layers, and the semantic organization includes equipment classification, parameter constraints, and standard applicability) is constructed based on a preset graph model and the entities, relationships between entities, and entity attributes (entity attributes include, but are not limited to, equipment models, voltage levels, and temperature tolerances). A knowledge graph is then generated in a data storage system. Target features in the target feature data (including, but not limited to, towers, conductors, insulators, location coordinates, appearance features, target categories, and detection confidence) are associated with entities in the knowledge graph to obtain a conductor knowledge graph.
[0159] It's worth noting that after obtaining the conductor knowledge graph, it can be verified and optimized to ensure its validity and accuracy. The specific process is as follows: B1. Perform a graph integrity check on the conductor knowledge graph to ensure its structure is reasonable, node relationships are accurate, and redundant and duplicate information is avoided. B2. Conduct inference testing using selected typical acceptance cases to verify the accuracy and logical rationality of the knowledge graph's matching of equipment parameters and acceptance criteria. B3. Based on the verification results, further optimize the graph structure and adjust unreasonable relationship definitions and information layout.
[0160] Step 206: When the image of the overhead wire to be tested is received, the image of the overhead wire to be tested is input into the target defect detection model to obtain feature data to be tested;
[0161] Further, see Figure 4 As shown, the target defect detection model includes a backbone network, an intermediate module, and a detection head group. Step 206 includes the following sub-steps:
[0162] S31, using a backbone network to extract features from the image of the overhead conductor to be measured, and outputting multiple conductor feature maps group by group;
[0163] Furthermore, the backbone network includes a first convolution group, a second convolution group, and a third convolution group, and S31 includes the following sub-steps:
[0164] S311. Perform feature extraction on the overhead wire image to be measured through a first convolution group to obtain a first wire feature map, wherein the first convolution group includes a convolution layer, a star operation module, a convolution layer, a star operation module, and a convolution layer connected in sequence;
[0165] In an embodiment of the present invention, feature extraction is performed on the overhead wire image to be measured through a convolution layer, a star operation module, a convolution layer, a star operation module and a convolution layer in sequence to obtain a first wire feature map.
[0166] S312. Perform feature extraction on the first wire feature map through a second convolution group to obtain a second wire feature map, wherein the second convolution group includes a star operation module and a convolution layer connected in sequence;
[0167] Further, see Figure 5 The star operation module shown includes a depthwise separable convolution layer, a first fully connected layer, a second fully connected layer, a feature fusion layer, a fully connected layer, and a depthwise separable convolution layer. S312 includes the following substeps:
[0168] S3121. Perform feature extraction on the first wire feature map through a depthwise separable convolutional layer to obtain a first depthwise wire feature map;
[0169] In an embodiment of the present invention, feature extraction is performed on the first wire feature map through a depthwise separable convolution layer to obtain a first depthwise wire feature map, wherein the convolution kernel of the depthwise separable convolution layer is 7 and the step size is 1.
[0170] It should be noted that the depthwise separable convolution layer is an efficient convolution operation that significantly reduces the amount of computation and parameters by decomposing the standard convolution into Depthwise convolution and Pointwise convolution.
[0171] S3122. Perform a linear transformation on the first depth wire feature map through a first fully connected layer to obtain a second depth wire feature map;
[0172] S3123. Perform a linear transformation on the first depth wire feature map through a second fully connected layer to obtain a third depth wire feature map;
[0173] In an embodiment of the present invention, a first depth wire feature map is linearly transformed by a first fully connected layer and a second fully connected layer respectively to obtain a second depth wire feature map and a third depth wire feature map.
[0174] S3124, using a feature fusion layer to perform feature fusion on the second depth wire feature map and the third depth wire feature map to obtain a fourth depth wire feature map;
[0175] In the embodiment of the present invention, the second depth wire feature map and the third depth wire feature map are feature fused by a feature fusion layer to obtain a fourth depth wire feature map.
[0176] S3125. Extract features from the fourth depthwise wire feature map through a fully connected layer and a depthwise separable convolutional layer in sequence to obtain a second wire feature map.
[0177] In an embodiment of the present invention, feature extraction is performed on the fourth depthwise wire feature map through a fully connected layer and a depthwise separable convolutional layer in sequence to obtain an initial second wire feature map, and the initial second wire feature map is feature fused with the first wire feature map to obtain a second wire feature map.
[0178] S313. Perform feature extraction on the second wire feature map through a third convolution group to obtain a third wire feature map, wherein the third convolution group includes a star operation module, a convolution layer, a spatial pyramid pooling module, and a partial attention module connected in sequence.
[0179] In an embodiment of the present invention, feature extraction is performed on the second wire feature map through a star operation module, a convolutional layer, a spatial pyramid pooling module (SPPF) and a partial attention module (PSA) in sequence to obtain a third wire feature map.
[0180] It should be noted that the self-attention mechanism can improve the model's global modeling capabilities, but it has high computational complexity and memory usage. The partial attention module (PSA) divides the channel features into two parts and applies self-attention to only one part, thereby retaining the global modeling capabilities while reducing computational costs.
[0181] It should be noted that the spatial pyramid pooling module (SPPF) reduces the amount of computation by reusing the pooling operation while retaining the ability of multi-scale feature extraction.
[0182] S32, continuously downsampling the multiple wire feature maps through the intermediate module to obtain multiple fused feature maps;
[0183] Further, see Figure 4 As shown, the intermediate module includes a first fusion module, a second fusion module, a downsampling module and a third fusion module, and S32 includes the following sub-steps:
[0184] S321. Perform feature fusion on the third wire feature map and the second wire feature map through a first fusion module to obtain a first wire fusion feature map, wherein the first fusion module includes an upsampling module and a feature fusion layer;
[0185] In an embodiment of the present invention, an upsampling operation is performed on the third wire feature map through an upsampling module (Upsamle) to obtain a first upsampling feature map, and feature fusion is performed on the first upsampling feature map and the second wire feature map through a feature fusion layer (Concat) to obtain a first wire fusion feature map.
[0186] S322. Performing feature fusion on the first wire fusion feature map and the first wire feature through a second fusion module to obtain a first fused feature map, wherein the second fusion module includes a first cross-stage fusion module, an upsampling module, a feature fusion layer, and the first cross-stage fusion module;
[0187] In an embodiment of the present invention, feature extraction is performed on the first wire fusion feature map through the first cross-stage fusion module (C2f) and the upsampling module in sequence to obtain a second upsampling feature map, feature fusion is performed on the second upsampling feature map and the first wire feature through the feature fusion layer to obtain an initial first fused feature map, and feature extraction is performed on the initial first fused feature map through the first cross-stage fusion module (C2f) to obtain a first fused feature map.
[0188] S323. Perform a downsampling operation on the first wire fusion feature map through a downsampling module to obtain a second fusion feature map, wherein the downsampling module includes a first basic module, a splicing module, and a first cross-stage fusion module connected in sequence;
[0189] Furthermore, S323 includes the following sub-steps:
[0190] S3231. Perform feature extraction on the first wire fusion feature map through a first basic module to obtain a first target fusion feature map, wherein the first basic module includes a two-dimensional convolution layer, a batch normalization layer, and a SiLU activation function layer connected in sequence;
[0191] In the embodiment of the present invention, feature extraction is performed on the first wire fusion feature map through a two-dimensional convolution layer, a batch normalization layer, and a SiLU activation function layer in sequence to obtain a first target fusion feature map.
[0192] S3232. Extract features from the first target fusion feature map through the splicing module and the first cross-stage fusion module in sequence to obtain a second fusion feature map.
[0193] In the embodiment of the present invention, feature extraction is performed on the first target fusion feature map through the concatenation module (Concat) and the first cross-stage fusion module (C2f) in sequence to obtain the second fusion feature map.
[0194] S324. Perform feature fusion on the second fused feature map and the third wire feature map through a third fusion module to obtain a third fused feature map, wherein the third fusion module includes a channel downsampling module, a feature fusion layer, and a second cross-stage fusion module.
[0195] Furthermore, S324 includes the following sub-steps:
[0196] S3241, using a channel downsampling module to perform a sampling operation on the second fusion feature map to obtain a target sampling feature map;
[0197] In an embodiment of the present invention, a sampling operation is performed on the second fused feature map through a channel downsampling module (ScDown) to obtain a target sampling feature map.
[0198] It should be noted that the channel downsampling module (ScDown) is a scale-aware downsampling module that retains multi-scale information through multi-scale convolution and feature fusion, enhancing the model's ability to perceive multi-scale targets.
[0199] S3242, performing feature fusion on the target sampling feature map and the third wire feature map through a feature fusion layer to obtain an intermediate fusion feature map;
[0200] In the embodiment of the present invention, the target sampling feature map and the third wire feature map are fused by a feature fusion layer (Concat) to obtain an intermediate fused feature map.
[0201] S3243. Perform feature extraction on the intermediate fusion feature map through the second cross-stage fusion module to obtain a third fusion feature map.
[0202] In the embodiment of the present invention, the second cross-stage fusion module (C2fC1B) performs feature extraction on the intermediate fusion feature map to obtain a third fusion feature map.
[0203] It should be noted that the second cross-stage fusion module (C2fC1B) can be composed of a C2f module, a 1x1 convolution and a batch normalization layer to enhance feature extraction capabilities, adjust the number of channels and improve model stability.
[0204] S33. Use the detection head group to perform defect detection on various fused feature images to obtain feature data to be tested.
[0205] Furthermore, S33 includes the following sub-steps:
[0206] S331, matching a corresponding detection head from the detection head group according to the resolution of the fused feature map;
[0207] In the embodiment of the present invention, a corresponding detection head is selected from the three detection heads of the detection head group according to the resolution of the fused feature map.
[0208] It's worth noting that the detection head group fully leverages the advantages of group normalization (GroupNorm) and shared convolution, effectively integrating feature information while minimizing computational effort and complexity. Shared convolution is a core concept in convolutional neural networks (CNNs), allowing the same convolution kernel to use the same weight parameters at different locations. This mechanism significantly reduces the number of parameters required for training, improves computational efficiency, and mitigates the risk of overfitting. Shared convolution effectively extracts local features while preserving spatial structure, enhancing the model's generalization capabilities.
[0209] S332. Use a detection head to perform defect detection on the fused feature map to obtain feature data to be tested, wherein the detection head includes a first group normalized convolution module, a second group normalized convolution module, a second group normalized convolution module and a prediction convolution module connected in sequence.
[0210] In the embodiment of the present invention, see Figure 6 As shown in the figure, the network passes through the first group of normalized convolution modules (i.e., 1×1 depthwise separable convolution), the second group of normalized convolution modules (i.e., 3×3 depthwise separable convolution), the third group of normalized convolution modules (i.e., 3×3 depthwise separable convolution), and the prediction convolution module. The prediction convolution module includes multiple convolutional lateralization modules (i.e., Conv_Reg) and multiple convolutional classification modules (i.e., Conv_Cls).
[0211] It should be noted that the depthwise separable convolution divides the channels of an input image of size [N, C, H, W] into several groups (where H is the height and W is the width), calculates the variance and mean of each group, and then normalizes all the data within that group. Because the calculation of the depthwise separable convolution GroupNorm depends on the number of channels C rather than the batch size N, it can accurately identify features when computer memory is limited or the number of samples is small.
[0212] It should be noted that the prediction box convolution module in the prediction convolution module is connected to a scaling module.
[0213] It is worth mentioning that the scaling module (i.e., Scale module) is used to match the detection of targets of different scales.
[0214] Step 207: Input the feature data to be tested into the conductor knowledge graph to obtain the overhead conductor detection result.
[0215] In an embodiment of the present invention, the feature data to be measured is input into the conductor knowledge graph for retrieval to obtain the overhead conductor detection result.
[0216] In an embodiment of the present invention, a pre-trained generative network is used to perform sample expansion processing on each training overhead conductor data to obtain a conductor feature set. The conductor feature set is then used to train a preset YOLOv10 defect detection model to generate a target defect detection model and target feature data. A conductor knowledge graph is constructed based on the target feature data and acceptance criteria information. When an image of an overhead conductor to be tested is received, defect detection is performed on the image using the target defect detection model and the conductor knowledge graph to obtain an overhead conductor detection result. This overcomes the technical problem that existing technologies primarily utilize deep learning networks to automatically detect overhead conductor images and identify and locate hidden dangers, but only identify a single hidden danger type, making it difficult to meet the diverse hidden danger detection needs on overhead conductors and reducing the reliability of overhead conductor operation. Compared with traditional defect detection methods, the present invention uses a pre-trained generative network to perform sample expansion processing on each training overhead conductor data to obtain a conductor feature set, enriching the training samples of the preset YOLOv10 defect detection model. This enables the target defect detection model to accurately identify various hidden danger types, improves the detection accuracy of the target defect detection model, and improves the reliability of overhead conductor operation.
[0217] See also Figure 7 , Figure 7 This is a structural block diagram of an overhead wire detection system based on a knowledge graph and improved YOLOv10 provided in Example 3 of the present invention.
[0218] The present invention provides an overhead wire detection system based on a knowledge graph and an improved YOLOv10, comprising:
[0219] An expansion module 301 is used to obtain a plurality of training overhead conductor data and acceptance criteria information, and perform sample expansion processing on each training overhead conductor data using a pre-trained generation network to obtain a conductor feature set;
[0220] A training module 302 is configured to use a wire feature set to input a preset YOLOv10 defect detection model for training, thereby generating a target defect detection model and target feature data.
[0221] A construction module 303 is used to construct a conductor knowledge graph using target feature data and acceptance criteria information;
[0222] The response module 304 is configured to input the image of the overhead wire to be tested into the target defect detection model to obtain feature data to be tested when the image of the overhead wire to be tested is received;
[0223] The detection module 305 is used to input the feature data to be tested into the conductor knowledge graph to obtain the overhead conductor detection result.
[0224] Furthermore, the expansion module 301 includes:
[0225] A preprocessing submodule, configured to perform image preprocessing on each defective overhead conductor image of the training overhead conductor data to obtain a plurality of first sample images;
[0226] A generation submodule, configured to input normal overhead wire images of each training overhead wire data into a pre-trained generation network to obtain a plurality of second sample images;
[0227] The first construction submodule is configured to construct a wire feature set using each first sample image and each second sample image.
[0228] Furthermore, the generative network includes a generator and a discriminator, and the generative submodule includes:
[0229] A generating unit is configured to input normal overhead conductor images and preset attribute control data of each training overhead conductor data into a generator to obtain multiple conductor hidden danger images, wherein an adaptive noise injection module is connected after the convolution layer in the generator;
[0230] A fusion unit is used to fuse each conductor hidden danger image with each normal overhead conductor image to obtain a plurality of initial hidden danger sample images;
[0231] The screening unit is used to input each initial hidden danger sample image into the discriminator for screening to obtain multiple second sample images.
[0232] Furthermore, the training module 302 includes:
[0233] The training submodule is used to input the preset YOLOv10 defect detection model using the wire feature set for training until the preset stop condition is met to obtain the target defect detection model;
[0234] The detection submodule is used to input the wire feature set into the target defect detection model to obtain target feature data.
[0235] Furthermore, the target defect detection model includes a backbone network, an intermediate module, and a detection head group. The response module 304 includes:
[0236] A feature extraction submodule is used to extract features from the image of the overhead conductor to be tested using a backbone network and output multiple conductor feature maps in groups;
[0237] The downsampling submodule is used to continuously downsample multiple wire feature maps through the intermediate module to obtain multiple fused feature maps;
[0238] The defect detection submodule is used to use the detection head group to perform defect detection on various fused feature maps to obtain the feature data to be tested.
[0239] Furthermore, the backbone network includes a first convolution group, a second convolution group, and a third convolution group, and a feature extraction submodule, including:
[0240] A first extraction unit is configured to perform feature extraction on the overhead wire image to be measured through a first convolution group to obtain a first wire feature map, wherein the first convolution group includes a convolution layer, a star operation module, a convolution layer, a star operation module, and a convolution layer connected in sequence;
[0241] A second extraction unit is configured to extract features from the first wire feature map through a second convolution group to obtain a second wire feature map, wherein the second convolution group includes a star operation module and a convolution layer connected in sequence;
[0242] The third extraction unit is used to extract features from the second wire feature map through a third convolution group to obtain a third wire feature map, wherein the third convolution group includes a star operation module, a convolution layer, a spatial pyramid pooling module and a partial attention module connected in sequence.
[0243] Furthermore, the star operation module includes a depthwise separable convolutional layer, a first fully connected layer, a second fully connected layer, a feature fusion layer, a fully connected layer and a depthwise separable convolutional layer, and a second extraction unit, including:
[0244] A first extraction subunit is configured to extract features from the first wire feature map through a depthwise separable convolutional layer to obtain a first depthwise wire feature map;
[0245] A first transformation subunit, configured to perform a linear transformation on the first depth wire feature map through a first fully connected layer to obtain a second depth wire feature map;
[0246] A second transformation subunit, configured to perform a linear transformation on the first depth wire feature map through a second fully connected layer to obtain a third depth wire feature map;
[0247] A first fusion subunit is configured to perform feature fusion on the second depth wire feature map and the third depth wire feature map using a feature fusion layer to obtain a fourth depth wire feature map;
[0248] The second extraction subunit is used to extract features of the fourth depthwise wire feature map through a fully connected layer and a depthwise separable convolutional layer in sequence to obtain a second wire feature map.
[0249] Furthermore, the intermediate module includes a first fusion module, a second fusion module, a downsampling module and a third fusion module, and the downsampling submodule includes:
[0250] A first fusion unit is configured to perform feature fusion on the third wire feature map and the second wire feature map through a first fusion module to obtain a first wire fusion feature map, wherein the first fusion module includes an upsampling module and a feature fusion layer;
[0251] a second fusion unit, configured to perform feature fusion on the first wire fusion feature map and the first wire feature through a second fusion module to obtain a first fused feature map, wherein the second fusion module includes a first cross-stage fusion module, an upsampling module, a feature fusion layer, and the first cross-stage fusion module;
[0252] a third fusion unit, configured to perform a downsampling operation on the first wire fusion feature map through a downsampling module to obtain a second fusion feature map, wherein the downsampling module includes a first basic module, a splicing module, and a first cross-stage fusion module connected in sequence;
[0253] The fourth fusion unit is used to perform feature fusion on the second fused feature map and the third wire feature map through a third fusion module to obtain a third fused feature map, wherein the third fusion module includes a channel downsampling module, a feature fusion layer and a second cross-stage fusion module.
[0254] Furthermore, the third fusion unit includes:
[0255] a third extraction subunit, configured to perform feature extraction on the first wire fusion feature map through a first basic module to obtain a first target fusion feature map, wherein the first basic module includes a two-dimensional convolutional layer, a batch normalization layer, and a SiLU activation function layer connected in sequence;
[0256] The second fusion subunit is used to extract features from the first target fusion feature map through the splicing module and the first cross-stage fusion module in sequence to obtain a second fusion feature map.
[0257] Furthermore, the fourth fusion unit includes:
[0258] A sampling subunit, configured to perform a sampling operation on the second fused feature map using a channel downsampling module to obtain a target sampling feature map;
[0259] The third fusion subunit is used to perform feature fusion on the target sampling feature map and the third wire feature map through a feature fusion layer to obtain an intermediate fusion feature map;
[0260] The fourth extraction subunit is used to perform feature extraction on the intermediate fusion feature map through the second cross-stage fusion module to obtain a third fusion feature map.
[0261] Furthermore, the defect detection submodule includes:
[0262] A matching unit, used to match the corresponding detection head from the detection head group according to the resolution of the fused feature map;
[0263] The defect detection unit is used to perform defect detection on the fused feature map using a detection head to obtain feature data to be tested, wherein the detection head includes a first group normalized convolution module, a second group normalized convolution module, a second group normalized convolution module and a prediction convolution module connected in sequence.
[0264] Furthermore, the prediction box convolution module in the prediction convolution module is connected to a scaling module.
[0265] See also Figure 8 , Figure 8 This is a structural block diagram of an electronic device provided in Example 4 of the present invention.
[0266] An electronic device according to an embodiment of the present invention includes: a memory 401 and a processor 402, wherein the memory 401 stores a computer program; when the computer program is executed by the processor 402, the processor 402 executes the overhead wire detection method based on the knowledge graph and the improved YOLOv10 as in any of the above embodiments.
[0267] Memory 401 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Memory 401 has storage space 403 for program code 413 for executing any of the method steps described above. For example, storage space 403 for program code may include individual program codes 413 for implementing various steps in the method described above. These program codes may be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. The program codes may be compressed, for example, in a suitable format. When executed by a processing device, these codes cause the processing device to execute the various steps in the method described above.
[0268] Embodiment 5 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the overhead wire detection method based on the knowledge graph and improved YOLOv10 as in any of the above embodiments is implemented.
[0269] Embodiment 6 of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the overhead wire detection method based on the knowledge graph and improved YOLOv10 as in any of the above embodiments.
[0270] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0271] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0272] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0273] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0274] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0275] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for detecting overhead wires based on knowledge graph and improved YOLOv10, characterized in that: include: Acquire multiple training overhead conductor data and acceptance criteria information, and use a pre-trained generative network to perform sample expansion processing on each of the training overhead conductor data to obtain a conductor feature set; The wire feature set is input into a preset YOLOv10 defect detection model for training to generate a target defect detection model and target feature data; Constructing a conductor knowledge graph using the target feature data and the acceptance criteria information; When receiving an image of an overhead wire to be tested, inputting the image of the overhead wire to be tested into the target defect detection model to obtain feature data to be tested, wherein the target defect detection model includes a backbone network, an intermediate module and a detection head group; Inputting the characteristic data to be measured into the conductor knowledge graph to obtain an overhead conductor detection result; The step of using a pre-trained generative network to perform sample expansion processing on each of the training overhead conductor data to obtain a conductor feature set includes: Performing image preprocessing on each defective overhead wire image of the training overhead wire data to obtain a plurality of first sample images; Inputting the normal overhead wire images of each of the training overhead wire data into a pre-trained generation network to obtain a plurality of second sample images; constructing a wire feature set using each of the first sample images and each of the second sample images; The generation network includes a generator and a discriminator. The step of inputting each normal overhead wire image of the training overhead wire data into the pre-trained generation network to obtain a plurality of second sample images includes: Inputting normal overhead wire images and preset attribute control data of each of the training overhead wire data into the generator to obtain multiple wire hidden danger images, wherein the convolution layer in the generator is connected to an adaptive noise injection module; fusing the conductor hidden danger images and the normal overhead conductor images respectively to obtain a plurality of initial hidden danger sample images; Each of the initial hidden danger sample images is input into the discriminator for screening to obtain a plurality of second sample images.
2. The overhead wire detection method based on knowledge graph and improved YOLOv10 according to claim 1 is characterized in that: The step of using the wire feature set to input a preset YOLOv10 defect detection model for training to generate a target defect detection model and target feature data includes: The wire feature set is input into a preset YOLOv10 defect detection model for training until a preset stop condition is met, thereby obtaining a target defect detection model; The wire feature set is input into the target defect detection model to obtain target feature data.
3. The overhead wire detection method based on knowledge graph and improved YOLOv10 according to claim 1 is characterized in that: The step of inputting the overhead wire image to be tested into the target defect detection model to obtain the feature data to be tested includes: Using the backbone network to extract features from the image of the overhead wire to be tested, and outputting a plurality of wire feature maps group by group; Continuously downsampling the plurality of wire feature maps through the intermediate module to obtain a plurality of fused feature maps; The detection head group is used to perform defect detection on various fused feature maps to obtain feature data to be tested.
4. The overhead wire detection method based on knowledge graph and improved YOLOv10 according to claim 3 is characterized in that: The backbone network includes a first convolution group, a second convolution group, and a third convolution group. The step of using the backbone network to extract features from the image of the overhead wire to be tested and outputting a plurality of wire feature maps group by group includes: Performing feature extraction on the overhead wire image to be tested through the first convolution group to obtain a first wire feature map, wherein the first convolution group includes a convolution layer, a star operation module, a convolution layer, a star operation module and a convolution layer connected in sequence; Performing feature extraction on the first wire feature map through the second convolution group to obtain a second wire feature map, wherein the second convolution group includes a star operation module and a convolution layer connected in sequence; Feature extraction is performed on the second wire feature map through the third convolution group to obtain a third wire feature map, wherein the third convolution group includes a star operation module, a convolution layer, a spatial pyramid pooling module and a partial attention module connected in sequence.
5. The overhead wire detection method based on knowledge graph and improved YOLOv10 according to claim 4 is characterized in that: The star operation module includes a depthwise separable convolution layer, a first fully connected layer, a second fully connected layer, a feature fusion layer, a fully connected layer, and a depthwise separable convolution layer. The step of extracting features from the first wire feature map through the second convolution group to obtain a second wire feature map includes: Performing feature extraction on the first wire feature map through a depthwise separable convolutional layer to obtain a first depthwise wire feature map; Performing a linear transformation on the first depth wire feature map through a first fully connected layer to obtain a second depth wire feature map; Performing a linear transformation on the first depth wire feature map through a second fully connected layer to obtain a third depth wire feature map; Using a feature fusion layer to perform feature fusion on the second depth wire feature map and the third depth wire feature map to obtain a fourth depth wire feature map; Feature extraction is performed on the fourth depthwise wire feature map through a fully connected layer and a depthwise separable convolutional layer in sequence to obtain a second wire feature map.
6. According to the overhead wire detection method based on knowledge graph and improved YOLOv10 in claim 4, the intermediate module includes a first fusion module, a second fusion module, a downsampling module and a third fusion module, and the step of continuously downsampling the multiple conductor feature maps through the intermediate module to obtain multiple fused feature maps is characterized in that: include: Performing feature fusion on the third wire feature map and the second wire feature map through the first fusion module to obtain a first wire fusion feature map, wherein the first fusion module includes an upsampling module and a feature fusion layer; performing feature fusion on the first wire fusion feature map and the first wire feature through the second fusion module to obtain a first fusion feature map, wherein the second fusion module includes a first cross-stage fusion module, an upsampling module, a feature fusion layer, and a first cross-stage fusion module; Performing a downsampling operation on the first wire fusion feature map through the downsampling module to obtain a second fusion feature map, wherein the downsampling module includes a first basic module, a splicing module, and a first cross-stage fusion module connected in sequence; The second fused feature map and the third wire feature map are subjected to feature fusion by the third fusion module to obtain a third fused feature map, wherein the third fusion module includes a channel downsampling module, a feature fusion layer and a second cross-stage fusion module.
7. The overhead wire detection method based on knowledge graph and improved YOLOv10 according to claim 3 is characterized in that: The step of using the detection head group to perform defect detection on various fused feature maps to obtain feature data to be tested includes: Matching a corresponding detection head from the detection head group according to the resolution of the fused feature map; The detection head is used to perform defect detection on the fused feature map to obtain feature data to be tested, wherein the detection head includes a first group normalized convolution module, a second group normalized convolution module, a second group normalized convolution module and a prediction convolution module connected in sequence.
8. The overhead wire detection method based on knowledge graph and improved YOLOv10 according to claim 7 is characterized in that: The prediction box convolution module in the prediction convolution module is connected to a scaling module.
9. The overhead wire detection method based on knowledge graph and improved YOLOv10 according to claim 6 is characterized in that: The step of performing a downsampling operation on the first wire fusion feature map by the downsampling module to obtain a second fusion feature map includes: Performing feature extraction on the first wire fusion feature map through the first basic module to obtain a first target fusion feature map, wherein the first basic module includes a two-dimensional convolution layer, a batch normalization layer, and a SiLU activation function layer connected in sequence; The first target fusion feature map is sequentially subjected to feature extraction by a splicing module and a first cross-stage fusion module to obtain a second fusion feature map.
10. The overhead wire detection method based on knowledge graph and improved YOLOv10 according to claim 6 is characterized in that: The step of performing feature fusion on the second fused feature map and the third wire feature map by the third fusion module to obtain a third fused feature map includes: A channel downsampling module is used to perform a sampling operation on the second fusion feature map to obtain a target sampling feature map; Performing feature fusion on the target sampling feature map and the third wire feature map through a feature fusion layer to obtain an intermediate fusion feature map; The intermediate fusion feature map is subjected to feature extraction by a second cross-stage fusion module to obtain a third fusion feature map.
11. An overhead wire detection system based on knowledge graph and improved YOLOv10, characterized by: include: An expansion module is used to obtain a plurality of training overhead conductor data and acceptance standard information, and use a pre-trained generation network to perform sample expansion processing on each of the training overhead conductor data to obtain a conductor feature set; A training module is used to use the wire feature set to input a preset YOLOv10 defect detection model for training to generate a target defect detection model and target feature data; A construction module, configured to construct a wire knowledge graph using the target feature data and the acceptance criteria information; a response module, configured to, upon receiving an image of an overhead wire to be tested, input the image of the overhead wire to be tested into the target defect detection model to obtain feature data to be tested, wherein the target defect detection model includes a backbone network, an intermediate module, and a detection head group; A detection module, configured to input the characteristic data to be tested into the conductor knowledge graph to obtain an overhead conductor detection result; The expansion module includes: A preprocessing submodule, configured to perform image preprocessing on each defective overhead wire image of the training overhead wire data to obtain a plurality of first sample images; A generating submodule, configured to input each normal overhead wire image of the training overhead wire data into a pre-trained generating network to obtain a plurality of second sample images; A first construction submodule is configured to construct a wire feature set using each of the first sample images and each of the second sample images; The generation network includes a generator and a discriminator, and the generation submodule includes: A generating unit, configured to input normal overhead wire images and preset attribute control data of each of the training overhead wire data into the generator to obtain a plurality of conductor hidden danger images, wherein an adaptive noise injection module is connected after the convolution layer in the generator; a fusion unit, configured to fuse the conductor hidden danger images and the normal overhead conductor images respectively to obtain a plurality of initial hidden danger sample images; The screening unit is used to input each of the initial hidden danger sample images into the discriminator for screening to obtain a plurality of second sample images.
12. An electronic device, characterized in that: It includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor performs the steps of the overhead wire detection method based on the knowledge graph and the improved YOLOv10 according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the overhead wire detection method based on knowledge graph and improved YOLOv10 is implemented as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Identification model training method, early warning method and device for external damage of overhead line
CN117079044A
Lightweight mobile phone screen defect detection method based on improved YOLOv10
CN119904449A