A target detection method and device for the power industry
By using a pre-trained target detection model for the power industry and data augmentation technology, the problems of large labeled data volume and low training accuracy in the power industry have been solved, achieving efficient and accurate target detection and promoting the intelligent development of the power industry.
Patent Information
- Application Number
- CN202310636391.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2043-05-31
AI Technical Summary
In the power industry, target detection tasks require a large amount of labeled data. Manual labeling is tedious and time-consuming, and traditional methods are not sufficiently trained, resulting in low accuracy and a lack of semantic understanding and visual feature representation capabilities, which limits the accuracy and generalization ability of the model.
A pre-trained target detection model for the power industry is used, combined with the Segment Anything model for semantic segmentation and bounding box annotation. Data augmentation training is performed using a small amount of labeled data to improve the model's accuracy and generalization ability.
It significantly reduces the amount of annotation required, improves the accuracy and generalization ability of the target detection model, and can more accurately identify targets in power equipment and scenarios, reduce potential risks, improve the work efficiency and safety of front-line personnel, and is applicable to different power industry scenarios.
Smart Images

Figure CN116704218B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology in the power industry, specifically to a target detection method and apparatus for the power industry. Background Technology
[0002] In the power industry, target detection plays an important role in enabling intelligent applications in key areas such as equipment monitoring, fault diagnosis, and safety management.
[0003] However, traditional object detection methods typically require a large amount of labeled data for model training. In large-scale application scenarios such as the power industry, obtaining sufficient quantity and quality of labeled data is a significant challenge. Manual annotation is tedious, time-consuming, and prone to subjectivity and inconsistency, making the required amount of labeled data a bottleneck that limits the application scope and iterative optimization of object detection models.
[0004] Low training accuracy is another key problem in object detection tasks. Traditional methods train object detection models directly from scratch, failing to fully utilize existing large-scale data and knowledge. This direct training method has two main problems: First, the model needs to be trained on limited labeled data, resulting in insufficient training and low accuracy; second, the object detection model lacks sufficient semantic understanding and visual feature representation capabilities, failing to accurately capture the complex shape and contextual information of the target, further limiting the model's accuracy and generalization ability. Summary of the Invention
[0005] To overcome the above-mentioned shortcomings, this invention proposes a target detection method and device for the power industry.
[0006] Firstly, a target detection method for the power industry is provided, the target detection method for the power industry comprising:
[0007] Acquire the image of the scene to be detected;
[0008] The image of the scene to be detected is used as input to a pre-trained target detection model for the power industry, and the detection result of the image of the scene to be detected is obtained from the output of the pre-trained target detection model for the power industry.
[0009] The detection results include at least one of the following: the location and category of the target.
[0010] Preferably, the category includes at least one of the following: power equipment category, preset facility and scenario category, and preset fault and abnormal scenario category.
[0011] Preferably, the process of acquiring the pre-trained power industry target detection model includes:
[0012] Using the scene image with unlabeled detection results as input to the Segment Anything model, we obtain the semantic segmentation image output by the SegmentAnything model;
[0013] The bounding boxes of the semantic segmentation images are labeled to obtain the first training data;
[0014] The initial target detection model is trained using the first training data.
[0015] Furthermore, after training the initial target detection model using the training data, the process includes:
[0016] Construct a second training data using scene images with labeled detection results;
[0017] The pre-trained power industry target detection model is trained using the second training data to obtain the pre-trained power industry target detection model.
[0018] Furthermore, the amount of data in the second training data is less than the amount of data in the first training data.
[0019] Furthermore, the method includes:
[0020] Data augmentation is performed on the first training data and the second training data.
[0021] Furthermore, the data augmentation of the first training data and the second training data includes:
[0022] The first and second training data are subjected to random horizontal and vertical flips with a probability of 0.5, random image rotation with an angle of -20 degrees to 20 degrees and a step size of 1 degree, random rotation with fixed angles of 90 degrees, 180 degrees and 270 degrees, and random scaling of the image size from 0.25 to 4 times, respectively.
[0023] Furthermore, the algorithm used in the process of acquiring the scene image of the labeled detection result is either a rectangular box annotation algorithm or an instance segmentation annotation algorithm.
[0024] Secondly, a target detection device for the power industry is provided, the target detection device for the power industry comprising:
[0025] The acquisition module is used to acquire images of the scene to be detected.
[0026] The analysis module is used to take the scene image to be detected as input to a pre-trained power industry target detection model, and obtain the detection result of the scene image to be detected output by the pre-trained power industry target detection model.
[0027] The detection results include at least one of the following: the location and category of the target.
[0028] Thirdly, a computer device is provided, comprising: one or more processors;
[0029] The processor is used to store one or more programs;
[0030] When the one or more programs are executed by the one or more processors, the power industry target detection method is implemented.
[0031] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, wherein when the computer program is executed, the power industry target detection method is implemented.
[0032] The above-described technical solutions of the present invention have at least one or more of the following beneficial effects:
[0033] This invention provides a method and apparatus for target detection in the power industry, comprising: acquiring an image of a scene to be detected; using the image of the scene to be detected as input to a pre-trained target detection model for the power industry, and obtaining a detection result of the scene image output by the pre-trained target detection model for the power industry; the detection result includes at least one of the following: the location and category of the target. The technical solution provided by this invention solves the problems of large annotation volume and low training accuracy in target detection tasks in the power industry, and has wider applicability, providing a more efficient and accurate target detection solution, promoting the intelligent development of the power industry and other fields. Specifically:
[0034] First, this invention significantly reduces the amount of annotation required for target detection models, enabling frontline personnel to more easily obtain sufficient quantity and quality of labeled data. This reduces the workload and time consumption of frontline personnel, allowing them to focus more on field work and task execution.
[0035] Secondly, the introduction of the pre-trained power industry target detection model improves the accuracy and generalization ability of the target detection model. This enables frontline personnel to accurately identify and locate targets in power equipment, facilities, and scenarios, such as faults and abnormal situations. This helps to detect problems in a timely manner, reduce potential risks, and improve the work efficiency and safety of frontline personnel.
[0036] Furthermore, the method of this invention has broad applicability and can be applied to various power industry scenarios and task requirements. Whether it is power equipment inspection, fault detection, or safety monitoring, frontline personnel can benefit from the efficient and accurate target detection solution provided by this invention. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the main steps of the target detection method in the power industry according to an embodiment of the present invention;
[0038] Figure 2 This is a main structural block diagram of the power industry target detection device according to an embodiment of the present invention. Detailed Implementation
[0039] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0040] 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 some embodiments of the present invention, 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.
[0041] As disclosed in the background section, target detection plays an important role in the power industry, enabling intelligent applications in key areas such as equipment monitoring, fault diagnosis, and safety management.
[0042] However, traditional object detection methods typically require a large amount of labeled data for model training. In large-scale application scenarios such as the power industry, obtaining sufficient quantity and quality of labeled data is a significant challenge. Manual annotation is tedious, time-consuming, and prone to subjectivity and inconsistency, making the required amount of labeled data a bottleneck that limits the application scope and iterative optimization of object detection models.
[0043] Low training accuracy is another key problem in object detection tasks. Traditional methods train object detection models directly from scratch, failing to fully utilize existing large-scale data and knowledge. This direct training method has two main problems: First, the model needs to be trained on limited labeled data, resulting in insufficient training and low accuracy; second, the object detection model lacks sufficient semantic understanding and visual feature representation capabilities, failing to accurately capture the complex shape and contextual information of the target, further limiting the model's accuracy and generalization ability.
[0044] To address the aforementioned problems, this invention provides a target detection method and apparatus for the power industry, comprising: acquiring a scene image to be detected; using the scene image to be detected as input to a pre-trained power industry target detection model to obtain a detection result of the scene image output by the pre-trained power industry target detection model; the detection result includes at least one of the following: the location and category of the target. The technical solution provided by this invention solves the problems of large annotation volume and low training accuracy in target detection tasks in the power industry, and has wider applicability, providing a more efficient and accurate target detection solution, promoting the intelligent development of the power industry and other fields. Specifically:
[0045] First, this invention significantly reduces the amount of annotation required for target detection models, enabling frontline personnel to more easily obtain sufficient quantity and quality of labeled data. This reduces the workload and time consumption of frontline personnel, allowing them to focus more on field work and task execution.
[0046] Secondly, the introduction of the pre-trained power industry target detection model improves the accuracy and generalization ability of the target detection model. This enables frontline personnel to accurately identify and locate targets in power equipment, facilities, and scenarios, such as faults and abnormal situations. This helps to detect problems in a timely manner, reduce potential risks, and improve the work efficiency and safety of frontline personnel.
[0047] Furthermore, the method of this invention has broad applicability and can be applied to various power industry scenarios and task requirements. Whether it is power equipment inspection, fault detection, or safety monitoring, frontline personnel can benefit from the efficient and accurate target detection solution provided by this invention.
[0048] The above plan will be explained in detail below.
[0049] Example 1
[0050] See appendix Figure 1 , Figure 1 This is a schematic flowchart illustrating the main steps of a target detection method for the power industry according to an embodiment of the present invention. Figure 1 As shown, the target detection method for the power industry in this embodiment of the invention mainly includes the following steps:
[0051] Step S101: Acquire the image of the scene to be detected;
[0052] Step S102: Use the image of the scene to be detected as input to the pre-trained power industry target detection model to obtain the detection result of the image of the scene to be detected output by the pre-trained power industry target detection model;
[0053] The detection results include at least one of the following: the location and category of the target.
[0054] In this embodiment, the category includes at least one of the following: power equipment category, preset facility and scenario category, preset fault and abnormal scenario category, for example, the fault and abnormal scenario category is missing transmission line bolts, and damaged appearance of metering device.
[0055] In this embodiment, the process of obtaining the pre-trained target detection model for the power industry includes:
[0056] Using the scene image with unlabeled detection results as input to the Segment Anything model, we obtain the semantic segmentation image output by the SegmentAnything model;
[0057] The bounding boxes of the semantic segmentation images are labeled to obtain the first training data;
[0058] The initial target detection model is trained using the first training data.
[0059] In one implementation, after training the initial object detection model using the training data, the process includes:
[0060] Construct a second training data using scene images with labeled detection results;
[0061] The pre-trained power industry target detection model is trained using the second training data to obtain the pre-trained power industry target detection model.
[0062] In one implementation, the amount of data in the second training data is less than the amount of data in the first training data.
[0063] In one implementation, the method includes:
[0064] Perform data augmentation on the first and second training data;
[0065] In one implementation, the data augmentation of the first training data and the second training data includes:
[0066] The first and second training data are subjected to random horizontal and vertical flips with a probability of 0.5, random image rotation with an angle of -20 degrees to 20 degrees and a step size of 1 degree, random rotation with fixed angles of 90 degrees, 180 degrees and 270 degrees, and random scaling of the image size from 0.25 to 4 times, respectively.
[0067] In one implementation, the algorithm used in the process of acquiring the scene image of the labeled detection result is either a rectangular bounding box annotation algorithm or an instance segmentation annotation algorithm.
[0068] In one specific implementation, the entire training process is illustrated in the following flowchart:
[0069] Step 1: Data Preparation
[0070] First, collect and prepare a target detection dataset for the power industry, including labeled image data and corresponding target labels. The dataset should cover power equipment, facilities, and scenarios, as well as common faults and anomalies.
[0071] Step 2: Training the pre-trained model
[0072] We trained a pre-trained model using Segment Anything on a large-scale unlabeled image dataset. The pre-trained model learns rich semantic information and visual features. The training process can employ self-supervised learning or other suitable unsupervised learning methods. The input to the pre-trained model is the original image data, and the output is the corresponding semantically segmented image.
[0073] Step 3: Training the object detection model
[0074] Based on the pre-trained model, the downstream task model, namely the object detection model, is trained. Using a labeled image dataset, the pre-trained model is used as the initial model for supervised object detection model training. A common object detection model can be used, such as Faster R-CNN, YOLO, or SSD. The input to the object detection model is the raw image data, and the output is the location and category information of the objects in the image.
[0075] Step 4: Model Optimization and Adjustment
[0076] The trained object detection model can be optimized and adjusted to further improve accuracy and performance. Various optimization techniques, such as learning rate adjustment, data augmentation, and model fusion, can be used to achieve better results.
[0077] Step 5: Model Evaluation and Testing
[0078] The optimized object detection model is evaluated and tested. Using an independent test dataset, the model's performance on object detection tasks is assessed, including metrics such as accuracy, recall, and precision. The performance and accuracy of the object detection model are validated by comparing it with standard evaluation metrics, such as mean average precision (mAP) and object detection accuracy. Based on the evaluation results, necessary adjustments and improvements are made to further optimize the model.
[0079] Step 6: Model Application and Deployment
[0080] After completing model training and optimization, the trained target detection model is applied to actual target detection tasks in the power industry. By inputting the image data to be detected, the model can output the location and category information of the targets in the image, thereby achieving target detection of power equipment, facilities, and scenes.
[0081] Step 7: Continuous optimization and iteration
[0082] As data from the power industry accumulates and new scenarios emerge, the trained model can be continuously optimized and iterated. By regularly updating and retraining the model, it can adapt to new object detection requirements and improve model performance.
[0083] The technical solution of this invention effectively addresses the target detection task in the power industry by combining a pre-trained model method based on Segment Anything with the training process of an object detection model. By reducing the amount of annotation required, improving training accuracy, and providing broader applicability, this invention offers a more accurate and efficient target detection solution, promoting the intelligent development of the power industry.
[0084] Example 2
[0085] Based on the same inventive concept, this invention also provides a target detection device for the power industry, such as... Figure 2 As shown, the power industry target detection device includes:
[0086] The acquisition module is used to acquire images of the scene to be detected.
[0087] The analysis module is used to take the scene image to be detected as input to a pre-trained power industry target detection model, and obtain the detection result of the scene image to be detected output by the pre-trained power industry target detection model.
[0088] The detection results include at least one of the following: the location and category of the target.
[0089] Preferably, the category includes at least one of the following: power equipment category, preset facility and scenario category, and preset fault and abnormal scenario category.
[0090] Preferably, the process of acquiring the pre-trained power industry target detection model includes:
[0091] Using the scene image with unlabeled detection results as input to the Segment Anything model, we obtain the semantic segmentation image output by the SegmentAnything model;
[0092] The bounding boxes of the semantic segmentation images are labeled to obtain the first training data;
[0093] The initial target detection model is trained using the first training data.
[0094] Furthermore, after training the initial target detection model using the training data, the process includes:
[0095] Construct a second training data using scene images with labeled detection results;
[0096] The pre-trained power industry target detection model is trained using the second training data to obtain the pre-trained power industry target detection model.
[0097] Furthermore, the amount of data in the second training data is less than the amount of data in the first training data.
[0098] Furthermore, the method includes:
[0099] Perform data augmentation on the first and second training data;
[0100] Furthermore, the data augmentation of the first training data and the second training data includes:
[0101] The first and second training data are subjected to random horizontal and vertical flips with a probability of 0.5, random image rotation with an angle of -20 degrees to 20 degrees and a step size of 1 degree, random rotation with fixed angles of 90 degrees, 180 degrees and 270 degrees, and random scaling of the image size from 0.25 to 4 times, respectively.
[0102] Furthermore, the algorithm used in the process of acquiring the scene image of the labeled detection result is either a rectangular box annotation algorithm or an instance segmentation annotation algorithm.
[0103] Example 3
[0104] Based on the same inventive concept, this invention also provides a computer device, which includes a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to implement corresponding method flows or corresponding functions, thereby implementing the steps of a target detection method in the power industry described in the above embodiments.
[0105] Example 4
[0106] Based on the same inventive concept, this invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the steps of the target detection method for the power industry described in the above embodiments.
[0107] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0108] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0110] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0111] 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 it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for power industry target detection, characterized in that, The method comprises: obtaining a scene image to be detected; inputting the scene image to be detected into a pre-trained power industry target detection model to obtain a detection result of the scene image to be detected output by the pre-trained power industry target detection model; wherein the detection result comprises at least one of the following: a position and a category of a target. The obtaining process of the pre-trained power industry target detection model comprises: inputting a scene image without a labeled detection result into a Segment Anything model to obtain a semantic segmentation image output by the Segment Anything model; labeling a bounding box frame of the semantic segmentation image to obtain first training data; training an initial target detection model by using the first training data; after the initial target detection model is trained by using the training data, the method comprises: constructing second training data by using a scene image with a labeled detection result; training the pre-trained power industry target detection model by using the second training data to obtain the pre-trained power industry target detection model; the data amount of the second training data is less than that of the first training data.
2. The method of claim 1, wherein, The category comprises at least one of the following: a power equipment category, a preset facility and scene category, and a preset fault and abnormal scene category.
3. The method of claim 1, wherein, The method comprises: performing data enhancement on the first training data and the second training data.
4. The method of claim 3, wherein, The data enhancement on the first training data and the second training data comprises: respectively performing, on the first training data and the second training data, random flipping in horizontal and vertical directions according to a probability of 0.5, random rotation of an image by an angle of -20 degrees to 20 degrees with a step of 1 degree, random rotation of the image by a fixed angle of 90 degrees, 180 degrees or 270 degrees, and random scaling of the image by a size of 0.25 to 4 times.
5. The method of claim 1, wherein, An algorithm used in the obtaining process of the scene image with a labeled detection result is a rectangular frame labeling algorithm or an instance segmentation labeling algorithm.
6. An apparatus based on the power industry target detection method of any of claims 1-5, characterized in that, The device comprises: an obtaining module configured to obtain a scene image to be detected; an analyzing module configured to input the scene image to be detected into a pre-trained power industry target detection model to obtain a detection result of the scene image to be detected output by the pre-trained power industry target detection model; wherein the detection result comprises at least one of the following: a position and a category of a target.
7. A computer device, comprising: comprise: one or more processors; the processor is configured to store one or more programs; when the one or more programs are executed by the one or more processors, the power industry target detection method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and when the computer program is executed, the power industry target detection method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Electric power intelligent construction site violation behavior detection method based on YOLOv4 improved algorithm
CN112149761A
Target detection model training method, target detection method and related devices
CN113963186A