Search

CN-115909393-B - Gesture recognition method and device, electronic equipment and storage medium

CN115909393BCN 115909393 BCN115909393 BCN 115909393BCN-115909393-B

Abstract

The invention discloses a gesture recognition method, a gesture recognition device, electronic equipment and a storage medium, wherein the gesture recognition method comprises the steps of obtaining a target image, obtaining human body key points of a target to be recognized based on the target image, wherein the human body key points at least comprise hip key points, knee joint key points and ankle joint key points, determining leg angles based on first connecting lines of the hip key points and the knee joint key points and second connecting lines of the knee joint key points and the ankle joint key points, and determining abnormal gestures of the target to be recognized when the leg angles exceed a preset angle range. Through the scheme, the human body key points can be obtained based on the images so as to determine the leg included angles, and then the abnormal gesture with the detection target can be determined according to the leg included angles.

Inventors

  • LI JIE
  • SUN ZHILIANG
  • HUANG PENG
  • YIN JUN
  • YANG JIAWEN

Assignees

  • 浙江大华技术股份有限公司

Dates

Publication Date
20260508
Application Date
20221024

Claims (8)

  1. 1. A gesture recognition method, characterized in that the gesture recognition method comprises: Acquiring a target image, wherein the acquisition of the target image comprises acquisition of an image to be identified, acquisition of a human body detection frame and a mine car detection frame in the image to be identified, and determination of a first intersection ratio of the human body detection frame and the mine car detection frame; Acquiring human body key points of a target to be identified based on the target image, wherein the human body key points at least comprise hip key points, knee joint key points and ankle joint key points; Determining a leg angle based on a first line connecting the hip keypoint and the knee joint keypoint, and a second line connecting the knee joint keypoint and the ankle joint keypoint; when the leg included angle exceeds a preset angle range, determining an abnormal gesture of the target to be identified; When the leg included angle exceeds a preset angle range, determining the abnormal gesture of the target to be identified comprises the following steps: Acquiring a foot detection frame and a mine car pedal detection frame in the target image to determine a second intersection ratio of the foot detection frame and the mine car pedal detection frame; and determining the abnormal gesture of the target to be identified when the second intersection ratio is smaller than a second preset threshold value or the leg included angle exceeds the preset angle range.
  2. 2. The method for recognizing a gesture according to claim 1, wherein, The target to be identified of the target image comprises two groups of key points, wherein each group of key points of the human body at least comprises a hip key point, a knee key point and an ankle key point; And when the second intersection ratio is smaller than a second preset threshold or the leg included angle exceeds the preset angle range, determining the abnormal behavior of the target to be identified comprises the following steps: and determining the abnormal gesture of the target to be identified when the leg included angle corresponding to any one of the two groups of key points of the target to be identified exceeds the preset angle range or the second intersection ratio is smaller than a second preset threshold.
  3. 3. The method for recognizing a gesture according to claim 1, wherein, The target to be identified of the target image comprises two foot detection frames; And determining the abnormal gesture of the target to be identified when the leg included angle corresponding to any one of the two groups of key points of the target to be identified exceeds the preset angle range or the second intersection ratio of any one of the two foot detection frames and the mine car pedal detection frame is smaller than a second preset threshold value.
  4. 4. The method for recognizing a gesture according to claim 1, wherein, After determining the abnormal gesture of the target to be identified, the gesture identification method further comprises the following steps: Accumulating the number of target images determined to be the abnormal pose; and outputting alarm information of the abnormal gesture of the target to be identified when the quantity accumulation reaches a preset quantity.
  5. 5. The method for recognizing a gesture according to claim 1, wherein, After determining the abnormal gesture of the target to be identified, the gesture identification method further comprises the following steps: accumulating the time of the target image determined to be the abnormal gesture as abnormal state time; outputting alarm information of the abnormal gesture of the target to be identified when the abnormal state time exceeds a time interval threshold value in a preset period; and in a preset period, when the abnormal state time does not exceed a time interval threshold value, setting the abnormal state time to zero.
  6. 6. A gesture recognition apparatus, characterized in that the gesture recognition apparatus comprises: The target image acquisition module is used for acquiring a target image, wherein the acquisition of the target image comprises acquisition of an image to be identified, acquisition of a human body detection frame and a mine car detection frame in the image to be identified, and determination of a first intersection ratio of the human body detection frame and the mine car detection frame; The key point extraction module is used for acquiring human body key points of a target to be identified based on the target image, wherein the human body key points at least comprise hip key points, knee joint key points and ankle joint key points; a leg angle determining module that determines a leg angle based on a first line connecting the hip keypoint and the knee joint keypoint, and a second line connecting the knee joint keypoint and the ankle joint keypoint; The gesture determining module is used for determining the abnormal gesture of the target to be identified when the leg included angle exceeds a preset angle range; When the leg included angle exceeds a preset angle range, determining the abnormal gesture of the target to be identified comprises the following steps: Acquiring a foot detection frame and a mine car pedal detection frame in the target image to determine a second intersection ratio of the foot detection frame and the mine car pedal detection frame; and determining the abnormal gesture of the target to be identified when the second intersection ratio is smaller than a second preset threshold value or the leg included angle exceeds the preset angle range.
  7. 7. An electronic device comprising a memory and a processor coupled to the memory, the memory storing at least one computer program that, when loaded and executed by the processor, is configured to implement the gesture recognition method of any one of claims 1-5.
  8. 8. A computer readable storage medium, characterized in that the computer readable storage medium has at least one program, which when loaded and executed by a processor, is adapted to carry out the gesture recognition method according to any one of claims 1-5.

Description

Gesture recognition method and device, electronic equipment and storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to a gesture recognition method, a gesture recognition device, an electronic device, and a storage medium. Background With the increasing maturity and popularity of image processing, recognition of the image processing is also receiving more and more attention, and in the prior art, recognition of a riding gesture is generally performed by using a sensor. In the research and practice process of the prior art, the inventor discovers that in the process of identifying the human body gesture, the sensor is generally used for acquiring the human body gesture parameters, however, when the sensor is damaged and other problems cause misjudgment, the acquired human body gesture parameters are inaccurate, and the gesture identification accuracy is affected. Disclosure of Invention The application mainly solves the technical problem of providing a gesture recognition method, a gesture recognition device, electronic equipment and a storage medium, wherein key points of a human body can be acquired based on images so as to determine leg included angles, and further abnormal gestures with detection targets can be determined according to the leg included angles. In order to solve the technical problems, the technical scheme includes that the gesture recognition method comprises the steps of obtaining a target image, obtaining human body key points of a target to be recognized based on the target image, wherein the human body key points at least comprise hip key points, knee joint key points and ankle joint key points, determining leg included angles based on first connecting lines of the hip key points and the knee joint key points and second connecting lines of the knee joint key points and the ankle joint key points, and determining abnormal gestures of the target to be recognized when the leg included angles exceed a preset angle range. In one embodiment of the application, the method for acquiring the target image comprises the steps of acquiring an image to be identified, acquiring a human body detection frame and a mine car detection frame in the image to be identified to determine a first intersection ratio of the human body detection frame and the mine car detection frame, and determining the target image by the image to be identified when the first intersection ratio is greater than or equal to a first preset threshold value. In an embodiment of the application, when the leg included angle exceeds a preset angle range, determining the abnormal gesture of the target to be identified includes acquiring a foot detection frame and a mine car pedal detection frame in the target image to determine a second intersection ratio of the foot detection frame and the mine car pedal detection frame, and when the second intersection ratio is smaller than a second preset threshold or the leg included angle exceeds the preset angle range, determining the abnormal gesture of the target to be identified. In an embodiment of the application, the target to be identified of the target image comprises two groups of key points, each group of key points of the human body at least comprises a buttock key point, a knee joint key point and an ankle joint key point, and when the second intersection ratio is smaller than a second preset threshold value or the leg angle exceeds the preset angle range, the abnormal behavior of the target to be identified is determined, wherein the abnormal gesture of the target to be identified is determined when the leg angle corresponding to any one group of key points in the two groups of key points of the target to be identified exceeds the preset angle range or the second intersection ratio is smaller than the second preset threshold value. In one embodiment of the application, the target to be identified of the target image comprises two foot detection frames, and when the leg included angle corresponding to any one of the two groups of key points of the target to be identified exceeds the preset angle range, or the second intersection ratio of any one of the two foot detection frames and the mine car pedal detection frame is smaller than a second preset threshold value, the abnormal gesture of the target to be identified is determined. In one embodiment of the application, after determining the abnormal gesture of the target to be identified, the gesture identification method further comprises the steps of accumulating the number of target images determined to be the abnormal gesture, and outputting alarm information of the abnormal gesture of the target to be identified when the number accumulated reaches a preset number. In one embodiment of the application, after determining the abnormal gesture of the object to be identified, the gesture identification method further comprises the steps of accumulating time of