A deep learning-based high-similarity power tool identification method and system
By improving the detection head of the YOLOv8 model, merging the feature extraction convolutional layer, and optimizing the feature extraction process, the problem of difficulty in identifying similar categories in the recognition of electrical tools and appliances by existing models is solved, and higher inference speed and classification accuracy are achieved.
Patent Information
- Application Number
- CN202610275864.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-12
Smart Images

Figure CN122200276A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and more specifically to a method and system for identifying highly similar electrical tools based on deep learning. Background Technology
[0002] Currently, the industry can categorize object detection into two main types: object detection based on traditional convolutional neural network models and object detection based on zero-shot transfer models using the Transformer architecture. The former achieves object detection through image convolution operations and can be further subdivided into two-stage detectors based on Region Proposal + CNN features (e.g., R-CNN, Fast R-CNN, Faster R-CNN, etc.) and single-stage convolutional detection models (e.g., SSD, YOLO series, etc.).
[0003] For object detection technology using image convolution operations, existing two-stage detectors offer significant improvements in accuracy and recognition performance. However, these methods suffer from reduced inference efficiency due to their reliance on traditional algorithms (such as Selective Search) to generate region proposals and then using CNNs to extract features for classification and regression. This makes them unsuitable for real-time detection of video streams. For instance, Chinese patent CN114445328A improves the backbone network of the Faster R-CNN model by receiving grayscale images and converted pseudo-color images for feature extraction and using an attention mechanism for feature fusion, thus improving the accuracy of steel surface defect detection. However, because the patent does not improve the two-stage model architecture, the inference time increases, inference efficiency decreases, and real-time recognition of high frame rate videos becomes impossible.
[0004] Single-stage convolutional detection models, such as the YOLO series, can achieve sufficient inference efficiency for real-time video recognition after targeted training with their low-weight pre-trained models. However, they may cause class confusion when classifying two similar objects. Increasing the weight of the classification loss function during training can lead to offsetting of the candidate box location.
[0005] For zero-shot transfer models based on the Transformer architecture, existing technologies use a zero-shot general model trained on large-scale data as the backbone network, with a custom detection head, and fine-tuned using vertical domain datasets to achieve target object detection. However, models based on the Transformer architecture and trained on large-scale data inevitably require stronger fitting capabilities, but this also leads to larger model sizes and lower inference efficiency, making it unsuitable for real-time recognition of video streams. Furthermore, for vertical target detection tasks, using such a model trained on massive amounts of data as the backbone limits the model's inference capabilities, constrains its robustness, and prevents it from fully utilizing its potential. For example, in Chinese patent CN120544081A, a high-precision UAV target detection model is constructed based on the DINO architecture using a multi-scale dilated convolution fusion method. Although this patent recognizes video, the data exchange between the device acquisition and the algorithm terminal requires network transmission, and the algorithm model uses DINO as the backbone, resulting in a T+1 processing time for the video.
[0006] In summary, two-stage detectors based on region proposal and CNN features, and object detection models based on the Transformer architecture, are unable to perform high frame rate recognition of video streams due to their complex model structures and large number of model parameters. Traditional YOLO models, on the other hand, suffer from weak binding between regression boxes and corresponding classes because their classification and bounding box regression detection are relatively independent in model structure, leading to errors in similar category identification.
[0007] Therefore, how to improve the efficiency and accuracy of multi-target detection and classification is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0008] In view of the above problems, the present invention is proposed to provide a method and system for identifying highly similar electrical appliances based on deep learning, which overcomes or at least partially solves the above problems.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, embodiments of the present invention provide a method for identifying highly similar electrical appliances based on deep learning, comprising the following steps: Acquire a dataset of highly similar power tool images and perform preprocessing; The preprocessed image dataset is input into the improved YOLOv8 model for training; the improved YOLOv8 model includes a backbone network, a neck network and a detection head connected in sequence, wherein the detection head is used to receive feature maps of different scales output by the neck network and output detection and classification results using shared convolutional layers; The trained improved YOLOv8 model is used to detect images of electrical tools.
[0010] Furthermore, in the step of acquiring and preprocessing a dataset of highly similar electrical tools images, the highly similar electrical tool images in the dataset include images of fuse tubes, fuse bodies, and power poles.
[0011] Furthermore, the preprocessing steps specifically include: data augmentation and data normalization.
[0012] Furthermore, in the step where the detection head receives feature maps of different scales output by the neck network, the feature maps of different scales include those with 128 channels and a resolution of 80. High-resolution features of 80; 512 channels, 40 resolution. 40 medium resolution features; and 1024 channels with a resolution of 20. 20 low-resolution features.
[0013] Secondly, embodiments of the present invention provide a high-similarity electrical tool identification system based on deep learning, comprising: The data acquisition and preprocessing module is used to acquire and preprocess a dataset of highly similar power tool images. The model training module trains the improved YOLOv8 model using a preprocessed image dataset. The improved YOLOv8 model includes a backbone network, a neck network, and a detection head connected in sequence. The detection head is used to receive feature maps of different scales output by the neck network and output detection and classification results using shared convolutional layers. The detection and recognition module is used to detect images of electrical tools to be detected using a trained improved YOLOv8 model.
[0014] Preferably, in the data acquisition and preprocessing module, the acquired highly similar electrical tool images include fuse tube images, fuse body images, and power pole images.
[0015] Preferably, the data acquisition and preprocessing module performs preprocessing on the image dataset, specifically including: data augmentation and data normalization on the image dataset.
[0016] Preferably, in the model training module, in the step where the detection head receives feature maps of different scales output by the neck network, the feature maps of different scales include those with 128 channels and a resolution of 80. High-resolution features of 80; 512 channels, 40 resolution. 40 medium resolution features; and 1024 channels with a resolution of 20. 20 low-resolution features.
[0017] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method and system for identifying highly similar electrical tools based on deep learning, which has the following beneficial effects: This invention reduces model parameters and improves model inference speed by merging convolutional layers that extract features from the head portion of the detection head, resulting in greater timeliness in processing real-time video tasks.
[0018] This invention combines convolutional layers that extract features from the head portion of the detection head, retaining more contour feature information for application to the classification head. This aligns with the actual situation in the power tool recognition business scenario where similar categories are similar in color but have subtle differences in contour and texture. Without reducing detection accuracy, this invention effectively improves the model's classification accuracy for similar categories. Attached Figure Description
[0019] 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, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the overall process of the method provided in the embodiments of the present invention; Figure 2 This is a topology diagram of the Head section of the improved YOLOv8 model provided in this embodiment of the invention. Detailed Implementation
[0021] 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 some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] This invention discloses a method for identifying highly similar electrical tools based on deep learning, such as... Figure 1 The process includes the following steps: Acquire the image dataset and perform preprocessing; The preprocessed image dataset is input into the improved YOLOv8 model for training; the improved YOLOv8 model includes a backbone network, a neck network and a detection head connected in sequence, wherein the detection head is used to receive feature maps of different scales output by the neck network and output detection and classification results using shared convolutional layers; The trained improved YOLOv8 model is used to detect the image to be detected.
[0023] On the other hand, embodiments of the present invention also disclose a high similarity electrical tool identification system based on deep learning, including: The data acquisition and preprocessing module is used to acquire and preprocess a dataset of highly similar power tool images. The model training module trains the improved YOLOv8 model using a preprocessed image dataset. The improved YOLOv8 model includes a backbone network, a neck network, and a detection head connected in sequence. The detection head is used to receive feature maps of different scales output by the neck network and output detection and classification results using shared convolutional layers. The detection and recognition module is used to detect images of electrical tools to be detected using a trained improved YOLOv8 model.
[0024] The principles of this invention will be explained in detail below.
[0025] In the first aspect, this invention discloses a method for identifying relevant electrical tools in power systems, such as fuse tubes and fuse bodies, and utility poles, using an improved YOLOv8 model. Due to the similarity in appearance, shape, and color among different types of tools, the traditional YOLOv8 model has difficulty accurately identifying the correct type. Specifically, when identifying the three different types of electrical tools—fuse tubes, fuse bodies, and utility poles—existing detection methods often confuse the detection results because all three are cylindrical in shape and grayish-brown in color.
[0026] Considering that the existing YOLOv8 model does not retain more subtle texture features during feature extraction on the classification branch after the Neck layer, it cannot effectively classify the three types of tools that are highly consistent in shape and color as mentioned above. This application creatively improves the YOLOv8 model by merging the feature extraction from the detection head and the classification head, thereby better preserving the more subtle texture features of power system tools and helping the classification head to perform better classification.
[0027] For details, please refer to Figure 2In this invention, only the detection head part of the YOLOv8 model is optimized, without changing the backbone and neck network of the YOLOv8 model. Therefore, the optimized detection head part still receives the output layers P3, P4 and P5 of the three scales of the YOLOv8 neck network: the P3 output layer is used to output feature maps with 8 times higher resolution and 256 channels, the P4 output layer is used to output feature maps with 16 times higher resolution and 512 channels, and the P5 output layer is used to output feature maps with 32 times lower resolution and 1024 channels. The input tensor is defined as X=[x3, x4, x5], where the sizes of x3, x4 and x5 are [Batch, 256, 80, 80], [Batch, 512, 40, 40] and [Batch, 1024, 20, 20], respectively. Shared Stem layer: Corresponding to the feature maps at the three scales mentioned above, each feature map is concatenated with multiple standard convolutional modules. Each standard convolutional module includes a 3×3 convolutional layer, a batch normalized (BN) layer, and a SiLU activation function, unifying the channel dimension of the output tensor to 128. The specific implementation is as follows: High-resolution feature input: The input scale is [Batch, 256, 80, 80]. Features are extracted through a convolutional layer module with 256 kernels, and the output scale remains unchanged. Then, features are extracted through a convolutional layer module with 128 kernels, and the output scale becomes [Batch, 128, 80, 80]. Medium resolution feature input: The input scale is [Batch, 512, 40, 40]. After feature extraction through a convolutional layer module with 256 kernels, the output scale becomes [Batch, 256, 40, 40]. Then, after feature extraction through a convolutional layer module with 128 kernels, the output scale becomes [Batch, 128, 40, 40]. Low-resolution feature input: The input scale is [Batch, 1024, 20, 20]. After feature extraction through a convolutional layer module with 512 kernels, the output scale becomes [Batch, 512, 20, 20]. Then, after feature extraction through a convolutional layer module with 128 kernels, the output scale becomes [Batch, 128, 20, 20]. Independent task head: For the object detection task, there are two tasks: detection and classification. Each task head contains only one lightweight convolutional layer, focusing on a specific prediction target. The specific implementation is as follows: Detection head: It receives the outputs of the shared Stem layer at three scales: [Batch, 128, 80, 80], [Batch, 128, 40, 40], and [Batch, 128, 20, 20]. The three outputs are respectively processed by three convolutional layer modules containing four convolutional kernels for bounding box offset regression, with output scales of [Batch, 4, 80, 80], [Batch, 4, 40, 40], and [Batch, 4, 20, 20]. Category Header: Since the detection head module has already shared the convolutional layer in the early stage, the classification head, like the detection head, receives the three scale outputs of the shared Stem layer. The three outputs are respectively processed by three convolutional layer modules containing N (the number of vertical scene categories to be identified) convolutional kernels to classify grid candidate boxes, and the output scales are [Batch, N, 80, 80], [Batch, N, 40, 40], and [Batch, N, 20, 20]; Model training, inference, and post-processing stages: In this invention, only the convolutional modules in the Head part of the YOLOv8 model, except for the last output convolutional layer, are merged and shared. Compared with the original model as a whole, the input and output tensor dimensions and sizes of the model do not change. Therefore, the model's preprocessing, loss function, inference postprocessing, etc., can all be based on the Ultralytics official source code. Based on the above scheme, this invention optimizes the YOLOv8-Head part. The optimized model firstly reduces the number of parameters compared to the official model architecture of the same level, decreasing by approximately 15%. Therefore, it improves the model's inference speed compared to the official model, and has a significant advantage over two-stage inference models and models based on the Transformer architecture. Secondly, regarding the model's recognition performance, in the power industry tool recognition scenario, the official YOLOv8 model has significant shortcomings in classifying similar shape categories (such as fuse tubes and fuse bodies), easily confusing the two categories. This phenomenon is particularly pronounced when the total number of categories is large. Furthermore, increasing the classification loss weight affects the candidate box localization. Replacing the model with larger weights improves this phenomenon, but also reduces the inference speed. This is because similar categories cannot be distinguished by appearance and color alone; the main differences lie in shape and texture. Theoretically, candidate box localization also relies more on contour feature information, so both target classification and localization are heavily dependent on contour information, leading to strong coupling between the two tasks in this scenario. Furthermore, smaller models, compared to larger models, do not sufficiently extract contour and texture features during feature extraction and fusion. Additionally, the Head part separates the classification and detection heads, receiving feature maps of different resolutions for further feature extraction before classification and regression, further weakening the strong correlation between classification and detection in similar category recognition, leading to category confusion in similar category scenarios. This solution preserves contour and texture information by merging the convolutional layers of the originally separate classification and detection heads, and finally directly separates the detection and classification heads, directly inputting feature maps containing more contour feature information into the classification head for prediction, thereby improving the model's classification accuracy for similar categories in the electrical equipment recognition scenario.
[0028] In practice, this invention adopts a PyTorch framework, GPU deployment (RTX-2070), and FP16 half-precision inference; the test set contains a total of 2000 similar category data images (320 similar category data images), the average inference time is reduced from the original 59ms / frame to 50ms / frame, a decrease of 15.3%, and the similar category recognition accuracy is improved from 83.75% to 95.94%.
[0029] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0030] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for identifying highly similar electrical tools based on deep learning, characterized in that, Includes the following steps: Acquire a dataset of highly similar power tool images and perform preprocessing; The preprocessed image dataset is input into the improved YOLOv8 model for training; the improved YOLOv8 model includes a backbone network, a neck network and a detection head connected in sequence, wherein the detection head is used to receive feature maps of different scales output by the neck network and output detection and classification results using shared convolutional layers; The trained improved YOLOv8 model is used to detect images of electrical tools.
2. The method as described in claim 1, characterized in that, In the step of acquiring and preprocessing a dataset of highly similar electrical tools images, the highly similar electrical tools images in the dataset include images of fuse tubes, fuse bodies, and power poles.
3. The method as described in claim 1, characterized in that, The preprocessing steps specifically include: data augmentation and data normalization.
4. The method as described in claim 1, characterized in that, In the step where the detection head receives feature maps of different scales output by the neck network, the feature maps of different scales include those with 128 channels and a resolution of 80. High-resolution features of 80; The number of channels is 512, and the resolution is 40. 40 medium resolution features; and 1024 channels with a resolution of 20. 20 low-resolution features.
5. A deep learning-based system for identifying highly similar electrical tools, characterized in that, include: The data acquisition and preprocessing module is used to acquire and preprocess a dataset of highly similar power tool images. The model training module trains the improved YOLOv8 model using a preprocessed image dataset. The improved YOLOv8 model includes a backbone network, a neck network, and a detection head connected in sequence. The detection head is used to receive feature maps of different scales output by the neck network and output detection and classification results using shared convolutional layers. The detection and recognition module is used to detect images of electrical tools to be detected using a trained improved YOLOv8 model.
6. The system as described in claim 5, characterized in that, In the data acquisition and preprocessing module, the acquired images of highly similar electrical tools include images of fuse tubes, fuse bodies, and power poles.
7. The system as described in claim 5, characterized in that, The data acquisition and preprocessing module performs preprocessing on the image dataset, specifically including data augmentation and normalization.
8. The method as described in claim 5, characterized in that, In the model training module, the step where the detection head receives feature maps of different scales output by the neck network includes feature maps with 128 channels and a resolution of 80. High-resolution features of 80; The number of channels is 512, and the resolution is 40. 40 medium resolution features; and 1024 channels with a resolution of 20. 20 low-resolution features.
Citation Information
Patent Citations
Medical image brain tumor detection method and system based on improved Faster R-CNN
CN114445328A
Unmanned aerial vehicle target detection method based on feature fusion DINO
CN120544081A
