Power transmission channel hidden danger identification method and device, computer equipment and storage medium
Through the combination of the DINO model and the HRNet model, the hidden dangers of transmission channels are identified, which solves the problem of inaccurate position information in the prior art, improves the recognition accuracy, and enhances the safety of transmission lines.
Patent Information
- Application Number
- CN202411267359.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-06
AI Technical Summary
When identifying hidden dangers in the transmission channel in the prior art, the position information of the construction machinery and the transmission channel is inaccurate, resulting in a low recognition accuracy.
The object detection and wire segmentation method based on the DINO model and HRNet model is adopted to perform object detection and wire segmentation through feature extraction, feature enhancement and multi-head attention modules. Combined with the least squares fitting method, the region of interest is determined and random rays are used. Judge whether there is a hidden danger.
It improves the accuracy of identification of hidden dangers in transmission channels, reduces false detection and missed detection, and enhances the safety and reliability of transmission lines.
Smart Images

Figure CN119091305A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric power safety technology, and in particular to a method, device, computer equipment, storage medium and computer program product for identifying hidden dangers in power transmission channels. Background Art
[0002] With the continuous increase in electricity demand and the continuous expansion of the transmission network, hidden dangers in the transmission channel have become a problem that cannot be ignored in the power system. Activities such as construction and excavation near the transmission line may cause physical damage to the transmission facilities and threaten the safety and reliability of power transmission. Intelligent inspection of transmission lines, real-time monitoring and early warning, timely detection and treatment of hidden dangers can effectively reduce hidden dangers in the transmission channel and ensure the safe and stable operation of the power system.
[0003] In the related art, the image corresponding to the transmission line can be used for target recognition to determine whether there are engineering machinery on the transmission channel, and the distance between the transmission channel and the engineering machinery in the image can be used to determine whether there are hidden dangers in the transmission channel. However, the location information of the engineering machinery and the transmission channel obtained by this method is greatly different from the actual location, thereby reducing the accuracy of identifying hidden dangers in the transmission channel. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for identifying hidden dangers in power transmission channels that can improve the identification accuracy in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a method for identifying hidden dangers in a power transmission channel. The method comprises:
[0006] Acquire an image to be processed of a power transmission channel; the objects in the image to be processed include a pole tower, a conductor, and a ground connected to the pole tower, and the pole tower is located at the center of the image to be processed, and each of the conductors is vertically symmetrical based on the pole tower;
[0007] Based on the trained target detection model, object detection is performed on the image to be processed to obtain a first detection frame of the target tower and a second detection frame of the target engineering machinery contained in the image to be processed;
[0008] Based on the trained conductor segmentation model, the image to be processed is segmented to obtain a plurality of target conductors corresponding to the target tower;
[0009] Projecting each of the target wires onto the ground in the image to be processed to obtain a projection line segment, and determining a connection area between the projection line segment and the first detection frame as an area of interest;
[0010] According to the positional relationship between each of the second detection frames and the region of interest, a hidden danger identification result corresponding to the power transmission channel is determined.
[0011] In one embodiment, the target detection model is a DINO model; the DINO model includes a CNN module, a Transformer module and a multi-head attention module; the object detection is performed on the image to be processed based on the trained target detection model to obtain a first detection frame of the target tower contained in the image to be processed and a second detection frame of the target engineering machinery, including:
[0012] Perform feature extraction on the image to be processed based on the CNN module to obtain multi-layer image features of the image to be processed;
[0013] Performing feature enhancement on the multi-layer image features based on the Transformer module to obtain global information corresponding to the multi-layer image features and context information of each pixel in the image to be processed;
[0014] Based on the multi-head attention module, the multi-layer image features, the global information and the context information are merged, and a first detection frame of each target tower and a second detection frame of the target engineering machinery in the image to be processed are predicted.
[0015] In one embodiment, the method further includes: performing object detection on the image to be processed based on the trained target detection model to obtain a first detection frame of the target tower and a second detection frame of the target engineering machinery contained in the image to be processed;
[0016] Acquire labeled first training data; the first training data includes images corresponding to various types of engineering machinery and various types of towers;
[0017] Based on the labeled first training data and preset training parameters, the target detection model is trained until the model evaluation value corresponding to the updated target detection model meets the training end condition, thereby obtaining a trained target detection model.
[0018] In one embodiment, the wire segmentation model includes an HRNet module and a Transformer module; the object segmentation of the image to be processed based on the trained wire segmentation model to obtain multiple target wires corresponding to the target tower includes:
[0019] Inputting the image to be processed into a trained HRNet module to obtain multiple groups of features with different resolutions corresponding to the image to be processed;
[0020] Inputting the multiple sets of features with different resolutions into a Transformer module to obtain context information corresponding to the multiple sets of features with different resolutions;
[0021] Combining the multiple groups of features with different resolutions and the context information, and predicting multiple wire regions included in the image to be processed;
[0022] Each of the conductor areas is fitted based on a least square fitting method to obtain a plurality of target conductors corresponding to the target tower.
[0023] In one embodiment, before performing object segmentation on the image to be processed based on the trained wire segmentation model to obtain multiple target wires corresponding to the target tower, the method further includes:
[0024] Acquire labeled second training data; the second training data includes images corresponding to multiple wires;
[0025] Jointly training the HRNet module and the Transformer module based on the second training data to obtain an updated wire segmentation model;
[0026] The intersection-and-union ratio corresponding to the updated wire segmentation model is determined until the intersection-and-union ratio meets a preset threshold, thereby obtaining a trained wire segmentation model.
[0027] In one embodiment, projecting each of the target wires onto the ground in the image to be processed to obtain a projection line segment, and determining a connection area between the projection line segment and the first detection frame as an area of interest includes:
[0028] Obtaining the slope value of each target conductor, and respectively determining the two target conductors with the largest slope value and the smallest slope value as the outer conductors; the slope value is determined by using the vertical line and the horizontal line of the target tower as a two-dimensional coordinate system;
[0029] In the image to be processed, a plurality of projection points of the two outer wires on the ground are determined as two projection line segments;
[0030] The endpoints of the first detection frame adjacent to the ground are connected to the endpoints of the two projection lines to obtain a connection area between the projection line segment and the first detection frame, and determine it as a region of interest.
[0031] In one embodiment, determining the hidden danger identification result corresponding to the power transmission channel according to the positional relationship between each of the second detection frames and the region of interest includes:
[0032] Determine the number of intersections between a random ray with the center point of the second detection frame as an endpoint and the boundary of the region of interest;
[0033] If the number of intersections is an odd number, determining that the second detection frame is in the region of interest, and determining that the hidden danger identification result corresponding to the power transmission channel is that a hidden danger exists;
[0034] If the number of intersections is an even number, it is determined that the second detection frame is outside the region of interest, and it is determined that the hidden danger identification result corresponding to the power transmission channel is that there is no hidden danger.
[0035] In a second aspect, the present application also provides a device for identifying hidden dangers in a power transmission channel. The device comprises:
[0036] An image acquisition module is used to acquire an image to be processed of a power transmission channel; the objects in the image to be processed include a pole tower, a conductor and a ground connected to the pole tower, and the pole tower is located in the center of the image to be processed, and each of the conductors is vertically symmetrical based on the pole tower;
[0037] A target detection module is used to perform object detection on the image to be processed based on a trained target detection model to obtain a first detection frame of a target tower and a second detection frame of a target engineering machinery contained in the image to be processed;
[0038] A conductor segmentation module is used to perform object segmentation on the image to be processed based on a trained conductor segmentation model to obtain a plurality of target conductors corresponding to the target tower;
[0039] A region determination module, configured to project each of the target wires onto the ground in the image to be processed to obtain a projection line segment, and determine a connection region between the projection line segment and the first detection frame as a region of interest;
[0040] The hidden danger identification module is used to determine the hidden danger identification result corresponding to the power transmission channel according to the position relationship between each of the second detection frames and the region of interest.
[0041] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.
[0042] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0043] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0044] The above-mentioned transmission channel hidden danger identification method, device, computer equipment, storage medium and computer program product obtain the image to be processed of the transmission channel through a shooting device, wherein the objects in the image to be processed include poles, wires and the ground connected to the poles, and the poles are located in the center of the image to be processed, and the wires are vertically symmetrical based on the poles. The objects contained in the image to be processed are limited to specific positions and angles, and can accurately perform target detection and wire segmentation in the subsequent processing process. The server can perform object detection on the image to be processed based on the trained target detection model to obtain a first detection frame of the target pole tower contained in the image to be processed, and a second detection frame of the target engineering machinery. Afterwards, based on the trained wire segmentation model, the image to be processed is segmented to obtain multiple target wires corresponding to the target pole tower. After obtaining the first detection frame and the target wire, each target wire can be projected to the ground in the image to be processed to obtain a projection line segment, and the connection area between the projection line segment and the first detection frame is determined as the area of interest. Since the image to be processed contains multiple wires that are vertically symmetrical to the tower and also contains the ground connected to the tower, the server can accurately determine the region of interest corresponding to the tower, and thus accurately obtain the transmission channel area under the target tower. Finally, based on the positional relationship between each second detection frame and the region of interest, it is determined whether the target construction machinery is in the transmission channel area, thereby determining the hidden danger identification result corresponding to the transmission channel and improving the accuracy of the hidden danger identification of the transmission channel. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] FIG1 is a diagram showing an application environment of a method for identifying hidden dangers in a power transmission channel according to an embodiment;
[0047] FIG2 is a schematic diagram of a flow chart of a method for identifying hidden dangers in a power transmission channel according to an embodiment;
[0048] FIG3 is a schematic diagram of a flow chart of a method for identifying hidden dangers in a power transmission channel in another embodiment;
[0049] FIG4 is a schematic diagram of data collection in one embodiment;
[0050] FIG5 is a schematic diagram of engineering machinery and tower markings in one embodiment;
[0051] FIG6 is a schematic diagram of wire segmentation in one embodiment;
[0052] FIG7 is a schematic diagram of channel hidden danger identification in one embodiment;
[0053] FIG8 is a structural block diagram of a device for identifying hidden dangers in a power transmission channel according to an embodiment;
[0054] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] The method for identifying hidden dangers in a power transmission channel provided in an embodiment of the present application can be applied in an application environment as shown in FIG. 1 . Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on a cloud or other network server. The terminal 102 can obtain the image to be processed of the power transmission channel through a shooting device. The image to be processed can be a real-time image of each different power transmission channel. The image to be processed can include a tower, a wire, and the ground connected to the tower. Usually, the tower is in the center of the image to be processed, and each wire can be symmetrically distributed with the tower as a vertical symmetry axis. The server 104 can obtain the image to be processed from the terminal 102, and perform object detection on the image to be processed through a trained target detection model, determine the target tower and target engineering machinery contained in the image to be processed, and use the first detection frame to mark the target tower, and use the second detection frame to mark the target engineering machinery. The server 104 can perform object segmentation on the image to be processed through a trained wire segmentation model to obtain multiple symmetrical target wires corresponding to the target tower. Based on this, the server 104 can project each target wire in the image to be processed onto the ground, obtain the projection line segment corresponding to the target wire, and connect the projection line segment with the first detection frame to obtain the region of interest. The server can determine whether the target engineering machinery is in the region of interest based on the positional relationship between the region of interest and the second detection frame corresponding to the target engineering machinery, thereby determining whether the target engineering machinery has hidden dangers and obtaining the hidden danger identification result of the power transmission channel.
[0057] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0058] In an exemplary embodiment, as shown in FIG2 , a method for identifying hidden dangers in a power transmission channel is provided, and the method is applied to the server 104 in FIG1 as an example for explanation, including the following steps S202 to S210. Among them:
[0059] Step S202, obtaining an image to be processed of the power transmission channel.
[0060] The objects in the image to be processed include poles, wires and the ground connected to the poles, and the poles are located in the center of the image to be processed, and the wires are vertically symmetrical based on the poles.
[0061] Specifically, the shooting device can shoot the pole tower, the wire and the ground corresponding to the bottom of the pole tower at a preset position to obtain the image to be processed of the transmission channel formed by each pole tower and the wire corresponding to the pole tower. The shooting device can be a camera on the pole tower or a drone used for inspection.
[0062] In one example, multiple wires in the image to be processed are distributed on both sides of the top of the tower with the tower as the vertical symmetry axis, and the tower is centered in the image to be processed. The connection between the base of the tower and the ground is clearly visible. Each object included in the image to be processed is clearly visible, and the camera can obtain a clear image to be processed by the camera under the weather and light conditions at the time of shooting.
[0063] Step S204, based on the trained target detection model, object detection is performed on the image to be processed to obtain a first detection frame of the target tower and a second detection frame of the target engineering machinery contained in the image to be processed.
[0064] The trained target detection model is trained based on annotated images containing a variety of poles, wires, and construction machinery. The target detection model can identify the poles and construction machinery in the image to be processed, and mark the detection frames corresponding to the poles and construction machinery in the image to be processed. In an example, the poles can be high-voltage power poles of different specifications, and the construction machinery can be tower cranes, bulldozers, loaders, excavators, etc.
[0065] Specifically, the server can input the image to be processed into a trained target detection model. The target detection model can extract image features in the image to be processed, and predict the poles and construction machinery in the image to be processed based on the image features, and mark the poles and construction machinery in the image to be processed through a detection box.
[0066] Step S206, based on the trained conductor segmentation model, the image to be processed is segmented to obtain a plurality of target conductors corresponding to the target tower.
[0067] The trained wire segmentation model is trained based on annotated images containing multiple types of wires. The wire segmentation model can identify wires in the processed image, determine the wire area and the identification points of each wire in the wire area, and fit the identification points to obtain the line segments corresponding to each target wire.
[0068] Specifically, the server can input the image to be processed into a trained wire segmentation model. The wire segmentation model can extract image features in the image to be processed, and based on the image features, predict the wire area in the image to be processed, and determine the line segments corresponding to multiple target wires according to multiple identification points in the wire area.
[0069] Step S208 , projecting each target wire onto the ground in the image to be processed to obtain a projection line segment, and determining a connection area between the projection line segment and the first detection frame as a region of interest.
[0070] Specifically, the image to be processed contains the ground, and the ground can be used as a plane in the image to be processed. The server can project multiple target wires corresponding to the target tower to the corresponding ground to obtain corresponding projection line segments on the ground. The projection line segments can be regarded as the line segments when the target wires fall vertically from the target tower to the ground. The bottom of the first detection frame of the target tower is connected to the ground, so the projection line segment is connected to the line segment at the bottom of the first detection frame to obtain a connection area formed by multiple projection line segments and the line segment at the bottom of the first detection frame, and it is determined as the area of interest.
[0071] Step S210: determining a hidden danger identification result corresponding to the power transmission channel according to the positional relationship between each second detection frame and the region of interest.
[0072] Specifically, the second detection frame of the target engineering machinery is connected to the ground, and the target engineering machinery moves and constructs on the plane corresponding to the ground. Based on this, the server can determine the position of the second detection frame and the position of the region of interest, and determine the positional relationship between the second detection frame and the region of interest. At least one target engineering machinery may be included in the image to be processed. Therefore, it is necessary to determine the positional relationship between multiple second detection frames and the region of interest, and finally determine whether there are safety hazards in the power transmission channel corresponding to the image to be processed based on multiple positional relationships, and obtain the hazard identification result corresponding to the transmission channel.
[0073] In the above-mentioned transmission channel hidden danger identification method, the image to be processed of the transmission channel is obtained by a shooting device, wherein the objects in the image to be processed include a pole tower, a conductor and the ground connected to the pole tower, and the pole tower is in the center of the image to be processed, and each conductor is vertically symmetrical based on the pole tower. The objects contained in the image to be processed are limited to a specific position angle, and can accurately perform target detection and conductor segmentation in the subsequent processing process. The server can perform object detection on the image to be processed based on the trained target detection model to obtain a first detection frame of the target pole tower contained in the image to be processed, and a second detection frame of the target engineering machinery. After that, the image to be processed is segmented based on the trained conductor segmentation model to obtain multiple target conductors corresponding to the target pole tower. After obtaining the first detection frame and the target conductor, each target conductor can be projected to the ground in the image to be processed to obtain a projection line segment, and the connection area between the projection line segment and the first detection frame is determined as the area of interest. Since the image to be processed contains multiple conductors vertically symmetrical to the pole tower, and also contains the ground connected to the pole tower, the server can accurately determine the area of interest corresponding to the pole tower, so that the transmission channel area under the target pole tower can be accurately obtained. Finally, according to the positional relationship between each second detection frame and the region of interest, it is determined whether the target engineering machinery is in the transmission channel area, thereby determining the hidden danger identification result corresponding to the transmission channel, thereby improving the accuracy of the hidden danger identification of the transmission channel.
[0074] In an exemplary embodiment, the target detection model is a DINO (DETR with Improved deNoisinganchOr boxes) model; the DINO model includes a CNN (Convolutional Neural Networks) module, a Transformer module, and a multi-head attention module. The specific implementation process of the step of "based on the trained target detection model, performing object detection on the image to be processed to obtain a first detection frame of the target tower contained in the image to be processed, and a second detection frame of the target engineering machinery" includes:
[0075] Based on the CNN module, feature extraction is performed on the image to be processed to obtain the multi-layer image features of the image to be processed; based on the Transformer module, feature enhancement is performed on the multi-layer image features to obtain the global information corresponding to the multi-layer image features and the context information of each pixel in the image to be processed; based on the multi-head attention module, the multi-layer image features, global information and context information are merged, and the first detection frame of each target tower and the second detection frame of the target engineering machinery in the image to be processed are predicted.
[0076] Specifically, the server can extract features of the image to be processed through the CNN module in the DINO model to obtain multi-layer image features. After that, the server can enhance the features of each layer of image features through the Transformer module, and integrate the initial global information contained in the multi-layer image features to determine the global information of the image to be processed in the multi-layer image features. The server can also merge the features of the pixels around each pixel in the image to be processed according to the Transformer module to obtain the context information of the pixel. Finally, the server performs weighted summation of the multi-layer image features, the global information corresponding to the multi-layer image features, and the context information of each pixel in the image to be processed through the multi-head attention module to obtain the feature value corresponding to the image to be processed, and determine the prediction result of each pixel according to the feature value, and finally obtain the predicted target tower and target engineering machinery, and generate the first detection frame corresponding to the target tower and the second detection frame corresponding to the target engineering machinery. Among them, the classification labels of the target tower and the target engineering machinery can be different. In addition, the classification labels of multiple target towers and multiple target engineering machinery can be further distinguished. For example, the classification label of the target tower may be A, and the classification label of the target engineering machinery may be B. Furthermore, the classification label of the target tower may be A1, A2...An, and the classification label of the target engineering machinery may be B1, B2...Bm.
[0077] In this embodiment, through the CNN module, Transformer module and multi-head attention module in the DINO model, feature extraction and feature enhancement can be performed on the processed image respectively, and global information and context information can be obtained. Finally, the detection frame of the target tower and target construction machinery is output through the prediction head in the DINO model, thereby improving the accuracy of predicting the target tower and target construction machinery.
[0078] In an exemplary embodiment, before the step of "performing object detection on the image to be processed based on the trained target detection model to obtain a first detection frame of the target tower and a second detection frame of the target engineering machinery contained in the image to be processed", the method further includes:
[0079] Acquire labeled first training data; the first training data includes images corresponding to a variety of engineering machinery and a variety of towers; train the target detection model based on the labeled first training data and preset training parameters until the model evaluation value corresponding to the updated target detection model meets the training end condition, thereby obtaining a trained target detection model.
[0080] The labeled first training data may be image data of various poles and towers and various engineering machinery taken at different angles, and the various poles and towers and various engineering machinery are labeled using classification labels and contour boxes. A single image data in the first training data may include at least one pole or at least one engineering machinery, and a single image data may also include both poles and engineering machinery, which is not specifically limited in this application.
[0081] Specifically, the server obtains multiple image data including poles and / or engineering machinery taken by the shooting device in the power transmission scene, and screens the image data, deletes blurred or non-compliant image data, and uses annotation instructions and annotation tools to perform detailed annotations on the poles and engineering machinery in the screened images, and finally obtains the annotated first training data. In addition, the server can perform data preprocessing on the first training data, including image normalization and data enhancement processing.
[0082] The server can use the labeled first training data and preset training parameters, such as learning rate, batch size, number of iterations and other parameters, to train the initial DINO model to obtain a trained DINO model. The server can use the validation set in the first training data to perform performance evaluation on the trained DINO model to determine the model evaluation value of the trained DINO model, such as precision and recall. If the model evaluation value does not meet the training end condition, the trained DINO model is repeatedly trained using the labeled first training data and the preset training parameters, and the DINO model is continuously evaluated using the validation set until the model evaluation value meets the training end condition to obtain a trained target detection model.
[0083] Optionally, the server can apply the trained target detection model and obtain a large amount of data to be processed during the application process to form new training data. After the new training data is labeled, the target detection model can be updated to obtain an updated target detection model, further improving the prediction accuracy and robustness of the target detection model.
[0084] In this embodiment, the DINO model is trained using the labeled first training data until the model evaluation value of the DINO model meets the training end condition, thereby obtaining a trained target detection model. Since the image data of the first training data has been screened, enhanced and labeled, the training efficiency of the target detection model can be improved.
[0085] In an exemplary embodiment, the wire segmentation model includes a HRNet (High-Resolution Net) module and a Transformer module. The specific implementation process of the step of "segmenting the image to be processed based on the trained wire segmentation model to obtain multiple target wires corresponding to the target tower" includes:
[0086] The image to be processed is input into the trained HRNet module to obtain multiple sets of features with different resolutions corresponding to the image to be processed; the multiple sets of features with different resolutions are input into the Transformer module to obtain the contextual information corresponding to the multiple sets of features with different resolutions; the multiple sets of features with different resolutions and the contextual information are merged, and multiple conductor areas contained in the image to be processed are predicted; each conductor area is fitted based on the least squares fitting method to obtain multiple target conductors corresponding to the target tower.
[0087] The wire segmentation model includes an HRNet module and a Transformer module. Different resolution features refer to image features of the image to be processed under different resolution images. The context information corresponding to different resolution features is the feature information of the surrounding pixels of each pixel in the images with different resolutions.
[0088] Specifically, the server inputs the image to be processed into the trained HRNet module. The HRNet module generates multiple images of different resolutions corresponding to the image to be processed, and determines the image features of each image of different resolutions to obtain multiple sets of features of different resolutions. The server inputs multiple sets of features of different resolutions into the Transformer module. The Transformer module combines the features of each pixel in the multiple sets of features of different resolutions to determine the context information of each set of image features of resolutions, and performs weighted summation of the image features of the multiple sets of images of resolutions and the context information to obtain the feature values corresponding to the image to be processed, and predicts the feature values through the prediction head to obtain the wire area contained in the image to be processed. The server fits each identification point in the wire area through the least squares fitting method to obtain the support target wire contained in the target area.
[0089] In this embodiment, the image to be processed is processed by the HRNet module to determine multiple groups of different resolution features of the image to be processed, and the context information corresponding to the multiple groups of different resolution features is determined by the Transformer module, the context information and the multiple groups of different resolution features are merged to obtain feature values, and prediction is performed based on the feature values to determine the wire area corresponding to the image to be processed, and finally the identification points contained in the wire area are fitted to obtain multiple target wires, thereby improving the accuracy of determining the target wires.
[0090] In an exemplary embodiment, before the step of "segmenting the image to be processed based on the trained wire segmentation model to obtain multiple target wires corresponding to the target tower", the method further includes:
[0091] Acquire labeled second training data; the second training data includes images corresponding to multiple wires; jointly train the HRNet module and the Transformer module based on the second training data to obtain an updated wire segmentation model; determine the intersection-and-union ratio corresponding to the updated wire segmentation model until the intersection-and-union ratio meets a preset threshold, thereby obtaining a trained wire segmentation model.
[0092] The annotated second training data may be image data of conductors contained in various poles and towers, and the conductors are annotated using classification labels and contour boxes. The second training data may include multiple types of conductors, as well as conductors photographed from multiple angles. A single image data in the second training data may include at least one type of conductor, or at least one conductor. A single image data may also include multiple different types of conductors and multiple conductors at the same time, which is not specifically limited in this application.
[0093] Specifically, the server obtains high-resolution image data containing wires taken by the shooting device in the power transmission scene to ensure that the second training data covers various environmental conditions and different types of wires. The server also filters the image data, deletes blurry or non-compliant image data, and annotates the position and contour of the wires in the filtered images through annotation instructions and annotation tools, and finally obtains the annotated second training data. In addition, the server can perform data preprocessing on the second training data, including image normalization and data enhancement processing.
[0094] The server can use the labeled second training data and preset training parameters, such as learning rate, batch size, number of iterations, etc., to train the initial wire segmentation model to obtain a trained wire segmentation model. The server can use the validation set in the second training data to evaluate the performance of the trained wire segmentation model and determine the intersection-and-union ratio of the trained wire segmentation model. If the intersection-and-union ratio does not meet the preset threshold, the labeled second training data and the preset training parameters are repeatedly used to train the trained wire segmentation model, and the wire segmentation model is continuously evaluated through the validation set until the intersection-and-union ratio meets the preset threshold, thereby obtaining a trained wire segmentation model.
[0095] In one example, the HRNet module and the Transformer module can each use a loss function as one of the training end conditions during training. When the loss values corresponding to the HRNet module and the Transformer module respectively meet the preset loss values, and the intersection-and-union ratio meets the preset threshold, it is determined that the wire segmentation model training is completed.
[0096] Optionally, the server can apply the trained wire segmentation model and obtain a large amount of data to be processed during the application process to form new training data. After the wires of the new training data are labeled, the wire segmentation model can be updated to obtain an updated wire segmentation model, further improving the prediction accuracy and robustness of the target detection model.
[0097] In this embodiment, the wire segmentation model is trained using the labeled second training data until the intersection-and-union ratio of the wire segmentation model meets the training end condition, thereby obtaining a trained wire segmentation model. Since the image data of the second training data is screened, enhanced, and labeled, the training efficiency of the wire segmentation model can be improved, and the prediction accuracy of the wire segmentation model can be improved.
[0098] In an exemplary embodiment, the specific implementation process of the step of "projecting each target wire onto the ground in the image to be processed to obtain a projection line segment, and determining the connection area between the projection line segment and the first detection frame as the region of interest" includes:
[0099] Obtain the slope value of each target wire, and determine the two target wires with the largest slope value and the smallest slope value as the outer wires. In the image to be processed, determine multiple projection points of the two outer wires on the ground as two projection line segments; connect the endpoints adjacent to the ground in the first detection frame with the endpoints of the two projection lines to obtain the connection area between the projection line segment and the first detection frame, and determine it as the region of interest.
[0100] Among them, the slope value is determined by using the vertical line and horizontal line of the target tower as a two-dimensional coordinate system.
[0101] Specifically, the server uses the vertical direction of the target tower as the Y-axis of the two-dimensional coordinate system in the image to be processed, and uses the horizontal direction of the target tower as the X-axis, and determines the slope values corresponding to the multiple target wires corresponding to the target tower based on the two-dimensional coordinate system. The server determines the two wires with the largest slope value and the smallest slope value as the two outer wires respectively. The server uses the first detection frame as a reference in the image to be processed, projects the multiple identification points corresponding to the two outer wires onto the ground, obtains multiple projection points, and connects the multiple projection points to obtain two projection line segments. The server connects the endpoints adjacent to the ground in the first detection frame with the endpoints of the two projection lines to obtain the connection area between the projection line segment and the first detection frame, and determines it as the region of interest. If the endpoints cannot be directly connected, the endpoints adjacent to the ground in the first detection frame can be extended outward to obtain a first extension line, and the two projection line segments can be extended outward to obtain two second extension lines, and the area formed by the first extension line and the second extension line is determined as the region of interest.
[0102] In this embodiment, two outer wires are determined by the slope value of the target wire, and the outer wires are projected onto the ground to form a region of interest with the first detection frame on the ground, thereby improving the accuracy and rationality of determining the region of interest.
[0103] In an exemplary embodiment, the specific implementation process of the step of "determining the hidden danger identification result corresponding to the power transmission channel according to the positional relationship between each second detection frame and the region of interest" includes:
[0104] Determine the number of intersections between the random ray with the center point of the second detection frame as the endpoint and the boundary of the region of interest; if the number of intersections is an odd number, it is determined that the second detection frame is in the region of interest, and the hidden danger identification result corresponding to the transmission channel is determined to be the presence of hidden dangers; if the number of intersections is an even number, it is determined that the second detection frame is outside the region of interest, and the hidden danger identification result corresponding to the transmission channel is determined to be the absence of hidden dangers.
[0105] Specifically, the coordinates of the center point of the second detection frame are determined, and random rays are emitted in all directions with the center point as the endpoint. When the random rays intersect the boundary of the region of interest, the number of intersections of the random rays at the boundary of the region of interest is determined. If the number of intersections is an odd number, it can be known that the center point of the second detection frame is in the region of interest, and the positional relationship between the second detection frame and the region of interest is determined to be in contact, and the hidden danger identification result corresponding to the transmission channel is determined to be that there is a hidden danger. If the number of intersections is an even number, it can be known that the center point of the second detection frame is not in the region of interest, and the positional relationship between the second detection frame and the region of interest is determined to be non-contact, and the hidden danger identification result corresponding to the transmission channel is determined to be that there is no hidden danger.
[0106] Optionally, the server may determine the distance between the midpoint of the second detection frame and the midpoint of the region of interest. When the distance satisfies a preset distance value, the positional relationship between the target engineering machinery corresponding to the second detection frame and the region of interest is determined to be non-contact, and the hidden danger identification result of the target engineering machinery is determined to be that there is no hidden danger. When the distance does not meet the preset distance value, the positional relationship between the target engineering machinery corresponding to the second detection frame and the region of interest is determined to be in contact, and the hidden danger identification result of the target engineering machinery is determined to be that there is a hidden danger. If the hidden danger identification result of at least one target engineering machinery in the image to be processed is that there is a hidden danger, the hidden danger identification result of the power transmission channel is determined to be that there is a hidden danger.
[0107] In this embodiment, the number of intersections between a random ray with the center point of the second detection frame as the endpoint and the boundary of the region of interest is used to determine whether a hidden danger exists, thereby improving the efficiency and accuracy of determining the hidden danger identification result.
[0108] As shown in FIG3 , the specific implementation process of the above-mentioned power transmission channel hidden danger identification method is described in detail below in conjunction with a specific embodiment.
[0109] Among them, regarding data collection: in the power transmission scenario, by presetting cameras on the towers or using drones for inspection, images with angles facing the towers in front and basically symmetrical on the conductors are screened. Such image screening provides accurate basic data for subsequent channel hidden danger identification, ensuring the effectiveness and reliability of image information.
[0110] Regarding the identification of transmission channel hidden danger targets: Pole tower and construction machinery identification: Use DINO to identify pole towers and construction machinery, effectively reduce the false detection rate under complex backgrounds, and improve the target detection rate. Wire segmentation algorithm: Use HRNet combined with Transform technology to build a wire segmentation algorithm model, and use morphological operations to remove noise, extract a clearer wire outline, and provide the least squares method to fit the wire, providing accurate wire location for subsequent analysis.
[0111] Regarding filtering: Main tower judgment: determine the main tower in the image (usually located in the center of the image) to ensure that the focus of processing is a tower that needs attention.
[0112] Wire-to-tower connection: Analyze the connection between wires and towers, identify the wires connected to a tower, and provide a basis for delineating areas of interest and warning areas.
[0113] Areas of interest and warning areas: Based on the projection of the wire and the left and right connection points at the bottom of the tower, define areas of interest and warning areas. By monitoring these areas, potential hazards can be identified and warned in a timely manner.
[0114] The embodiments of the present application significantly improve the recognition efficiency and robustness through precise data collection, advanced target recognition algorithms and effective filtering mechanisms, and can quickly and accurately detect and warn of potential hidden dangers in power transmission channels, avoid the occurrence of safety accidents, and reduce the workload of manual review.
[0115] Specifically, the vision-based transmission channel hidden danger identification technology uses a camera to capture images of transmission lines, uses the DINO model to identify poles and construction machinery, and combines Transformer technology with HRNet to segment conductors. After extracting the actual conductor area through morphological operations, the conductor is fitted, the main poles are selected and the relative distance between the conductor and the pole is calculated, and the area of interest is delineated as the warning area, thereby achieving accurate identification of transmission channel hidden dangers and real-time warning, effectively improving the maintenance efficiency and safety of transmission lines. As shown in Figure 3, the following steps are included:
[0116] Step 1: Data collection. Function: Use the camera to collect image data to construct a recognition image data set. Principle: In the power transmission scenario, the pole tower is used to support the conductor. Usually, a camera is installed on the pole tower to ensure that the center line of the camera basically overlaps with the center line of the transmission line, so that the conductor and the pole tower are nearly symmetrical in the collected image data. According to the characteristics of the power transmission scenario, through the preset camera on the pole tower or drone inspection, the image with the angle facing the front tower and the conductor basically symmetrical is screened out, providing basic data for the subsequent identification of channel hidden dangers. As shown in Figure 4, this is an example of collected data:
[0117] In one example: 1. Install a high-resolution camera on the tower and ensure that the camera's line of sight basically overlaps with the center line of the transmission line. The camera's installation angle and position must be accurately calibrated to ensure that the captured images can clearly show the conductors and towers. 2. Use drones for regular inspections, and the flight path and shooting angle must be accurately planned to ensure that the conductors and towers in the images captured by the drone are nearly symmetrical. Drones can reach areas that ground cameras cannot cover and collect images from more perspectives. 3. Filter out images that meet the requirements from the collected images, that is, images that face the tower in front and the conductors are basically symmetrical. Image processing technology can be used for automatic screening, or manual review can be used to ensure the screening quality. 4. Classify and annotate the screened image data and store them in the data management system. Ensure that the data is managed in an orderly manner to facilitate subsequent analysis and use. 5. Update the data set regularly to ensure the timeliness and coverage of the data. Perform regular maintenance on cameras and drones to ensure the normal operation of the equipment and the quality of image acquisition.
[0118] Step 2: Target recognition. Function: Detect targets in images, including poles and construction machinery. Principle: DINO uses the Transformer architecture to process image features and captures the relationship between different parts of the image through the self-attention mechanism. In the detection of construction machinery and poles, DINO first extracts image features through CNN, then uses the Transformer module for global information integration and context modeling, and finally outputs the target category and bounding box through the prediction head. DINO's advantage lies in its efficient feature learning ability and strong adaptability to complex scenes.
[0119] In an example: 1. Image data acquisition: Collect image data containing construction machinery in the power transmission scene in advance. Ensure that the collected data covers various possible scenes and different types of construction machinery. 2. Data screening and annotation: Filter the collected image data to remove blurry or non-compliant images. Use annotation tools to annotate the filtered images in detail, including poles, towers, and construction machinery. The annotation diagram is shown in Figure 5. 3. Data preprocessing: Preprocess the annotated image data, including image normalization and data enhancement (such as rotation, scaling, cropping, etc.) to improve the generalization and robustness of the model. 4. Algorithm selection: Select the DINO algorithm, using its powerful feature extraction and object detection capabilities to adapt to complex power transmission scenarios. 5. Model training: Use the preprocessed annotated data set to train the DINO model. Set reasonable training parameters, such as learning rate, batch size, number of iterations, etc., to ensure that the model can effectively learn the features and patterns in the image. 6. Model evaluation: During the training process, the validation set is used to evaluate the model performance, and the model effect is evaluated through indicators such as precision and recall, and necessary parameter adjustment and optimization are performed. 7. Model deployment: The trained DINO model is deployed to the actual application environment, which is the drone inspection system and the camera system fixedly installed on the tower, for real-time image data collection and processing. 8. Data collection and review: After the model is deployed, image data in the power transmission scene is continuously collected for real-time detection. For the detected hidden dangers and abnormal conditions, manual review is performed to ensure the accuracy of the detection results. 9. False detection optimization: Analyze and annotate the false detection data found in the manual review to form a new training data set. Through iterative training, the DINO model is continuously optimized and improved to improve its detection accuracy and robustness.
[0120] In this embodiment, through the above implementation steps, an efficient and accurate transmission channel hidden danger identification algorithm is constructed, and advanced image processing and machine learning technologies are used to detect engineering machinery and towers in the transmission line in real time, providing a foundation for the follow-up.
[0121] Step 3: Wire extraction and fitting. Function: Use Transformer technology combined with HRNet for wire segmentation to accurately segment the wire area in the power transmission line, and then use the least squares method to fit the wire area into multiple straight lines. The global feature extraction capability of Transformer technology combined with the high-resolution processing capability of HRNet can achieve high-precision wire segmentation in complex backgrounds, improve the segmentation effect and the robustness of the model. Principle: HRNet is a high-resolution network that combines multi-scale features to perform fine pixel-level segmentation by maintaining the high-resolution features of the image. In traditional segmentation models, images are usually processed after downsampling, which may lead to loss of details. HRNet avoids this problem by processing features in parallel at different resolutions, thereby better preserving image details. The Transformer model is good at capturing global contextual information in images and extracting global features through a self-attention mechanism. In image segmentation tasks, Transformers can enhance the local features extracted by HRNet and provide richer contextual information, thereby improving the accuracy and robustness of segmentation. By combining the global contextual information of Transformer with the high-resolution features of HRNet, the performance of wire segmentation can be effectively improved. The global features extracted by Transformer are fused with the local features processed by HRNet at high resolution, making the segmentation model perform better in processing complex backgrounds and details.
[0122] In an example: 1. Data collection: Collect high-resolution image data including wires to ensure that the data set covers various environmental conditions and different types of wires. 2. Data annotation: Accurately annotate the image to mark the exact location and contour of the wire to provide accurate label data for model training. Figure 6 shows a schematic diagram of wire annotation. 3. Data preprocessing: Preprocess the annotated data, such as image normalization and data enhancement (such as rotation, cropping, and flipping). 4. HRNet training: First, train HRNet to extract high-resolution local features for pixel-level segmentation. Integrate Transformer technology into HRNet, specifically adding a Transformer module after the feature extraction stage of HRNet for global information fusion and enhancing the model's global context feature extraction capabilities. Through joint training, optimize the combination of HRNet and Transformer so that the two can effectively complement each other and improve the accuracy of wire segmentation. 5. Model evaluation: Use the test set to evaluate the trained model, calculate indicators such as IoU (intersection over union) and measure the segmentation effect. 6. Error analysis: Analyze the model's misclassification in specific scenarios, annotate and adjust the misdetected data, and improve the model's segmentation capabilities. 7. Optimization iteration: Parameter tuning and model optimization are performed based on the evaluation results to ensure good performance in practical applications. 8. Model deployment: The trained and optimized model is deployed to the actual application environment, which is the drone inspection system and the camera system fixed on the tower for real-time image data acquisition and processing. 9. Wire fitting: Use morphological operations to remove noise and extract a clearer wire outline. Use the least squares method to fit the wire to provide accurate wire location for subsequent analysis. Optionally, a hough transform based on known points can be used for fitting.
[0123] Step 4: Draw the area of interest and select the connection area between the projection of the outermost conductor on the ground and the bottom of the left and right sides of the tower. Function: Use geometric distance to find the main tower and conductor projections, and connect these projections with the left and right connection areas at the bottom of the tower to form an alarm area. This alarm area can be used for detection and protection to ensure that objects or activities in the area are discovered and handled in a timely manner. Principle: Randomly sample the conductor area and use the least squares fitting method to fit multiple straight lines; select the two straight lines with the smallest and largest slopes as the two outermost straight lines according to the slope; project the selected two outermost straight lines onto the ground to form two projection lines; connect the left and right connection points at the bottom of the main tower with the endpoints of the two projection lines to form a closed polygonal area; this polygonal area is the alarm area for detection and protection.
[0124] In an example: 1. Select the outermost straight line: Calculate the slope of each straight line , select the one with the smallest slope and maximum The two straight lines are denoted as and 2. Calculate the projection point: and The projection points on the ground are calculated to form two projection lines. 3. Determination of the main towers: Determine the main towers in the image through the geometric relationship between the wires and the towers (usually the main towers are located in the center of the image) to ensure that the focus of processing is the towers that need attention. 4. Connection between wires and towers: Analyze the connection relationship between wires and towers, identify the wires connected to a tower, and provide a basis for delineating areas of interest and alarm areas. 5. Determine the connection points at the bottom of the tower: Assume that the coordinates of the left and right connection points at the bottom of the tower are (x1, y1) and (x2, y2), respectively, connect these points with the endpoints of the ground projection line to form a closed polygon. 6. Form an alarm area: The polygon formed by the projection line and the connection points at the bottom of the tower is the alarm area.
[0125] Step 5: Determine whether the construction machinery is in the region of interest. Function: By detecting whether the construction machinery enters or stays in the predefined region of interest (ROI), ensure that the machinery operates within the specified working area to avoid damage to the transmission line system. Principle: By pre-defining the boundaries of the region of interest and using target detection technology to obtain the location of the construction machinery, the location of the construction machinery is compared with the region of interest to determine whether the machinery is in these areas.
[0126] In one example, as shown in Figure 7, the coordinates (x, y) of the center point of the construction machinery are calculated, and the ray method is used to determine whether the mechanical position point (x, y) is within the quadrilateral area. Draw a ray from the point (x, y) in any direction, and count the number of intersections between the ray and the quadrilateral boundary. If the number of intersections is an odd number, the point is within the polygon; if it is an even number, the point is outside the polygon. If it is within the polygon, an alarm is issued; if it is not within the polygon, no alarm is issued. If the crane in the rectangular frame is within the quadrilateral, an alarm is issued; if the crane in the circular frame is not within the quadrilateral, no alarm is issued.
[0127] In this embodiment, in terms of data collection: provide high-quality and high-accuracy basic data to ensure the validity and reliability of image information; provide accurate data input for channel hidden danger identification, reduce invalid data interference, and improve detection accuracy and efficiency. In terms of pole tower and engineering machinery identification: effectively reduce the false detection rate under complex backgrounds, improve the target detection rate, accurately identify pole towers and engineering machinery, and reduce missed detection and false alarms. In terms of wire segmentation algorithm: by combining HRNet with transformer, provide accurate wire position and improve the accuracy of wire detection. In terms of noise removal and accurate fitting, reduce false detection and missed detection, ensure the reliability of detection results, and provide high-precision wire data for subsequent analysis. In terms of main pole tower judgment: ensure that the focus of processing is the pole tower that needs attention, improve processing efficiency, reduce interference from irrelevant objects, and ensure effective use of system resources. In terms of wire and pole tower connection analysis: provide clear wire connection relationship, improve the accuracy of potential hidden danger identification, and reduce false alarms. In terms of the definition of areas of interest and warning areas: timely identify and warn potential hidden dangers, improve the timeliness and accuracy of hidden danger identification, avoid safety accidents, greatly reduce the workload of manual review, and improve the degree of system automation.
[0128] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0129] Based on the same inventive concept, the embodiment of the present application also provides a power transmission channel hidden danger identification device for implementing the power transmission channel hidden danger identification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the power transmission channel hidden danger identification device provided below can refer to the limitations of the power transmission channel hidden danger identification method above, and will not be repeated here.
[0130] In an exemplary embodiment, as shown in FIG8 , a transmission channel hidden danger identification device 800 is provided, comprising: an image acquisition module 801, a target detection module 802, a wire segmentation module 803, an area determination module 804 and a hidden danger identification module 805, wherein:
[0131] The image acquisition module 801 is used to acquire the image to be processed of the power transmission channel; the objects in the image to be processed include the pole tower, the wire and the ground connected to the pole tower, and the pole tower is located in the center of the image to be processed, and the wires are vertically symmetrical based on the pole tower;
[0132] The target detection module 802 is used to perform object detection on the image to be processed based on the trained target detection model, and obtain a first detection frame of the target tower and a second detection frame of the target engineering machinery contained in the image to be processed;
[0133] The conductor segmentation module 803 is used to perform object segmentation on the image to be processed based on the trained conductor segmentation model to obtain multiple target conductors corresponding to the target tower;
[0134] The region determination module 804 is used to project each target wire onto the ground in the image to be processed to obtain a projection line segment, and determine the connection area between the projection line segment and the first detection frame as the region of interest;
[0135] The hidden danger identification module 805 is used to determine the hidden danger identification result corresponding to the power transmission channel according to the position relationship between each second detection frame and the area of interest.
[0136] Furthermore, the target detection model is a DINO model; the DINO model includes a CNN module, a Transformer module and a multi-head attention module, and the target detection module 802 is specifically used to: extract features of the image to be processed based on the CNN module to obtain multi-layer image features of the image to be processed; enhance the multi-layer image features based on the Transformer module to obtain global information corresponding to the multi-layer image features and context information of each pixel in the image to be processed; merge the multi-layer image features, global information and context information based on the multi-head attention module, and predict the first detection frame of each target tower and the second detection frame of the target engineering machinery in the image to be processed.
[0137] Furthermore, the device also includes a first model training module, which is specifically used to: obtain labeled first training data; the first training data includes images corresponding to a variety of engineering machinery and a variety of towers; based on the labeled first training data and preset training parameters, the target detection model is trained until the model evaluation value corresponding to the updated target detection model meets the training end condition, thereby obtaining a trained target detection model.
[0138] Furthermore, the wire segmentation model includes an HRNet module and a Transformer module. The wire segmentation module 803 is specifically used for:
[0139] The image to be processed is input into the trained HRNet module to obtain multiple sets of features with different resolutions corresponding to the image to be processed; the multiple sets of features with different resolutions are input into the Transformer module to obtain the contextual information corresponding to the multiple sets of features with different resolutions; the multiple sets of features with different resolutions and the contextual information are merged, and multiple conductor areas contained in the image to be processed are predicted; each conductor area is fitted based on the least squares fitting method to obtain multiple target conductors corresponding to the target tower.
[0140] Furthermore, the device also includes a second model training module, which is specifically used to: obtain labeled second training data; the second training data contains images corresponding to multiple wires; based on the second training data, the HRNet module and the Transformer module are jointly trained to obtain an updated wire segmentation model; determine the intersection-and-union ratio corresponding to the updated wire segmentation model until the intersection-and-union ratio meets a preset threshold to obtain a trained wire segmentation model.
[0141] Furthermore, the area determination module 804 is specifically used to: obtain the slope value of each target conductor, and respectively determine the two target conductors with the largest slope value and the smallest slope value as the outer conductors; the slope value is determined with the vertical line and the horizontal line of the target tower as the two-dimensional coordinate system; in the image to be processed, determine multiple projection points of the two outer conductors on the ground as two projection line segments; connect the endpoints adjacent to the ground in the first detection frame with the endpoints of the two projection lines to obtain the connection area between the projection line segment and the first detection frame, and determine it as the area of interest.
[0142] Furthermore, the hidden danger identification module 805 is specifically used to: determine the number of intersections between a random ray with the center point of the second detection frame as the endpoint and the boundary of the area of interest; if the number of intersections is an odd number, it is determined that the second detection frame is in the area of interest, and the hidden danger identification result corresponding to the transmission channel is determined to be the existence of a hidden danger; if the number of intersections is an even number, it is determined that the second detection frame is outside the area of interest, and the hidden danger identification result corresponding to the transmission channel is determined to be the absence of a hidden danger.
[0143] Each module in the above-mentioned power transmission channel hidden danger identification device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0144] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store training data sets for target detection models and wire segmentation models. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for identifying hidden dangers in a power transmission channel is implemented.
[0145] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0146] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0147] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0148] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0149] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0151] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0152] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for identifying hidden dangers in a power transmission channel, characterized in that: The method comprises: Acquire an image to be processed of a power transmission channel; the objects in the image to be processed include a pole tower, a conductor, and a ground connected to the pole tower, and the pole tower is located at the center of the image to be processed, and each of the conductors is vertically symmetrical based on the pole tower; Based on the trained target detection model, object detection is performed on the image to be processed to obtain a first detection frame of the target tower and a second detection frame of the target engineering machinery contained in the image to be processed; Based on the trained conductor segmentation model, the image to be processed is segmented to obtain a plurality of target conductors corresponding to the target tower; Projecting each of the target wires onto the ground in the image to be processed to obtain a projection line segment, and determining a connection area between the projection line segment and the first detection frame as an area of interest; According to the positional relationship between each of the second detection frames and the region of interest, a hidden danger identification result corresponding to the power transmission channel is determined.
2. The method according to claim 1, characterized in that The target detection model is a DINO model; the DINO model includes a CNN module, a Transformer module and a multi-head attention module; the target detection model is trained to perform object detection on the image to be processed, and a first detection frame of the target tower contained in the image to be processed and a second detection frame of the target engineering machinery are obtained, including: Perform feature extraction on the image to be processed based on the CNN module to obtain multi-layer image features of the image to be processed; Performing feature enhancement on the multi-layer image features based on the Transformer module to obtain global information corresponding to the multi-layer image features and context information of each pixel in the image to be processed; Based on the multi-head attention module, the multi-layer image features, the global information and the context information are merged, and a first detection frame of each target tower and a second detection frame of the target engineering machinery in the image to be processed are predicted.
3. The method according to claim 2, characterized in that Before performing object detection on the image to be processed based on the trained target detection model to obtain a first detection frame of the target tower and a second detection frame of the target engineering machinery contained in the image to be processed, the method further includes: Acquire labeled first training data; the first training data includes images corresponding to various types of engineering machinery and various types of towers; Based on the labeled first training data and preset training parameters, the target detection model is trained until the model evaluation value corresponding to the updated target detection model meets the training end condition, thereby obtaining a trained target detection model.
4. The method according to claim 1, characterized in that: The wire segmentation model includes an HRNet module and a Transformer module; The method of performing object segmentation on the image to be processed based on the trained conductor segmentation model to obtain a plurality of target conductors corresponding to the target tower includes: Inputting the image to be processed into a trained HRNet module to obtain multiple groups of features with different resolutions corresponding to the image to be processed; Inputting the multiple sets of features with different resolutions into a Transformer module to obtain context information corresponding to the multiple sets of features with different resolutions; Combining the multiple groups of features with different resolutions and the context information, and predicting multiple wire regions included in the image to be processed; Each of the conductor areas is fitted based on a least square fitting method to obtain a plurality of target conductors corresponding to the target tower.
5. The method according to claim 4, characterized in that Before performing object segmentation on the image to be processed based on the trained wire segmentation model to obtain a plurality of target wires corresponding to the target tower, the method further includes: Acquire labeled second training data; the second training data includes images corresponding to multiple wires; Jointly training the HRNet module and the Transformer module based on the second training data to obtain an updated wire segmentation model; The intersection-and-union ratio corresponding to the updated wire segmentation model is determined until the intersection-and-union ratio meets a preset threshold, thereby obtaining a trained wire segmentation model.
6. The method according to claim 1, characterized in that The step of projecting each of the target wires onto the ground in the image to be processed to obtain a projection line segment, and determining a connection area between the projection line segment and the first detection frame as an area of interest includes: Obtaining the slope value of each target conductor, and respectively determining the two target conductors with the largest slope value and the smallest slope value as the outer conductors; the slope value is determined by using the vertical line and the horizontal line of the target tower as a two-dimensional coordinate system; In the image to be processed, a plurality of projection points of the two outer wires on the ground are determined as two projection line segments; The endpoints of the first detection frame adjacent to the ground are connected to the endpoints of the two projection lines to obtain a connection area between the projection line segment and the first detection frame, and determine it as a region of interest.
7. The method according to claim 1, characterized in that The determining, according to the positional relationship between each of the second detection frames and the region of interest, a hidden danger identification result corresponding to the power transmission channel includes: Determine the number of intersections between a random ray with the center point of the second detection frame as an endpoint and the boundary of the region of interest; If the number of intersections is an odd number, determining that the second detection frame is in the region of interest, and determining that the hidden danger identification result corresponding to the power transmission channel is that a hidden danger exists; If the number of intersections is an even number, it is determined that the second detection frame is outside the region of interest, and it is determined that the hidden danger identification result corresponding to the power transmission channel is that there is no hidden danger.
8. A device for identifying hidden dangers in a power transmission channel, characterized in that: The device comprises: An image acquisition module is used to acquire an image to be processed of a power transmission channel; the objects in the image to be processed include a pole tower, a conductor and a ground connected to the pole tower, and the pole tower is located in the center of the image to be processed, and each of the conductors is vertically symmetrical based on the pole tower; A target detection module is used to perform object detection on the image to be processed based on a trained target detection model to obtain a first detection frame of a target tower and a second detection frame of a target engineering machinery contained in the image to be processed; A conductor segmentation module is used to perform object segmentation on the image to be processed based on a trained conductor segmentation model to obtain a plurality of target conductors corresponding to the target tower; A region determination module, configured to project each of the target wires onto the ground in the image to be processed to obtain a projection line segment, and determine a connection region between the projection line segment and the first detection frame as a region of interest; The hidden danger identification module is used to determine the hidden danger identification result corresponding to the power transmission channel according to the position relationship between each of the second detection frames and the region of interest.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Power transmission environment hidden danger target remote sensing extraction method, system, equipment and medium
CN121353254A
