Wall climbing identification method, device and electronic equipment

By combining the head detection model and the tracking model, the wall cordon is set and the climbing judgment point is calculated, which solves the problem of low accuracy in long-distance climbing recognition, reduces false alarms and missed reports, and improves the recognition accuracy of climbing behavior and speed.

CN115294610BActive Publication Date: 2024-11-19CHANGSHA HISENSE INTELLIGENT SYST RES INST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210984114.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-17
Publication Date
2024-11-19
Estimated Expiration
2042-08-17

AI Technical Summary

Technical Problem

The existing wall climbing recognition methods have problems with low identification accuracy, false alarms and missed reports when deploying long-distance perimeters. Especially when the human body blocks each other or has a variety of postures, it is difficult to effectively identify climbing behavior.

Method used

Use the head detection model to obtain the image to be detected, track the target head detection frame through the head tracking model, and set the wall cordon, calculate the angle and climbing judgment point, comprehensively determine whether the target has climbing behavior, and use the center of the head detection frame The positional relationship between points and climbing judgment points and the wall cordon is used to judge climbing behavior.

Benefits of technology

It improves the accuracy of wall climbing recognition, reduces false alarms and missed reports, and improves the accuracy and speed of climbing behavior recognition, especially when targets are blocked by each other and the head position is too high.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294610B_ABST
    Figure CN115294610B_ABST
Patent Text Reader

Abstract

The present invention provides a wall climbing identification method, device and electronic device. The method comprises the following steps: identifying and tracking a head detection frame of a target located in a preset wall area; setting a wall warning line; calculating the coordinates of a climbing judgment point; obtaining a first climbing judgment result according to the change in the positional relationship between the coordinates of the center point of the head detection frame and the wall warning line before and after tracking; obtaining a second climbing judgment result according to the positional relationship between the connecting line of the climbing judgment points before and after tracking and the wall warning line; when at least one of the first climbing judgment result and the second climbing judgment result identifies that the target has a climbing behavior, a climbing warning is issued, head detection is used to replace full body detection, and the position between the center point of the head detection frame, the climbing judgment point and the wall warning line is comprehensively judged to determine whether the target has a climbing behavior, which can reduce the false detection and missed detection caused by mutual occlusion of the target and the excessively high position of the head, and improve the accuracy and speed of climbing behavior identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition technology, and in particular to a wall climbing recognition method, device and electronic equipment. Background Art

[0002] With the development of technology and the advancement of science and technology, my country has made qualitative breakthroughs in key monitoring technologies such as artificial intelligence perception, machine learning, 5G communications, the Internet of Things, cloud computing and edge computing, and video optoelectronic technology. The security industry has become the most important application field for the deep integration of artificial intelligence and the real economy. Leading companies have deployed high-end artificial intelligence algorithms, and AI cameras with artificial intelligence algorithm analysis have gradually occupied the market.

[0003] As the first line of defense for security in various places, perimeter walls are widely used in schools, prisons, factory parks, residential areas / villas, cultural relics protection units and scientific research units. They can identify the behavior of people climbing over the walls to enter and exit the area and issue timely warnings, thereby reducing the investment in security human resources. They play an indispensable role in the field of security monitoring. With the development of deep learning, the current climbing recognition methods are mainly divided into recognition methods based on key point detection, target detection and binary classification.

[0004] Among them, the recognition method based on key point detection is currently the most commonly used method for climbing recognition. First, multiple key points of the human skeleton are obtained through the key point detection model, and then the climbing behavior is determined by the position, distance and angle between the key points. This method can define the climbing action in detail, so that the specific climbing behavior can be accurately identified. However, the recognition method based on key point detection has many limitations in the actual application of security: first, this method is only suitable for the deployment of the camera at the left and right angles of the vertical wall, the monitoring range of the wall is short, it is not suitable for long-distance perimeter deployment, and requires the wall to have an installation position in the vertical left and right directions; second, when the camera is deployed parallel to the top of the wall, although the monitoring distance of the wall is long, when a person climbs the wall, only the side of the human body can be photographed, and the detection accuracy of the key points of the human body is low, especially for small targets in the distance. And when more than two people block each other, the method based on key point detection is almost ineffective.

[0005] The recognition method based on target detection currently mainly uses human body interlacing logic to determine climbing behavior. Compared with the recognition method based on key point detection, this method has simple judgment logic and fast algorithm speed. Although it cannot accurately identify specific climbing actions, it does not affect the recognition of people climbing the wall to enter and exit the area. However, the method based on target detection also has limitations when deployed at long distances: first, when more than two people stand in parallel, their bodies seriously block each other's area, which is easy to miss detection and false alarm; second, people climb the wall in various postures, such as squatting, leaping, jumping, etc., and the recognition method based on target detection is prone to miss detection.

[0006] As for the recognition method based on binary classification, it mainly distinguishes between climbing and non-climbing through binary classification. However, due to the diversity of wall scenes and climbing actions, it is difficult to identify all climbing scenes using only a binary classification model. In practical applications, this method will have more false alarms and missed alarms. For example, it is easy to misreport normal pedestrians at both ends of the wall. Summary of the invention

[0007] The object of the present invention is to provide a wall climbing identification method, which is suitable for long-distance wall perimeter climbing identification and can effectively improve the accuracy of identification and reduce false positives and missed positives.

[0008] To achieve the above object, the present invention first provides a wall climbing identification method, comprising the following steps:

[0009] Step S1, obtaining an image to be detected, inputting the image to be detected into a preset head detection model, and identifying a head detection frame of a target located in a preset wall area;

[0010] Step S2: Tracking the head detection frame of the target using a preset head tracking model;

[0011] Step S3, setting a fence warning line, wherein the fence warning line is in contact with the upper edge of the fence and extends along the extension direction of the fence, and the two end points of the fence warning line are a first warning point and a second warning point;

[0012] Step S4, calculating a first angle according to the coordinates of the first warning point and the second warning point, wherein the first angle is a positive angle between the fence warning line and the X-axis;

[0013] Step S5, calculating the coordinates of the waist approximate point according to the center point coordinates of the head detection frame;

[0014] Step S6, calculating the coordinates of the climbing judgment point according to the coordinates of the waist approximate point and the coordinates of the center point of the head detection frame;

[0015] Step S7, obtaining a first climbing judgment result according to the change in the positional relationship between the center point coordinates of the head detection frame before and after tracking and the fence warning line;

[0016] Step S8, obtaining a second climbing judgment result according to the positional relationship between the line connecting the climbing judgment points before and after tracking and the fence warning line;

[0017] Step S9: When at least one of the first climbing judgment result and the second climbing judgment result indicates that the target has climbing behavior, a climbing warning is issued.

[0018] Optionally, the calculation method of the first angle in step S4 is:

[0019] ;

[0020] Wherein (x1, y1) and (x2, y2) are the coordinates of the first warning point and the second warning point respectively, y1≤y2, and when y1=y2, x1<x2, θ is the first angle.

[0021] Optionally, the method for calculating the coordinates of the waist approximate point in step S5 is:

[0022] When the y-axis height of the head detection frame is y h , the center point coordinates are (x c ,y c ), then:

[0023] h=2.5×y h ;

[0024] Where h is the y-axis distance between the center point of the head detection frame and the waist approximation point;

[0025] The coordinates of the waist approximate point are (x c ,y c + h).

[0026] Optionally, the method for calculating the coordinates of the climbing judgment point in step S6 is:

[0027] ;

[0028] Among them, (x j ,y j ) are the coordinates of the climbing judgment point.

[0029] Optionally, the step S7 specifically includes:

[0030] Determine which side of the fence warning line the center point of the head detection frame before and after tracking is on. The determination method is: when the When the center point of the head detection frame is determined to be on one side of the fence cordon, When , the center point of the head detection frame is determined to be on the other side of the fence cordon, where (x1, y1) and (x2, y2) are the coordinates of the first and second warning points, respectively, y1≤y2, and when y1=y2, x1<x2, θ is the first angle, (x c ,y c ) is the center point coordinate of the head detection frame;

[0031] When the center point of the human head detection frame before and after tracking changes from one side of the fence warning line to the other side, the first climbing judgment result is determined to be that the target has a climbing behavior, otherwise the first climbing judgment result is determined to be that the target has no climbing behavior.

[0032] Optionally, the step S8 specifically includes:

[0033] Determine the climbing judgment points before and after tracking as the first climbing judgment point and the second climbing judgment point respectively;

[0034] connecting the first climbing judgment point and the second climbing judgment point to obtain a connecting line of the climbing judgment points;

[0035] When the line connecting the climbing judgment points intersects with the fence warning line, the second climbing judgment result is determined to be that the target has a climbing behavior; otherwise, the second climbing judgment result is determined to be that the target has no climbing behavior.

[0036] Optionally, in step S9, a climbing warning is issued only when both the first climbing judgment result and the second climbing judgment result determine that the target has a climbing behavior.

[0037] Optionally, step S2 further includes a step of filtering the target head detection frame before tracking the target head detection frame through a preset head tracking model, and the step of filtering the target head detection frame includes eliminating targets whose any corner points in the target head detection frame exceed the wall area.

[0038] The present invention also provides a wall climbing identification device, comprising the following steps:

[0039] The recognition unit is used to obtain the image to be detected, input the image to be detected into a preset head detection model, and identify the head detection frame of the target located in the preset wall area;

[0040] A tracking unit, used to track the head detection frame of the target through a preset head tracking model;

[0041] A setting unit, used for setting a fence warning line, wherein the fence warning line is attached to the upper edge of the fence and extends along the extension direction of the fence, and the two end points of the fence warning line are a first warning point and a second warning point;

[0042] A first calculation unit, configured to calculate a first angle according to the coordinates of the first warning point and the second warning point, wherein the first angle is a positive angle between the fence warning line and the X-axis;

[0043] A second calculation unit is used to calculate the coordinates of the waist approximate point according to the coordinates of the center point of the head detection frame;

[0044] A third calculation unit is used to calculate the coordinates of the climbing judgment point according to the coordinates of the waist approximate point and the coordinates of the center point of the head detection frame;

[0045] A first judgment unit, used to obtain a first climbing judgment result according to a change in the positional relationship between the center point coordinates of the head detection frame before and after tracking and the fence warning line;

[0046] A second judgment unit, used to obtain a second climbing judgment result according to the positional relationship between the connecting line of the climbing judgment points before and after tracking and the fence warning line;

[0047] The alarm unit is used to issue a climbing warning when at least one of the identified targets in the first climbing judgment result and the second climbing judgment result has a climbing behavior.

[0048] The present invention also provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0049] Beneficial effects of the present invention: The present invention provides a wall climbing identification method, device and electronic device, the method comprising the following steps: step S1, obtaining an image to be detected, inputting the image to be detected into a preset head detection model, and identifying a head detection frame of a target located in a preset wall area; step S2, tracking the head detection frame of the target through a preset head tracking model; step S3, setting a wall warning line, the wall warning line fits the upper edge of the wall and extends along the extension direction of the wall, and the two end points of the wall warning line are the first warning point and the second warning point; step S4, calculating a first angle according to the coordinates of the first warning point and the second warning point, the first angle being the positive angle between the wall warning line and the X-axis; step S5, calculating the waist approximate point according to the coordinates of the center point of the head detection frame Step S6: calculate the coordinates of the climbing judgment point according to the coordinates of the waist approximate point and the coordinates of the center point of the head detection frame; Step S7: obtain the first climbing judgment result according to the change in the positional relationship between the coordinates of the center point of the head detection frame and the wall warning line before and after tracking; Step S8: obtain the second climbing judgment result according to the positional relationship between the line connecting the climbing judgment points before and after tracking and the wall warning line; Step S9: when at least one of the first climbing judgment result and the second climbing judgment result determines that the target has climbing behavior, a climbing warning is issued, and head detection is used to replace full body detection. The position between the center point of the head detection frame, the climbing judgment point and the wall warning line is used to comprehensively judge whether the target has climbing behavior, which can reduce false detection and missed detection caused by mutual occlusion of targets and excessive head position, and improve the accuracy and speed of climbing behavior recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to further understand the features and technical contents of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings are only provided for reference and illustration and are not intended to limit the present invention.

[0051] Figure 1 is a flow chart of the wall climbing identification method of the present invention;

[0052] Figure 2 Schematic diagram of step S7 of the wall climbing identification method of the present invention;

[0053] Figure 3 Schematic diagram of step S8 of the wall climbing identification method of the present invention;

[0054] Figure 4 Schematic diagram of steps S3 to S6 of the wall climbing identification method of the present invention;

[0055] Figure 5 and Figure 6 It is a schematic diagram of the recognition effect of the wall climbing recognition method of the present invention;

[0056] Figure 7 Schematic diagram of positional relationship in step S7 of the wall climbing identification method of the present invention;

[0057] Figure 8 Schematic diagram of the judgment process of step S8 of an embodiment of the wall climbing identification method of the present invention;

[0058] Fig. 9 is a schematic diagram of a wall climbing identification device of the present invention;

[0059] Fig.10 Schematic diagram of an electronic device of the present invention. DETAILED DESCRIPTION

[0060] To further illustrate the technical means and effects of the present invention, the following is a detailed description in conjunction with the preferred embodiments of the present invention and the accompanying drawings.

[0061] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0062] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0063] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0064] See also Figure 1 , Figure 5 and Figure 6 The present invention first provides a wall climbing identification method, comprising the following steps:

[0065] Step S1, as shown in the figure, obtain an image to be detected, input the image to be detected into a preset head detection model, and identify a head detection frame of a target located in a preset wall area.

[0066] Specifically, obtaining the image to be detected in step S1 specifically includes taking frames of the video stream at a fixed frame rate, and the obtained picture frame is the image to be detected;

[0067] The image to be detected is input into a trained head detection model to obtain a head detection frame of a target located in a preset wall area, and targets whose corner points in the head detection frame of the target are beyond the wall area are eliminated.

[0068] Furthermore, the user may configure the wall area as required. Generally speaking, the wall area is a closed polygonal area including the wall. Of course, the user may also configure the wall area for global detection.

[0069] Optionally, the head detection model is a target detection model based on yolov5.

[0070] Step S2: Tracking the head detection frame of the target using a preset head tracking model.

[0071] Specifically, the tracking method sampled by the head tracking model can be selected according to needs. Preferably, the head tracking model is a target tracker ByteTrack.

[0072] Furthermore, the step S2 also includes a step of filtering the target head detection frame before tracking the target head detection frame through a preset head tracking model, and the step of filtering the target head detection frame includes eliminating targets whose any corner points in the target head detection frame exceed the wall area.

[0073] Specifically, the head tracking model outputs the trajectory of the current frame and the lost trajectory retained by the tracker, and continuously updates the head trajectory.

[0074] Step S3: setting a fence warning line, wherein the fence warning line fits the upper edge of the fence and extends along the extension direction of the fence, and the two end points of the fence warning line are a first warning point and a second warning point.

[0075] Specifically, combined Figure 4 As shown, the two end points of the fence warning line P1P2 are the first warning point P1 (x1, y1) and the second warning point P2 (x2, y2).

[0076] Step S4, calculating a first angle according to the coordinates of the first warning point and the second warning point, wherein the first angle is a positive angle between the fence warning line and the X-axis;

[0077] like Figure 4 As shown, the calculation method of the first angle in step S4 is:

[0078] ;

[0079] Wherein (x1, y1) and (x2, y2) are the coordinates of the first warning point and the second warning point respectively, y1≤y2, and when y1=y2, x1<x2, θ is the first angle.

[0080] Step S5: Calculate the coordinates of the waist approximate point according to the center point coordinates of the head detection frame.

[0081] Step S6, calculating the coordinates of the climbing judgment point according to the coordinates of the waist approximate point and the coordinates of the center point of the head detection frame;

[0082] It should be noted that due to the poor field of view of the camera's two-dimensional image, at the far end of the fence cordon, although a person stands within the fence cordon, the target head detection frame may have exceeded the upper end of the fence cordon.

[0083] Therefore, when the coordinate information of the human head is used to determine whether a person climbs over the wall to enter the area, it is easy to miss the detection. In view of this situation, the present invention performs a special offset processing on the coordinates of the center point of the human head according to the action of climbing over the wall and the characteristics of the human body structure, obtains a reasonable climbing judgment point, and then combines the climbing judgment point and the human head detection frame to perform climbing identification to reduce missed detection.

[0084] Specifically, if Figure 4 As shown in the figure, first determine the approximate distance from the center point of the head detection frame to the person's hips. The reason for choosing this is that the center of gravity of a person is generally at the hips before and after climbing over the wall. In the picture frames before and after climbing over the wall, the difference in the two-dimensional image field of view between the hips and the wall warning line is small, so the climbing judgment point can be determined by calculating the human hip position. Assume that the y-axis height of the head detection frame is y h , the center point coordinates are (x c ,y c ), according to the average head-to-body ratio of the human body, the human hip position is generally about 3 heads high, so:

[0085] h=2.5×y h ;

[0086] Where h is the y-axis distance between the center point of the head detection frame and the waist approximation point;

[0087] The coordinates of the waist approximate point are (x c ,y c + h).

[0088] Then, if Figure 4 As shown, the coordinates of the climbing judgment point are estimated. Since the direction of the person approaching the wall is perpendicular to the wall when climbing the wall, first draw a vertical auxiliary line CD from the waist approximate point C to the wall warning line P1P2, and then draw a vertical auxiliary line AB from the center point A of the head detection frame to the extension line of CD, where AB is parallel to P1P2. Based on this, the calculation method of the climbing judgment point coordinates can be obtained as follows:

[0089] ;

[0090] Among them, (x j ,y j ) are the coordinates of the climbing judgment point.

[0091] Step S7: Refer to Figure 2 ,According to the change in the positional relationship between the center point coordinates of the head detection frame before and after tracking and the fence warning line, the first climbing judgment result is obtained.

[0092] Specifically, the step S7 specifically includes:

[0093] Step S71: Determine which side of the fence warning line the center point of the head detection frame before and after tracking is located. The determination method is: When the center point of the head detection frame is determined to be on one side of the fence cordon, When , the center point of the head detection frame is determined to be on the other side of the fence cordon, where (x1, y1) and (x2, y2) are the coordinates of the first and second warning points, respectively, y1≤y2, and when y1=y2, x1<x2, θ is the first angle, (x c ,y c ) is the center point coordinate of the head detection frame;

[0094] Step S72: when the center point of the human head detection frame before and after tracking changes from one side of the fence warning line to the other side, the first climbing judgment result is determined to be that the target has climbing behavior; otherwise, the first climbing judgment result is determined to be that the target has no climbing behavior.

[0095] like Figure 7 As shown, one side and the other side of the fence cordon are the left side and the right side respectively, and the climbing behavior judgment logic in step S7 is: when a person moves from one side of the fence cordon P1P2 to the other side, it is judged as a climbing behavior. Figure 7 For example, the specific steps of judging the climbing behavior in step S7 are as follows: tracking the target, when the center point coordinate is A (x c ,y c ) first appears within the fence warning line segment, judge A (x c ,y c ) is located on the left or right side of the fence cordon P1P2, and record the value. Establish two vectors with point P1 as the starting point , , then according to The sign of the two vectors determines the clockwise and counterclockwise relationship between them, thus determining A(x c ,y c ) is on the left or right side of the fence cordon P1P2. The final specific calculation is as follows:

[0096] .

[0097] Step S8: Refer to Figure 3 , according to the positional relationship between the connecting line of the climbing judgment points before and after tracking and the fence warning line, a second climbing judgment result is obtained;

[0098] Specifically, the step S8 specifically includes:

[0099] Step S81, determining that the climbing judgment points before and after tracking are the first climbing judgment point and the second climbing judgment point respectively;

[0100] Step S82, connecting the first climbing judgment point and the second climbing judgment point to obtain a connecting line of the climbing judgment points;

[0101] Step S83: when the line connecting the climbing judgment points intersects with the fence warning line, the second climbing judgment result is determined as the target has climbing behavior; otherwise, the second climbing judgment result is determined as the target has no climbing behavior.

[0102] Specifically, see Figure 8 The specific implementation logic of the climbing behavior judgment in step S8 is: when the climbing judgment point of a person's head ID moves from one side of the fence warning line P1P2 to the other side, it is judged as a climbing behavior. Taking a person with a current frame ID of id1 as an example, the specific steps of climbing behavior judgment are as follows:

[0103] Step S100, determine whether the current frame id1 exists in the previous frame trajectory, if yes, directly execute step S300, if not, execute step S200;

[0104] Step S200, determine whether the current frame id1 exists in the lost track retained by the tracker, if yes, execute step S300, if not, there is no climbing behavior, and end the logical judgment of this frame;

[0105] Step S300, assuming that the climbing judgment point of the current frame id1 is the first climbing point B1, and the previous frame or lost trajectory id1 is the second climbing point B2, then determine whether the line segment B1B2 and the fence warning line P1P2 have an intersection, if so, it is determined that the id1 has a climbing behavior.

[0106] Step S9: When at least one of the first climbing judgment result and the second climbing judgment result indicates that the target has climbing behavior, a climbing warning is issued.

[0107] Optionally, in some embodiments of the present invention, in order to avoid misjudgment, in step S9, a climbing warning is issued only when both the first climbing judgment result and the second climbing judgment result determine that the target has climbing behavior.

[0108] Optionally, in other embodiments of the present invention, to avoid missed judgment, in step S9, when any one of the first climbing judgment result and the second climbing judgment result determines that the target has climbing behavior, a climbing warning is issued.

[0109] See also Fig. 9 The present invention also provides a wall climbing identification device, comprising the following steps:

[0110] The recognition unit 10 is used to obtain an image to be detected, input the image to be detected into a preset head detection model, and identify a head detection frame of a target located in a preset wall area;

[0111] A tracking unit 20, configured to track a head detection frame of the target using a preset head tracking model;

[0112] A setting unit 30 is used to set a fence warning line, wherein the fence warning line is attached to the upper edge of the fence and extends along the extension direction of the fence, and the two end points of the fence warning line are a first warning point and a second warning point;

[0113] A first calculation unit 40 is used to calculate a first angle according to the coordinates of the first warning point and the second warning point, wherein the first angle is a positive angle between the fence warning line and the X-axis;

[0114] A second calculation unit 50 is used to calculate the coordinates of the waist approximate point according to the coordinates of the center point of the head detection frame;

[0115] A third calculation unit 60 is used to calculate the coordinates of the climbing judgment point according to the coordinates of the waist approximate point and the coordinates of the center point of the head detection frame;

[0116] A first judgment unit 70, configured to obtain a first climbing judgment result according to a change in the positional relationship between the center point coordinates of the head detection frame before and after tracking and the fence warning line;

[0117] A second judgment unit 80, configured to obtain a second climbing judgment result according to a positional relationship between a line connecting climbing judgment points before and after tracking and a fence warning line;

[0118] The alarm unit 90 is used to issue a climbing warning when at least one of the first climbing judgment result and the second climbing judgment result determines that the target has climbing behavior.

[0119] See also Fig.10 The present invention provides an electronic device, comprising: a memory 200 and a processor 100, wherein the memory 200 stores a computer program, and when the computer program is executed by the processor 100, the processor 100 executes the steps of the above method.

[0120] In summary, the present invention provides a wall climbing identification method, device and electronic device, the method comprising the following steps: step S1, obtaining an image to be detected, inputting the image to be detected into a preset head detection model, and identifying a head detection frame of a target located in a preset wall area; step S2, tracking the head detection frame of the target by a preset head tracking model; step S3, setting a wall warning line, the wall warning line fits the upper edge of the wall and extends along the extension direction of the wall, and the two end points of the wall warning line are a first warning point and a second warning point; step S4, calculating a first angle according to the coordinates of the first warning point and the second warning point, the first angle being the positive angle between the wall warning line and the X-axis; step S5, calculating the coordinates of the waist approximate point according to the coordinates of the center point of the head detection frame ; Step S6, calculate the coordinates of the climbing judgment point according to the coordinates of the waist approximate point and the coordinates of the center point of the head detection frame; Step S7, obtain the first climbing judgment result according to the change in the positional relationship between the coordinates of the center point of the head detection frame and the wall warning line before and after tracking; Step S8, obtain the second climbing judgment result according to the positional relationship between the connecting line of the climbing judgment points before and after tracking and the wall warning line; Step S9, when at least one of the first climbing judgment result and the second climbing judgment result determines that the target has climbing behavior, a climbing warning is issued, and head detection is used to replace full body detection. The position between the center point of the head detection frame, the climbing judgment point and the wall warning line is used to comprehensively judge whether the target has climbing behavior, which can reduce false detection and missed detection caused by mutual occlusion of targets and excessive head position, and improve the accuracy and speed of climbing behavior recognition.

[0121] As described above, for ordinary technicians in this field, various other corresponding changes and modifications can be made based on the technical solutions and technical concepts of the present invention, and all these changes and modifications should fall within the protection scope of the claims of the present invention.

Claims

1. A wall climbing identification method, characterized in that: The steps include: Step S1, obtaining an image to be detected, inputting the image to be detected into a preset head detection model, and identifying a head detection frame of a target located in a preset wall area; Step S2: Tracking the head detection frame of the target using a preset head tracking model; Step S3, setting a fence warning line, wherein the fence warning line is in contact with the upper edge of the fence and extends along the extension direction of the fence, and the two end points of the fence warning line are a first warning point and a second warning point; Step S4, calculating a first angle according to the coordinates of the first warning point and the second warning point, wherein the first angle is a positive angle between the fence warning line and the X-axis; Step S5, calculating the coordinates of the waist approximate point according to the center point coordinates of the head detection frame; Step S6, calculating the coordinates of the climbing judgment point according to the coordinates of the waist approximate point and the coordinates of the center point of the head detection frame; Step S7, obtaining a first climbing judgment result according to the change in the positional relationship between the center point coordinates of the head detection frame before and after tracking and the fence warning line; Step S8, obtaining a second climbing judgment result according to the positional relationship between the line connecting the climbing judgment points before and after tracking and the fence warning line; Step S9: When at least one of the first climbing judgment result and the second climbing judgment result indicates that the target has climbing behavior, a climbing warning is issued.

2. The wall climbing identification method according to claim 1, characterized in that: The calculation method of the first angle in step S4 is: ; Wherein (x1, y1) and (x2, y2) are the coordinates of the first warning point and the second warning point respectively, y1≤y2, and when y1=y2, x1<x2, θ is the first angle.

3. The wall climbing identification method according to claim 2, characterized in that: The calculation method of the waist approximate point coordinates in step S5 is: When the y-axis height of the head detection frame is y h , the center point coordinates are (x c ,y c ), then: h=2.5×y h ; Where h is the y-axis distance between the center point of the head detection frame and the waist approximation point; The coordinates of the waist approximate point are (x c ,y c + h).

4. The wall climbing identification method according to claim 3, characterized in that: The calculation method of the climbing judgment point coordinates in step S6 is: ; Among them, (x j ,y j ) are the coordinates of the climbing judgment point.

5. The wall climbing identification method according to claim 1, characterized in that: The step S7 specifically includes: Determine which side of the fence warning line the center point of the head detection frame before and after tracking is on. The determination method is: when the When the center point of the head detection frame is determined to be on one side of the fence cordon, When , the center point of the head detection frame is determined to be on the other side of the fence cordon, where (x1, y1) and (x2, y2) are the coordinates of the first and second warning points, respectively, y1≤y2, and when y1=y2, x1<x2, θ is the first angle, (x c ,y c ) is the center point coordinate of the head detection frame; When the center point of the human head detection frame before and after tracking changes from one side of the fence warning line to the other side, the first climbing judgment result is determined to be that the target has a climbing behavior, otherwise the first climbing judgment result is determined to be that the target has no climbing behavior.

6. The wall climbing identification method according to claim 1, characterized in that: The step S8 specifically includes: Determine the climbing judgment points before and after tracking as the first climbing judgment point and the second climbing judgment point respectively; connecting the first climbing judgment point and the second climbing judgment point to obtain a connecting line of the climbing judgment points; When the line connecting the climbing judgment points intersects with the fence warning line, the second climbing judgment result is determined to be that the target has a climbing behavior; otherwise, the second climbing judgment result is determined to be that the target has no climbing behavior.

7. The wall climbing identification method according to claim 1, characterized in that: In step S9, a climbing warning is issued only when both the first climbing judgment result and the second climbing judgment result determine that the target has a climbing behavior.

8. The wall climbing identification method according to claim 1, characterized in that: The step S2 also includes a step of filtering the target head detection frame before tracking the target head detection frame through a preset head tracking model, wherein the step of filtering the target head detection frame includes removing targets whose corner points in the target head detection frame exceed the wall area.

9. A wall climbing identification device, characterized in that: The steps include: The recognition unit is used to obtain the image to be detected, input the image to be detected into a preset head detection model, and identify the head detection frame of the target located in the preset wall area; A tracking unit, used to track the head detection frame of the target through a preset head tracking model; A setting unit, used for setting a fence warning line, wherein the fence warning line is attached to the upper edge of the fence and extends along the extension direction of the fence, and the two end points of the fence warning line are a first warning point and a second warning point; A first calculation unit, configured to calculate a first angle according to the coordinates of the first warning point and the second warning point, wherein the first angle is a positive angle between the fence warning line and the X-axis; A second calculation unit is used to calculate the coordinates of the waist approximate point according to the coordinates of the center point of the head detection frame; A third calculation unit is used to calculate the coordinates of the climbing judgment point according to the coordinates of the waist approximate point and the coordinates of the center point of the head detection frame; A first judgment unit, used to obtain a first climbing judgment result according to a change in the positional relationship between the center point coordinates of the head detection frame before and after tracking and the fence warning line; A second judgment unit, used to obtain a second climbing judgment result according to the positional relationship between the connecting line of the climbing judgment points before and after tracking and the fence warning line; The alarm unit is used to issue a climbing warning when at least one of the identified targets in the first climbing judgment result and the second climbing judgment result has a climbing behavior.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Community enclosing wall crossing early warning method and system, server and computer storage medium

    CN110766894A

  • Transformer substation electronic fence monitoring method based on intelligent video monitoring, storage medium and equipment

    CN111144232A

  • Target event detection method and device, computer equipment and storage medium

    CN111860140A