Lightweight shielded catenary dropper identification method based on YOLOv10n
By introducing GhostConv and NAM algorithm modules in the YOLOv10n algorithm, combining linear transformation and batch normalization channel attention mechanism, the problem of difficulty in identifying contact network strings in complex weather and occlusion scenarios in the existing technology is solved, and efficient , accurate identification effect.
Patent Information
- Application Number
- CN202411542440.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-14
AI Technical Summary
The existing contact net string recognition methods are difficult to identify occluded contact net strings in complex weather and different lighting conditions.
Using the lightweight occlusion contact network string recognition method based on YOLOv10n, by replacing the C2f algorithm module as the GhostConv algorithm module and replacing the PSA algorithm module as the NAM algorithm module, combining the channel attention mechanism of linear transformation and batch normalization, generate More feature maps and reduce computational costs.
In severe weather such as rain, snow and fog or in scenes of tree branches, it can efficiently identify the contact network strings, significantly reduce the calculation amount and model size, and improve the recognition efficiency and accuracy.
Smart Images

Figure CN119445114A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for identifying a catenary suspension string, and in particular to a method for identifying a lightweight and shielded catenary suspension string based on YOLOv10n. Background Art
[0002] The catenary dropper is an important component of the electrified railway catenary. Its function is to support the catenary's load-bearing cables and contact wires, ensure the stability of the catenary and the smooth power supply of the electric locomotive. The catenary dropper is easily broken, loosened, and falls off due to the influence of bad weather, various external forces, and erosion by current, which seriously affects the safe operation of high-speed railways. Therefore, the detection and identification of the catenary dropper has become an indispensable and important part of the detection of the electrified railway catenary.
[0003] In the early days, the detection and identification of contact network hanging strings were mainly carried out through manual inspection. However, manual inspection is labor-intensive, inefficient, and easily affected by human and environmental factors, especially in bad weather such as rain, snow, and fog. The difficulty of manual inspection increases and the accuracy decreases. In recent years, with the rapid development of deep learning technology, it has been successfully applied in many fields, and many scholars have applied it to the identification and detection tasks of contact network hanging strings.
[0004] Wang Xiaoming and other scholars published "Cat Wire Defect Detection Method Based on YOLOv7x" in the Journal of East China Jiaotong University. They introduced the Swin Transformer network at the end of the trunk feature extraction layer to replace the original extended efficient layer aggregation network module, which improved the network's ability to grasp global information; at the same time, they introduced the SIoU loss function to replace the loss function in the original network, and introduced the Coordinate Attention mechanism in the neck layer. The trained model accuracy reached 95.9%, and the detection speed reached 52 frames per second, solving the problem of low detection efficiency in the field of catenary wire defect identification. However, this method can only process daytime and nighttime images, and does not solve the problem of identifying catenary wires under obstructions such as rain, snow, fog, or tree branches. Summary of the invention
[0005] The purpose of the present invention is to solve the technical problem that the existing contact network suspension string recognition method is difficult to identify obstructed contact network suspension strings under complex weather and different lighting conditions, and to provide a lightweight obstructed contact network suspension string recognition method based on YOLOv10n.
[0006] To achieve the above object, the technical solution adopted by the present invention is:
[0007] A lightweight obstructed contact network dropper string recognition method based on YOLOv10n is special in that it includes the following steps:
[0008] Step 1: Collect images of overhead line suspension strings under different lighting environments and different occlusion scenes, and then filter them to obtain an initial data set;
[0009] Step 2: Generate synthetic datasets under different weather scenarios using the initial dataset, then annotate the catenary string images in the synthetic dataset and the initial dataset to obtain a catenary string image dataset, and divide it into a training set, a validation set, and a test set;
[0010] Step 3: Establish an initial model based on the YOLOv10n algorithm model and input the training set into the initial model;
[0011] Step 4: Use the training set to train the initial model to obtain a training model;
[0012] Step 5: Input the validation set into the training model, output the recognition result of the catenary string image, and optimize and adjust the parameters of the training model according to the loss function between the recognition result and the annotation result of the catenary string image until the validation set is traversed to obtain the optimized model;
[0013] Step 6, repeating steps 4 to 5 at least M times to obtain at least M optimization models, and selecting the optimization model with the smallest loss function between the recognition result and the annotation result of the contact network dropper string image as the obstructed contact network dropper string recognition model; wherein M≥10, and M is an integer;
[0014] Step 7: Input the test set into the occluded contact network string recognition model, use the linear transformation method to convolve the features of each channel of the test set, and use the batch normalization channel attention mechanism to merge the features of each channel, extract feature maps of different scales, and then fuse and recognize the feature maps of different scales to obtain the recognition result of the contact network string image.
[0015] Furthermore, in step 3, the specific method of establishing the initial model based on the YOLOv10n algorithm model is:
[0016] All C2f algorithm modules in the YOLOv10n algorithm model are replaced with GhostConv algorithm modules, and the PSA algorithm module is replaced with the NAM algorithm module to obtain the initial model. The initial model includes a backbone feature extraction network, a neck feature fusion network and a detection head network connected in sequence.
[0017] Furthermore, step 4 is specifically as follows:
[0018] 4.1. The backbone feature extraction network performs 2 convolution processes, 1 GhostConv process, 1 convolution process, 1 GhostConv process, 1 downsampling process, 1 GhostConv process, 1 downsampling process, 1 GhostConv process and 1 SPPF process on all the catenary string images in the training set to obtain a pooled feature map; then the pooled feature map of all the catenary string images in the training set is processed by NAM once to obtain a global feature map, and the feature maps of all the catenary string images in the training set after the 2nd and 3rd GhostConv processes and the global feature map are output to the neck feature fusion network;
[0019] 4.2. The neck feature fusion network upsamples the feature map of a catenary string image in the training set after the second and third GhostConv processing, as well as the global feature map, and then performs feature fusion on them to obtain the fused feature map of the catenary string image in the training set, and sends it to the detection head network;
[0020] 4.3. The detection head network analyzes the fusion feature map of the catenary string image in the training set and outputs the recognition result of the catenary string image in the training set;
[0021] 4.4. Calculate the loss function of the recognition result and the labeling result of the contact network string image in the training set, and then adjust the parameters of the initial model according to the loss function, and then return to step 4.2 to identify the next contact network string image in the training set until the training set is traversed.
[0022] Furthermore, in step 4.1, the specific method of GhostConv processing is:
[0023] A.1. Extract the features of N channels of the overhead wire string image in the training set, and then perform convolution processing on it to reduce the number of channels to n, and obtain the initial feature map, where N / 2≤n<N;
[0024] A.2. Perform identity mapping and channel-separable convolution operations on the initial feature map to obtain a mapping feature map and a convolution feature map of each channel, and then concatenate the two to obtain a concatenated feature map.
[0025] Further, in step 4.1, the specific method of the NAM treatment is:
[0026] B.1. Perform batch normalization on the pooled feature maps of all catenary suspension string images in the training set channel by channel, and obtain the batch normalized feature map of each channel according to the following formula:
[0027]
[0028] Among them, F 2i is the batch normalized feature map of the ith channel, BN(F 1i ) indicates the 1i The feature map is batch normalized, F 1i is the pooled feature map of the i-th channel, γ i is the scale factor of the i-th channel, 1≤i≤C, C is the number of channels, μ B is the mean of all pooled feature maps, σ B is the standard deviation of all pooled feature maps, ε is a small positive number to ensure that the denominator is not 0, β i is the translation factor of the i-th channel;
[0029] B.2. Set the weight factor of each channel according to the following formula:
[0030]
[0031] Among them, ω i is the weight factor of the i-th channel;
[0032] B.3. According to the weight factor of each channel, the normalized feature map of each channel is mapped respectively by the following formula to obtain the mapping feature map of each channel;
[0033] F 3i =sigmoid(ω i (BN(F 1i )))
[0034] Among them, F3 is the mapping feature map of the i-th channel, and sigmoid() is a mapping function used to map the weight value of each channel to the range of (0,1);
[0035] B.4. Merge the mapping feature maps of each channel to obtain the global feature map.
[0036] Further, in step 4.4, adjusting the parameters of the initial model includes: adjusting the weight factor of each channel in the initial model;
[0037] In step 5, adjusting the parameters of the training model includes: adjusting the weight factor of each channel in the training model.
[0038] Furthermore, in step 2, the synthetic data sets under different weather scenes include images of overhead contact network suspension strings in foggy scenes and images of overhead contact network suspension strings in rainy and snowy scenes.
[0039] Furthermore, the synthesis method of the overhead contact wire hanging string image in the fog scene is:
[0040] The fog image is generated by random noise, and then the contact network string image of the fog scene is generated using the following formula:
[0041] img1=a*src1+b*src2+c
[0042] Among them, img1 represents the overhead contact string image in the fog scene; src1 represents the original overhead contact string image; src2 represents the fog image; c represents the bias term, which is 0; a and b represent weight coefficients, a is a random number between [0.03, 0.28], and b is 1.0.
[0043] Furthermore, the synthesis method of the overhead contact wire hanging string image in the rain and snow scene is:
[0044] The rain and snow images are generated by random noise, and then the catenary string images of the rain and snow scenes are generated using the following formula:
[0045]
[0046] Among them, img2 represents the overhead contact string image in the rain and snow scene; src1(i) represents the pixel of the i-th channel of the original overhead contact string image; rain(i) represents the pixel of the i-th channel of the rain and snow image; δ represents the weight coefficient, which is 0.6;
[0047] or:
[0048] The rain and snow images are generated by random noise, and then the catenary string images of the rain and snow scenes are generated using the following formula:
[0049]
[0050] Among them, rain(i) represents the rain and snow image; represents the weight coefficient, which is 0.9; ξ represents the bias term, which is 0.
[0051] Compared with the prior art, the present invention has the following beneficial technical effects:
[0052] 1. The lightweight and obstructed contact network suspension string recognition method based on YOLOv10n provided by the present invention generates more feature maps from existing features by linear transformation, significantly reduces the computational cost without reducing the performance, and uses the batch normalized channel attention mechanism to assign weight coefficients to each channel, and then merges the features of each channel, thereby highlighting significant features while improving the computational efficiency. The contact network suspension string can be well identified in bad weather such as rain, snow, fog, or in scenes where branches are obstructed, with small computational load and high recognition efficiency and accuracy.
[0053] 2. In the lightweight obstructed contact network dropper string identification method based on YOLOv10n provided by the present invention, the GhostConv algorithm module is used to replace the C2f algorithm module, and the Ghost algorithm idea is applied to the identification of obstructed contact network dropper strings. More feature maps can be obtained through fewer parameters, reducing the amount of calculation and the required number of parameters in the identification of obstructed contact network dropper strings, thereby realizing the lightweight of the algorithm model;
[0054] 3. In the lightweight obstructed catenary suspension string recognition method based on YOLOv10n provided by the present invention, the NAM algorithm module is used to replace the PSA algorithm module, and the batch normalization attention mechanism is used to reduce the parameters and the amount of calculation while ensuring the original performance, thereby further improving the lightweight performance of the algorithm model;
[0055] 4. In the lightweight occluded catenary string recognition method based on YOLOv10n provided by the present invention, the number of catenary string image feature maps is first reduced by convolution, and then a larger number of feature maps are obtained by identity mapping and channel-separable convolution operations. Compared with the existing method of performing convolution processing on all catenary string image feature maps, not only the amount of calculation in the feature extraction stage is reduced, but also the amount of calculation for subsequent iterative convolution to obtain multi-scale feature maps is greatly reduced;
[0056] 5. In the lightweight obstructed contact network suspension string recognition method based on YOLOv10n provided by the present invention, the feature maps of each channel are first batch normalized, and then merged according to the weight factors of each channel. The attention is constructed through the normalized scale transformation parameters, which improves the computational efficiency while highlighting the significant features. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A typical overhead wire hanging string diagram in the initial data set is obtained in step 1 of the embodiment of the present invention, wherein (a) is a scene without obstruction during the day, (b) is a scene with strong illumination without obstruction during the day, (c) is a scene without obstruction at night, (d) is a scene with obstruction by branches during the day, (e) is a scene with strong illumination with obstruction by branches during the day, and (f) is a scene with obstruction by branches at night;
[0058] Figure 2 The contact network chord diagram in the initial data set and the contact network chord diagram of the fog scene obtained in step 2 of the embodiment of the present invention are used, wherein (a) is a fog-free scene with daytime obstruction, (b) is a fog-free scene with nighttime obstruction, (c) is a fog-free scene with daytime obstruction, (d) is a fog-free scene with nighttime obstruction, (e) is a foggy scene with daytime obstruction, (f) is a foggy scene with nighttime obstruction, (g) is a foggy scene with daytime obstruction, and (h) is a foggy scene with nighttime obstruction;
[0059] Figure 3This is the existing YOLOv10n algorithm model framework diagram;
[0060] Figure 4 This is a diagram of the initial model algorithm framework established in step 3 of the embodiment of the present invention;
[0061] Figure 5 It is the feature map output by the first C2f algorithm module in the existing YOLOv10n algorithm model;
[0062] Figure 6 The feature map output by the first GhostConv algorithm module in the initial model established in step 3 of the embodiment of the present invention;
[0063] Figure 7 Schematic diagram of using GhostConv processing to perform feature graph convolution operation in step 4.1 of an embodiment of the present invention;
[0064] Figure 8 Schematic diagram of existing feature graph convolution operation;
[0065] Fig. 9 This is a schematic diagram of the operation of NAM processing in step 4.1 of an embodiment of the present invention;
[0066] Fig.10 It is a verification comparison diagram of the recognition results of the overhead contact network suspension diagram in different scenes during the day using the embodiment of the present invention, wherein the scenes of the first group to the sixth group are respectively with tree branch occlusion-no rain and snow-no fog, with tree branch occlusion-no rain and snow-fog, with tree branch occlusion-rain and snow-no fog, without tree branch occlusion-no rain and snow-no fog, without tree branch occlusion-no rain and snow-no fog, without tree branch occlusion-no rain and snow-fog, and without tree branch occlusion-rain and snow-no fog. (a) is the original image, (b) is the recognition result diagram using C2f and PSA algorithm modules, (c) is the recognition result diagram using GhostConv and PSA algorithm modules, (d) is the recognition result diagram using C2f and NAM algorithm modules, and (e) is the recognition result diagram using GhostConv and NAM algorithm modules.
[0067] Fig.11 The diagram is a verification comparison diagram of the recognition results of the contact network suspension string diagram in different scenes at night using the embodiment of the present invention, wherein the scenes of the first group to the sixth group are respectively with tree branch obstruction - no rain, snow and fog, with tree branch obstruction - no rain, snow and fog, with tree branch obstruction - rain, snow and fog, without tree branch obstruction - no rain, snow and fog, without tree branch obstruction - no rain, snow and fog, and without tree branch obstruction - rain, snow and fog. (a) is the original image, (b) is the recognition result diagram using the C2f and PSA algorithm modules, (c) is the recognition result diagram using the GhostConv and PSA algorithm modules, (d) is the recognition result diagram using the C2f and NAM algorithm modules, and (e) is the recognition result diagram using the GhostConv and NAM algorithm modules. DETAILED DESCRIPTION
[0068] The following is a further detailed description of a light-weight and obstructed contact network dropper string identification method based on YOLOv10n proposed by the present invention in conjunction with the accompanying drawings and specific implementation methods. It should be understood by those skilled in the art that these implementation methods are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0069] A lightweight obstructed contact network dropper string recognition method based on YOLOv10n, comprising the following steps:
[0070] Step 1: Collect images of overhead wire suspension strings under different lighting environments and different occlusion scenarios, and then filter them to remove overexposed, dark or no suspension string images to obtain the following images: Figure 1 The initial dataset shown.
[0071] Step 2: Figure 2 As shown, the initial dataset is used to generate synthetic datasets under different weather scenarios, and then the contact network string images in the synthetic dataset and the initial dataset are annotated to obtain a contact network string image dataset, which is divided into a training set, a validation set, and a test set.
[0072] Among them, the synthetic data sets under different weather scenes include images of contact network suspension strings in foggy scenes and images of contact network suspension strings in rainy and snowy scenes.
[0073] The synthesis method of the overhead contact wire image in fog scene is as follows:
[0074] The fog image is generated by random noise, and then the contact network string image of the fog scene is generated using the following formula:
[0075] img1=a*src1+b*src2+c
[0076] Among them, img1 represents the overhead contact string image in the fog scene; src1 represents the original overhead contact string image; src2 represents the fog image; c represents the bias term, which is 0; a and b represent weight coefficients, a is a random number between [0.03, 0.28], and b is 1.0.
[0077] The synthesis method of the overhead contact wire string image in rain and snow scenes is as follows:
[0078] The rain and snow images are generated by random noise, and then the catenary string images of the rain and snow scenes are generated using the following formula:
[0079]
[0080] Wherein, img2 represents the overhead contact wire image of the rain and snow scene; src1(i) represents the pixel of the i-th channel of the original overhead contact wire image, 1≤i≤C, C is the number of channels, and in this embodiment, C is 256; rain(i) represents the pixel of the i-th channel of the rain and snow image; δ represents the weight coefficient, which is 0.6;
[0081] In order to make the overhead contact wire string image in the rain and snow scene richer, this embodiment also adopts the following method to generate the overhead contact wire string image in the rain and snow scene:
[0082] The rain and snow images are generated by random noise, and then the catenary string images of the rain and snow scenes are generated using the following formula:
[0083]
[0084] Among them, rain(i) represents the rain and snow image; represents the weight coefficient, which is 0.9; ξ represents the bias term, which is 0.
[0085] Step 3: Replace all C2f algorithm modules in the YOLOv10n algorithm model with GhostConv algorithm modules, and replace the PSA algorithm module with the NAM algorithm module to obtain the initial model, which includes the backbone feature extraction network, neck feature fusion network, and detection head network connected in sequence. Then input the training set into the backbone feature extraction network.
[0086] like Figure 3 , Figure 4 As shown, based on the existing YOLOv10n algorithm model, this embodiment replaces the C2f algorithm module in the trunk feature extraction network and the neck feature fusion network with the GhostConv algorithm module, which can generate more feature maps from the existing features through linear transformation, significantly reducing the computing cost without reducing the performance. At the same time, the PSA algorithm module at the end of the trunk feature extraction network is replaced by the NAM algorithm module, and the importance of the channel is measured by the batch normalized weight factor to form a channel attention mechanism, reflect the importance difference, highlight the significant features, and quickly identify the contact network suspension string. The number of parameters of the PSA algorithm module is 249728, and the number of parameters of the NAM algorithm module is 512. Compared with the PSA algorithm module, the number of parameters of the NAM algorithm module is greatly reduced.
[0087] like Figure 5 As shown in the figure, it is the feature map output by the C2f algorithm module in the existing YOLOv10n algorithm model. It can be seen that there are two sets of similar feature maps. Figure 6As shown in Table 1, the feature map output by the GhostConv algorithm module in this embodiment, there are almost no similar feature maps, so the feature maps actually obtained are more than those of the C2f algorithm module, and the number of parameters is also reduced. As shown in Table 1, the number of parameters of the GhostConv algorithm module is smaller than that of the C2f algorithm module. The introduction of the GhostConv algorithm module can solve the problem of a large model and realize the lightweight of the algorithm model.
[0088] Table 1 Comparison of parameters between C2f module and GhostConv module
[0089] layer Modules Parameter quantity Modules Parameter quantity 2 C2f 7360 GhostConv 5072 4 C2f 49664 GhostConv 19360 6 C2f 197632 GhostConv 75584 8 C2f 460288 GhostConv 298624 13 C2f 148224 GhostConv 223040 16 C2f 37248 GhostConv 56224 19 C2f 123648 GhostConv 112448
[0090] Step 4: Use the training set to train the initial model to obtain a training model. In this step, a large number of overhead wire hanging string images are used to adjust the parameters of the training model so that the training model can learn the characteristics of the overhead wire hanging string. Specifically:
[0091] 4.1. The backbone feature extraction network performs 2 convolution processes, 1 GhostConv process, 1 convolution process, 1 GhostConv process, 1 downsampling process, 1 GhostConv process, 1 downsampling process, 1 GhostConv process and 1 SPPF process on the contact network string images in the training set to obtain a pooled feature map; then the pooled feature map of all contact network string images in the training set is processed by NAM once to obtain a global feature map, and the feature maps of all contact network string images in the training set after the 2nd and 3rd GhostConv processing and the global feature map are output to the neck feature fusion network.
[0092] Among them, Figure 7 As shown, the specific method of GhostConv processing is:
[0093] A.1. Extract the features of N channels of the overhead wire string image in the training set, and then perform convolution processing on it to reduce the number of channels to N / 2 to obtain the initial feature map;
[0094] A.2. Perform identity mapping and channel-separable convolution operations on the initial feature map to obtain a mapping feature map and a convolution feature map of each channel, and then concatenate the two to obtain a concatenated feature map.
[0095] like Figure 8As shown, the existing feature map convolution operation performs convolution processing on all input features, which has a large amount of calculation, and the YOLOv10n algorithm model subsequently performs multiple iterations and fusion operations on the feature maps, which has a large calculation complexity and parameter quantity. In this embodiment, a 1*1 convolution operation is first performed to generate a feature map with half the number of channels, and then identity mapping and channel-by-channel convolution are performed respectively and then spliced together, and the traditional convolution is divided into two steps, and only ordinary convolution operations are performed to produce more feature maps through linear transformation.
[0096] like Fig. 9 As shown, the specific method of NAM treatment is:
[0097] B.1. Perform batch normalization on the pooled feature maps of all catenary suspension string images in the training set channel by channel, and obtain the batch normalized feature map of each channel according to the following formula:
[0098]
[0099] Among them, F 2i is the batch normalized feature map of the ith channel, BN(F 1i ) indicates the 1i The feature map is batch normalized, F 1i is the pooled feature map of the i-th channel, γ i is the scale factor of the i-th channel, 0≤i≤C, C is the number of channels, μ B is the mean of all pooled feature maps, σ B is the standard deviation of all pooled feature maps, ε is a small positive number to ensure that the denominator is not 0, β i is the translation factor of the i-th channel;
[0100] B.2. Set the weight factor of each channel according to the following formula:
[0101]
[0102] Among them, ω i is the weight factor of the i-th channel;
[0103] B.3. According to the weight factor of each channel, the normalized feature map of each channel is mapped respectively by the following formula to obtain the mapping feature map of each channel;
[0104] F 3i =sigmoid(ω i (BN(F 1i )))
[0105] Among them, F3 is the mapping feature map of the i-th channel, and sigmoid() is a mapping function used to map the weight value of each channel to the range of (0,1);
[0106] B.4. Merge the mapping feature maps of each channel to obtain the global feature map.
[0107] 4.2. The neck feature fusion network upsamples the feature map of a contact network string image in the training set after the second and third GhostConv processing, as well as the global feature map, and then fuses the features to obtain the fused feature map of the contact network string image in the training set, and sends it to the detection head network.
[0108] 4.3. The detection head network analyzes the fusion feature map of the contact network suspension string image in the training set and outputs the recognition result of the contact network suspension string image in the training set.
[0109] 4.4. Calculate the loss function of the recognition result and the labeling result of the contact network string image in the training set, and then adjust the weight factor of each channel in the initial model according to the loss function, and then return to step 4.2 to identify the next contact network string image in the training set until the training set is traversed.
[0110] Step 5: Input the verification set into the training model, output the recognition result of the contact network suspension string image, and optimize and adjust the parameters of the training model according to the loss function between the recognition result and the annotation result of the contact network suspension string image until the verification set is traversed to obtain the optimized model.
[0111] Step 6. Repeat steps 4 and 5 at least M times to obtain at least M optimization models, and select the optimization model with the smallest loss function between the recognition result and the annotation result of the contact network dropper string image as the obstructed contact network dropper string recognition model; wherein M≥10, and M is an integer.
[0112] In step 4-6, the training set is input into the initial model for training. During the training process, the initial model traverses the training set multiple times, and each traversal is an epoch. In each epoch, the initial model will learn and recognize the images in the training set, and then update the initial parameters of the model based on the difference between the recognition result and the annotation result to obtain the training model. After each epoch, the training model will be evaluated on the validation set to confirm the performance of the training model, and ultimately help select the best model parameters and structure.
[0113] Step 7: Input the test set into the optimization model, use the linear transformation method to perform convolution processing on the features of each channel of the contact network string image in the test set, and use the normalized channel attention mechanism to merge the features of each channel, extract feature maps of different scales, and then fuse and identify the feature maps of different scales to obtain the recognition result of the contact network string image.
[0114] The lightweight and obstructed contact network string recognition method based on YOLOv10n provided in this embodiment first collects and screens the contact network string images, removes the contact network images without strings and overexposed and dark images, and then artificially synthesizes the contact network string images in the rain, snow and fog obstruction scene. Then, the GhostConv algorithm module is introduced to replace the C2f algorithm module in the backbone feature extraction network and the neck feature fusion network of the YOLOv10n algorithm model, and more feature maps are generated from the existing features through linear transformation, which significantly reduces the computing cost without reducing the performance. At the same time, the NAM algorithm module is introduced to replace the PSA algorithm module in the backbone feature extraction network, and attention is constructed through normalized scale transformation parameters, which improves the computing efficiency and highlights the significant features.
[0115] like Fig.10 , Fig.11 As shown in the figure, a comparison chart of the recognition results of different algorithm modules in different scenarios is used. It can be seen that the lightweight obstructed contact network string recognition method based on YOLOv10n provided in this embodiment shows good effect in the recognition of contact network strings in different scenarios, and there is no missed recognition phenomenon. It effectively solves the problem of poor recognition of contact network strings under the obstruction of rain, snow, fog or branches, and at the same time greatly reduces the amount of calculation and the size of the model, which is more conducive to the deployment of the model on edge computing devices.
[0116] Experimental results show that the contact network string recognition accuracy, recall rate, mAP and mAP50-95 of this embodiment are 98.6%, 98.6%, 99.4% and 82.3% in severe weather conditions such as rain, snow, fog or tree branch obstruction. The model size is 4.8MB, which can well identify the contact network string in severe weather conditions such as rain, snow, fog or tree branch obstruction.
Claims
1. A lightweight and obstructed contact network dropper string recognition method based on YOLOv10n, characterized in that: The following steps are involved: Step 1: Collect images of overhead line suspension strings under different lighting environments and different occlusion scenes, and then filter them to obtain an initial data set; Step 2: Generate synthetic datasets under different weather scenarios using the initial dataset, then annotate the catenary string images in the synthetic dataset and the initial dataset to obtain a catenary string image dataset, and divide it into a training set, a validation set, and a test set; Step 3: Establish an initial model based on the YOLOv10n algorithm model and input the training set into the initial model; Step 4: Use the training set to train the initial model to obtain a training model; Step 5: Input the validation set into the training model, output the recognition result of the catenary string image, and optimize and adjust the parameters of the training model according to the loss function between the recognition result and the annotation result of the catenary string image until the validation set is traversed to obtain the optimized model; Step 6, repeating steps 4 to 5 at least M times to obtain at least M optimization models, and selecting the optimization model with the smallest loss function between the recognition result and the annotation result of the contact network dropper string image as the obstructed contact network dropper string recognition model; wherein M≥10, and M is an integer; Step 7: Input the test set into the occluded contact network string recognition model, use the linear transformation method to convolve the features of each channel of the test set, and use the batch normalization channel attention mechanism to merge the features of each channel, extract feature maps of different scales, and then fuse and recognize the feature maps of different scales to obtain the recognition result of the contact network string image.
2. The method for identifying lightweight obstructed overhead contact network droppers based on YOLOv10n according to claim 1 is characterized in that: In step 3, the specific method of establishing the initial model based on the YOLOv10n algorithm model is: All C2f algorithm modules in the YOLOv10n algorithm model are replaced with GhostConv algorithm modules, and the PSA algorithm module is replaced with the NAM algorithm module to obtain the initial model. The initial model includes a backbone feature extraction network, a neck feature fusion network and a detection head network connected in sequence.
3. The method for identifying lightweight obstructed overhead contact network droppers based on YOLOv10n according to claim 2 is characterized in that: Step 4 is as follows: 4.
1. The backbone feature extraction network performs 2 convolution processes, 1 GhostConv process, 1 convolution process, 1 GhostConv process, 1 downsampling process, 1 GhostConv process, 1 downsampling process, 1 GhostConv process and 1 SPPF process on all the catenary string images in the training set to obtain a pooled feature map; then the pooled feature map of all the catenary string images in the training set is processed by NAM once to obtain a global feature map, and the feature maps of all the catenary string images in the training set after the 2nd and 3rd GhostConv processes and the global feature map are output to the neck feature fusion network; 4.
2. The neck feature fusion network upsamples the feature map of a catenary string image in the training set after the second and third GhostConv processing, as well as the global feature map, and then performs feature fusion on them to obtain the fused feature map of the catenary string image in the training set, and sends it to the detection head network; 4.
3. The detection head network analyzes the fusion feature map of the catenary string image in the training set and outputs the recognition result of the catenary string image in the training set; 4.
4. Calculate the loss function of the recognition result and the labeling result of the contact network string image in the training set, then adjust the parameters of the initial model according to the loss function, and then return to step 4.2 to identify the next contact network string image in the training set until the training set is traversed.
4. The method for identifying lightweight obstructed overhead contact network droppers based on YOLOv10n according to claim 3 is characterized in that: In step 4.1, the specific method of GhostConv processing is: A.
1. Extract the features of N channels of the overhead wire string image in the training set, and then perform convolution processing on it to reduce the number of channels to n, and obtain the initial feature map, where N / 2≤n<N; A.
2. Perform identity mapping and channel-separable convolution operations on the initial feature map to obtain a mapping feature map and a convolution feature map of each channel, and then concatenate the two to obtain a concatenated feature map.
5. The method for identifying lightweight obstructed overhead contact network droppers based on YOLOv10n according to claim 4 is characterized in that: In step 4.1, the specific method of NAM treatment is: B.
1. Perform batch normalization on the pooled feature maps of all catenary suspension string images in the training set channel by channel, and obtain the batch normalized feature map of each channel according to the following formula: Among them, F 2i is the batch normalized feature map of the ith channel, BN(F 1i ) indicates the 1i The feature map is batch normalized, F 1i is the pooled feature map of the i-th channel, γ i is the scale factor of the i-th channel, 1≤i≤C, C is the number of channels, μ B is the mean of all pooled feature maps, σ B is the standard deviation of all pooled feature maps, ε is a small positive number to ensure that the denominator is not 0, β i is the translation factor of the i-th channel; B.
2. Set the weight factor of each channel according to the following formula: Among them, ω i is the weight factor of the i-th channel; B.
3. According to the weight factor of each channel, the normalized feature map of each channel is mapped respectively by the following formula to obtain the mapping feature map of each channel; F 3i =sigmoid(ω i (BN(F 1i ))) Among them, F 3i is the mapping feature map of the i-th channel, sigmoid() is the mapping function used to map the weight value of each channel to the range of (0,1); B.
4. Merge the mapping feature maps of each channel to obtain the global feature map.
6. The method for identifying lightweight obstructed overhead contact network droppers based on YOLOv10n according to claim 5 is characterized in that: In step 4.4, adjusting the parameters of the initial model includes: adjusting the weight factor of each channel in the initial model; In step 5, adjusting the parameters of the training model includes: adjusting the weight factor of each channel in the training model.
7. The method for identifying lightweight obstructed overhead contact network droppers based on YOLOv10n according to any one of claims 1 to 6, characterized in that: In step 2, the synthetic data sets under different weather scenes include images of overhead contact network suspension strings in foggy scenes and images of overhead contact network suspension strings in rainy and snowy scenes.
8. The method for identifying lightweight obstructed overhead contact network droppers based on YOLOv10n according to claim 7 is characterized in that: The synthesis method of the overhead contact wire hanging string image in the fog scene is as follows: The fog image is generated by random noise, and then the catenary string image of the fog scene is generated using the following formula: img1=a*src1+b*src2+c Among them, img1 represents the overhead contact string image in the fog scene; src1 represents the original overhead contact string image; src2 represents the fog image; c represents the bias term, which is 0; a and b represent weight coefficients, a is a random number between [0.03, 0.28], and b is 1.
0.
9. The method for identifying lightweight obstructed overhead contact network droppers based on YOLOv10n according to claim 8, characterized in that: The synthesis method of the overhead contact wire hanging string image in the rain and snow scene is as follows: The rain and snow images are generated by random noise, and then the catenary string images of the rain and snow scenes are generated using the following formula: Among them, img2 represents the overhead contact string image in the rain and snow scene; src1(i) represents the pixel of the i-th channel of the original overhead contact string image; rain(i) represents the pixel of the i-th channel of the rain and snow image; δ represents the weight coefficient, which is 0.6; or: The rain and snow images are generated by random noise, and then the catenary string images of the rain and snow scenes are generated using the following formula: Among them, rain(i) represents the rain and snow image; represents the weight coefficient, which is 0.9; ξ represents the bias term, which is 0.