Human body kneeling posture detection method and device, detection equipment and storage medium
By identifying key points of human posture and determining positional relationships, the problem of the inability to detect kneeling postures in urban monitoring systems has been solved, enabling rapid processing and improving management efficiency.
Patent Information
- Application Number
- CN202211079883.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-05
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-09-05
AI Technical Summary
In existing technologies, urban monitoring systems cannot detect and process kneeling behavior in public places in a timely and effective manner, resulting in low timeliness and responsiveness.
The system acquires images of the target area using an image acquisition device, identifies key points of the human posture, determines whether the person is in a kneeling position based on the coordinates and positional relationships of these key points, and issues an alarm signal.
It enables the rapid detection and handling of kneeling behavior in public places, improving the efficiency of urban management.
Smart Images

Figure CN115690832B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, detection device, and storage medium for detecting human kneeling posture. Background Technology
[0002] In daily life, there may be instances where someone deliberately kneels in public areas to attract the attention of citizens, or where one party kneels due to a dispute, which is detrimental to the city's image. Such incidents affect people's lives and travel and need to be dealt with promptly.
[0003] In existing technologies, the detection of individuals is generally achieved through manual observation via urban surveillance systems, which requires a significant amount of manpower and time. This approach is not timely or effective in persuading individuals, resulting in low timeliness and efficiency. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method, device, detection equipment and storage medium for detecting human kneeling posture, which can specifically solve the existing problems.
[0005] Based on the above objectives, in a first aspect, this application proposes a method for detecting a kneeling posture of a human body, applied to a detection device in a target detection system. The target detection system further includes an image acquisition device for acquiring images of a target area. The method includes: obtaining a target image containing a target person based on the image acquired by the image acquisition device; identifying the posture key points of the target person and obtaining the coordinates of the posture key points based on their pixel positions in the target image; obtaining the positional relationship between the at least two target key points based on their coordinates; and determining that the target person is in a kneeling posture and issuing an alarm signal when the positional relationship between the target key points satisfies a preset condition.
[0006] Furthermore, after obtaining the coordinates of the pose key points, the method further includes: generating a human body bounding box based on the coordinates of the pose key points, wherein the human body bounding box contains all the pose key points; and standardizing the coordinates of the pose key points according to the proportional relationship between the human body bounding box and the target image.
[0007] Furthermore, the attitude key points include multiple groups, each group of attitude key points includes a first key point and a second key point with the same attributes, the target key point includes one of the first key point and the second key point, and after obtaining the coordinates of the attitude key points, the method further includes: obtaining the abscissa of the first key point and the abscissa of the second key point.
[0008] If the distance difference between the abscissa of the first key point and the abscissa of the second key point is within a preset range, the coordinates of the attitude key point are determined as valid coordinates, wherein each group of attitude key points has a one-to-one corresponding preset range.
[0009] Choose one of the first key point and the second key point as the target key point.
[0010] Furthermore, taking one of the first key point and the second key point as the target key point includes: taking the attitude key point that is far away from the origin coordinate in the vertical direction of the first key point and the second key point as the target key point.
[0011] Furthermore, the target key points include a first target key point and a second target key point, and the positional relationship between the target key points satisfies a preset condition. Determining that the target person is in a kneeling position includes: obtaining a first distance difference between the first target key point and the second target key point in the vertical coordinate direction; and determining that the target person is in a kneeling position when the first distance difference is less than or equal to 0.
[0012] Furthermore, the target key point also includes a third target key point. The positional relationship between the target key points satisfies a preset condition. Determining that the target person is in a kneeling position includes: determining that the target person is in a kneeling position when the distance from the third target key point to the ground is less than a first threshold, and the distances from the first target key point and the second target key point to the ground are both less than a second threshold.
[0013] Furthermore, the target key point also includes a fourth target key point. The positional relationship between the target key points satisfies a preset condition to determine that the target person is in a kneeling position, including: obtaining a second distance difference between the third target key point and the first target key point, and a third distance difference between the fourth target key point and the third target key point; if the ratio of the second distance difference to the third distance difference is less than a preset ratio, the target person is determined to be in a kneeling position.
[0014] Secondly, a human kneeling posture detection device is also provided. The device includes: an image processing module for obtaining a target image containing a target person based on an image acquired by an image acquisition device; a recognition module for recognizing the posture key points of the target person and obtaining the coordinates of the posture key points based on the pixel positions of the posture key points in the target image; a position calculation module for obtaining the positional relationship between at least two target key points based on the coordinates of at least two target key points among the posture key points; and a detection module for determining that the target person is in a kneeling posture and issuing an alarm signal when the positional relationship between the target key points meets preset conditions.
[0015] Thirdly, a detection device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the method described in any one of the first aspects.
[0016] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, the program being executed by a processor to implement the method as described in any of the first aspects.
[0017] In summary, the advantages of this application and the user experience it brings are as follows:
[0018] By acquiring images, a target image containing the target person is obtained. Then, the posture key points of the target person are identified, and the coordinates of the posture key points are obtained based on the pixel positions of the posture key points in the target image. Based on the coordinates of at least two target key points among the posture key points, the positional relationship between at least two target key points is obtained. When the positional relationship between the target key points meets the preset conditions, it is determined that the target person is in a kneeling position, and an alarm signal is issued. This can quickly detect people in a kneeling position and issue an alarm, which can improve the efficiency of urban management. Attached Figure Description
[0019] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in this application and should not be construed as limiting the scope of this application.
[0020] Figure 1 A flowchart of the human kneeling posture detection method of this application is shown.
[0021] Figure 2 A schematic diagram showing key points of human posture according to an embodiment of this application is provided.
[0022] Figure 3This diagram illustrates the positional relationship between the pixel coordinate system and the human body bounding box in this embodiment.
[0023] Figure 4 Another flowchart of the human kneeling posture detection method of this application is shown.
[0024] Figure 5 This embodiment shows a flowchart of the selection of target key points;
[0025] Figure 6 A schematic block diagram of a human kneeling posture detection device according to one embodiment is shown;
[0026] Figure 7 This invention provides a schematic diagram of the structure of a detection device according to an embodiment of the present application.
[0027] Figure 8 A schematic diagram of a storage medium provided in one embodiment of this application is shown. Detailed Implementation
[0028] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0029] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0030] This embodiment provides a method for detecting a kneeling human body, applied to a detection device within a target detection system. The target detection system also includes an image acquisition device for acquiring images of the target area. The target detection system can be an urban surveillance system, and the image acquisition device can be a camera installed in a public urban area to obtain video streams from that area. The target area can be a public urban area with high pedestrian traffic.
[0031] Figure 1 A flowchart illustrating a human kneeling posture detection method according to an embodiment of this application is shown. Figure 1 As shown, the method for detecting a person's kneeling posture includes the following steps S101-S104:
[0032] S101. Obtain a target image containing the target person based on the image acquired by the image acquisition device.
[0033] In this embodiment, the image acquired by the image acquisition device can be image frames obtained from the video stream acquired by the image acquisition device. Intelligent recognition technology is used to identify people in the image frames. For example, AI recognition technology can be used, employing Openvino's person-detection-0202 model to identify people in the image frames. The target person can be anyone appearing in the image frame, and the image frame containing the target person is used as the target image.
[0034] S102. Identify the pose key points of the target person and obtain the coordinates of the pose key points based on their pixel positions in the target image.
[0035] In this embodiment, the pose key points may include feature points that can reflect human characteristics, for example... Figure 2 A diagram illustrating key points of human posture, for reference. Figure 2 There are 18 pose key points: nose key point 1, left eye key point 16, right eye key point 15, left ear key point 18, right ear key point 17, neck key point 2, left shoulder key point 4, right shoulder key point 3, left elbow key point 6, right elbow key point 5, left wrist key point 8, right wrist key point 7, left hip bone key point 10, right hip bone key point 9, left knee key point 12, right knee key point 11, left ankle bone key point 14, and right ankle bone key point 13. In one example, AI recognition technology was used to identify human pose key points using Openvino's human-pose-estimation-3d-0001 model.
[0036] Figure 3 This is a schematic diagram illustrating the positional relationship between the pixel coordinate system and the human bounding box in this embodiment. In this embodiment, the coordinates of the pose key points are obtained based on their pixel positions in the target image, such as... Figure 3 As shown, a pixel coordinate system can be established with the top-left corner of the target image as the origin (0,0), labeled as two-dimensional (x,y), where x is called the horizontal coordinate and y is called the vertical coordinate. The positive direction of the x-axis is to the right, and the positive direction of the y-axis is downward. Therefore, the coordinate values of each attitude keypoint are all positive. The coordinates of the attitude keypoints can then be obtained based on the relationship between the pixel coordinates of each attitude keypoint in the target image and the origin.
[0037] It should be noted that, considering the high pedestrian traffic in urban areas, there may be errors in identifying target individuals. Therefore, after obtaining the coordinates of the pose key points, these coordinates are standardized. (Reference) Figure 4 The method in this embodiment further includes S1021--S1022:
[0038] S1021. Generate the human body bounding box based on the coordinates of the pose key points.
[0039] The human body bounding box contains all pose keypoints, such as Figure 3 As shown, all pose key points are contained within the human body bounding box, or some pose key points are located on the boundary line of the human body bounding box, so that the human body bounding box can represent the general outline of the target person and the position of the target person in the target image.
[0040] S1022. Based on the proportional relationship between the human body bounding box and the target image, the coordinates of the pose key points are standardized.
[0041] In this embodiment, standardizing the coordinates of pose key points based on the ratio between the human body bounding box and the target image can reduce the influence of the position and size of the target person on the coordinates of pose key points, thereby improving the accuracy of pose key points in representing human posture.
[0042] In this embodiment, the proportional relationship between the human bounding box and the target image can be obtained using the width and height of the human bounding box and the width and height of the target image. Specifically, assuming the coordinates of the pose key points are (x, y), the coordinates of the standardized pose key points are (x, y). i Y i If the orientation key points are then normalized, the formula for processing them is:
[0043]
[0044]
[0045] Where i is the number of the pose keypoint (1...18), w and h are the width and height of the target image, and x... b y b The coordinates of the top-left corner of the human body bounding box, w b h b These are the width and height of the human body's bounding box.
[0046] S103. Based on the coordinates of at least two target key points in the attitude key points, obtain the positional relationship between at least two target key points.
[0047] This embodiment detects whether a target person is in a kneeling position by using human posture key points. Therefore, posture key points that can characterize the vertical changes in the target person can be selected as target key points. In one example, posture key points include multiple sets, each set including a first key point and a second key point with the same attributes. For example, left eye key point 16 and right eye key point 15 are one set of posture key points, and left hip bone key point 10 and right hip bone key point 9 are another set. The target key point includes one of the first and second key points; that is, in a set of posture key points with the same attributes, the target key point contains only one of them. For example, if a set of posture key points includes left hip bone key point 10 and right hip bone key point 9, then the target key point includes either left hip bone key point 10 or right hip bone key point 9.
[0048] It is understandable that the relative positions of the various posture key points need to meet the basic requirements of human anatomy; for example, the distance between the left and right hip bones of an adult is generally around 30 cm. Therefore, to improve the accuracy of posture key points, this embodiment, after obtaining the coordinates of the posture key points, also judges the validity of the posture key point coordinates, thereby using the posture key points with valid coordinates as target key points and improving the accuracy of detection.
[0049] It is understandable that when using the human-pose-estimation-3d-0001 model to identify key points of human pose, the coordinates of a certain pose key point may not be identified or a part of the horizontal or vertical coordinate may be lost due to situations such as overlapping of people in the image. In this case, the coordinates of the pose key point can be regarded as invalid coordinates.
[0050] When the model identifies the coordinates of key points in human posture, the validity of the coordinates can be judged based on the fact that the relative positions of each key point need to meet the basic requirements of human structure.
[0051] Specifically, Figure 5 The flowchart for selecting target key points in this embodiment is referenced. Figure 5 After obtaining the coordinates of the attitude key points, this embodiment also includes:
[0052] S1031. Obtain the x-coordinate of the first key point and the x-coordinate of the second key point.
[0053] For example, if the first keypoint is the left knee keypoint and the second keypoint is the right knee keypoint, then obtain the x-coordinate of the left knee keypoint and the x-coordinate of the right knee keypoint.
[0054] S1032. If the distance difference between the abscissa of the first key point and the abscissa of the second key point is within a preset range, the coordinates of the attitude key point are determined as valid coordinates.
[0055] It is understandable that each set of key points in human posture has different distances. For example, the distance between the eyes is less than the width of the hip bone, and the distance between the ears is greater than the distance between the eyes but less than the width of the hip bone. Therefore, each set of key points in this embodiment has a one-to-one corresponding preset range.
[0056] For example, if the first key point is the left knee key point and the second key point is the right knee key point, and the preset range corresponding to the knee key points is [a, b], then when the distance difference between the x-coordinate of the left knee key point and the x-coordinate of the right knee key point is within [a, b], then the coordinates of the first key point and the coordinates of the second key point are determined to be valid coordinates.
[0057] For example, if the first key point is the left ankle bone key point and the second key point is the right ankle bone key point, and the preset range corresponding to the ankle bone key points is [c,d], then when the distance difference between the x-coordinate of the left ankle bone key point and the x-coordinate of the right ankle bone key point is within [c,d], then the coordinates of the first key point and the coordinates of the second key point are determined to be valid coordinates.
[0058] S1033. Take one of the two key points, the first key point and the second key point, as the target key point.
[0059] In this embodiment, after determining that the first and second key points are valid, a target key point can be selected according to a preset rule. This preset rule can be based on the left side; for example, when both the left and right ankle bone key points are detected as valid, the left ankle bone key point is selected as the target key point. This method can reduce the amount of computation.
[0060] However, in order to improve the calculation accuracy, this embodiment uses one of the first key point and the second key point as the attitude key point as the target key point: the attitude key point that is far away from the origin coordinate in the vertical direction of the first key point and the second key point is used as the target key point.
[0061] For example, if the first key point is the left ankle bone key point and the second key point is the right ankle bone key point, and the coordinates of the left ankle bone key point and the right ankle bone key point are both valid, and the ordinate of the left ankle bone key point is greater than the ordinate of the right ankle bone key point, that is, the left ankle bone key point is farther away from the origin coordinates than the right ankle bone key point, this can indicate that the left ankle bone key point is closer to the ground and can better represent that the target person is in a kneeling position. In this case, the coordinates of the target key point are taken as the coordinates of the left ankle bone key point.
[0062] After identifying the target key points, this embodiment determines whether the target person is in a kneeling position by detecting whether the positional relationship between the target key points meets preset conditions.
[0063] S104. If the positional relationship between the key points of the target meets the preset conditions, determine that the target personnel are in a kneeling position and issue an alarm signal.
[0064] It is understandable that the distance between the knee and the ankle is the most telling feature of whether the target person is in a kneeling position. Therefore, the target key points in this embodiment include a first target key point and a second target key point, wherein the first target key point is the ankle key point and the second target key point is the knee key point.
[0065] Among them, the positional relationship between the target key points meets the preset conditions to determine that the target person is in a kneeling position, including: obtaining the first distance difference between the first target key point and the second target key point in the vertical axis direction, and determining that the target person is in a kneeling position when the first distance difference is less than or equal to 0.
[0066] If the first distance difference is less than 0, the vertical coordinate of the ankle key point is less than the vertical coordinate of the knee key point, that is, the knee key point is lower than the ankle key point, then the target person can be determined to be in a kneeling position. If the first distance difference is equal to 0, the vertical coordinates of the knee key point and the ankle key point are the same, which also indicates that the target person is in a kneeling position.
[0067] In this embodiment, when the first distance difference is greater than 0, the target person may be in a kneeling position or a non-kneeling position. In this case, the target person's posture can be further determined based on the third target key point. The third target key point can be either the left hip bone key point or the right hip bone key point.
[0068] That is, the target key point also includes the third target key point. At this time, it is determined whether the target person's posture is in a kneeling position. This includes: if the distance from the third target key point to the ground is less than the first threshold, and the distances from the first target key point and the second target key point to the ground are both less than the second threshold, then the target person is determined to be in a kneeling position.
[0069] In this embodiment, the distance from the target key point to the ground can be obtained by the difference between the vertical coordinate of the target key point and the vertical coordinate of the intersection point of the human body and the ground in the target image. For example, the distance from the third target key point to the ground can be obtained by the difference between the vertical coordinate of the third target key point and the vertical coordinate of the intersection point of the human body and the ground in the target image. Similarly, the distance from the first target key point to the ground can be obtained by the difference between the vertical coordinate of the first target key point and the vertical coordinate of the intersection point of the human body and the ground in the target image. The distance from the second target key point to the ground can be obtained by the difference between the vertical coordinate of the second target key point and the vertical coordinate of the intersection point of the human body and the ground in the target image.
[0070] If the distances from the hip bone key point to the ground, the knee bone key point, and the ankle bone key point to the ground are all less than the preset threshold, it indicates that the hip bone, knee bone, and ankle bone of the human body are too close to the ground, and the posture of the target person is determined to be a kneeling position.
[0071] In another embodiment, the ratio of the upper body to the lower body can be used to determine whether the target person is in a kneeling position. Specifically, the target key points also include a fourth target key point, which is a neck key point. If the positional relationship between the target key points meets a preset condition, it is determined that the target person is in a kneeling position. This includes: obtaining a second distance difference between a third target key point and a first target key point, and a third distance difference between a fourth target key point and a third target key point; if the ratio of the second distance difference to the third distance difference is less than a preset ratio, it is determined that the target person is in a kneeling position.
[0072] In this embodiment, the second distance difference can be obtained based on the difference between the ordinate of the hip bone key point and the ordinate of the ankle bone key point. Considering the significant change in the relative position between the hip bone and the neck, the third distance difference can be obtained using the distance calculation formula between the neck and the hip bone. The formula for calculating the distance D between the neck and the hip bone is as follows:
[0073]
[0074] The coordinates of the key points in the neck are (x1, y1), and the coordinates of the key points in the hip are (x2, y2).
[0075] In one example, the preset ratio is When the ratio of the second distance difference to the third distance difference is less than If the distance from the hip bone to the ankle is much smaller than the distance from the neck to the hip bone, it can be determined that the target person is in a kneeling position.
[0076] In one example, issuing an alarm signal based on a kneeling posture can be achieved by establishing a connection with the city's security system. Upon confirming that a target person is in a kneeling position, an alarm signal is sent to the city's security system, and an image of the kneeling person is automatically saved. The alarm signal can include a text alert message and the image of the kneeling person. This allows city management personnel to quickly identify any behavior that may disrupt city order and take proactive and effective measures.
[0077] The above is a method for detecting kneeling posture provided in this embodiment. By acquiring images, a target image containing the target person is obtained. Then, the posture key points of the target person are identified, and the coordinates of the posture key points are obtained based on the pixel positions of the posture key points in the target image. Based on the coordinates of at least two target key points among the posture key points, the positional relationship between at least two target key points is obtained. When the positional relationship between the target key points meets the preset conditions, the posture of the target person is determined to be kneeling, and an alarm signal is issued. This method can quickly detect people in a kneeling position and issue an alarm, thereby improving the efficiency of urban management.
[0078] Figure 6 This is a schematic diagram of a human kneeling posture detection device according to one embodiment. Figure 6 As shown, the human kneeling posture detection device 600 includes:
[0079] Image processing module 601 is used to obtain a target image containing the target person based on the image acquired by the image acquisition device;
[0080] The recognition module 602 is used to recognize the posture key points of the target person and obtain the coordinates of the posture key points based on the pixel positions of the posture key points in the target image.
[0081] The position calculation module 603 is used to obtain the positional relationship between the at least two target key points based on the coordinates of at least two target key points among the attitude key points;
[0082] The detection module 604 is used to determine that the target person is in a kneeling position and to issue an alarm signal when the positional relationship between the target key points meets the preset conditions.
[0083] In one example, the recognition module 602 is further configured to generate a human body bounding box based on the coordinates of the pose key points, the human body bounding box containing all pose key points; and to standardize the coordinates of the pose key points according to the proportional relationship between the human body bounding box and the target image.
[0084] In one example, the attitude key points include multiple groups, each group of attitude key points includes a first key point and a second key point with the same attributes, and the target key point includes one of the first key point and the second key point. The recognition module 602 is further configured to, after obtaining the coordinates of the attitude key points, obtain the abscissa of the first key point and the abscissa of the second key point; if the distance difference between the abscissa of the first key point and the abscissa of the second key point is within a preset range, determine the coordinates of the attitude key point as valid coordinates, wherein each group of attitude key points has a one-to-one corresponding preset range; and take one of the first key point and the second key point as the target key point.
[0085] In one example, the recognition module 602 is further configured to identify the posture key point that is farther from the origin coordinate in the vertical direction between the first key point and the second key point as the target key point.
[0086] In one example, the target key points include a first target key point and a second target key point. The detection module 604 is also used to obtain a first distance difference between the first target key point and the second target key point in the vertical coordinate direction; if the first distance difference is less than or equal to 0, it is determined that the target person is in a kneeling position.
[0087] In one example, the target key point also includes a third target key point, and the detection module 604 is further configured to determine that the target person is in a kneeling position when the distance from the third target key point to the ground is less than a first threshold, and the distances from the first target key point and the second target key point to the ground are both less than a second threshold.
[0088] In one example, the target key point also includes a fourth target key point. The detection module 604 is further used to obtain a second distance difference between the third target key point and the first target key point, and a third distance difference between the fourth target key point and the third target key point; if the ratio of the second distance difference to the third distance difference is less than a preset ratio, it is determined that the target person is in a kneeling position.
[0089] The human kneeling posture detection device provided in the above embodiments of this application and the human kneeling posture detection method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application stored therein.
[0090] This embodiment also provides a detection device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the method provided in the above-described method embodiment.
[0091] refer to Figure 7This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 7 As shown, the electronic device 20 includes: a processor 200, a memory 201, a bus 202, and a communication interface 203. The processor 200, the communication interface 203, and the memory 201 are connected through the bus 202. The memory 201 stores a computer program that can run on the processor 200. When the processor 200 runs the computer program, it executes the human kneeling posture detection method provided in any of the foregoing embodiments of this application.
[0092] The memory 201 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 203 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.
[0093] Bus 202 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs. After receiving an execution instruction, the processor 200 executes the program. The human kneeling posture detection method disclosed in any of the foregoing embodiments of this application can be applied to the processor 200, or implemented by the processor 200.
[0094] The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 200 or by instructions in software form. The processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 201. The processor 200 reads the information in memory 201 and, in conjunction with its hardware, completes the steps of the above method.
[0095] The electronic device provided in this application embodiment and the human kneeling posture detection method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0096] The application also provides a computer-readable storage medium corresponding to the human kneeling posture detection method provided in the foregoing embodiments. Please refer to [the relevant documentation]. Figure 8 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the human kneeling posture detection method provided in any of the foregoing embodiments.
[0097] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.
[0098] The computer-readable storage medium provided in the above embodiments of this application and the human kneeling posture detection method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application stored therein.
[0099] It should be noted that:
[0100] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of this application.
[0101] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0102] Similarly, it should be understood that, in order to simplify this application and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this application, various features of this application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.
[0103] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0104] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0105] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the virtual machine creation system according to the embodiments of this application. This application can also be implemented as a device or system program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such an implementation of this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0106] It should be noted that the above embodiments are illustrative of this application and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. This application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several systems, several of these systems may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0107] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting human kneeling posture, characterized in that, A detection device applied in a target detection system, the target detection system further comprising an image acquisition device for acquiring an image of a target region, the method comprising: Based on the images acquired by the image acquisition device, a target image containing the target person is obtained; Identify the pose key points of the target person, and obtain the coordinates of the pose key points based on their pixel positions in the target image; Based on the coordinates of at least two target key points among the attitude key points, the positional relationship between the at least two target key points is obtained; If the positional relationship between the key target points meets the preset conditions, the target person is determined to be in a kneeling position, and an alarm signal is issued. Wherein, after obtaining the coordinates of the pose key points, the method further includes: generating a human body bounding box based on the coordinates of the pose key points, wherein the human body bounding box contains all the pose key points; The attitude key points include multiple groups, each group of attitude key points includes a first key point and a second key point with the same attributes, and the target key point includes one of the first key point and the second key point. After obtaining the coordinates of the attitude key points, the method further includes: obtaining the abscissa of the first key point and the abscissa of the second key point; if the distance difference between the abscissa of the first key point and the abscissa of the second key point is within a preset range, determining the coordinates of the attitude key point as valid coordinates, wherein each group of attitude key points has a one-to-one corresponding preset range; and taking one of the first key point and the second key point as the target key point.
2. The method according to claim 1, characterized in that, After generating the human bounding box based on the coordinates of the pose key points, the method includes: Based on the proportional relationship between the human body bounding box and the target image, the coordinates of the pose key points are standardized.
3. The method according to claim 1, characterized in that, Take one of the first key point and the second key point as the target key point, including: The attitude key point that is farther away from the origin coordinate in the vertical direction between the first key point and the second key point is taken as the target key point.
4. The method according to claim 1, characterized in that, The target key points include a first target key point and a second target key point. The positional relationship between the target key points satisfies preset conditions, determining that the target person is in a kneeling position, including: Obtain the first distance difference between the first target key point and the second target key point in the vertical coordinate direction; If the first distance difference is less than or equal to 0, the target person is determined to be in a kneeling position.
5. The method according to claim 4, characterized in that, The target key points also include a third target key point. The positional relationship between the target key points satisfies preset conditions to determine that the target person is in a kneeling position, including: If the distance from the third target key point to the ground is less than the first threshold, and the distances from the first target key point and the second target key point to the ground are both less than the second threshold, then the target person is determined to be in a kneeling position.
6. The method according to claim 5, characterized in that, The target key points also include a fourth target key point. The positional relationship between the target key points satisfies preset conditions to determine that the target person is in a kneeling position, including: Obtain the second distance difference between the third target key point and the first target key point, and the third distance difference between the fourth target key point and the third target key point; If the ratio of the second distance difference to the third distance difference is less than a preset ratio, it is determined that the target person is in a kneeling position.
7. A human kneeling posture detection device, characterized in that, The device includes: The image processing module is used to obtain a target image containing the target person based on the image acquired by the image acquisition device; The recognition module is used to recognize the pose key points of the target person and obtain the coordinates of the pose key points based on the pixel positions of the pose key points in the target image; The position calculation module is used to obtain the positional relationship between the at least two target key points based on the coordinates of at least two target key points among the attitude key points; The detection module is used to determine that the target person is in a kneeling position and to issue an alarm signal when the positional relationship between the key points of the target meets preset conditions. The position calculation module is further configured to, after obtaining the coordinates of the posture key points, generate a human body bounding box based on the coordinates of the posture key points, the human body bounding box containing all the posture key points; the posture key points include multiple groups, each group of posture key points including a first key point and a second key point with the same attributes, the target key point including one of the first key point and the second key point; after obtaining the coordinates of the posture key points, the device is further configured to: obtain the abscissa of the first key point and the abscissa of the second key point; if the distance difference between the abscissa of the first key point and the abscissa of the second key point is within a preset range, determine the coordinates of the posture key point as valid coordinates, wherein each group of posture key points has a one-to-one corresponding preset range; and take one of the posture key points, the first key point and the second key point, as the target key point.
8. A detection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by a processor to implement the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Human body posture recognition method and device
CN111753721A