Table-lying behavior identification method, apparatus and device, and storage medium

By obtaining and examining the key points of the human body, combining the relative angles and height position relationships of the head and shoulders, we can determine whether the table lying on the table has occurred, and solve the problems of low accuracy and high computing power requirements in the existing technology, achieving higher recognition accuracy and wider applicable scenarios.

CN119600690AActive Publication Date: 2025-03-11GUANGZHOU AVA ELECTRONICS TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411710106.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-11
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

The existing table-side behavior detection methods have low accuracy, especially on edge devices with insufficient computing power, which is difficult to achieve efficient identification.

Method used

By obtaining the key points of the head, neck, elbow and wrist, checking the correctness of the key points, calculating the relative angle and height position relationship of the head and shoulders, and using the preset threshold range to determine whether the table lying on the table occurs.

Benefits of technology

It improves the accuracy of table-side behavior recognition, reduces the demand for computing power, and is suitable for more scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600690A_ABST
    Figure CN119600690A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device and equipment for identifying a desk-lying behavior, and a storage medium. Wherein. The method comprises the following steps: acquiring head and neck key points of a detection target and elbow and wrist key points on the same side; checking the detected key points of the human body by using a method for checking the detected key points of the human body, and if a correct conclusion of the detected key points of the human body cannot be obtained, stopping using the key points to carry out table-lying behavior identification; acquiring shoulder key points of double shoulders of the detection target; calculating a head-shoulder relative angle between the head and the shoulder; according to the position information of the head key point and the shoulder key point, obtaining a height position relationship between the head key point and the shoulder key point; and when the height position relationship is within a preset height position relationship threshold range, if the head-shoulder relative angle is within a preset angle threshold range, judging that the detection target makes a behavior of lying on the desk. The method has the advantages of low requirement on computing power, higher accuracy and wider applicable scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video image processing, and more specifically, to a method, device, equipment and storage medium for identifying table lying behavior. Background Art

[0002] With the development of information technology in the field of education, it is becoming more and more common to observe and count the interactive behaviors of teachers and students in classrooms through automated and intelligent means, supervise and objectively evaluate the learning status of each student, and improve teaching management and teachers' teaching quality in a targeted manner. Raising hands is the most typical behavior of students in the classroom, the most intuitive form of students' active participation in classroom content, and the most direct way for teachers to interact with students. It can be used as an effective way to evaluate students' learning status and teachers' teaching quality.

[0003] At present, the application logic of posture recognition methods based on human key point detection in common teaching and research recording and broadcasting scenarios is generally as follows: ① Use the human key point detection algorithm to detect the skeletal key points of all candidate targets. For example, in the detection of table lying behavior, it is necessary to first detect the key points such as the head, shoulder joints, elbow joints and wrist joints; ② Use the detected key points to set different posture judgment methods according to different geometric arrangements; ③ Or use the posture classification model to directly classify the posture of the detected human targets. There is an important premise in the above scheme, that is, the detection result of the human key point detection algorithm in step ① has a high accuracy rate. To meet this condition, common methods are: ① In the single-stage method, an algorithm model with a large number of parameters and computational complexity is used. Generally, the accuracy of such models is high; ② In the two-stage method, the human body detection algorithm is first used to obtain the human body bounding box in the image, and then the target in the bounding box is passed to the high-precision single-target human key point detector; The above two methods can suppress the false detection rate to a certain extent. But obviously, these schemes have high requirements for computing power, which is not friendly to edge devices with insufficient computing power. Summary of the invention

[0004] In order to overcome the defect of low accuracy of current methods for detecting lying on the table, the present invention provides a method, device, equipment and storage medium for identifying lying on the table behavior. The technical solution adopted by the present invention is as follows.

[0005] In a first aspect, the present invention provides a method for identifying table lying behavior, comprising:

[0006] Obtain the key points of the head and neck of the detected target, as well as the key points of the elbow and wrist on the same side;

[0007] The detected key points of the human body are checked by using a method for checking the detected key points of the human body. If a correct conclusion cannot be drawn about the detected key points of the human body, the use of the key points for the table lying behavior recognition is terminated;

[0008] Obtain the shoulder key points of both shoulders of the detection target;

[0009] Calculate the relative angle between the head and the shoulders, wherein the relative angle is the angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extensions, and the line connecting the shoulders and their extensions;

[0010] According to the position information of the head key point and the shoulder key point, the height position relationship between the head key point and the shoulder key point is obtained, wherein the height position relationship is used to describe the height position relationship between the head key point and the line connecting the shoulder key points of both shoulders;

[0011] When the height position relationship is within a preset height position relationship threshold range, and if the head-shoulder relative angle is within a preset angle threshold range, it is determined that the detection target is lying on the table;

[0012] Wherein, the method for checking the detected key points of the human body includes:

[0013] Obtain the key points of the head and neck of the detection target;

[0014] Calculate the distance from the key point of the head to the key point of the neck, and record it as the head length;

[0015] Obtain the elbow key points and wrist key points on the same side of the detection target;

[0016] Calculate the distance from the elbow key point to the wrist key point, and record it as the length of one side of the arm;

[0017] Based on a preset comparison model, the head length is compared with the arm length on one side to obtain a relative scale estimation value;

[0018] When the relative scale estimation value is within a preset scale threshold range, it is determined that the detected human body key points are correct.

[0019] In one embodiment, the preset comparison model in the method for checking the detected key points of the human body is:

[0020] Among them, β is the relative scale estimate, D H is the head length, D A is the arm length, W and b are preset parameters.

[0021] In one embodiment, the method for checking the detected key points of the human body further includes:

[0022] If the head length is not within the preset head length range, it is determined that the human body key points of the current detection target are unavailable;

[0023] If the arm length on one side is not within the preset arm length range, it is determined that the human body key point of the current detection target is unavailable;

[0024] When it is determined that the human body key points of the current detection target are unavailable, it is determined that the detected human body key points are incorrect.

[0025] In one embodiment, the preset height position relationship threshold range is that the head key point is not higher than the line connecting the shoulder key points of both shoulders.

[0026] In one embodiment, the head-shoulder relative angle is the acute angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extensions, and the line connecting the shoulders and their extensions;

[0027] The preset angle threshold ranges from n degrees to 90 degrees, wherein 50≤n≤70.

[0028] In a second aspect, the present invention provides a device for identifying table lying behavior, comprising:

[0029] The first acquisition module is used to acquire the key points of the head and neck of the detection target, as well as the key points of the elbow and wrist on the same side;

[0030] The first judgment module is used to use the device for checking the detected key points of the human body to check the detected key points of the human body, and if a correct conclusion cannot be drawn that the detected key points of the human body are correct, the key points are stopped from being used to identify the behavior of lying on the table;

[0031] The second acquisition module is used to acquire the shoulder key points of both shoulders of the detection target;

[0032] An angle calculation module, used to calculate the head-shoulder relative angle between the head and the shoulders, wherein the head-shoulder relative angle is the angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extension lines, and the line connecting the shoulders and their extension lines;

[0033] The second judgment module is used to obtain the height position relationship between the head key point and the shoulder key point according to the position information of the head key point and the shoulder key point, wherein the height position relationship is used to describe the height position relationship between the head key point and the connecting line of the shoulder key points of both shoulders; when the height position relationship is within a preset height position relationship threshold range, if the head-shoulder relative angle is within a preset angle threshold range, it is judged that the detection target performs the behavior of lying on the table;

[0034] Wherein, the device for checking the detected key points of the human body includes:

[0035] An acquisition module is used to acquire the key points of the head and neck of the detection target; and acquire the key points of the elbow and wrist on the same side of the detection target;

[0036] A calculation module is used to calculate the distance from the key point of the head to the key point of the neck, which is recorded as the head length; and calculate the distance from the key point of the elbow to the key point of the wrist, which is recorded as the length of one side of the arm;

[0037] A comparison module, used for comparing the head length with the arm length on one side based on a preset comparison model to obtain a relative scale estimation value;

[0038] The judgment module is used to judge whether the detected human body key points are correct when the relative scale estimation value is within a preset scale threshold range.

[0039] In one embodiment, the preset comparison model in the device for checking the detected key points of the human body is:

[0040] Among them, β is the relative scale estimate, D H is the head length, D A is the arm length, W and b are preset parameters.

[0041] In one embodiment, the judgment module of the device for checking and detecting the key points of the human body is also used to judge that the key points of the human body of the current detection target are unavailable if the head length is not within the preset head length range; if the length of the arm on one side is not within the preset arm length range, judge that the key points of the human body of the current detection target are unavailable; when it is judged that the key points of the human body of the current detection target are unavailable, judge that the detected key points of the human body are incorrect.

[0042] In a third aspect, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned methods when executing the program.

[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method of any of the above-mentioned embodiments.

[0044] In the present invention, for the classroom teaching scenario, the relationship between the head length and the arm length is used to check whether the detected key points of the human body are correct in a relatively simple way; then, if the key points are correct, the relative height position and angle relative position of the head and shoulders are combined and compared with the preset threshold range respectively, and according to the comparison results, it is judged whether the behavior of lying on the table occurs. Compared with the judgment method in the prior art, the present invention has lower computing power requirements, higher accuracy, and wider applicable scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a schematic diagram of the overall flow of an implementation method of Example 1 of the present invention.

[0046] Figure 2 It is a flow chart of the detection method according to the embodiment of the present invention.

[0047] Figure 3 It is a schematic diagram of the overall structure of an implementation method of Example 21 of the present invention. DETAILED DESCRIPTION

[0048] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0049] It should be noted that the terms "first\second\..." involved in the embodiments of the present invention are only used to distinguish similar objects, and do not represent a specific order for the objects. It is understandable that the specific order or sequence of "first\second\..." can be interchanged where permitted. It should be understood that the objects distinguished by "first\second\..." can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.

[0050] Embodiment 1

[0051] See also Figure 1 , Figure 11 is a flow chart of a method for identifying table lying behavior provided in Embodiment 1 of the present invention, the method comprising step S110, step S120, step S130, step S140, step S150 and step S160. It should be noted that step S110, step S120, step S130, step S140, step S150 and step S160 are only reference numerals for the purpose of clearly explaining the embodiment and the appendix. Figure 1 The corresponding relationship does not limit the order of the steps in this embodiment.

[0052] Step S110, obtaining the key points of the head and neck of the detection target, as well as the key points of the elbow and wrist on the same side;

[0053] Step S120, using a method for checking detected key points of the human body to check the detected key points of the human body, if a conclusion that the detected key points of the human body are correct cannot be drawn, the use of this key point for the table lying behavior recognition is terminated;

[0054] Step S130, obtaining shoulder key points of both shoulders of the detection target;

[0055] Step S140, calculating the head-shoulder relative angle between the head and the shoulders, wherein the head-shoulder relative angle is the angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and the extension line thereof, and the line connecting the shoulders and the extension line thereof;

[0056] Step S150, obtaining a height position relationship between the head key point and the shoulder key point according to the position information of the head key point and the shoulder key point, wherein the height position relationship is used to describe the height position relationship between the head key point and the line connecting the shoulder key points of both shoulders;

[0057] Step S160: When the height position relationship is within a preset height position relationship threshold range, and if the head-shoulder relative angle is within a preset angle threshold range, it is determined that the detection target is lying on the table.

[0058] like Figure 2 As shown, Figure 2 It is a flow chart of the method for checking and detecting key points of a human body, and the method comprises: step S210, step S220, step S230, step S240, step S250 and step S260.

[0059] Step S210, obtaining key points of the head and neck of the detection target;

[0060] Step S220, calculating the distance from the key point of the head to the key point of the neck, and recording it as the head length;

[0061] Step S230, acquiring the elbow key points and wrist key points on the same side of the detection target;

[0062] Step S240, calculating the distance from the elbow key point to the wrist key point, and recording it as the length of one side of the arm;

[0063] Step S250, based on a preset comparison model, the head length is compared with the arm length on one side to obtain a relative scale estimation value;

[0064] Step S260: When the relative scale estimation value is within a preset scale threshold range, it is determined that the detected human body key points are correct.

[0065] This method is applicable to devices that can analyze human body movements, such as recording and broadcasting hosts. For the sake of convenience, this method will be described below using the recording and broadcasting host as an example. The recording and broadcasting host obtains the captured video stream from the recording and broadcasting terminal, uses the human key point detection algorithm to perform full-image detection on the video frames in the video stream, and obtains all the human skeleton key points in the video frame and the human body information corresponding to the key points. The details are as follows:

[0066] (1) The human body key points include: head, neck, shoulders, elbows, and wrists, a total of 8 key points;

[0067] (2) In classroom scenes, only the upper body of a human target can be seen. Therefore, the six key points of the lower body, namely the hips, knees, and ankles, are not considered. Only the key points of the upper body are calculated and decoded, which can reduce computational overhead.

[0068] Common methods for posture recognition based on skeleton key points often ignore an important judgment premise, which is the accuracy of the key points detected by the human key point detection algorithm. Since the human key point detection algorithm cannot guarantee that every key point detected is correct, it is necessary to add a judgment criterion for preliminary screening. Steps S110 and S120 are to first judge the correctness of the key points of the detection target. If they are incorrect, these key points will not be used to detect the behavior of lying on the table.

[0069] Specifically, when determining the correctness of the key points of the detected target, a method for checking the detected key points of the human body is used.

[0070] In this inspection method, in the recorded broadcast scene of classroom teaching and research analysis, the head is a relatively less obscured human body part. In the human key point detection algorithm, the probability of error is lower than that of other key points because of the relatively less occlusion. Therefore, in step S210 and step S220, it is appropriate to use the length of the head of the detected target as the scale standard for the target, calculate the distance between the head key point and the neck key point, and obtain D HThe head length of the detected target at the current scale (panoramic or close-up).

[0071] Compared to the head, the arm is often mis-estimated or estimated with low precision by the human key point detection algorithm because of its smaller area in the picture or easy to be blocked, which will seriously affect the accuracy of the subsequent posture recognition based on the skeleton key points. In step S230 and step S240, it is first assumed that all human key points are accurately detected. If the elbow and wrist key points on the same side can be detected by the human key point detection algorithm, the distance between the elbow key point and the wrist key point is calculated to obtain D A The length of the left / right arm of the detected target at the current scale.

[0072] In step S250, the arm length D A and head length D H The preset comparison model formula is used to calculate and compare, and the relative scale estimation value β between the head and the arm is obtained. In step S260, the relative scale estimation value β is compared with the preset scale threshold range. If it is within the preset scale threshold range, it is determined that the detected human body key point is correct.

[0073] Because there are several situations for targets that do not meet the conditions of step S250 and step S260: the first is that the target does not make detectable behavior gestures under the premise that the human key point detection algorithm correctly detects all key points; the second is that the human key points are misdetected, resulting in unreliable data obtained by length calculation; the third is that when the camera shoots at different angles, the target's arms and other parts have too small or too large imaging scales due to angle differences. These three situations will seriously affect the accuracy of the subsequent key point-based gesture recognition method. Therefore, only when the above conditions are met can the detected human key points be judged to be correct.

[0074] In one embodiment, the preset comparison model is:

[0075] Among them, β is the relative scale estimate, D H is the head length, D A is the arm length, W and b are preset parameters.

[0076] Among them, W and b can be parameters obtained through training. Using an image data set with labeled key points of the human body, using image scale information in the training data, and position information of each labeled key point, W and b are trained.

[0077] In one embodiment, the method for checking the detected key points of the human body further includes: step S270, step S280 and step S290.

[0078] Step S270, if the head length is not within the preset head length range, determining that the human body key points of the current detection target are unavailable;

[0079] Step S280, if the arm length on one side is not within the preset arm length range, determining that the human body key point of the current detection target is unavailable;

[0080] Step S290, when it is determined that the human body key points of the current detection target are not available, it is determined that the detected human body key points are incorrect.

[0081] The head length and arm length are compared with their respective preset length threshold ranges. If any of the head length and arm length is not within the respective preset length threshold ranges, the human key points of the current detection target are considered unavailable. This is because there are two situations where the target does not meet this condition: the first is that the size of the target in the image is very small and does not meet the minimum standard for detection and recognition; the second is that the human key points are misdetected, resulting in unreliable data obtained by length calculation.

[0082] It should be noted here that steps S270 and S280 are used to determine whether the detected human body key points are usable. If they are not usable, it must be that the human body key points are incorrect. Therefore, these two steps are preferably performed before steps S250 and S260. If it is determined that they are not usable, there is no need to execute the subsequent steps.

[0083] In the method of checking the key points of the human body detected in this paper, for the classroom teaching scenario, the relationship between the head length and the arm length is used to check whether the key points of the human body detected are correct in a relatively simple way. Compared with the judgment method in the prior art, the method of checking the key points of the human body detected in this paper has lower computing power requirements and is applicable to a wider range of scenarios.

[0084] After checking the correctness of the key points of the detection target in step S110 and step S120, if they are confirmed to be correct, the subsequent step of actually detecting the behavior of lying on the table will be entered.

[0085] In the recorded scenes of classroom teaching and research analysis, the main reference for detecting whether the target has made similar behaviors such as lying on the table is the head and the relative position of the head and shoulders.

[0086] The relative position of the head and shoulders is divided into two aspects. The first aspect is the relative position relationship of height, and the second aspect is the relative position relationship of angle.

[0087] The first aspect, that is, the process of step S150 and the judgment process before step S160, uses the position information of the head key points to compare with the position information of the shoulders. The position information of the shoulders here is the line connecting the shoulder key points of both shoulders. If the position of the head key points and the position of the shoulder key points are within the preset height position relationship threshold range, the target enters the next step of judgment.

[0088] It should be noted here that the preset height position relationship threshold range here can be a height position relationship threshold value derived by technical personnel in this field based on past experience. For example, the height of the head position is not higher than that of the shoulders by more than a preset threshold, or the head position is lower than that of the shoulders, etc.

[0089] The second aspect, that is, the process of step S140 and the judgment process after step S160, takes the angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extension lines, and the line connecting the shoulders and their extension lines, as the head-shoulder relative angle between the head and the shoulders. On the premise of meeting the first aspect of the condition, the head-shoulder relative angle of the head and the shoulders is compared with the preset angle threshold. If the head-shoulder relative angle meets the preset angle threshold, it is considered that the detection target has the behavior of lying on the table; otherwise, it is considered that there may be other recognizable behaviors, which can be added to the candidate set of other posture judgments.

[0090] It should be noted here that the relative angle of the head and shoulders is the angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extended lines, and the line connecting the shoulders and their extended lines. There are acute angles and obtuse angles. At this time, it does not matter whether you take an acute angle or an obtuse angle, as long as the range of the subsequent preset angle threshold can match. For example, if an acute angle is taken, the range of the subsequent preset angle threshold is 60 to 90 degrees. If an obtuse angle is taken, the range of the subsequent preset angle threshold is 90 to 120 degrees.

[0091] In one embodiment, the preset height position relationship threshold range is that the head key point is not higher than the line connecting the shoulder key points of both shoulders.

[0092] This embodiment is the case where the position of the head is lower than the position of the shoulders as described above.

[0093] In one embodiment, the head-shoulder relative angle is the acute angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extensions, and the line connecting the shoulders and their extensions;

[0094] The preset angle threshold ranges from n degrees to 90 degrees, wherein 50≤n≤70.

[0095] In this implementation, the optimal range of the preset angle threshold is obtained based on actual experience.

[0096] In this method, for classroom teaching scenarios, the relationship between head length and arm length is used to check whether the detected key points of the human body are correct in a relatively simple way; then, if the key points are correct, the relative height and angle positions of the head and shoulders are combined and compared with the preset threshold range respectively, and based on the comparison results, it is determined whether the behavior of lying on the table occurs. Compared with the judgment method in the prior art, this method has lower computing power requirements, higher accuracy, and is applicable to a wider range of scenarios.

[0097] Embodiment 2

[0098] Corresponding to the method of embodiment 1, as Figure 3 As shown, the present invention further provides a device 3 for identifying table lying behavior, comprising: a first acquisition module 310, a first judgment module 320, a second acquisition module 330, an angle calculation module 340 and a second judgment module 350.

[0099] The first acquisition module 310 is used to acquire the key points of the head and neck of the detection target, as well as the key points of the elbow and wrist on the same side;

[0100] The first judgment module 320 is used to check the detected key points of the human body using a device for checking the detected key points of the human body, and if a conclusion that the detected key points of the human body are correct cannot be drawn, the key points are stopped from being used to identify the behavior of lying on the table;

[0101] The second acquisition module 330 is used to acquire the shoulder key points of both shoulders of the detection target;

[0102] Angle calculation module 340, used to calculate the head-shoulder relative angle between the head and the shoulders, wherein the head-shoulder relative angle is the angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and the extension line thereof, and the line connecting the shoulders and the extension line thereof;

[0103] The second judgment module 350 is used to obtain the height position relationship between the head key point and the shoulder key point according to the position information of the head key point and the shoulder key point, wherein the height position relationship is used to describe the height position relationship between the head key point and the line connecting the shoulder key points of both shoulders; when the height position relationship is within a preset height position relationship threshold range, if the relative angle between the head and shoulders is within a preset angle threshold range, it is judged that the detection target is lying on the table.

[0104] Wherein, the device for checking the detected key points of the human body includes:

[0105] An acquisition module is used to acquire the key points of the head and neck of the detection target; and acquire the key points of the elbow and wrist on the same side of the detection target;

[0106] A calculation module is used to calculate the distance from the key point of the head to the key point of the neck, which is recorded as the head length; and calculate the distance from the key point of the elbow to the key point of the wrist, which is recorded as the length of one side of the arm;

[0107] A comparison module, used for comparing the head length with the arm length on one side based on a preset comparison model to obtain a relative scale estimation value;

[0108] The judgment module is used to judge whether the detected human body key points are correct when the relative scale estimation value is within a preset scale threshold range.

[0109] In one embodiment, the preset comparison model in the device for checking the detected key points of the human body is:

[0110] Among them, β is the relative scale estimate, D H is the head length, D A is the arm length, W and b are preset parameters.

[0111] In one embodiment, the judgment module of the device for checking and detecting the key points of the human body is also used to judge that the key points of the human body of the current detection target are unavailable if the head length is not within the preset head length range; if the length of the arm on one side is not within the preset arm length range, judge that the key points of the human body of the current detection target are unavailable; when it is judged that the key points of the human body of the current detection target are unavailable, judge that the detected key points of the human body are incorrect.

[0112] In one embodiment, the preset height position relationship threshold range is that the head key point is not higher than the line connecting the shoulder key points of both shoulders.

[0113] In one embodiment, the head-shoulder relative angle is the acute angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extensions, and the line connecting the shoulders and their extensions;

[0114] The preset angle threshold ranges from n degrees to 90 degrees, wherein 50≤n≤70.

[0115] In this device, for classroom teaching scenarios, the relationship between the length of the head and the length of the arms is used to check whether the key points of the human body detected are correct in a relatively simple way; then, if the key points are correct, the relative height and angle positions of the head and shoulders are combined and compared with the preset threshold range, and based on the comparison results, it is determined whether the behavior of lying on the table occurs. Compared with the judgment method in the prior art, this device has lower computing power requirements, higher accuracy, and wider applicable scenarios.

[0116] Embodiment 3

[0117] An embodiment of the present invention further provides a storage medium on which computer instructions are stored. When the instructions are executed by a processor, the method for identifying table lying behavior according to any of the above embodiments is implemented.

[0118] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, random access memories (RAM), read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0119] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, RAM, ROM, magnetic disks or optical disks.

[0120] Corresponding to the above-mentioned computer storage medium, in one embodiment, a computer device is also provided, which includes a memory, an encoder, and a computer program stored in the memory and executable on the encoder, wherein when the encoder executes the program, a method for identifying table lying behavior as described in any of the above-mentioned embodiments is implemented.

[0121] The above computer device, for classroom teaching scenarios, uses a relatively simple method to check whether the detected key points of the human body are correct through the relationship between the length of the head and the length of the arms; then, if the key points are correct, the relative height and angle of the head and shoulders are combined and compared with the preset threshold range respectively, and based on the comparison results, it is determined whether the behavior of lying on the table occurs. Compared with the judgment method in the prior art, the above computer device has lower computing power requirements, higher accuracy, and wider applicable scenarios.

[0122] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0123] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A method for identifying table lying behavior, characterized in that: include: Obtain the key points of the head and neck of the detected target, as well as the key points of the elbow and wrist on the same side; The detected key points of the human body are checked by using a method for checking the detected key points of the human body. If a correct conclusion cannot be drawn about the detected key points of the human body, the use of the key points for the table lying behavior recognition is terminated; Obtain the shoulder key points of both shoulders of the detection target; Calculate the relative angle between the head and the shoulders, wherein the relative angle is the angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extensions, and the line connecting the shoulders and their extensions; According to the position information of the head key point and the shoulder key point, the height position relationship between the head key point and the shoulder key point is obtained, wherein the height position relationship is used to describe the height position relationship between the head key point and the line connecting the shoulder key points of both shoulders; When the height position relationship is within a preset height position relationship threshold range, and if the head-shoulder relative angle is within a preset angle threshold range, it is determined that the detection target is lying on the table; Wherein, the method for checking the detected key points of the human body includes: Obtain the key points of the head and neck of the detection target; Calculate the distance from the key point of the head to the key point of the neck, and record it as the head length; Obtain the elbow key points and wrist key points on the same side of the detection target; Calculate the distance from the elbow key point to the wrist key point, and record it as the length of one side of the arm; Based on a preset comparison model, the head length is compared with the arm length on one side to obtain a relative scale estimation value; When the relative scale estimation value is within a preset scale threshold range, it is determined that the detected human body key points are correct.

2. The method for identifying table lying behavior according to claim 1, characterized in that: The preset comparison model in the method for checking the detected key points of the human body is: Among them, β is the relative scale estimate, D H is the head length, D A is the arm length, W and b are preset parameters.

3. The method for identifying table lying behavior according to claim 1, characterized in that: The method for checking the detected human body key points also includes: If the head length is not within the preset head length range, it is determined that the human body key points of the current detection target are unavailable; If the arm length on one side is not within the preset arm length range, it is determined that the human body key point of the current detection target is unavailable; When it is determined that the human body key points of the current detection target are unavailable, it is determined that the detected human body key points are incorrect.

4. The method for identifying table lying behavior according to claim 1, characterized in that: The preset height position relationship threshold range is that the head key point is not higher than the line connecting the shoulder key points of both shoulders.

5. The method for identifying table lying behavior according to claim 1, characterized in that: The head-shoulder relative angle is the acute angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extensions, and the line connecting the shoulders and their extensions; The preset angle threshold ranges from n degrees to 90 degrees, wherein 50≤n≤70.

6. A device for identifying table lying behavior, characterized in that: include: The first acquisition module is used to acquire the key points of the head and neck of the detection target, as well as the key points of the elbow and wrist on the same side; The first judgment module is used to use the device for checking the detected key points of the human body to check the detected key points of the human body, and if a correct conclusion cannot be drawn that the detected key points of the human body are correct, the key points are stopped from being used to identify the behavior of lying on the table; The second acquisition module is used to acquire the shoulder key points of both shoulders of the detection target; An angle calculation module, used to calculate the head-shoulder relative angle between the head and the shoulders, wherein the head-shoulder relative angle is the angle formed by the intersection of the line connecting the key points of the head and the key points of the neck and their extension lines, and the line connecting the shoulders and their extension lines; The second judgment module is used to obtain the height position relationship between the head key point and the shoulder key point according to the position information of the head key point and the shoulder key point, wherein the height position relationship is used to describe the height position relationship between the head key point and the connecting line of the shoulder key points of both shoulders; when the height position relationship is within a preset height position relationship threshold range, if the head-shoulder relative angle is within a preset angle threshold range, it is judged that the detection target performs the behavior of lying on the table; Wherein, the device for checking the detected key points of the human body includes: An acquisition module is used to acquire the key points of the head and neck of the detection target; and acquire the key points of the elbow and wrist on the same side of the detection target; A calculation module is used to calculate the distance from the key point of the head to the key point of the neck, which is recorded as the head length; and calculate the distance from the key point of the elbow to the key point of the wrist, which is recorded as the length of one side of the arm; A comparison module, used for comparing the head length with the arm length on one side based on a preset comparison model to obtain a relative scale estimation value; The judging module is used to judge whether the detected key points of the human body are correct when the relative scale estimation value is within a preset scale threshold range.

7. The device for identifying lying-on-the-table behavior according to claim 6, characterized in that: The preset comparison model in the device for checking the detected key points of the human body is: Among them, β is the relative scale estimate, D H is the head length, D A is the arm length, W and b are preset parameters.

8. The device for identifying table lying behavior according to claim 6, characterized in that: The judgment module of the device for checking the detected human body key points is also used to judge that the human body key points of the current detection target are unavailable if the head length is not within the preset head length range; if the arm length on one side is not within the preset arm length range, judge that the human body key points of the current detection target are unavailable; when it is judged that the human body key points of the current detection target are unavailable, judge that the detected human body key points are incorrect.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Posture estimation device, posture estimation method, and posture estimation program

    CN104487999A

  • Planar palm center area extraction method and device

    CN110287772A

  • Target posture recognition method and device, and camera

    CN111104816A

  • Sitting posture real-time intelligent judgment method, system and apparatus and storage medium

    CN111414780A

  • Sitting posture type detection method and device, electronic equipment and storage medium

    CN116052205A