Current transformer secondary terminal small target detection method and system based on improved YOLOv10
By improving the YOLOv10 model and combining it with a lightweight network architecture and feature point optimization, the accuracy and real-time performance issues of small target detection on the secondary terminals of current transformers were resolved, enabling automated wiring of the robotic arm and promoting unmanned high-voltage electrical testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU ELECTRIC POWER RES INST
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-08
AI Technical Summary
In high-voltage electrical testing, existing technologies for automated wiring devices for the secondary terminals of current transformers face challenges such as low accuracy in detecting small targets, difficulty in distinguishing targets in complex backgrounds, and high model complexity, making them difficult to deploy in real time on edge devices.
The YOLOv10 model was improved by replacing the backbone network with MobileNetV3, adding or removing head networks, increasing the number of sampled feature points, and optimizing the loss function. Combined with a dual-camera mode for image acquisition and robotic arm control, lightweight and high-precision small target detection was achieved.
It improves the detection efficiency and accuracy of the secondary terminals of current transformers, realizes the automatic docking and wiring of robotic arms, and promotes the full unmanned operation of high-voltage electrical testing.
Smart Images

Figure CN121999201A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of high-voltage electrical testing technology for power equipment inspection, specifically involving a method and system for detecting small targets on the secondary terminals of current transformers based on an improved YOLOv10. Background Technology
[0002] In high-voltage electrical testing of 10kV and 35kV power distribution equipment (such as distribution transformers, circuit breakers, pole-mounted switches, and high-voltage current transformers), existing technologies have automated the primary wiring and disconnection of the test equipment using robots. However, the handling of secondary terminals and temperature measurement lines still relies on manual operation. Operators need to locate the corresponding secondary signal line interfaces on the power distribution equipment and then manually connect the signal lines to the terminals. The secondary signal line interfaces on power distribution equipment are typically small in size and numerous, resulting in low efficiency for manual wiring. This is especially true in large-scale power distribution equipment installation or maintenance scenarios, requiring significant manpower and time investment. Furthermore, operators must work around the power distribution equipment, posing safety hazards such as electric shock. To improve production efficiency and ensure safe production, it is essential to apply automated wiring devices to secondary wiring in the power distribution field.
[0003] However, current automated wiring devices face a significant challenge in target detection technology when used for secondary wiring in power distribution. The secondary terminals of distribution network materials such as current transformers are small, on the order of millimeters, and vary in type. Some are fixed with screws, while others are fixed with pins. Furthermore, current transformers are often deployed in complex environments such as substation switchgear and distribution boxes, where uneven lighting, weak light, and reflections exist. Existing target detection algorithms struggle to distinguish secondary terminal targets from background or similar objects in complex environments, resulting in low detection accuracy. This fails to meet the positioning and type recognition accuracy required for robotic arm docking in automated wiring devices, hindering robotic arm operation. Therefore, the key technology for applying automated wiring devices to secondary wiring in power distribution lies in the targeted improvement of the target detection system to adapt to the characteristics of small targets and complex environments.
[0004] The YOLO (You Only Look Once) series is the most representative real-time detection algorithm framework in the field of object detection. Its architecture is a deep learning model specifically designed for efficiently predicting multiple bounding boxes and their corresponding class probabilities in images. YOLO has a significant advantage in processing speed, making it particularly suitable for industrial scenarios requiring real-time detection capabilities. However, YOLO also has performance bottlenecks when detecting small objects. To improve the performance of small object detection, existing technologies are mostly based on YOLOv10, retaining its backbone architecture while optimizing specific modules, making improvements in areas such as head expansion, loss function optimization, and enhanced feature extraction. Chinese patent CN120014291A discloses an optimization method and detection method for a small object detection model based on YOLOv10. The improvement in head expansion of this technical solution is to add a small object detection head to the detection head part, with a resolution set to 160×160. In terms of enhanced feature extraction, a multi-scale fusion structure based on a dynamic upsampler and a time-frequency domain feature extraction module is used to improve the neck network, capturing spatial and frequency information at different levels by extracting features in the time and frequency domains. Chinese patent CN121095551A discloses a multi-scale target detection method for UAV aerial images based on an improved YOLOv10. The improvements in head expansion involve adding a 160×160 P2 detection layer to the head network's detection layer and removing the 20×20 P5 detection layer. For loss function optimization, an EMASlideLoss loss function is designed, integrating the EMA exponential moving average algorithm to dynamically smooth the loss value, indirectly improving the model's detection performance on difficult samples through a stable gradient update process. In terms of enhanced feature extraction, a multi-scale edge information enhancement (MEE) module is designed to enhance the efficiency and accuracy of target feature extraction from images. An iterative attention feature fusion (iAFF) module is introduced into the neck network to extract information from feature maps at different levels. Chinese patent CN119418233A discloses an S-YOLO method for drone aerial image detection based on YOLOv10. Improvements in head expansion include the introduction of a small target detection layer (P2) and the removal of the redundant P5 detection head for small target detection in the original network. For loss function optimization, the Dice loss function is introduced in the detection part and weighted with BCE as the classification loss function. Enhanced feature extraction involves introducing a small target feature extraction module C2fGCU into the backbone network, strengthening small target features through a gating mechanism, and introducing a feature fusion module FFM in the feature fusion part for multi-scale feature fusion.
[0005] The aforementioned existing technologies, through improvements to YOLOv10, enhance the detection capability for small targets. However, they still have some shortcomings for specialized current transformer secondary terminal target detection applications. First, although existing technologies have extended the head, enhancing the targeting of small targets to some extent, they do not consider the differences in frequency and importance of various targets in the specific detection scenario of current transformer secondary terminals. Therefore, they fail to concentrate resources on the dedicated detection needs of current transformer secondary terminal sizes. Second, regarding loss function optimization, existing technologies propose the EMASlideLoss loss function to dynamically smooth the loss value, indirectly improving the model's detection performance for difficult-to-classify samples through a stable gradient update process; or they introduce the Dice loss function, which is weighted and combined with BCE as the classification loss function. These solutions... Although the loss function has been improved, the focus is mainly on optimizing the classification loss. However, in the target detection task of the secondary terminal of the current transformer, the accuracy of the bounding box has a greater impact on the detection performance than the classification accuracy. The existing technology has not optimized for the characteristic that the localization error dominates in the target detection task of the secondary terminal. Third, in terms of enhancing feature extraction, the existing technical solutions introduce time-domain and frequency-domain convolution modules, reparameterization modules, multi-scale edge information enhancement MEE modules, iterative attention feature fusion iAFF modules, small target feature extraction modules C2fGCU, and feature fusion modules FFM. While these solutions enhance the feature extraction capability, they inevitably increase the complexity and computation of the detection model, making them unsuitable for real-time detection. Furthermore, if the model size is too large, it will be difficult to deploy on the edge equipment of the current transformer secondary terminal detection station. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the technical problem this invention aims to solve is to provide a method and system for detecting small targets on the secondary terminals of current transformers based on an improved YOLOv10. Based on the YOLOv10 backbone architecture, the method extends the header to meet the specific detection requirements of the secondary terminals of current transformers. It optimizes the loss function based on the characteristic that positioning errors dominate in secondary terminal target detection tasks. Simultaneously, while maintaining a lightweight model, it effectively enhances feature extraction capabilities, achieving high-precision, real-time detection of small targets on secondary terminals. This provides reliable target positioning and type recognition support for robotic arm operations, enabling the robotic arm to automatically complete the docking and wiring of secondary terminals.
[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The first aspect of this invention provides a method for detecting small targets on the secondary terminals of a current transformer based on an improved YOLOv10, comprising the following steps: S1. Collect images of the secondary terminals of the current transformer and construct a detection dataset of the secondary terminals of the current transformer. S2, Improve the original YOLOv10 model, the improvements include: S21 replacing the backbone network, S22 adding or removing head networks, S23 adding sampling feature points and S24 optimizing the loss function; S3, Construct an improved YOLOv10 model based on the improvements made in step S2; S4. Input the dataset obtained in step S1 into the improved YOLOv10 model constructed in S3, configure the model training parameters, iteratively train the improved YOLOv10 model and verify its performance. After the verification is passed, a secondary terminal small target detection model is obtained. S5, use a dual-camera combination mode to acquire the image of the secondary terminal of the current transformer under test, and input the image under test into the small target detection model of the secondary terminal obtained in step S4 to obtain the position coordinates and interface type of the secondary terminal interface; S6. Based on the position coordinates and interface type information of the secondary terminal interface obtained in step S5, a control command is generated to drive the robotic arm to move along a preset path and complete the automatic docking and wiring with the secondary terminal.
[0008] Furthermore, in step S1, the bounding boxes and category labels of the images in the current transformer secondary terminal detection dataset are labeled, and the dataset is divided into training set, validation set and test set in a ratio of 8:1:1; the current transformer secondary terminal detection dataset includes images of current transformer secondary terminals under different lighting conditions, operating conditions and shapes.
[0009] Furthermore, in step S2, the method for replacing the backbone network in S21 is to replace the YOLOv10 backbone network with a lightweight MobileNetV3 architecture. The MobileNetV3 module includes depthwise separable convolutions and an SE channel attention mechanism. The specific process is as follows: S211, Perform a 1×1 convolution operation on the input secondary terminal image to increase the number of channels in the feature map; S212 performs a depth convolution operation in the high-dimensional space after adding channels to extract spatial features such as the position and contour of the secondary terminals; S213 utilizes the SE attention mechanism to perform weighted optimization on the feature maps generated by deep convolution; S214, Perform a 1×1 convolution on the feature map optimized by the SE attention mechanism. The 1×1 convolution uses a linear activation function to reduce the number of channels in the feature map. S215, when the stride is 1, the input image is residually connected to the feature map generated by 1×1 convolution; when the stride is 2, the feature map is downsampled.
[0010] Furthermore, in step S2, the method for adding or removing the head network in step S22 is as follows: The large target detection module in the original YOLOv10 is removed, the medium and small target detection modules are retained, and an ultra-small target detection module is added. The medium target detection module generates a 40×40 feature map through 16x downsampling, the small target detection module generates an 80×80 feature map through 8x downsampling, and the ultra-small target detection module generates a 160×160 feature map through 4x downsampling.
[0011] Furthermore, in step S2, the method for adding sampling feature points in step S23 is as follows: Five additional sampling feature points are set to obtain accurate terminal features. The additional sampling feature points include a first sampling feature point, a second sampling feature point, a third sampling feature point, a fourth sampling feature point, and a fifth sampling feature point. The first sampling feature point is located at the geometric center of the secondary terminal to locate the position coordinates of the entire secondary terminal; The second sampling feature point is located at the inflection point of the upper left corner of the secondary terminal, and is used to identify the starting point of the secondary terminal outline and distinguish the secondary terminal from background interference; The third sampling feature point is located at the lower right corner edge inflection point of the secondary terminal, and together with the second sampling point, it generates the rectangular outline of the secondary terminal, thereby calculating its width-to-height ratio; The fourth sampling feature point is located at the geometric center of the top wiring hole of the secondary terminal; The fifth sampling feature point is located at the inflection point where the bottom pin of the secondary terminal connects to the terminal body.
[0012] Furthermore, in step S2, the method for optimizing the loss function in step S24 is as follows: To optimize IoU, corner distance constraints and center Manhattan distance constraints are added. Specific steps include: S241, Input the coordinates of the prediction box ( , , , ) and target bounding box coordinates ( , , , ,in , ) represents the coordinates of the top left corner of the prediction box. , () represents the coordinates of the lower right corner of the prediction box. , The coordinates of the top left corner of the target box. , () represents the coordinates of the bottom right corner of the target box; S242, let the coordinates of the intersection region be ( , , , ), and Take () , )and( , The maximum value in ) and Take () , )and( , Calculate the area I of the intersection region between the predicted bounding box and the target bounding box by taking the minimum value from the given values. , in, The width of the intersection region. The height of the intersection region; S243, Calculate the area U of the union region of the predicted bounding box and the target bounding box: , in, To predict the box width, To predict the bounding box height, The width of the target bounding box. The height of the target bounding box; S244, Calculate the sum of squared corner distances between the predicted bounding box and the target bounding box: , S245, normalization is performed using the squared diagonal distance of the minimum closed bounding box, so that the loss value is not affected by image scale or bounding box size. The formula for calculating the sum of squared Euclidean diagonal distances of the minimum closed bounding box is as follows: , in, The width of the closed frame. The height of the closed frame; S246, Calculate the Manhattan distance between the center point of the target bounding box and the center point of the predicted bounding box: , , The optimized IoU loss function is calculated as follows: .
[0013] Furthermore, in step S3, the improved YOLOv10 model includes a backbone network, a neck network, and a head network, and the specific construction steps are as follows: S31, Construct the backbone network, which includes an initial convolutional layer and the first to sixth MobileNetV3 modules. The image is processed by a 3×3 initial convolutional layer to extract features and obtain a preliminary feature map. The first to sixth MobileNetV3 modules are used to sequentially extract deep features from the preliminary feature map to generate multi-scale intermediate features. S32, construct the neck network, the neck network includes the first to fourth feature fusion modules denoted as F1, F2, F3, F4, the first to fourth ghost convolutions denoted as G1, G2, G3, G4, the first to second upsampling modules denoted as U1, U2, the first to fourth feature splicing modules denoted as C1, C2, C3, C4, and the first to second convolutional layers denoted as Conv1, Conv2; S33, Construct a head network. The head network, based on the features processed by the neck network in step S32, performs target detection on the secondary terminals of the current transformer at different scales. It includes the first to third dual detection heads corresponding to the ultra-small target detection module, the small target detection module, and the medium target detection module. Each dual detection head contains a one-to-many detection head H1 and a one-to-one detection head H2. H1 and H2 complete the target detection of the secondary terminals of the current transformer by performing classification and regression operations on the feature map.
[0014] Furthermore, in step S4, the specific steps are as follows: S41. Configure training parameters for the improved YOLOv10 model: training batch is set to 16, initial learning rate is set to 0.001, cosine annealing learning rate decay strategy is adopted, decay period is 10 rounds, total training rounds are set to 150 rounds, momentum parameter is 0.9, and weight decay coefficient is 0.0005. S42. Input the training set data obtained in step S1 into the improved YOLOv10 model constructed in step S3 with a batch size of 16. S43, iteratively train the improved YOLOv10 model, use the optimized loss function in step S2 to calculate the loss of the quadratic terminal prediction results generated by the model, calculate the parameter gradient based on backpropagation, iteratively update the model weights through the stochastic gradient descent SGD optimizer, and continue iterating until the loss function converges. S44. The improved YOLOv10 model after training is verified using the validation set data obtained in step S1. The verification is performed to check whether the model’s recognition accuracy of the secondary terminals of the current transformer meets the requirements of the robotic arm docking. After the verification is passed, the final secondary terminal small target detection model for the robotic arm docking the secondary terminals of the current transformer is obtained.
[0015] The second aspect of the present invention provides a small target detection system for the secondary terminals of a current transformer based on an improved YOLOv10, including an image acquisition module, a data preprocessing module, a model training module, a target detection module, and a docking control module; The image acquisition module is used to acquire images of the secondary terminals of the current transformer; The data preprocessing module is used to receive the secondary terminal image generated by the image acquisition module, preprocess the image, label the preprocessed image, and construct a dataset. The model training module is used to receive the dataset generated by the data preprocessing module and construct a secondary terminal small target detection model based on the improved YOLOv10 model. The target detection module is used to receive the image to be detected generated by the image acquisition module and the secondary terminal small target detection model generated by the model training module, and input the image to be detected into the secondary terminal small target detection model to generate the position coordinates and type information of the secondary terminal; The docking control module includes a controller and a robotic arm drive unit. The controller receives the position coordinates and type information of the secondary terminals generated by the target detection module and generates control commands accordingly. The robotic arm drive unit receives the control commands and drives the robotic arm to move along a preset path to complete the automatic docking and wiring with the secondary terminals.
[0016] Furthermore, in step S5, the dual cameras include a global camera and a local camera. The global camera is fixed at the high-voltage electrical testing and inspection station, with a horizontal viewing angle range of 0 to 90°. The local camera is installed directly above the end of the robotic arm, with a horizontal viewing angle range of 0 to 40°.
[0017] Compared with the prior art, the present invention has the following beneficial effects: (1) The technical solution of the present invention improves the YOLOv10 model in terms of head expansion, removes the large target detection module in the original YOLOv10, retains the medium and small target detection modules, and adds an ultra-small target detection module. In response to the special detection requirements of the secondary terminals of the current transformer, the model focuses more on the secondary terminal targets in the actual detection scenario, thereby improving the detection efficiency. (2) The technical solution of this invention optimizes the loss function of the YOLOv10 model based on the characteristic that the positioning error is dominant in the secondary terminal target detection task, and adds corner distance constraints and center Manhattan distance constraints to optimize IoU; the corner distance reflects the positional difference between the four corner points of the predicted box and the target box, and the Manhattan distance reflects the distance difference between the center points of the two boxes in the horizontal and vertical directions. The combination of the two can make up for the shortcomings of IoU in the corner position and center position deviation, effectively filter the feature interference caused by shadows and reflections, and ensure the accurate positioning of the center of the docking terminal and the center of the wiring hole; and it is a lightweight operation (addition and subtraction + absolute value), which is suitable for real-time detection; (3) The technical solution of the present invention improves the feature extraction capability of the YOLOv10 model for secondary terminal target detection simply and effectively by adding sampling feature points. Setting 5 additional sampling feature points can capture the feature information of the secondary terminal image more comprehensively and meticulously, directly improving the quality of feature extraction and thus improving the detection accuracy. At the same time, it maintains a low computational complexity, avoids the introduction of complex computation modules, keeps the model lightweight, and is conducive to real-time detection and deployment of resource-constrained edge devices. (4) The improved YOLOv10 secondary terminal small target detection model of the present invention can be deployed inside the robotic arm to provide reliable positioning and type information for the robotic arm, so that the robotic arm can automatically complete the docking and wiring of the secondary terminals, replacing the traditional manual operation. Combined with robot automation technology, it will promote the realization of fully unmanned high-voltage electrical testing of distribution network materials such as high-voltage current transformers. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on the structures shown in these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the process of the secondary terminal small target detection method based on the improved YOLOv10 in an embodiment of the present invention; Figure 2 This is a schematic diagram of the improved YOLOv10 model network structure in an embodiment of the present invention; Figure 3 This is a schematic diagram of the secondary terminal small target detection and docking process based on the improved YOLOv10 model in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0021] like Figure 1 As shown, this embodiment of the invention provides a method for detecting small targets on the secondary terminals of a current transformer based on an improved YOLOv10. The method includes the following steps: S1. Collect images of the secondary terminals of the current transformer and construct a detection dataset of the secondary terminals of the current transformer. The dataset includes images of the secondary terminals of the current transformer under different lighting conditions, operating conditions, and shapes. Label the bounding boxes and category labels on the images in the dataset and divide them into training set, validation set, and test set in a ratio of 8:1:1. S2. Improve the original YOLOv10 model. The improvements include: replacing the backbone network, adding or removing head networks, increasing sampling feature points, and optimizing the loss function.
[0022] S3. Construct an improved YOLOv10 model based on the improvements; S4. Input the training set data obtained in S1 into the improved YOLOv10 model constructed in S3, configure the model training parameters, and iteratively train the improved YOLOv10 model to obtain a secondary terminal small target detection model. S5. Use a dual-camera combination mode to acquire images of the secondary terminals of the current transformer, input the images into the loaded secondary terminal small target detection model, and identify and locate the interface type and position coordinates of the secondary terminal interface. S6. Based on the position coordinates and interface type information of the secondary terminal interface obtained in step S5, generate control commands to drive the robotic arm to move along a preset path and complete the automatic docking and wiring with the secondary terminal.
[0023] In this embodiment of the invention, the industrial camera acquires images of the secondary terminals of a current transformer, constructing a current transformer secondary terminal detection dataset. This dataset includes images of the secondary terminals under two different lighting conditions (normal lighting and weak lighting) and two different shapes (screw-type and plug-in type). The LabelImg tool is used to annotate the bounding boxes and category labels of the secondary terminals in the images of the dataset. The dataset is then expanded by random horizontal flipping and Gaussian blurring, and finally divided into training, validation, and test sets in an 8:1:1 ratio. It should be noted that the secondary terminal image acquisition process needs to consider the environmental and equipment type differences that may occur in actual application scenarios. Under normal lighting, the outline of the terminal, screw patterns, plug-in interfaces, and other details are clear. However, in weak lighting, image contrast may decrease and details may become blurred, potentially causing the model to misjudge terminal edges or key positioning points, leading to misalignment during robotic arm docking.
[0024] In this embodiment of the invention, the specific improvements in step S2 include: S21. Replace the backbone network: The original YOLOv10 backbone network is replaced with a lightweight MobileNetV3 architecture. The MobileNetV3 module includes depthwise separable convolutions and a SE channel attention mechanism. The specific steps include: Perform a 1×1 convolution operation on the input secondary terminal image to increase the number of channels in the feature map; Deep convolution is performed in the high-dimensional space after adding channels to extract spatial features such as the position and contour of the secondary terminals; The SE attention mechanism is used to perform weighted optimization on the feature maps generated by deep convolution; The feature map optimized by the SE attention mechanism is subjected to a 1×1 convolution, which uses a linear activation function to reduce the number of channels in the feature map. When the stride is 1, the input image is residually connected to the feature map generated by 1×1 convolution; When the step size is 2, the feature map is downsampled.
[0025] S22, Adding or removing head network: The large target detection module in the head network of the original YOLOv10 model can only generate a 20×20 feature map after performing a 32x downsampling on the original image. For the secondary terminals of current transformers with small detection size, the feature map can only capture a single feature point or cannot capture any feature points at all. Therefore, the large target detection module and related feature layers are removed from the improved YOLOv10 model to eliminate their interference with the detection of small targets on the secondary terminals, reduce the network redundancy computation, and add an ultra-small target detection module.
[0026] The large target detection module in the original YOLOv10 is removed, the medium and small target detection modules are retained, and an ultra-small target detection module is added. The medium target detection module generates a 40×40 feature map through 16x downsampling, the small target detection module generates an 80×80 feature map through 8x downsampling, and the ultra-small target detection module generates a 160×160 feature map through 4x downsampling.
[0027] It should be noted that, in order to better achieve precise docking of the robotic arm with the secondary terminals of the current transformer, hierarchical downsampling processing and corresponding detection modules can be used together to meet the recognition accuracy and efficiency requirements of targets of different scales. For the micro-screws and tiny markings on the secondary terminals of the current transformer, microscopic features must be preserved to ensure recognition and positioning accuracy. The corresponding feature map generated by the neck network is downsampled by 4 times and then input into the ultra-small target detection module. Although the computational load is slightly larger than that of high-multiple downsampling, this increase in computational load is within an acceptable range because the detection result of ultra-small targets directly determines the accuracy of the docking reference of the robotic arm. For multiple connection points of a single terminal block unit, the shape and position relationship of the terminal posts, such small targets are the direct operation objects of the robotic arm docking. It is necessary to accurately identify their geometric parameters and spatial layout. The corresponding feature map generated by the neck network is downsampled by 8 times and then input into the small target detection module. For multiple sets of terminal block integrated modules and the connection area between terminals and external wiring, it is necessary to simultaneously identify local features and global relationships. A 16-fold downsampling is used and then input into the medium target detection module, which can take into account both local features and global relationships, and provide a basis for real-time path planning for the robotic arm.
[0028] S23. Add sampling feature points: It should be noted that the secondary terminals of current transformers are small in size, and after sampling the original model, only blurry features remain, making precise docking impossible for the robotic arm. In this embodiment of the invention, five additional sampling feature points are set to obtain accurate terminal features, preventing the robotic arm from misidentifying the terminals as background or other components during the docking process. These include: The first sampling feature point is located at the geometric center of the secondary terminal to locate the position coordinates of the entire secondary terminal; The second sampling feature point is located at the inflection point of the upper left corner of the secondary terminal, and is used to identify the starting point of the secondary terminal outline and distinguish the secondary terminal from background interference. The third sampling feature point is located at the bottom right corner edge inflection point of the secondary terminal, and together with the second sampling point, it generates the rectangular outline of the secondary terminal, thereby calculating its width-to-height ratio; The fourth sampling feature point is located at the geometric center of the wiring hole on the top of the secondary terminal. The wiring hole is a key functional part for the robot arm docking, and its positional accuracy directly affects the success rate of the robot arm docking. This feature point allows the network to focus on the core functional area of the terminal, and even if the secondary terminal is small, the type of secondary terminal can be accurately identified through the wiring hole feature.
[0029] The fifth sampling feature point is located at the inflection point where the bottom pin of the secondary terminal connects to the terminal body.
[0030] S24. Optimize the loss function: Traditional IoU loss functions assess bounding box similarity solely based on the overlap ratio between the predicted and target bounding boxes, neglecting key geometric features such as box position and shape, resulting in poor optimization capabilities for small target localization. Current transformers are commonly deployed in substation switchgear and distribution boxes, where uneven lighting, weak light, and reflections can easily blur or interfere with the background of millimeter-sized secondary terminal features, leading to bounding box selection offsets. This can cause gradient vanishing during model training, preventing the model from optimizing bounding box regression accuracy. In this embodiment, corner distance calculation is optimized to simultaneously improve the terminal's contour and aspect ratio, and the Manhattan distance is combined to strengthen positional constraints. The corner distance reflects the positional differences between the four corners of the predicted and target bounding boxes, while the Manhattan distance reflects the horizontal and vertical distance differences between the center points of the two boxes. The combination of these two methods compensates for the shortcomings of IoU in corner and center position deviations, effectively filtering feature interference caused by shadows and reflections, and ensuring accurate positioning of the terminal center and wiring hole center.
[0031] To optimize IoU, corner distance constraints and center Manhattan distance constraints are added. Specific steps include: Input the coordinates of the prediction box ( , , , ) and target bounding box coordinates ( , , , , ( , ) represents the coordinates of the top left corner of the prediction box. , ) represents the coordinates of the lower right corner of the prediction box. , ) represents the coordinates of the top-left corner of the target bounding box. , The coordinates of the bottom right corner of the target bounding box are shown below. It should be noted that while a rectangular region is typically represented using the top left and bottom right corner coordinates, in practice, model predictions have uncertainties. To ensure the rectangle has a valid width in the horizontal direction and a valid height in the vertical direction, the predicted bounding box, the target bounding box, and subsequent formulas must all satisfy the following conditions: , .
[0032] Let the coordinates of the intersection region be ( , , , ), and Take () , )and( , The maximum value in ) and Take () , )and( , Calculate the area of the intersection region between the predicted bounding box and the target bounding box by finding the minimum value among the values in the given set. I :
[0033] in, The width of the intersection region. The height of the intersection region.
[0034] Calculate the area of the union region of the predicted bounding box and the target bounding box. U :
[0035] in, To predict the box width, To predict the bounding box height, The width of the target bounding box. The height of the target bounding box.
[0036] Calculate the sum of squared corner distances between the predicted bounding box and the target bounding box:
[0037] Normalization is performed using the squared diagonal distance of the minimum closed bounding box, so that the loss value is not affected by image scale or bounding box size. The formula for calculating the sum of squared Euclidean diagonal distances of the minimum closed bounding box is as follows:
[0038] in, The width of the closed frame. This represents the height of the closed frame.
[0039] Calculate the Manhattan distance between the center point of the target bounding box and the center point of the predicted bounding box:
[0040] The optimized IoU loss function is calculated as follows:
[0041] like Figure 2 As shown, in this embodiment of the invention, the specific steps in step S3 are as follows: S31. Construct a backbone network, which includes: an initial convolutional layer, and the first to sixth MobileNetV3 modules. The image is processed by a 3×3 initial convolutional layer to extract features and obtain a preliminary feature map. The first to sixth MobileNetV3 modules are used to progressively extract deep features from the preliminary feature map to generate multi-scale intermediate features. The initial convolutional layer is used for basic feature extraction. The third version module of the first mobile terminal convolutional neural network is used for shallow feature extraction; The second mobile terminal convolutional neural network third version module is used to generate the first feature fusion path; The third version of the third mobile terminal convolutional neural network module is used to deepen feature extraction; The third version module of the fourth mobile terminal convolutional neural network is used to generate the second feature fusion path; The fifth mobile terminal convolutional neural network third version module is used to further refine features; The sixth mobile terminal convolutional neural network third version module is used to provide deep semantic features.
[0042] S32. Construct a neck network, the neck network comprising first to fourth feature fusion modules (denoted as F1, F2, F3, F4), first to fourth ghost convolutions (denoted as G1, G2, G3, G4), first to second upsampling modules (denoted as U1, U2), first to fourth feature splicing modules (denoted as C1, C2, C3, C4), and first to second convolutional layers (denoted as Conv1, Conv2); S33. Construct a head network. The head network is used to perform target detection at different scales on the secondary terminals of the current transformer based on the features processed by the neck network in step S32. It includes a first to third dual detection head corresponding to an ultra-small target detection module, a small target detection module, and a medium target detection module. Each dual detection head includes a one-to-many detection head H1 and a one-to-one detection head H2. H1 and H2 perform classification and regression operations on the feature map to complete the target detection of the secondary terminals of the current transformer.
[0043] In this embodiment of the invention, the improved YOLOv10 model operation process is as follows: The C1 receives the first feature map generated by the second MobileNetV3 module and performs feature concatenation with the second feature map generated by U1 to obtain the first concatenated feature map. F1 receives the first spliced feature map generated by C1 and performs feature fusion to obtain the first fused feature map; G2 receives the first fused feature map generated by F1. The ghost convolutional layer can reduce the amount of computation and achieve lightweighting to obtain the third feature map. The feature map is input to the first dual detection head. Conv1 receives the third feature map generated by G2, performs a convolution operation to adjust the number of feature map channels and spatial dimension, and obtains the fourth feature map. The C3 receives the third feature map generated by Conv1 and the fifth feature map generated by G1 and performs feature concatenation to obtain the third concatenated feature map; The F3 receives the third spliced feature map generated by C3 and performs feature fusion to enhance the feature representation capability of small targets, thereby obtaining the third fused feature map; The G3 receives the third fused feature map generated by the F3 and extracts features to obtain the sixth feature map, which is then input to the second dual detection head. Conv2 receives the sixth feature map generated by G3, adjusts the number of feature map channels and spatial dimension to obtain the seventh feature map; The C4 receives the seventh feature map generated by Conv2 and the eighth feature map generated by the sixth MobileNetV3 module, and performs feature concatenation to obtain the fourth concatenated feature map. The F4 receives the fourth spliced feature map generated by C4, and fuses the feature maps to enhance the feature representation capability of small targets, thus obtaining the fourth fused feature map. The G4 receives the fourth fused feature map generated by the F4 and performs feature extraction to obtain the ninth feature map, which is then input to the third dual detection head. The C2 receives the tenth feature map generated by the fourth MobileNetV3 module and the eleventh feature map generated by U2 to obtain the second spliced feature map; The F2 receives the second spliced feature map generated by C2 and performs feature fusion to obtain the second fused feature map; G1 receives the second fused feature map generated by F2, performs feature extraction, and generates a fifth feature map; In this embodiment of the invention, the specific steps in step S4 are as follows: S41. Configure training parameters for the improved YOLOv10 model: training batch is set to 16, initial learning rate is set to 0.001, cosine annealing learning rate decay strategy is adopted, decay period is 10 rounds, total training rounds are set to 150 rounds, momentum parameter is 0.9, and weight decay coefficient is 0.0005. S42. Input the training set data obtained in step S1 into the improved YOLOv10 model constructed in step S3 with a batch size of 16. S43. Iteratively train the improved YOLOv10 model, use the optimized loss function in step S3 to calculate the loss of the quadratic terminal prediction results generated by the model, calculate the parameter gradient based on backpropagation, iteratively update the model weights through the stochastic gradient descent SGD optimizer, and continue iterating until the loss function converges. S44. The improved YOLOv10 model after training is verified using the validation set data obtained in step S1. The verification is performed to check whether the model’s recognition accuracy of the secondary terminals of the current transformer meets the requirements of the robotic arm docking. After the verification is passed, the final detection model for the robotic arm docking the secondary terminals of the current transformer is obtained.
[0044] In this embodiment of the invention, a dual-camera combination mode is used to acquire images of the secondary terminals of the current transformer. The acquired images are then input into a loaded secondary terminal small target detection model to identify and locate the interface type and position coordinates of the secondary terminal interface.
[0045] The dual-camera combination includes a global camera and a local camera. The global camera is fixed at the high-voltage electrical testing and inspection station, with a horizontal viewing angle range of 0 to 90° to completely cover the secondary terminal area, facilitating the initial positioning and obstacle avoidance of the robotic arm. The local camera is installed directly above the end of the robotic arm, with a horizontal viewing angle range of 0 to 40°, used to accurately identify the precise center, angle, and contour of the secondary terminals to control the robotic arm to complete the docking operation.
[0046] In actual operation, after the global camera identifies the docking target, the robotic arm can be controlled to move to the pre-docking position directly above the secondary terminal to be docked. Once the robotic arm enters the pre-docking position, the local camera is activated to take close-up pictures of the secondary terminal. The improved YOLOv10 small target detection model is used to identify and locate the type and position of the secondary terminal, and the docking position of the robotic arm is adjusted until the docking is completed.
[0047] like Figure 3 As shown, this embodiment of the invention also provides a small target detection system for the secondary terminals of a current transformer based on an improved YOLOv10, the system comprising: The image acquisition module uses a dual-camera combination mode to acquire images of the secondary terminals of the current transformer; The data preprocessing module is used to receive secondary terminal images generated by the image acquisition module, preprocess the images, label the preprocessed images, and construct a dataset, which is divided into training set, validation set and test set in a ratio of 8:1:1. The model training module is used to receive the training set and validation set generated by the data preprocessing module, and to build a secondary terminal small target detection model based on the improved YOLOv10 model. The target detection module is used to receive the image to be detected generated by the image acquisition module and the secondary terminal small target detection model generated by the model training module, and input the image to be detected into the secondary terminal small target detection model to generate the position coordinates, type and confidence of the secondary terminal; The docking control module includes a controller and a robotic arm drive unit. The controller receives the position coordinates and type information of the secondary terminals generated by the target detection module, and generates control commands based on the coordinates and type information. The robotic arm drive unit receives the control commands and drives the robotic arm to move along a preset path to complete the automatic docking and wiring with the secondary terminals.
[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A small target detection system for the secondary terminals of a current transformer based on an improved YOLOv10, characterized in that, It includes an image acquisition module, a data preprocessing module, a model training module, an object detection module, and a docking control module; The image acquisition module is used to acquire images of the secondary terminals of the current transformer; The data preprocessing module is used to receive the secondary terminal image generated by the image acquisition module, preprocess the image, label the preprocessed image, and construct a dataset. The model training module is used to receive the dataset generated by the data preprocessing module and construct a secondary terminal small target detection model based on the improved YOLOv10 model. The target detection module is used to receive the image to be detected generated by the image acquisition module and the secondary terminal small target detection model generated by the model training module, and input the image to be detected into the secondary terminal small target detection model to generate the position coordinates and type information of the secondary terminal; The docking control module includes a controller and a robotic arm drive unit. The controller receives the position coordinates and type information of the secondary terminals generated by the target detection module and generates control commands accordingly. The robotic arm drive unit receives the control commands and drives the robotic arm to move along a preset path to complete the automatic docking and wiring with the secondary terminals.
2. A method for detecting small targets on the secondary terminals of a current transformer based on an improved YOLOv10, implemented based on the small target detection system for the secondary terminals as described in claim 1, characterized in that... Includes the following steps: S1. Collect images of the secondary terminals of the current transformer and construct a detection dataset of the secondary terminals of the current transformer. S2, Improve the original YOLOv10 model, the improvements include: S21 replacing the backbone network, S22 adding or removing head networks, S23 adding sampling feature points and S24 optimizing the loss function; S3, Construct an improved YOLOv10 model based on the improvements made in step S2; S4. Input the dataset obtained in step S1 into the improved YOLOv10 model constructed in S3, configure the model training parameters, iteratively train the improved YOLOv10 model and verify its performance. After the verification is passed, a secondary terminal small target detection model is obtained. S5, use a dual-camera combination mode to acquire the image of the secondary terminal of the current transformer under test, and input the image under test into the small target detection model of the secondary terminal obtained in step S4 to obtain the position coordinates and interface type of the secondary terminal interface; S6. Based on the position coordinates and interface type information of the secondary terminal interface obtained in step S5, a control command is generated to drive the robotic arm to move along a preset path and complete the automatic docking and wiring with the secondary terminal.
3. The method for detecting small targets in secondary terminals according to claim 2, characterized in that, In step S1, bounding boxes and category labels are labeled on the images in the current transformer secondary terminal detection dataset, and the dataset is divided into training set, validation set and test set in a ratio of 8:1:
1. The current transformer secondary terminal detection dataset includes images of current transformer secondary terminals under different lighting conditions, operating conditions and shapes.
4. The method for detecting small targets in secondary terminals according to claim 3, characterized in that, In step S2, the method for replacing the backbone network in S21 is to replace the YOLOv10 backbone network with a lightweight MobileNetV3 architecture. The MobileNetV3 module includes depthwise separable convolutions and SE channel attention mechanisms. The specific process is as follows: S211, Perform a 1×1 convolution operation on the input secondary terminal image to increase the number of channels in the feature map; S212 performs a depth convolution operation in the high-dimensional space after adding channels to extract spatial features such as the position and contour of the secondary terminals; S213 utilizes the SE attention mechanism to perform weighted optimization on the feature maps generated by deep convolution; S214, Perform a 1×1 convolution on the feature map optimized by the SE attention mechanism. The 1×1 convolution uses a linear activation function to reduce the number of channels in the feature map. S215, when the stride is 1, the input image is residually connected to the feature map generated by 1×1 convolution; when the stride is 2, the feature map is downsampled.
5. The method for detecting small targets in secondary terminals according to claim 4, characterized in that, In step S2, the method for adding or removing the head network in step S22 is as follows: The large target detection module in the original YOLOv10 is removed, the medium and small target detection modules are retained, and an ultra-small target detection module is added. The medium target detection module generates a 40×40 feature map through 16x downsampling, the small target detection module generates an 80×80 feature map through 8x downsampling, and the ultra-small target detection module generates a 160×160 feature map through 4x downsampling.
6. The method for detecting small targets in secondary terminals according to claim 5, characterized in that, In step S2, the method for adding sampling feature points in step S23 is as follows: Five additional sampling feature points are set to obtain accurate terminal features. The additional sampling feature points include a first sampling feature point, a second sampling feature point, a third sampling feature point, a fourth sampling feature point, and a fifth sampling feature point. The first sampling feature point is located at the geometric center of the secondary terminal to locate the position coordinates of the entire secondary terminal; The second sampling feature point is located at the inflection point of the upper left corner of the secondary terminal, and is used to identify the starting point of the secondary terminal outline and distinguish the secondary terminal from background interference; The third sampling feature point is located at the lower right corner edge inflection point of the secondary terminal, and together with the second sampling point, it generates the rectangular outline of the secondary terminal, thereby calculating its width-to-height ratio; The fourth sampling feature point is located at the geometric center of the top wiring hole of the secondary terminal; The fifth sampling feature point is located at the inflection point where the bottom pin of the secondary terminal connects to the terminal body.
7. The method for detecting small targets in secondary terminals according to claim 6, characterized in that, In step S2, the method for optimizing the loss function in step S24 is as follows: To optimize IoU, corner distance constraints and center Manhattan distance constraints are added. Specific steps include: S241, Input the coordinates of the prediction box ( , , , ) and target bounding box coordinates ( , , , ,in , ) represents the coordinates of the top left corner of the prediction box. , () represents the coordinates of the lower right corner of the prediction box. , The coordinates of the top left corner of the target box. , () represents the coordinates of the bottom right corner of the target box; S242, let the coordinates of the intersection region be ( , , , ), and Take () , )and( , The maximum value in ) and Take () , )and( , Calculate the area I of the intersection region between the predicted bounding box and the target bounding box by taking the minimum value from the given values. , in, The width of the intersection region. The height of the intersection region; S243, Calculate the area U of the union region of the predicted bounding box and the target bounding box: , in, To predict the box width, To predict the bounding box height, The width of the target bounding box. The height of the target bounding box; S244, Calculate the sum of squared corner distances between the predicted bounding box and the target bounding box: , S245, normalization is performed using the squared diagonal distance of the minimum closed bounding box, so that the loss value is not affected by image scale or bounding box size. The formula for calculating the sum of squared Euclidean diagonal distances of the minimum closed bounding box is as follows: , in, The width of the closed frame. The height of the closed frame; S246, Calculate the Manhattan distance between the center point of the target bounding box and the center point of the predicted bounding box: , , The optimized IoU loss function is calculated as follows: 。 8. The method for detecting small targets in secondary terminals according to claim 7, characterized in that, In step S3, the improved YOLOv10 model includes a backbone network, a neck network, and a head network. The specific construction steps are as follows: S31, Construct the backbone network, which includes an initial convolutional layer and the first to sixth MobileNetV3 modules. The image is processed by a 3×3 initial convolutional layer to extract features and obtain a preliminary feature map. The first to sixth MobileNetV3 modules are used to sequentially extract deep features from the preliminary feature map to generate multi-scale intermediate features. S32, construct the neck network, the neck network includes the first to fourth feature fusion modules denoted as F1, F2, F3, F4, the first to fourth ghost convolutions denoted as G1, G2, G3, G4, the first to second upsampling modules denoted as U1, U2, the first to fourth feature splicing modules denoted as C1, C2, C3, C4, and the first to second convolutional layers denoted as Conv1, Conv2; S33, Construct a head network. The head network, based on the features processed by the neck network in step S32, performs target detection on the secondary terminals of the current transformer at different scales. It includes the first to third dual detection heads corresponding to the ultra-small target detection module, the small target detection module, and the medium target detection module. Each dual detection head contains a one-to-many detection head H1 and a one-to-one detection head H2. H1 and H2 complete the target detection of the secondary terminals of the current transformer by performing classification and regression operations on the feature map.
9. The method for detecting small targets in secondary terminals according to claim 8, characterized in that, In step S4, the specific steps are as follows: S41, Configure training parameters for the improved YOLOv10 model: training batch is set to 16, initial learning rate is set to 0.001, cosine annealing learning rate decay strategy is adopted, decay period is 10 rounds, total training rounds are set to 150 rounds, momentum parameter is 0.9, and weight decay coefficient is 0.0005. S42, input the training set data obtained in step S1 into the improved YOLOv10 model constructed in step S3 with a batch size of 16; S43, iteratively train the improved YOLOv10 model, use the optimized loss function in step S2 to calculate the loss of the quadratic terminal prediction results generated by the model, calculate the parameter gradient based on backpropagation, iteratively update the model weights through the stochastic gradient descent SGD optimizer, and continue iterating until the loss function converges. S44. The improved YOLOv10 model after training is verified using the validation set data obtained in step S1. The verification is performed to check whether the model’s recognition accuracy of the secondary terminals of the current transformer meets the requirements of the robotic arm docking. After the verification is passed, the final secondary terminal small target detection model for the robotic arm docking the secondary terminals of the current transformer is obtained.
10. The method for detecting small targets in secondary terminals according to any one of claims 2 to 9, characterized in that, In step S5, the dual cameras include a global camera and a local camera. The global camera is fixed at the high-voltage electrical testing and inspection station, and its horizontal viewing angle range is set to 0-90°. The local camera is installed directly above the end of the robotic arm, and its horizontal viewing angle range is set to 0-40°.
Citation Information
Patent Citations
YOLOv10-based unmanned aerial vehicle aerial image detection method for S-YOLO
CN119418233A
YOLOv10-based small target detection model optimization method and detection method
CN120014291A
Unmanned aerial vehicle aerial image multi-scale target detection method based on improved YOLOv10
CN121095551A