A method, device, equipment and medium for early warning of safety of electric power construction personnel near electricity
Through the methods of image acquisition, bounding box marking and three-dimensional distance calculation, the problem of low accuracy of near-power safety warning in the prior art is solved, and high-precision safety monitoring and real-time alarm functions for power construction personnel are realized.
Patent Information
- Application Number
- CN202411639696.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-18
AI Technical Summary
The existing near-power safety warning methods for power construction personnel are low in accuracy and cannot fully guarantee the safety of workers.
A close-to-energy safety warning method for power construction workers is adopted. By collecting and correcting the power construction images, the bounding boxes of live equipment and workers are marked, the pre-trained model is used to identify the workers, and the closest distance between live equipment and workers is calculated based on three-dimensional coordinates. If the distance is too close, an alarm will be called.
By considering the three-dimensional structure of the object, the accuracy of distance calculation is improved, the accuracy of distance monitoring of live equipment and operators is enhanced, real-time safety warning and alarm functions are realized, and the operation safety is improved.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of safe power operation, and in particular to a method, device, equipment and medium for early warning of safety of electric power construction personnel near electricity. Background Art
[0002] When working near electricity in a substation, it is crucial to ensure that the operator maintains a safe distance from live equipment. However, due to the dense equipment and complex electromagnetic field environment in the substation, traditional monitoring methods have significant shortcomings and cannot fully guarantee the safety of operators. Traditional safety warning methods for power construction workers near electricity mainly include: near-electricity induction detection method, GPS positioning method, live-site warning device hanging, and traditional Euclidean distance calculation method.
[0003] However, these methods have different defects: the near-electricity induction detection method is extremely complex and inaccurate due to the dense substation equipment and complex electromagnetic field environment; the GPS positioning algorithm is complex, the substation equipment layout is complex, and the early modeling and algorithm tuning work is arduous, making it difficult to ensure accuracy; the warning device mounted on the live part is in direct contact with 35kV, 110kV or higher voltage equipment, and the strong electromagnetic environment interferes with radar monitoring, resulting in monitoring failure; the traditional Euclidean distance calculation method only considers the distance in two-dimensional space, ignoring the three-dimensional structure of the object, resulting in inaccurate distance calculation and unable to accurately reflect the real working environment and potential dangers. In short, the current near-electricity safety warning method for power construction personnel has defects and it is difficult to accurately achieve near-electricity safety warning. Summary of the invention
[0004] The present invention provides a method, device, equipment and medium for early warning of safety of electric power construction personnel near electricity, so as to solve the technical problem of low accuracy of the existing early warning method of safety of electric power near electricity.
[0005] On the one hand, the present invention provides a method for early warning of safety of electric power construction workers near electricity, the method comprising the following steps: step S1: collecting electric power construction images for correction to eliminate camera distortion; step S2: marking the bounding boxes of all live equipment on the corrected image, and recording the coordinates of the live equipment; step S3: inputting the corrected image into a pre-trained operator recognition model, identifying the operators, and marking the bounding boxes of the operators; step S4: based on the bounding boxes of the live equipment and the bounding boxes of the operators, calculating the shortest distance between the target live equipment and the operators, and sounding an alarm if the distance is too close.
[0006] In one implementation of the present invention, the step S1 is specifically as follows: Step S11: using a binocular depth camera to capture a left view image and right view image ; Step S12: Use the camera intrinsic parameter matrix K, distortion coefficient D and extrinsic parameter matrices R and T for correction, and the formula used is as follows: , , where and They are the corrected left and right view images respectively.
[0007] In an implementation of the present invention, the method further includes: generating a disparity map based on the corrected image by calculation; and generating a depth map based on the disparity map.
[0008] In one implementation of the present invention, the step S3 specifically includes: step S31: collecting historical work images of operators and using the LabelImg annotation tool to annotate the operators, generating corresponding annotation files, and dividing the data set into a training set, a validation set, and a test set; step S32: using the annotated data set to train the YOLOv8 model; wherein the training process includes: installing YOLOv8 related dependencies and frameworks, configuring the training environment to use a local GPU; configuring a YOLOv8 configuration file, the configuration file including a model architecture, training hyperparameters, and a data path; evaluating the model performance on the validation set, checking the accuracy and recall rate, and adjusting the model's hyperparameters or data enhancement strategies based on the evaluation results, and retraining to improve the model performance; step S33: the corrected left image The trained YOLOv8 model is input, and the model performs target detection and identifies the bounding boxes of all operators.
[0009] In one implementation of the present invention, the step S4 specifically includes: step S41: obtaining an edge point set based on the Canny edge detection algorithm; step S42: extracting the operator vertices and the energized equipment vertices from the edge point set using the Graham scanning convex hull algorithm; step S43: calculating the three-dimensional coordinates of the operator vertices and the energized equipment vertices; step S44: calculating the minimum distance between the energized equipment and the operator based on the triangular patch algorithm; step S45: if the minimum distance is less than the preset distance threshold, an alarm is issued.
[0010] In one implementation of the present invention, step S44 specifically includes: and Convert to a collection of triangles and , a collection of triangles of charged equipment: , the set of triangle patches of the operator: ; Each triangle is represented by three vertices: , ; Calculate the vertices The distance to the triangle patch; calculate the distance from the triangle patch corresponding to the live equipment to the triangle patch corresponding to the operator, and take the minimum value; traverse all the triangle patches of the live equipment and the operator, calculate the distance between each pair of triangle patches corresponding to the live equipment and the triangle patches corresponding to the operator, and take the minimum value.
[0011] In one implementation of the present invention, the vertex The distance to the triangle patch is: the perpendicular distance from the calculated point to the plane; the normal vector is: , the normal vector is calculated by the cross product of the two edge vectors of the triangle; the vertical distance from the point to the plane is: ,in, Yes To the vertex on the triangle The vector of is the normal vector and vector The dot product of The distance to the plane, is the absolute value of the dot product, ensuring that the distance is positive, is the normal vector The norm of is used to normalize the distance; the barycentric coordinate method is used to determine whether the perpendicular foot is within the triangle. The specific formula is as follows: , ,judge , , Are they all non-negative? If so, the foot of the perpendicular is inside the triangle. If not, the foot of the perpendicular is on the edge or vertex. Calculate the point based on the following formula To the edge The distance ,in, represents the area of the parallelogram formed by two vectors, Represents edge The length of; based on the following formula to take the minimum distance,
[0012] .
[0013] The present invention also provides a safety warning device for electric power construction workers near electricity, the device comprising: an image acquisition module, used to acquire electric power construction images for correction to eliminate camera distortion; a marking module, used to mark the bounding boxes of all live equipment on the corrected image, and record the coordinates of the live equipment; an identification module, used to input the corrected image into a pre-trained operator recognition model, identify the operator, and mark the bounding box of the operator; a distance calculation module, used to calculate the shortest distance between the target live equipment and the operator based on the bounding box of the live equipment and the bounding box of the operator, and to sound an alarm if the distance is too close.
[0014] The present invention also provides a safety warning device for power construction personnel near electricity, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can complete the aforementioned safety warning method for power construction personnel near electricity.
[0015] The present invention also provides a non-volatile computer storage medium for early warning of safety of electric power construction personnel near electricity, which stores computer executable instructions. The computer executable instructions are executed by a processor to implement the aforementioned early warning method for safety of electric power construction personnel near electricity.
[0016] The present invention provides a method, device, equipment and medium for early warning of electric power construction personnel near electricity, which has the following beneficial effects:
[0017] (1) The algorithm represents the object as a grid composed of triangular facets, taking into account the three-dimensional structure of the object, making the distance calculation more accurate and improving the accuracy of distance monitoring between live equipment and operators;
[0018] (2) By manually marking live equipment, it can be applied to any work scene and is no longer limited to fixed live equipment. The algorithm can handle complex shapes of live equipment and operator models and is not restricted by the shape of the object;
[0019] (3) Parallel computing is used to accelerate the distance calculation process. Alarm judgment is performed while calculating the minimum distance. The distance between the operator and the live equipment can be detected in real time, and an alarm is triggered in time when the distance is less than the safety threshold.
[0020] (4) Through real-time calculation and alarm judgment, it can effectively prevent workers from approaching live equipment and improve work safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0022] Figure 1 A flow chart of a method for early warning of electric power construction personnel's proximity to electricity safety provided by an embodiment of the present invention;
[0023] Figure 2 A composition diagram of a safety warning device for electric construction personnel near electricity provided by an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of a safety warning device for electric power construction personnel near electricity provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0026] The embodiments of the present invention provide a method, device, equipment and medium for early warning of safety of electric power construction personnel near electricity. The technical solutions proposed in the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0027] Figure 1 The present invention provides a flow chart of a method for early warning of electric power safety for construction personnel. Figure 1 As shown, the method mainly includes the following steps:
[0028] Step S1: Collect power construction images and perform correction to eliminate camera distortion.
[0029] Step S2: Mark the bounding boxes of all charged devices on the rectified image and record the coordinates of the charged devices.
[0030] Step S3: input the corrected image into a pre-trained operator recognition model, identify the operator, and mark the boundary box of the operator.
[0031] Step S4: Based on the bounding box of the live equipment and the bounding box of the operator, the shortest distance between the target live equipment and the operator is calculated, and an alarm is sounded if the distance is too close.
[0032] Specifically, in the embodiment of the present invention, the power construction image is collected using a binocular depth camera to collect left and right view images. and , the pixels of the images collected by the left and right cameras are 1920*1080. and Correction is performed to eliminate camera distortion. The camera intrinsic parameter matrix K, distortion coefficient D (the distortion coefficient is zero in the embodiment of the present invention because it has been corrected) and extrinsic parameter matrix R (rotation matrix) and T (translation matrix, in the embodiment of the present invention, T = 0.12 meters, which is the baseline distance between the left and right cameras) are used for correction:
[0033]
[0034] .
[0035] Furthermore, in the corrected left image On the , manually mark the bounding boxes of multiple live devices and record their coordinates ,in For the Specifically, the coordinates of powered device 1 are (400, 300) at the upper left corner and (600, 500) at the lower right corner.
[0036] Further, disparity map and depth map are generated. The disparity map is calculated by comparing the rectified left and right images taken by the stereo camera (left and right camera). Disparity is the difference in the position of the corresponding pixel points in the left and right images for the same scene point.
[0037] For each pixel after correction , find the matching points in the left and right images, and use the corrected left and right images and Calculate its disparity :
[0038]
[0039] in, , are the horizontal coordinates of the corresponding points in the left and right images respectively.
[0040] Each pixel value of the disparity map represents the disparity , which is the horizontal offset of the corresponding pixels in the left and right images. The depth map is converted from the disparity map and represents the distance from each point in the scene to the camera. The calculation formula is as follows:
[0041]
[0042] in, is the depth value of a point in the depth map, that is, the distance from the camera, For camera focal length = 1200 pixels, The camera baseline distance is 0.12 meters.
[0043] Horizontal offset (disparity) of corresponding points: In the embodiment of the present invention, for the center point (500, 400) of the powered device 1, the disparity d is 80 pixels.
[0044] Calculate the depth value: rice
[0045] The above disparity map calculation can find the corresponding points of each pixel in the left and right images and calculate the horizontal offset of these points. The larger the disparity value, the closer the object is to the camera; the smaller the disparity value, the farther the object is from the camera. The depth map calculation converts the disparity value into the actual physical distance by introducing camera parameters (focal length and baseline distance). In this way, three-dimensional information can be obtained from a two-dimensional image.
[0046] Furthermore, when detecting and identifying operators from the acquired images, a large amount of labeled data is used to train the YOLOv8 model to identify operators. Input into the YOLOv8 model, perform target detection, identify all workers in the image, and obtain the worker bounding box ,in For the For each operator, the following are the specific steps:
[0047] 1. Data preparation and annotation
[0048] Collect a large number of images containing workers, and use the LabelImg annotation tool to annotate the workers and generate corresponding annotation files. Divide the dataset into training set, validation set, and test set.
[0049] 2. Training the YOLOv8 model
[0050] The YOLOv8 model is trained using the labeled dataset. The training process includes the following steps:
[0051] (1) Environment configuration: Install YOLOv8 related dependencies and frameworks, configure the training environment to use the local GPU; configure the YOLOv8 configuration file, including model architecture, training hyperparameters (such as learning rate, batch size), and data path.
[0052] (2) Model training: Use the following command to start model training:
[0053] yolo train data=your_dataset.yaml model=yolov8s.pt epochs=100 imgsz=640
[0054] Among them, your_dataset.yaml is the configuration file of the dataset, including the paths of the training set and the validation set. yolov8s.pt is the pre-trained model weight file of YOLOv8. epochs=100 is the number of training rounds, which can be adjusted according to the size of the dataset and the training effect. imgsz=640 is the image input size.
[0055] (3) Model evaluation and optimization: Evaluate model performance on the validation set and check indicators such as accuracy and recall. Based on the evaluation results, adjust the model's hyperparameters or data augmentation (cropping, rotation, scaling, etc.) strategies and perform retraining to improve model performance.
[0056] 3. Object Detection
[0057] The corrected left image Input the trained YOLOv8 model, the model performs target detection and identifies the bounding boxes of all operators ,in For the An operating staff.
[0058] The bounding box of the worker: The upper left corner of worker 1 is (800,350), and the lower right corner is (1000,550).
[0059] Furthermore, in order to more accurately obtain the closest distance between the live equipment and the operator, the algorithm is completed through edge point set extraction, vertex extraction by convex hull algorithm, three-dimensional coordinate conversion, and closest distance calculation steps. In the embodiment of the present invention, the extracted edge points of the live equipment are as follows: point 1 (400, 300), point 2 (600, 300), point 3 (600, 500), point 4 (400, 500); the collected edge point set of the operator is as follows: point 1 (800, 350), point 2 (1000, 350), point 3 (1000, 550), point 4 (800, 550).
[0060] Furthermore, the bounding box of the live device is extracted and the worker bounding box The edge inside the image is detected using the Canny edge detection algorithm to obtain the edge point set. and , the specific steps are as follows:
[0061] 1. Color image Convert to grayscale image :
[0062]
[0063] 2. Use Gaussian blur to blur the gray image above Remove image noise:
[0064] Convolve the image with a Gaussian kernel and calculate the new value for each pixel
[0065]
[0066] in, is the blurred image at position The pixel value of . Is a grayscale image In Location The pixel value of . is the Gaussian kernel at position The weight of . is half the size of the Gaussian kernel window. The size of the Gaussian kernel is usually chosen to be .
[0067] Gaussian kernel weights Calculated by the following formula:
[0068]
[0069] in, is the standard deviation, which determines the width of the Gaussian distribution. and is the offset of the Gaussian kernel relative to the center point.
[0070] The extraction process is as follows:
[0071] 1. Extract edges using the Canny edge detection algorithm:
[0072]
[0073] in, and Are the two threshold parameters of the Canny algorithm.
[0074] 2. Extract edge points within the bounding box:
[0075] Set the bounding box of the energized equipment to , the bounding box of the operator is
[0076] 3. From the bounding box of the live equipment and the bounding box of the operator The edge points extracted are defined as:
[0077]
[0078]
[0079] Specifically, the process of extracting vertices by the convex hull algorithm is to use the Graham scanning convex hull algorithm to extract vertices from the edge point set. The steps and formulas of the Graham scanning algorithm are as follows:
[0080] In the embodiment of the present invention, P is the edge point set extracted in the above step, then the convex hull The vertices of can be obtained by following the steps below:
[0081] 1. Find the lowest point:
[0082]
[0083] Select the point with the smallest y coordinate as the starting point. If the y coordinates are the same, select the point with the smallest x coordinate, denoted as
[0084] 2. Sort by polar angle:
[0085] from To begin, for all other points click relative to The polar angle θ is calculated by the following formula:
[0086]
[0087] 3. Use Graham scanning algorithm to construct the convex hull:
[0088] Initialize the convex hull list and set the starting point and the first point after sorting Add the convex hull:
[0089] H=
[0090] For each remaining point after sorting Iterate, starting from the second point, to determine whether the current point and the last two points in the convex hull form a left turn (that is, the cross product is positive). The cross product formula is:
[0091]
[0092] If a left turn is not formed, the last point is removed from the convex hull, and the current point is added to the convex hull. In the embodiment of the present invention, since the edge points collected previously have formed a rectangle, four vertices are directly extracted.
[0093] Through the above steps and formulas, the vertices of the live equipment can be accurately extracted and the peak of the operating personnel .
[0094] Furthermore, the three-dimensional coordinate transformation process is specifically to extract the vertices of the charged equipment above and the peak of the operating personnel The collection coordinates are combined with the depth map to calculate the three-dimensional coordinates of the vertex:
[0095] The value of the depth map calculated above is , whose value represents the depth of each pixel. The pixel coordinates are converted into three-dimensional space coordinates using the camera's intrinsic matrix. The definition is as follows:
[0096]
[0097] in, and is the focal length, and are the coordinates of the center point of the image.
[0098] Then for each vertex three-dimensional coordinate It can be calculated by the following formula:
[0099]
[0100] Perform three-dimensional coordinate transformation on each vertex, and the three-dimensional coordinates of the charged device point (400,300) are:
[0101] rice
[0102] rice
[0103] Z = 1.8 m
[0104] Through the above steps and formulas, the vertex coordinates of the live equipment and operators can be combined with the depth map to calculate their actual position coordinates in three-dimensional space.
[0105] Furthermore, the specific process of calculating the shortest distance is that in order to calculate the shortest distance between the live equipment and the workers in the three-dimensional space, each object is represented as a grid composed of triangular faces. In order to improve the calculation efficiency, all triangular faces of the live equipment and the workers are traversed, and the distance between each pair of triangular faces corresponding to the live equipment and the triangular faces corresponding to the workers is calculated, and the minimum value of 1.2 meters is taken.
[0106] The following are the detailed steps and formulas:
[0107] 1. Gather the vertices of live equipment and operators and Convert to a collection of triangles and
[0108] A collection of triangles for powered devices:
[0109] The triangle patch collection of the operator:
[0110] Each triangle is represented by three vertices:
[0111]
[0112]
[0113] 2. Calculate the distance from the vertex to the triangle patch
[0114] Calculating vertices To the triangle patch △B (vertices are , , ) distance:
[0115] (1) Calculate the vertical distance from the point to the plane
[0116] Normal vector:
[0117] The normal vector is calculated by the cross product of the two edge vectors of the triangle.
[0118] The perpendicular distance from a point to a plane:
[0119]
[0120] in:
[0121] Yes To the vertex on the triangle Vector.
[0122] is the normal vector and vector The dot product of Distance to the plane (unnormalized).
[0123] is the absolute value of the dot product, ensuring that the distance is positive.
[0124] is the normal vector The norm of is used to normalize the distance.
[0125] (2) Determine whether the foot of the perpendicular is inside the triangle
[0126] Use the barycentric coordinate method to determine:
[0127]
[0128]
[0129] judge , , Are they all non-negative? If so, the foot is inside the triangle, if not, the foot is on an edge or vertex.
[0130] (3) Calculate the distance from the point to the edge
[0131] point To the edge Distance:
[0132]
[0133] in:
[0134] Represents the area of the parallelogram formed by two vectors.
[0135] Represents edge Length.
[0136] (4) Take the minimum distance
[0137]
[0138] First, calculate the distance between the triangle corresponding to the live equipment and the triangle corresponding to the operator
[0139] For two triangles △A and △B, calculate the distance from all vertices to the triangles and take the minimum value:
[0140] (1) Distance from vertex to triangle
[0141]
[0142]
[0143] (2) Distance from triangle to triangle
[0144]
[0145] Secondly, the shortest distance between the live equipment and the operator is calculated in parallel
[0146] Traverse all triangles of live equipment and workers, calculate the distance between each pair of triangles corresponding to live equipment and the triangles corresponding to workers, and take the minimum value:
[0147]
[0148]
[0149] Finally, make alarm judgment and trigger, and set a safe distance threshold =1.5 meters, if the calculated minimum distance =1.2 meters, which is less than the preset safety distance threshold , then trigger the alarm.
[0150] The above is a method for early warning of electric power construction personnel near electricity provided by an embodiment of the present invention. Based on the same inventive concept, an embodiment of the present invention also provides an early warning device for electric power construction personnel near electricity. Figure 2 A composition diagram of a safety warning device for electric construction personnel near electricity provided by an embodiment of the present invention, such as Figure 2 As shown, the device mainly includes: an image acquisition module 201, which is used to acquire power construction images for correction to eliminate camera distortion; a marking module 202, which is used to mark the bounding boxes of all live devices on the corrected image and record the coordinates of the live devices; an identification module 203, which is used to input the corrected image into a pre-trained operator recognition model, identify the operator, and mark the bounding box of the operator; a distance calculation module 204, which is used to calculate the shortest distance between the target live device and the operator based on the bounding box of the live device and the bounding box of the operator, and an alarm is issued if the distance is too close.
[0151] The above is a safety warning device for electric power construction personnel near electricity provided by an embodiment of the present invention. Based on the same inventive concept, an embodiment of the present invention also provides a safety warning device for electric power construction personnel near electricity. Figure 3 A schematic diagram of a safety warning device for electric construction personnel near electricity provided by an embodiment of the present invention, such as Figure 3 As shown, the device mainly includes: at least one processor 301; and a memory 302 that is communicatively connected to the at least one processor; wherein the memory 302 stores instructions that can be executed by the at least one processor 301, and the instructions are executed by the at least one processor 301 so that the at least one processor 301 can complete the aforementioned method for safety warning of electric power construction personnel near electricity.
[0152] In addition, an embodiment of the present invention also provides a non-volatile computer storage medium for early warning of safety of electric power construction personnel near electricity, which stores computer executable instructions. The computer executable instructions are executed by a processor to implement the aforementioned method for early warning of safety of electric power construction personnel near electricity.
[0153] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0156] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0157] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0158] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0159] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A safety early warning method for electric power construction personnel near electricity, characterized in that: The method comprises the following steps: Step S1: Collect power construction images for correction to eliminate camera distortion; Step S2: Mark the bounding boxes of all charged devices on the corrected image and record the coordinates of the charged devices; Step S3: inputting the corrected image into a pre-trained operator recognition model, identifying the operator, and marking the boundary box of the operator; Step S4: Based on the bounding box of the live equipment and the bounding box of the operator, the shortest distance between the target live equipment and the operator is calculated, and an alarm is issued if the distance is too close; The step S4 specifically includes: Step S41: Obtain edge point set based on Canny edge detection algorithm; Step S42: using Graham scanning convex hull algorithm to extract operator vertices and live equipment vertices from the edge point set; Step S43: Calculate the three-dimensional coordinates of the operator's vertex and the live equipment's vertex; Step S44: Calculate the minimum distance between the live equipment and the operator based on the triangular patch algorithm; Step S45: If the minimum distance is less than the preset distance threshold, an alarm is issued; The step S44 specifically includes: Gather the vertices of live equipment and workers and Convert to a collection of triangles and , a collection of triangles of charged equipment: , the set of triangle patches of the operator: ; Each triangle is represented by three vertices: , ; Calculate the distance between the triangle patch corresponding to the live equipment and the triangle patch corresponding to the operator, and take the minimum value; Traverse all triangles of live equipment and workers, calculate the distance between each pair of triangles corresponding to live equipment and the triangles corresponding to workers, and take the minimum value as the minimum distance; Among them, the vertex is calculated The distance to the triangle patch is: Calculate the perpendicular distance from a point to a plane; the normal vector is: , the normal vector is calculated by the cross product of the two edge vectors of the triangle; the vertical distance from the point to the plane is: ,in, Yes To the vertex on the triangle The vector of is the normal vector and vector The dot product of The distance to the plane, is the absolute value of the dot product, ensuring that the distance is positive, is the normal vector The norm of is used to normalize the distance; Use the barycentric coordinate method to determine whether the foot of the perpendicular is within the triangle. The specific formula is as follows: judge , , Are they all non-negative? If so, the foot of the perpendicular is inside the triangle; if not, the foot of the perpendicular is on an edge or vertex; The points are calculated based on the following formula To the edge The distance in, represents the area of the parallelogram formed by two vectors, Represents edge Length; The minimum distance is taken based on the following formula: 。 2. A method for early warning of electric power construction personnel's safety near electricity according to claim 1, characterized in that: The step S1 is specifically: Step S11: Use the binocular depth camera to capture the left view image and right view image ; Step S12: Use the camera intrinsic parameter matrix K, distortion coefficient D and extrinsic parameter matrices R and T for calibration. The formula used is as follows: In the formula, and are the corrected left view image and right view image respectively, where R is the rotation matrix and T is the translation matrix.
3. A method for early warning of electric power construction personnel's safety near electricity according to claim 1, characterized in that: The method further comprises: Generate a disparity map based on the corrected image calculation; A depth map is generated based on the disparity map.
4. The method for early warning of electric power construction personnel's safety near electricity according to claim 1, characterized in that: The step S3 specifically includes: Step S31: Collect historical work images of operators and use LabelImg annotation tool to annotate operators, generate corresponding annotation files, and divide the data set into training set, validation set and test set; Step S32: train the YOLOv8 model using the annotated dataset; wherein the training process includes: installing YOLOv8 related dependencies and frameworks, configuring the training environment to use the local GPU; configuring the YOLOv8 configuration file, the configuration file including the model architecture, training hyperparameters and data path; evaluating the model performance on the validation set, checking the accuracy and recall rate, adjusting the model hyperparameters or data enhancement strategy according to the evaluation results, and retraining to improve the model performance; Step S33: Corrected left image The trained YOLOv8 model is input, and the model performs target detection and identifies the bounding boxes of all operators.
5. A safety warning device for electric power construction personnel near electricity, used to implement a safety warning method for electric power construction personnel near electricity as described in any one of claims 1 to 4, characterized in that: The device comprises: Image acquisition module, used to collect power construction images for correction to eliminate camera distortion; A marking module, used to mark the bounding boxes of all charged devices on the rectified image and record the coordinates of the charged devices; A recognition module, used for inputting the corrected image into a pre-trained operator recognition model, identifying the operator, and marking a boundary box of the operator; The distance calculation module is used to calculate the shortest distance between the target live equipment and the operator based on the boundary box of the live equipment and the boundary box of the operator, and to alarm if the distance is too close.
6. A safety warning device for electric power construction personnel near electricity, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can complete the method for safety early warning of electric power construction personnel near electricity as described in any one of claims 1-4.
7. A non-volatile computer storage medium for early warning of safety of electric power construction personnel near electricity, storing computer execution instructions, characterized in that: The computer-executable instructions are executed by a processor to implement a method for early warning of safety of electric power construction personnel near electricity as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Power production personnel safety monitoring method, system and equipment
CN111753712A
Binocular vision-based power transformation operator near-electricity distance detection method
CN116563386A