A method, device and electronic equipment for detecting crossing fence during substation operation

Through video data processing and object detection technology, calibration lines and tracking trajectories are drawn to accurately judge the behavior of substation operators across fences, solving the problems of high misjudgment rate and low accuracy in the existing technology, real-time monitoring and control of fence detection are realized Alert function.

CN112861819BActive Publication Date: 2024-11-26潘振波
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110357178.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-01
Publication Date
2024-11-26
Estimated Expiration
2041-04-01

AI Technical Summary

Technical Problem

At the substation construction site, the existing temporary fence lacks supervision and alarm functions, which leads to the inability of timely warnings when crossing the fence. The existing detection methods are prone to misjudgment when the fence is not parallel to the coordinate axis, and the accuracy is low.

Method used

By obtaining video data, drawing the first calibration line, and performing preset target detection on the video data, including human targets and fence targets, tracking the movement trajectory of the human target, and determining the second calibration line based on the fence targets and action trajectory, when the second When the calibration line intersects with the action track, it is determined to be a crossing fence behavior, and an alarm message is sent to the mobile terminal.

Benefits of technology

Accurate detection and real-time warning of substation operators' behavior across fences is achieved, the error judgment rate is reduced, and the accuracy and reliability of detection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112861819B_ABST
    Figure CN112861819B_ABST
Patent Text Reader

Abstract

The present application relates to the field of video analysis technology, and in particular to a method, device, and electronic device for detecting fence crossing during substation operation. The present application obtains video data and draws a first calibration line in the video data; performs preset target detection on the video data, and the preset targets include human targets and fence targets; when the human target and the fence target are detected at the same time, a second calibration line is obtained according to a first preset rule; the human target is tracked to obtain a first motion trajectory of the human target; according to the fence target and the first motion trajectory, a second motion trajectory of the human target is determined according to a second preset rule; when the second calibration line is detected to intersect with the second motion trajectory, it is determined that the human target has crossed the fence. By adopting the above-mentioned method, device, and electronic device for detecting fence crossing during substation operation, the judgment result for fence crossing behavior is more accurate, and there is no fixed requirement for the video angle used for analysis, and the limitation is small.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video analysis technology, and in particular to a method, device and electronic equipment for detecting fence crossing during substation operation. Background Art

[0002] At the construction site of a substation, operators often violate safety operating rules by not following the prescribed requirements. Although the site is basically equipped with video surveillance equipment, so that supervisors can see the site's operating conditions at any time and make corrections, manual video viewing has problems such as heavy workload and easy neglect of key information when personnel are tired.

[0003] At the substation construction site, the construction guardrail is a temporary fence constructed from the pole holes near the cable trench (channel). The substation construction specifications require that workers are prohibited from crossing the fence, but the existing temporary fence does not have a supervision alarm function. Therefore, when workers cross the fence, there is no way to warn the workers to stop the illegal behavior. Therefore, it is necessary to monitor this behavior in real time and issue a warning.

[0004] In the prior art, the recognition result is obtained by judging whether the human body motion trajectory intersects with the fence. This detection method requires that the fence is parallel to the coordinate axis in the picture, otherwise it is easy to make a misjudgment, so a more accurate detection method is needed. Summary of the invention

[0005] In view of this, the embodiments of the present application at least provide a method, device and electronic equipment for detecting fence crossing during substation operations.

[0006] This application mainly includes the following aspects:

[0007] In a first aspect, an embodiment of the present application provides a method for detecting a substation operation crossing a fence, and the method for detecting a substation operation crossing a fence includes:

[0008] Acquire video data, and draw a first calibration line in the video data;

[0009] Perform preset target detection on the video data, the preset targets include human targets and fence targets;

[0010] When a human target and a fence target are detected at the same time, a second calibration line is obtained according to a first preset rule;

[0011] Track the human target and obtain the first action trajectory of the human target;

[0012] Determine a second motion trajectory of the human target according to the fence target and the first motion trajectory according to a second preset rule;

[0013] When it is detected that the second calibration line intersects the second action trajectory, it is determined that the human target has crossed the fence.

[0014] In a possible implementation manner, the step of drawing a first calibration line in the video data specifically includes:

[0015] Identify fence poles in video data;

[0016] A first calibration line is formed based on a connecting line between adjacent fence poles among the identified fence poles.

[0017] In a possible implementation, the human target includes multiple human objects.

[0018] The step of tracking the human target and obtaining the first motion trajectory of the human target specifically includes:

[0019] Determine a plurality of human body detection positions in a current frame of the video data;

[0020] Determining a plurality of predicted positions corresponding to a plurality of human objects based on data of a predetermined number of frames of video data preceding a current frame;

[0021] For each predicted position, the predicted position is matched with each human body detection position, and the human body detection position with the highest matching degree is determined as the detection position of the human body object corresponding to the predicted position in the current frame;

[0022] Based on the detected positions of multiple human objects in each frame, a first motion trajectory of each human object is obtained.

[0023] In a possible implementation, the predicted position is matched with the human body detection position in the following manner: position coincidence matching and image feature matching are performed on the predicted position and the human body detection position.

[0024] The human body detection position with the highest matching degree with any predicted position is determined in the following manner:

[0025] For any predicted position, based on the positional coincidence between the predicted position and each human body detection position, a first matching value of the predicted position is determined; based on the image feature matching between the predicted position and each human body detection position, a second matching value of the predicted position is determined; based on the determined first matching value and second matching value, a comprehensive feature matching value of the predicted position is determined;

[0026] The human body detection position corresponding to the maximum comprehensive feature matching value is determined as the human body detection position with the highest matching degree with any predicted position.

[0027] In a possible implementation manner, the method for detecting a substation operation crossing a fence further includes:

[0028] After determining that the human target has crossed the fence, an alarm message is sent to the mobile terminal held by the human target.

[0029] In a second aspect, an embodiment of the present application further provides a substation operation crossing fence detection device, the substation operation crossing fence detection device comprising:

[0030] A drawing module, used for acquiring video data and drawing a first calibration line in the video data;

[0031] A detection module is used to detect preset targets on video data, where the preset targets include human targets and fence targets;

[0032] A first calculation module is used to obtain a second calibration line according to a first preset rule when a human target and a fence target are detected at the same time;

[0033] A target tracking module is used to track a human target and obtain a first motion trajectory of the human target;

[0034] A second calculation module, used for determining a second motion trajectory of the human target according to the fence target and the first motion trajectory according to a second preset rule;

[0035] The judgment module is used to determine that the human target has crossed the fence when it is detected that the second calibration line intersects with the second action trajectory.

[0036] In a possible implementation, the drawing module is specifically used for:

[0037] Identify fence poles in video data;

[0038] A first calibration line is formed based on a connecting line between adjacent fence poles among the identified fence poles.

[0039] In a possible implementation, the human target includes multiple human objects.

[0040] Among them, the target tracking module is specifically used for:

[0041] Determine a plurality of human body detection positions in a current frame of the video data;

[0042] Determining a plurality of predicted positions corresponding to a plurality of human objects based on data of a predetermined number of frames of video data preceding a current frame;

[0043] For each predicted position, the predicted position is matched with each human body detection position, and the human body detection position with the highest matching degree is determined as the detection position of the human body object corresponding to the predicted position in the current frame;

[0044] Based on the detected positions of multiple human objects in each frame, a first motion trajectory of each human object is obtained.

[0045] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the substation operation crossing fence detection method described in the first aspect or any possible implementation manner of the first aspect.

[0046] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the substation operation crossing fence detection method described in the first aspect or any possible implementation scheme of the first aspect are executed.

[0047] The method and device for detecting fence crossing during substation operation provided by the embodiment of the present application adopt the method of acquiring video data, marking a first calibration line for a fence in a video screen, performing preset target detection on the video data, detecting a human target and a fence target in the video, and when both a human target and a fence target appear in the screen, acquiring a second calibration line according to a first preset rule, i.e., a calibration line in a fence target detection frame, tracking the human target in the video, obtaining tracking information, extracting a first motion trajectory of the human target from the tracking information, generating a second motion trajectory according to the fence target and the first motion trajectory, i.e., a trajectory in a fence target detection frame, and when the second motion trajectory intersects with the second calibration line, determining that the human target has illegally crossed the hurdle. Compared with the prior art of determining whether a fence parallel to a coordinate axis in a screen intersects with a human motion trajectory, which has great limitations and low accuracy, the method obtains the human motion trajectory and the fence calibration line respectively when detecting that both a human target and a fence appear in the screen, and filters the part in the fence target detection frame, and determines whether the operator has crossed the fence by detecting whether the filtered human motion trajectory intersects with the calibration line, so that the determination result is more accurate, and there is no fixed requirement for the video angle used for analysis, and the limitation is small.

[0048] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 A flow chart of a method for detecting a substation operation crossing a fence provided by an embodiment of the present application is shown;

[0051] Figure 2 A flow chart of another method for detecting a substation operation crossing a fence provided by an embodiment of the present application is shown;

[0052] Figure 3 A functional module diagram of a substation operation crossing fence detection device provided by an embodiment of the present application is shown;

[0053] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown.

[0054] Description of main component symbols:

[0055] In the figure: 301-drawing module; 302-detection module; 303-first calculation module; 304-target tracking module; 305-second calculation module; 306-judgment module; 400-electronic device; 401-processor; 402-communication bus; 403-user interface; 404-network interface; 405-memory; 4051-operating system; 4052-application. DETAILED DESCRIPTION

[0056] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.

[0057] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0058] In order to enable those skilled in the art to use the contents of this application, the following implementation method is given in combination with the specific application scenario of "substation operation crossing fence detection". For those skilled in the art, the general principles defined here can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application.

[0059] The following methods, devices, electronic devices or computer-readable storage media of the embodiments of the present application can be applied to any scenario requiring detection of substation operations crossing fences. The embodiments of the present application are not limited to specific application scenarios. Any scheme using the substation operation crossing fence detection method and device provided in the embodiments of the present application is within the scope of protection of the present application.

[0060] It is worth noting that before this application was proposed, the existing schemes usually used target detection to divide the fence, and obtained the recognition result by judging whether the trajectory of the person and the fence frame detected by the target detection intersect. However, target detection can only frame the minimum circumscribed rectangle of the fence (the four sides of the minimum circumscribed rectangle are parallel to the border of the picture). If the fence is slanted in the picture, that is, the four sides of the fence are not in a horizontal or vertical state in the picture, then even if the construction workers walk near the fence and do not cross it, they will still be identified as crossing the fence. Therefore, this method has limitations in practical applications and its accuracy is also low.

[0061] In response to the above problems, embodiments of the present application provide a method and device for detecting fence crossing during substation operations, which will be described below through embodiments.

[0062] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.

[0063] Figure 1 This is a flow chart of a method for detecting a substation operation crossing a fence provided in an embodiment of the present application. Figure 1 As shown, the method for detecting a substation operation crossing a fence provided in an embodiment of the present application includes the following steps:

[0064] S101: Acquire video data, and draw a first calibration line in the video data;

[0065] S102: Performing preset target detection on the video data, where the preset targets include human targets and fence targets;

[0066] S103: when a human target and a fence target are detected at the same time, a second calibration line is obtained according to a first preset rule;

[0067] S104: Tracking the human target to obtain a first motion trajectory of the human target;

[0068] S105: Determine a second motion trajectory of the human target according to the fence target and the first motion trajectory according to a second preset rule;

[0069] S106: When it is detected that the second calibration line intersects the second motion trajectory, it is determined that the human target has crossed the fence.

[0070] In step S101, the monitoring video of the substation construction site can be obtained in real time, and the obtained camera image is calibrated by the detection system to draw a number of calibration lines. The monitoring video here can be obtained by shooting with a camera, and the angle of the camera can be fixed or rotating.

[0071] In step S102, preset target detection is performed on the video data. In a preferred embodiment, target detection can be implemented by using the YOLOv5s deep learning model to detect human targets and fence targets in the picture. Among them, human targets include all human objects in the picture, and fence targets cover the entire fence in the picture.

[0072] Specifically, historical surveillance videos of the construction site can be collected, and the human body and fences can be marked separately to create a data set for training, and the YOLOv5s target detection algorithm model can be obtained. The data set can also be expanded using the IMGAUDG data enhancement tool and other means to improve the recognition accuracy and robustness of the model. The IMGAUDG data enhancement tool includes blurring, plane rotation, mirror flipping, Gaussian noise, scaling and other processing methods, which can expand the data of the original data set.

[0073] In step S103, when a human target and a fence target are detected to appear in the picture at the same time, the second calibration line is obtained according to the first preset rule, that is, the part of the first calibration line contained in the detection frame of the detected fence target is filtered out as the second calibration line.

[0074] In step S104, the human targets detected in the video data are tracked by the improved SORT multi-target tracking algorithm, so as to obtain the motion trajectory of the human targets, i.e., the first action trajectory, and the original image screen. The improved SORT multi-target tracking algorithm here can track multiple targets simultaneously, and the recognition accuracy is relatively accurate. The action trajectory point here is the bottom midpoint of the human target detection frame, i.e., the trajectory of the sole of the human foot.

[0075] In step S105, the obtained first motion trajectory is screened according to a second preset rule based on the target fence, that is, the first motion trajectory portion within the target fence detection frame is extracted as the second motion trajectory.

[0076] In step S106, it is detected whether the second calibration line intersects with the second action trajectory. If so, it is determined that the current human target has crossed the fence; if not, the current round of detection ends.

[0077] In this embodiment, when a human body and a fence are detected in the picture at the same time, the movement trajectory of the human body and the fence calibration line are respectively obtained and the part within the fence target detection frame is screened. By detecting whether the filtered human body movement trajectory intersects with the calibration line, it is judged whether the operator has crossed the fence. The judgment result is more accurate, there is no fixed requirement for the video angle used for analysis, and there are few limitations.

[0078] Further, step S101 specifically includes: identifying fence poles in the video data, and forming a first calibration line based on the connection line between adjacent fence poles in the identified fence. Preferably, adjacent fence pole holes are used as endpoints and connected to form the first calibration line, so that the judgment effect is more accurate.

[0079] like Figure 2 As shown, further, the human target detected according to the video data includes multiple human objects, and step S104 specifically includes:

[0080] Step S201: determining a plurality of human body detection positions in a current frame of video data;

[0081] Step S202: determining a plurality of predicted positions corresponding to a plurality of human objects based on data of a predetermined number of frames of video data before a current frame;

[0082] Step S203: for each predicted position, matching the predicted position with each human body detection position, and determining the human body detection position with the highest matching degree as the detection position of the human body object corresponding to the predicted position in the current frame;

[0083] Step S204: based on the detected positions of the multiple human objects in each frame, obtaining a first motion trajectory of each human object.

[0084] Among them, in step S201, the video data is composed of several frames of images, each frame of the image can detect human targets, determine the positions of all human targets in the current frame, obtain multiple human detection positions, and each human detection position corresponds to a detection frame.

[0085] In step S202, based on the human body detection positions in a certain number of frames before the current frame of the video data and based on the human body's motion state, the position of the human body object in the next frame is predicted to obtain multiple predicted positions corresponding to multiple human body objects.

[0086] Specifically, when predicting the position of a human object, a Kalman filter prediction is performed based on the valid trajectory in the tracking model, and an estimate is made based on the historical motion state of the human object to obtain the predicted position corresponding to the human object. Among them, the valid trajectory includes the trajectory of the confirmed state and the trajectory of the unconfirmed state. The trajectory of the confirmed state is the trajectory that matches the target and meets the preset conditions, and the trajectory of the unconfirmed state is the trajectory that does not match the target, such as a new person appearing in the picture or other human targets that are misdetected.

[0087] In step S203, the preset position is matched with the detection positions corresponding to all human objects detected in the current frame, wherein the detection position with the highest matching degree is the actual position of the current human object, and the detection position with the highest matching degree is used as the object for calculating the trajectory.

[0088] In step S204, the trajectory points of the current human object in all frames are connected to obtain the action trajectory corresponding to the current human target. The trajectory point here is the bottom midpoint of the detection frame of the human object.

[0089] Step S203 specifically includes: matching the predicted position with the human body detection position in the following manner: performing position coincidence matching and image feature matching on the predicted position and the human body detection position.

[0090] The human body detection position with the highest matching degree with any predicted position is determined in the following manner:

[0091] For any predicted position, a first matching value of the predicted position is determined based on the positional overlap between the predicted position and each human body detection position, a second matching value of the predicted position is determined based on the image feature matching between the predicted position and each human body detection position, and a comprehensive feature matching value of the predicted position is determined based on the determined first matching value and second matching value; the human body detection position corresponding to the maximum comprehensive feature matching value is determined as the human body detection position with the highest matching degree with any predicted position.

[0092] Among them, the first matching value is the IOU (overlap) matching value, which is based on the positional overlap between the predicted position (i.e., the prediction box) and each human body detection position (i.e., the detection box), and calculates the first matching value between the predicted position and each human body detection position in the current frame.

[0093] The second matching value is a grayscale feature matching value, and based on the image features of the predicted position (i.e., the prediction frame) and each human body detection position (i.e., the detection frame), the second matching value of the predicted position and each human body detection position in the current frame is calculated. Preferably, the image features here are grayscale feature values, including but not limited to grayscale mean, grayscale entropy, grayscale anisotropy, and grayscale matrix features.

[0094] The first matching value and the second matching value are calculated by weighted calculation method to calculate the comprehensive feature matching value. The calculation formula is as follows:

[0095] S=α·F IOU +β·F gray

[0096] Among them, F IOU is the IOU matching value, F gray is the gray feature matching value, α is the weight when the IOU matching value is fused, β is the weight when the gray feature value is fused, and S is the comprehensive feature matching value.

[0097] Based on the obtained comprehensive feature matching value, Hungarian algorithm matching is performed, and there are three matching results: the trajectory that matches the target, the trajectory that does not match the target, and the target that does not match the trajectory.

[0098] Among them, for the trajectory that matches the target, when the trajectory in the unconfirmed state for three consecutive frames matches the target, the trajectory is adjusted to the confirmed state, the trajectory parameters are updated, and the observation information of the corresponding human target is updated to the trajectory data.

[0099] For the trajectory that does not match the target, it is necessary to determine whether the trajectory meets the deletion condition. If it does, the trajectory is marked as deleted. First, the status of the trajectory that does not match the target is determined. If the trajectory is in the confirmed state, it is changed to the deleted state when the number of consecutive unmatched targets is greater than the preset lost target threshold. If the trajectory is in the unconfirmed state, it is changed to the deleted state when the number of consecutive unmatched targets is less than the preset confirmed trajectory threshold. The trajectory in the deleted state will be deleted and will not be used in the next round of matching.

[0100] For targets that are not matched to the track, extract the detection frame corresponding to the target. Create a new track object for the detection frame to record the subsequent track information of the detection frame, and set the track as an unconfirmed object. The target that is not matched to the track here may be a new person or a misjudged person in the picture. In the next round of matching, the target can continue to be matched according to the comprehensive feature matching value of the detection frame, and the state of the track can be changed according to the above conditions.

[0101] Furthermore, after determining that the human target has crossed the fence, an alarm message is sent to the mobile terminal held by the human target. A message can also be sent to the management staff through the detection system.

[0102] In the embodiment of the present application, the fence in the video data is calibrated to obtain a first calibration line. When it is detected that both a human target and a fence target appear in the video, a second calibration line is obtained through the detection frame of the fence target, and the human object is tracked separately to obtain the corresponding first motion trajectory. The first motion trajectory is screened through the detection frame of the fence target to obtain the second motion trajectory. If the second motion trajectory intersects with the second calibration line, it is determined that the current human object has violated the rules by crossing the fence, and an alarm is issued, so that the manager can be informed of the occurrence of the violation and perform corresponding processing. Compared with the conventional video analysis-based fence crossing detection system, the calibration function can accurately determine the position of the fence, and the detection of fence crossing at any angle in the video is more accurate, with fewer limitations, and at the same time reduce the probability of misjudging workers near the fence.

[0103] Based on the same application concept, the embodiments of the present application also provide a substation operation crossing fence detection device corresponding to the substation operation crossing fence detection method provided in the above embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the substation operation crossing fence detection method in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0104] See also Figure 3 As shown, a substation operation crossing fence detection device provided in another embodiment of the present application includes:

[0105] A drawing module 301 is used to obtain video data and draw a first calibration line in the video data;

[0106] A detection module 302 is used to perform preset target detection on the video data, where the preset targets include human targets and fence targets;

[0107] A first calculation module 303 is used to obtain a second calibration line according to a first preset rule when a human target and a fence target are detected at the same time;

[0108] The target tracking module 304 is used to track the human target and obtain a first motion trajectory of the human target;

[0109] A second calculation module 305, configured to generate a second motion trajectory according to a second preset rule based on the fence target and the first motion trajectory;

[0110] The judgment module 306 is used to determine that the human target has crossed the fence when the second calibration line intersects the second motion trajectory.

[0111] The drawing module 301 is specifically used to: identify fence poles in the video data, and form a first calibration line based on the connection lines between adjacent fence poles in the identified fence poles.

[0112] In one embodiment, the human target includes multiple human objects, wherein the target tracking module is specifically used to: determine multiple human detection positions in the current frame of the video data, and determine multiple predicted positions corresponding to the multiple human objects based on data of a predetermined number of frames of the video data before the current frame. For each predicted position, the predicted position is matched with each human detection position, and the human detection position with the highest matching degree is determined as the detection position of the human object corresponding to the predicted position in the current frame, and based on the detection positions of the multiple human objects in each frame, the first action trajectory of each human object is obtained.

[0113] Based on the same application concept, see Figure 4 As shown, the structure of an electronic device 400 provided in an embodiment of the present application includes: at least one processor 401, at least one network interface 404 or other user interface 403, a memory 405, and at least one communication bus 402. The communication bus 402 is used to realize the connection and communication between these components. The electronic device 400 optionally includes a user interface 403, including a display (for example, a touch screen, LCD, CRT, holographic imaging (Holographic) or projection (Projector), etc.), a keyboard or a pointing device (for example, a mouse, a trackball (trackball), a touch pad or a touch screen, etc.).

[0114] The memory 405 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A portion of the memory 405 may also include a non-volatile random access memory (NVRAM).

[0115] In some implementations, the memory 405 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof:

[0116] Operating system 4051, including various system programs for implementing various basic services and processing hardware-based tasks;

[0117] The application module 4052 includes various application programs, such as a launcher, a media player, a browser, etc., which are used to implement various application services.

[0118] In the embodiment of the present invention, by calling the program or instruction stored in the memory 405, the processor 401 is used to execute the steps of the method for detecting the substation operation crossing the fence provided in any of the above embodiments.

[0119] Based on the same application concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the substation operation crossing fence detection method provided in the above embodiment are executed.

[0120] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the above-mentioned substation operation crossing fence detection method can be executed, and the fence in the video data is calibrated to obtain a first calibration line. When it is detected that a human target and a fence target appear in the video at the same time, the second calibration line is obtained through the detection frame of the fence target, and the human object is tracked respectively to obtain the corresponding first motion trajectory. The first motion trajectory is screened through the detection frame of the fence target to obtain the second motion trajectory. If the second motion trajectory intersects with the second calibration line, it is determined that the current human object has violated the rules of crossing the fence, and an alarm is issued, so that the manager can be informed of the occurrence of the violation and perform corresponding processing. Compared with the conventional video analysis-based crossing fence detection system, the calibration function can accurately determine the position of the fence, and the detection of crossing the fence at any angle in the video is more accurate, with less limitations, and at the same time reduce the probability of misjudging the operator near the fence.

[0121] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0122] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0123] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0124] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0125] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for detecting fence crossing in substation operations. It is characterized in that The method for detecting a substation operation crossing a fence comprises: Identify fence poles in the acquired video data, and form a first calibration line based on a connection line between adjacent fence poles among the identified fence poles; Performing preset target detection on the video data, the preset targets including human targets and fence targets; When a human target and a fence target are detected at the same time, the first calibration line contained in the detection frame of the detected fence target is used as the second calibration line; Track the human target and obtain the first action trajectory of the human target; The first motion trajectory contained in the detection frame of the detected fence target is used as the second motion trajectory of the human target; When it is detected that the second demarcation line intersects with the second action trajectory, it is determined that the human target has crossed the fence; The human target includes a plurality of human objects. The step of tracking the human target to obtain the first motion trajectory of the human target specifically includes: Determine a plurality of human body detection positions in a current frame of the video data; Determining a plurality of predicted positions corresponding to the plurality of human objects based on data of a predetermined number of frames of the video data before a current frame; For each predicted position, the predicted position is matched with each human body detection position, and the human body detection position with the highest matching degree is determined as the detection position of the human body object corresponding to the predicted position in the current frame; Based on the detected positions of the multiple human objects in each frame, a first motion trajectory of each human object is obtained.

2. The method for detecting a substation operation crossing a fence according to claim 1, It is characterized in that The predicted position is matched with the human body detection position in the following ways: position coincidence matching and image feature matching are performed on the predicted position and the human body detection position. The human body detection position with the highest matching degree with any predicted position is determined in the following manner: For any of the predicted positions, based on the positional coincidence between the predicted position and each human body detection position, determine a first matching value of the predicted position, based on the image feature matching between the predicted position and each human body detection position, determine a second matching value of the predicted position, and based on the determined first matching value and second matching value, determine a comprehensive feature matching value of the predicted position; The human body detection position corresponding to the maximum comprehensive feature matching value is determined as the human body detection position with the highest matching degree with any of the predicted positions.

3. The method for detecting a substation operation crossing a fence according to claim 1 or 2, It is characterized in that Also includes: After determining that the human target has crossed the fence, an alarm message is sent to the mobile terminal held by the human target.

4. A device for detecting crossing fences during substation operations. It is characterized in that The substation operation crossing fence detection device comprises: A drawing module, configured to identify fence poles in the acquired video data, and form a first calibration line based on a connection line between adjacent fence poles in the identified fence poles; A detection module, used to perform preset target detection on the video data, wherein the preset targets include human targets and fence targets; A first calculation module is used for, when a human target and a fence target are detected at the same time, using a first calibration line contained in a detection frame of the detected fence target as a second calibration line; A target tracking module is used to track a human target and obtain a first motion trajectory of the human target; A second calculation module is used to use the first motion trajectory contained in the detection frame of the detected fence target as the second motion trajectory of the human target; A judgment module, configured to determine that the human target has crossed the fence when it is detected that the second demarcation line intersects the second motion trajectory; The human target includes a plurality of human objects, wherein the target tracking module is specifically used for: Determine a plurality of human body detection positions in a current frame of the video data; Determining a plurality of predicted positions corresponding to the plurality of human objects based on data of a predetermined number of frames of the video data before a current frame; For each predicted position, the predicted position is matched with each human body detection position, and the human body detection position with the highest matching degree is determined as the detection position of the human body object corresponding to the predicted position in the current frame; Based on the detected positions of the multiple human objects in each frame, a first motion trajectory of each human object is obtained.

5. An electronic device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the method for detecting substation operation crossing the fence as described in any one of claims 1 to 3.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for detecting a substation operation crossing a fence as claimed in any one of claims 1 to 3 are executed.