Motion recognition device, method, and electronic apparatus
The motion recognition apparatus and method enhance accuracy by determining the direction of an object using the included angle between shoulder and elbow-wrist key points, addressing low accuracy and misjudgments in conventional methods.
Patent Information
- Application Number
- JP2024048169
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-30
- Filing Date
- 2024-03-25
- Publication Date
- 2024-10-11
AI Technical Summary
Conventional methods for determining the direction of an object in an image suffer from low accuracy and misjudgments in motion recognition results.
A motion recognition apparatus and method that utilizes a neural network to recognize key points in an image and determines the direction of an object based on the included angle between the connecting lines between the left and right shoulder key points and the elbow and wrist key points on the same side.
Improves the accuracy of motion recognition results by simplifying the calculation process and reducing the influence of image distortion and posture variations.
Smart Images

Figure 2024144287000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the technical field of image processing. [Background technology]
[0002] With the continuous development of computer technology, behavior recognition (identification) based on key points has been widely used in fields such as intelligent monitoring, behavior analysis, human-computer interaction, etc. For example, for an image of a driver of a means of transportation (e.g., a vehicle) captured by an image capture device, the direction the driver is pointing can be determined based on the driver's human body key points in the image, and based on this direction, the driver's driving plan or whether the driver's behavior complies with the behavior norm (specification) can be confirmed, etc. This is advantageous for safe production, operation and maintenance, etc.
[0003] It should be noted that the introduction of the above background art is intended to clearly and completely explain the technical solutions of the present invention, and to facilitate understanding thereof by those skilled in the art, and these technical solutions are described in the background art of the present invention, and therefore should not be construed as being known to those skilled in the art. Summary of the Invention [Problem to be solved by the invention]
[0004] However, the inventors have found that the conventional methods for determining the pointing direction of an object in an image have certain limitations, such as low accuracy and high probability of misjudgment.
[0005] In view of at least one of the above problems, an object of the present invention is to provide an action recognition device, method, and electronic device that can improve the accuracy of action recognition results. [Means for solving the problem]
[0006] According to one aspect of an embodiment of the present invention, there is provided a motion recognition device, the motion recognition device comprising: an acquisition unit for performing keypoint recognition for an object in an image by a neural network and acquiring keypoints of the object; and Among the acquired keypoints, a determination unit is included, which determines the pointing direction of the object based on the included angle between a first connecting line between the left shoulder keypoint and the right shoulder keypoint and a second connecting line between the elbow keypoint and the wrist keypoint, where the elbow keypoint and the wrist keypoint are located on the same side.
[0007] According to another aspect of an embodiment of the present invention, there is provided an action recognition method, the action recognition method comprising: Performing keypoint recognition on an object in an image using a neural network to obtain keypoints of the object; and Among the acquired key points, the pointing direction of the object is determined based on the included angle between a first connecting line between the left shoulder key point and the right shoulder key point and a second connecting line between the elbow key point and the wrist key point, where the elbow key point and the wrist key point are on the same side.
[0008] According to another aspect of an embodiment of the present invention, there is provided an electronic device including a memory and a processor, the memory storing a computer program, and the processor configured to execute the computer program to realize the above-mentioned action recognition method. Effect of the Invention
[0009] The accuracy of the action recognition results can be improved by determining the pointing direction of the object using the included angle between the first connecting line of the object's two shoulder key points and the second connecting line between the elbow key point and the wrist key point. [Brief description of the drawings]
[0010] [Figure 1] FIG. 2 is a diagram illustrating a method for recognizing an action according to an embodiment of the present invention. [Diagram 2]FIG. 13 is a diagram showing a deformed image in the embodiment of the present invention. [Diagram 3] FIG. 11 is another diagram showing a deformed image in the embodiment of the present invention. [Figure 4] FIG. 2 is a diagram showing key points in an embodiment of the present invention. [Diagram 5] FIG. 2 is a diagram showing the included angle in an embodiment of the present invention. [Figure 6] FIG. 11 is another diagram illustrating the included angle in an embodiment of the present invention. [Figure 7A] FIG. 2 is a diagram showing the direction in which an object is pointed in an embodiment of the present invention. [Figure 7B] FIG. 2 is a diagram showing the direction in which an object is pointed in an embodiment of the present invention. [Figure 7C] FIG. 2 is a diagram showing the direction in which an object is pointed in an embodiment of the present invention. [Figure 8A] FIG. 2 is a diagram showing the direction in which an object is pointed in an embodiment of the present invention. [Figure 8B] FIG. 2 is a diagram showing the direction in which an object is pointed in an embodiment of the present invention. [Figure 8C] FIG. 2 is a diagram showing the direction in which an object is pointed in an embodiment of the present invention. [Figure 9] FIG. 11 is another diagram illustrating the included angle in an embodiment of the present invention. [Figure 10] FIG. 11 is another diagram illustrating the included angle in an embodiment of the present invention. [Figure 11] FIG. 1 illustrates an action recognition device according to an embodiment of the present invention. [Figure 12] 1 is a diagram showing an electronic device according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] The above and other features of the present invention will become apparent from the following detailed description and the accompanying drawings, in which: While the specification and drawings disclose certain embodiments of the present invention, these are illustrative of only some of the embodiments which may employ the principles of the present invention, and it is to be understood that the present invention is not limited to the described embodiments, but rather includes all modifications, variations and alternatives which fall within the scope of the appended claims.
[0012] In an embodiment of the present invention, the target of the action recognition may be a human body of various ages, for example, an elderly person, a child, an elderly person and / or a caregiver, a child and / or a guardian, etc. However, the present invention is not limited thereto, and the target as the detection target may be a human body or other animal body having a vital sign, or a machine without a vital sign.
[0013] Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0014] <Example of the first aspect> The present invention provides a method for recognizing actions. Figure 1 is a diagram showing the method for recognizing actions in an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
[0015] Step 101: Recognizing key points of an object in an image using a neural network to obtain key points of the object; and Step 102: Among the obtained key points, determine the pointing direction of the object based on the included angle between a first connecting line between the left shoulder key point and the right shoulder key point and a second connecting line between the elbow key point and the wrist key point, where the elbow key point and the wrist key point are located on the same side.
[0016] According to the above embodiment, the pointing direction of the target is determined by using the included angle between the first connecting line of the target's two shoulder key points and the second connecting line between the elbow key point and the wrist key point located on the same side, thereby improving the accuracy of the action recognition result.
[0017] For example, an object shows different directions according to different positions of an arm (particularly, a forearm) relative to a torso (particularly, a shoulder), and among the multiple key points of the object, two shoulder key points can represent (or partially represent) the position of the torso, and an elbow key point and a wrist key point located on the same side can represent the position of the forearm on this side, so that the pointing direction of the object can be reasonably and accurately determined based on these key points. By determining the pointing direction of the object based on two shoulder key points and the elbow key point and the wrist key point on the same side among the multiple key points, the pointing direction of the object can be determined in a simple manner. Therefore, the amount of calculation can be reduced and the calculation efficiency can be improved. In addition, by determining the pointing direction of the object based on the included angle between the first connecting line and the second connecting line of the two shoulder key points, the influence of the image acquisition angle (e.g., front, side, etc.) and / or the posture of the object (e.g., posture such as standing, sitting, etc.) and / or distortion of the image (e.g., normal image or deformed image, etc.) on the recognition result can be reduced.
[0018] Note that, although the above-mentioned FIG. 1 is for explaining an embodiment of the present invention, the present invention is not limited thereto. For example, the execution order between each operation (step) can be appropriately adjusted, or some operations can be added or removed. Those skilled in the art can make appropriate modifications based on the above-mentioned contents without being limited to the description of the above-mentioned FIG. 1.
[0019] In some embodiments, the image may be of various types. For example, the image may be a normal image or a deformed image. A normal image is, for example, an image without distortion or an image with a distortion amount smaller than a predetermined value. For example, the ratio of the distance between any two pixel points in the normal image to the distance between the objects corresponding to the two pixel points may be the same, or the difference between the two may be smaller than a predetermined deformation threshold.
[0020] For example, the deformed image is an image with distortion or an image with a distortion amount larger than a predetermined value. Figures 2 and 3 are diagrams showing deformed images in an embodiment of the present invention, each showing a deformed image including an object acquired from a different angle (e.g., front, side, etc.). As shown in Figures 2 and 3, a first ratio between a distance between two pixel points and a distance between an object corresponding to the two pixel points in the deformed image is different from a second ratio between a distance between other two pixel points and a distance between an object corresponding to the other two pixel points, or the difference between the two is larger than a predetermined deformation threshold.
[0021] In some embodiments, the deformed image is, for example, a fisheye image, as shown in Figures 2 and 3. For example, the deformed image is an image of a forklift driver captured using a fisheye camera mounted on a forklift, and the forklift may be, for example, a counter forklift truck or a reach forklift truck. However, the present invention is not limited thereto, and the deformed image may be other images.
[0022] In some embodiments, in step 101, a neural network may directly recognize key points of an object in a normal image or a deformed image to obtain key points of the object. The angle between the recognized first connecting line between the shoulder key points and the second connecting line between the elbow key point and the wrist key point on the same side is used to determine the pointing direction of the object, thereby ensuring the accuracy of the recognition result of the pointing direction of the object even in a deformed image where the shape of the object is distorted (or deformed).
[0023] In some embodiments, in step 101, the neural network can recognize key points of the object in the image in various ways. For example, the neural network can use algorithms such as openpose and DeepCut to recognize the key points. For specific methods of key point recognition, see the related art.
[0024] FIG. 4 is a diagram illustrating key points in an embodiment of the present invention. In some embodiments, as shown in FIG. 4, an object may have one or more key points, each of which corresponds to a part of the object's body. For example, the object's key points may include one or more of the following: neck 0, nose 1, left shoulder 6, right shoulder 7, left hip 12, right hip 13, left eye 2, right eye 3, left elbow 8, right elbow 9, left knee 14, right knee 15, left ear 4, right ear 5, left wrist 10, right wrist 11, left ankle 16, and right ankle 17. However, the present invention is not limited thereto, and the object's key points may include other key points besides the above 18 key points.
[0025] In some embodiments, step 102 may recognize various pointing directions of the object, such as up, down, left, right, front, back, one side of the torso, the other side of the torso, etc. Step 102 will be described below by taking the recognition of the pointing direction of the object on one side of the torso and the other side of the torso as an example. It should be understood that the same is applicable to the recognition of other directions as well.
[0026] 5 is a diagram illustrating the included angles in some embodiments of the present invention. As shown in FIG. 5, the first connecting line C1 is a connecting line between the left shoulder key point 6 and the right shoulder key point 7. The second connecting line may be a connecting line C2_L between the left elbow key point 8 and the left wrist key point 10, and / or a connecting line C2_R between the right elbow key point 9 and the right wrist key point 11.
[0027] In some embodiments, as shown in Fig. 5, the angle between the first connecting line and the second connecting line may be a first angle between the first connecting line C1 and the second connecting line C2_R, and / or a second angle between the first connecting line C1 and the second connecting line C2_L.
[0028] As shown in FIG. 5, taking the example of facing the front of the object, when the right wrist key point 11 is located lower than the right elbow key point 9, the first included angle between the first connecting line C1 and the second connecting line C2_R is the clockwise included angle γ1 between the second connecting line C2_R and the first connecting line C1, that is, the angle when the second connecting line C2_R rotates clockwise around the intersection point A2 between the second connecting line C2_R and the first connecting line C1 to a position where it overlaps (matches) with the first connecting line C1.
[0029] As shown in FIG. 5, taking the example of facing the front of the object, when the left wrist key point 10 is lower than the left elbow key point 8, the second included angle between the first connecting line C1 and the second connecting line C2_L is the counterclockwise included angle γ2 between the second connecting line C2_L and the first connecting line C1, that is, it is the angle when the second connecting line C2_L rotates counterclockwise around the intersection point A1 between the second connecting line C2_L and the first connecting line C1 to a position where it overlaps with the first connecting line C1.
[0030] Fig. 6 is another diagram showing the included angle in the embodiment of the present invention. As shown in Fig. 6, taking the object facing the front as an example, when the right wrist key point 11 is higher than the right elbow key point 9, the first included angle between the first connecting line C1 and the second connecting line C2_R is the counterclockwise included angle γ1 between the second connecting line C2_R and the first connecting line C1, that is, the angle when the second connecting line C2_R rotates counterclockwise around the intersection point A2 between the second connecting line C2_R and the first connecting line C1 to the overlapping position of the first connecting line C1.
[0031] As shown in FIG. 6, taking the example of facing the front of the object, when the left wrist key point 10 is located higher than the left elbow key point 8, the second included angle between the first connecting line C1 and the second connecting line C2_L is the clockwise included angle γ2 between the second connecting line C2_L and the first connecting line C1, that is, it is the angle when the second connecting line C2_L rotates clockwise around the intersection point A1 between the second connecting line C2_L and the first connecting line C1 to a position where it overlaps with the first connecting line C1.
[0032] In Figures 5 and 6, the method of determining the first and second included angles is illustrated by taking the subject's right arm pointing approximately to the right (outer right) or the subject's left arm pointing approximately to the left (outer left). As can be understood, the method of determining the first and second included angles shown in Figures 5 and 6 can be similarly applied to the subject's right arm pointing approximately to the left (inner right) or the subject's left arm pointing approximately to the right (inner left).
[0033] By setting the first and second included angles in the above manner, when the wrist key point is above or below the elbow key point, the same manner can be used to determine the target pointing direction. This simplifies the determination operation (processing). The present invention is not limited to this, and the first and second included angles may be set in other manners.
[0034] In some embodiments, step 102 may determine the object's pointing direction based on the first included angle and a first predetermined threshold, and / or based on the second included angle and a second predetermined threshold. The first predetermined threshold may be the same as the second predetermined threshold, which simplifies the process of determining the object's pointing direction. The present invention is not limited thereto, and the first predetermined threshold and the second predetermined threshold may be different, which allows the first predetermined threshold and the second predetermined threshold to be flexibly set.
[0035] In some embodiments, the first and second predetermined thresholds may be thresholds corresponding to the magnitudes of the first and second included angles, or may be thresholds corresponding to a trigonometric function of the first and second included angles.
[0036] In some embodiments, when determining the pointing direction of the object based on the magnitude of the included angle and the predetermined threshold, the first predetermined threshold may include a first threshold and a second threshold. For example, for a first included angle γ1 between the first connecting line C1 and the second connecting line C2_R, when the first included angle γ1 is smaller than the first threshold, the pointing direction of the object is right outward (pointing from the right side of the body to the almost right side), and when the first included angle γ1 is larger than the second threshold, the pointing direction of the object is right inward (pointing from the right side of the body to the almost left side). Wherein, the first threshold may be equal to the second threshold, or the first threshold may be smaller than the second threshold. For example, the first threshold and the second threshold may both be 90°, or the first threshold may be smaller than 90° and the second threshold may be larger than 90°.
[0037] 7A, 7B and 7C are diagrams showing the pointing directions of an object in an embodiment of the present invention, in which FIGS. 7A, 7B and 7C respectively show the pointing directions of right lateral, right medial and right lateral.
[0038] In the above embodiment, the second threshold value may include a third threshold value and a fourth threshold value. For example, for the second included angle γ2 between the first connecting line C1 and the second connecting line C2_L, when the second included angle γ2 is smaller than the third threshold value, the direction of the object is the left outer side (pointing from the left side of the body to the left side), and when the second included angle γ2 is larger than the fourth threshold value, the direction of the object is the left inner side (pointing from the left side of the body to the right side). Wherein, the third threshold value may be the same as the fourth threshold value, or the third threshold value may be smaller than the fourth threshold value. For example, the third threshold value and the fourth threshold value may both be 90°, or the third threshold value may be smaller than 90°, and the fourth threshold value may be larger than 90°.
[0039] 8A, 8B and 8C are diagrams showing the pointing directions of an object in an embodiment of the present invention, in which Figs. 8A, 8B and 8C show the left lateral, left medial and left lateral pointing directions, respectively.
[0040] In some embodiments, the first threshold and / or the third threshold and / or the second threshold and / or the fourth threshold may be adjusted based on a requirement for accuracy of the recognition result, for example, when a high requirement for accuracy is required, the first threshold and / or the third threshold may be set to a smaller value and the second threshold and / or the fourth threshold may be set to a larger value.
[0041] In some embodiments, the first threshold may be the same as or different from the third threshold, and the second threshold may be the same as or different from the fourth threshold.
[0042] In some embodiments, when determining the pointing direction of the object based on the trigonometric function value of the included angle and the predetermined threshold, the trigonometric function value of the included angle may be various trigonometric function values. Taking the cosine function as an example, the first predetermined threshold may include a fifth threshold and a sixth threshold. For example, when the cosine function value of the first included angle γ1 is greater than the fifth threshold, the pointing direction of the object is right outward (pointing from the right side of the body to the almost right side), and when the cosine function value of the first included angle γ1 is less than the sixth threshold, the pointing direction of the object is right inward (pointing from the right side of the body to the almost left side). Wherein, the fifth threshold may be equal to the sixth threshold, or the fifth threshold may be greater than the sixth threshold. For example, the fifth threshold and the sixth threshold may both be 0, or the fifth threshold may be a positive value and the sixth threshold may be a negative value.
[0043] In the above embodiment, the second predetermined threshold may include a seventh threshold and an eighth threshold. For example, when the cosine function value of the second included angle γ2 is greater than the seventh threshold, the object's pointing direction is left outward (pointing from the left side of the body to the left side), and when the second included angle γ2 is less than the eighth threshold, the object's pointing direction is left inward (pointing from the left side of the body to the right side). Wherein, the seventh threshold may be the same as the eighth threshold, or the seventh threshold may be greater than the eighth threshold. For example, the seventh threshold and the eighth threshold may both be 0, or the seventh threshold may be a positive value and the eighth threshold may be a negative value.
[0044] In some embodiments, the fifth threshold and / or the sixth threshold and / or the seventh threshold and / or the eighth threshold may be adjusted based on the requirement for accuracy of the recognition result, for example, the fifth threshold and / or the seventh threshold may be set to a higher value and the sixth threshold and / or the eighth threshold may be set to a lower value when the requirement for accuracy is high.
[0045] In some embodiments, the fifth threshold may be the same as or different from the seventh threshold, and the fourth threshold may be the same as or different from the sixth threshold.
[0046] In some embodiments, the first and / or second predetermined thresholds may be determined based on a relative positional relationship between an image capture device that captures the image and the left and right shoulders of the subject, where the relative positional relationship may include, for example, a distance between the image capture device and the left and right shoulders of the subject, and a vertical position of the image capture device relative to the left and right shoulders of the subject. The first and / or second predetermined thresholds may be correspondingly adjusted based on the relative positional relationship between the image capture device that captures the image and the left and right shoulders of the subject, thereby further improving the accuracy of the subject's pointing direction.
[0047] For example, the image capture device may be located in the following position, that is, the distance between the image capture device and the left shoulder of the object is equal to the distance between the image capture device and the right shoulder of the object, and the image capture device is aligned (i.e., at the same height) with the left and right shoulders of the object in the vertical direction. In this case, the image capture device can obtain a first image of the front of the object. By performing keypoint recognition for the object in the first image, the left shoulder keypoint, the right shoulder keypoint, the elbow keypoint, and the wrist keypoint of the object can be obtained. Furthermore, the direction of the object's pointing can be determined based on the included angle (first included angle and second included angle) between the first connecting line between the left shoulder keypoint and the right shoulder keypoint and the second connecting line between the elbow keypoint and the wrist keypoint, and the predetermined threshold (first predetermined threshold and second predetermined threshold). The first included angle and the second included angle corresponding to the first image are referred to as the first reference angle and the second reference angle, and the first predetermined threshold and the second predetermined threshold are referred to as the first reference value and the second reference value.
[0048] Assuming that the subject's posture does not change, the image capture device is adjusted to a position where the distance between the image capture device and the subject's left shoulder is not equal to the distance between the image capture device and the subject's right shoulder, and the image capture device is not vertically aligned with the left and right shoulders of the subject (i.e., different heights). In such a case, the image capture device can obtain a second image of the side of the subject. The first and second included angles corresponding to the second image may be different values from the first and second reference angles, so that the first and second predetermined thresholds corresponding to the second image may be set to different values from the first and second reference values.
[0049] 5 is lower than the elbow key point, when the image capture device is located above the left and right shoulders of the subject, the first included angle between the second connecting line C2_R between the right elbow key point 9 and the right wrist key point 11 and the first connecting line C1 becomes smaller than the first reference angle when the distance between the image capture device and the right shoulder key point 7 is smaller than the distance between the image capture device and the left shoulder key point 6, and the second included angle between the second connecting line C2_L between the left elbow key point 8 and the left wrist key point 10 and the first connecting line C1 becomes larger than the second reference angle. Thus, when the first and second predetermined thresholds are thresholds of the magnitude of the included angle (for example, the first predetermined threshold is the above-mentioned first and second thresholds, and the second predetermined threshold is the above-mentioned third and fourth thresholds), the first predetermined threshold may be set to a value smaller than the first reference value, and the second predetermined threshold may be set to a value larger than the second reference value.
[0050] Similarly, when the distance between the image capture device and the right shoulder keypoint 7 is greater than the distance between the image capture device and the left shoulder keypoint 6, the first predetermined threshold may be set to a value greater than a first reference value, and the second predetermined threshold may be set to a value less than a second reference value.
[0051] 5, the wrist key point is lower than the elbow key point, and when the image capture device is located below the left and right shoulders of the subject, the first included angle between the second connecting line C2_R between the right elbow key point 9 and the right wrist key point 11 and the first connecting line C1 becomes larger than the first reference angle when the distance between the image capture device and the right shoulder key point 7 is smaller than the distance between the image capture device and the left shoulder key point 6. The second included angle between the second connecting line C2_L between the left elbow key point 8 and the left wrist key point 10 and the first connecting line C1 becomes smaller than the second reference angle. Thus, when the first and second predetermined thresholds are thresholds of the magnitude of the included angle (for example, the first predetermined threshold is the above-mentioned first and second thresholds, and the second predetermined threshold is the above-mentioned third and fourth thresholds), the first predetermined threshold may be set to a value larger than the first reference value, and the second predetermined threshold may be set to a value smaller than the second reference value.
[0052] Similarly, when the distance between the image capture device and the right shoulder keypoint 7 is greater than the distance between the image capture device and the left shoulder keypoint 6, the first predetermined threshold may be set to a value smaller than a first reference value, and the second predetermined threshold may be set to a value larger than a second reference value.
[0053] The present invention is not limited thereto, and the first and second predetermined thresholds may be adjusted in other ways.
[0054] In some embodiments, in step 102, besides determining the target pointing direction based on the angle between the first connecting line and the second connecting line, the target pointing direction may also be determined based on the angle between the first connecting line, the second connecting line, and a third connecting line between the shoulder key point and the elbow key point, where the shoulder key point, the elbow key point, and the wrist key point are on the same side. By also taking the third connecting line into account in the process of determining the target pointing direction, the accuracy of the target pointing direction can be further improved.
[0055] In some embodiments, the included angle between the first connecting line, the second connecting line, and the third connecting line may include at least one of the following included angles: an included angle between the first connecting line and the second connecting line, an included angle between the first connecting line and the third connecting line, and an included angle between the second connecting line and the third connecting line.
[0056] The determination method will be illustrated by taking as an example the determination of the pointing direction of the object based on the included angle between the first connecting line and the second connecting line and the included angle between the first connecting line and the third connecting line.
[0057] In some embodiments, the definition of the included angle between the first connecting line and the third connecting line may be similar to the definition of the included angle between the first connecting line and the second connecting line.
[0058] 9 is another diagram showing the included angles in an embodiment of the present invention. As shown in FIG. 9, taking the front of the object as an example, when the right elbow key point 9 is lower than the right shoulder key point 7, the third included angle between the first connecting line C1 and the third connecting line C3_R is the clockwise included angle γ3 between the third connecting line C3_R and the first connecting line C1, and when the left elbow key point 8 is lower than the left shoulder key point 6, the fourth included angle between the first connecting line C1 and the third connecting line C3_L is the counterclockwise included angle γ4 between the third connecting line C3_L and the first connecting line C1.
[0059] Figure 10 is another diagram showing the included angles in an embodiment of the present invention. As shown in Figure 10, taking the front of the object as an example, when the right elbow key point 9 is higher than the right shoulder key point 7, the third included angle between the first connecting line C1 and the third connecting line C3_R is the counterclockwise included angle γ3 between the third connecting line C3_R and the first connecting line C1, and when the left elbow key point 8 is higher than the left shoulder key point 6, the fourth included angle between the first connecting line C1 and the third connecting line C3_L is the clockwise included angle γ4 between the third connecting line C3_L and the first connecting line C1.
[0060] 9 and 10, the method of determining the third and fourth included angles is illustrated by taking the subject's right arm pointing almost to the right (outer right) or the left arm pointing almost to the left (outer left) as an example. As can be understood, the method of determining the third and fourth included angles shown in Fig. 9 and 10 can also be applied to the subject's right arm pointing almost to the left (inner right) or the left arm pointing almost to the right (inner left).
[0061] In some embodiments, the target pointing direction can be determined based on the third included angle and the third predetermined threshold, and / or the fourth included angle and the fourth predetermined threshold. When the target pointing direction is determined based on the magnitude of the included angle and the predetermined threshold, the third predetermined threshold can include a ninth threshold and a tenth threshold. For example, for the first included angle γ1 between the first connecting line C1 and the second connecting line C2_R and the third included angle γ3 between the first connecting line C1 and the third connecting line C3_R, when the first included angle γ1 is smaller than the first threshold and the third included angle γ3 is smaller than the ninth threshold, the target pointing direction is right outward (pointing from the right side of the body to the almost right side), and when the first included angle γ1 is larger than the second threshold and the third included angle γ3 is larger than the tenth threshold, the target pointing direction is right inward (pointing from the right side of the body to the almost left side). Wherein, the ninth threshold can be the same as or different from the tenth threshold.
[0062] In the above embodiment, the fourth predetermined threshold may include an eleventh threshold and a twelfth threshold. For example, for the second included angle γ2 between the first connecting line C1 and the second connecting line C2_L and the fourth included angle γ4 between the first connecting line C1 and the third connecting line C3_L, when the second included angle γ2 is smaller than the third threshold and the fourth included angle γ4 is smaller than the eleventh threshold, the direction of the object is the left outside (pointing from the left side of the body to the left side), and when the second included angle γ2 is larger than the fourth threshold and the fourth included angle γ4 is larger than the twelfth threshold, the direction of the object is the left inside (pointing from the left side of the body to the right side). Wherein, the eleventh threshold may be the same as or different from the twelfth threshold.
[0063] In some embodiments, in step 102, the pointing direction of the object can be determined if a predetermined condition is satisfied. The predetermined condition may include the following: the number of key points of the object obtained in step 101 is greater than a predetermined value, and the obtained key points of the object include two shoulder key points and at least one arm key point. The number of key points of the object obtained is greater than the predetermined value, which means that a relatively large number of key points are obtained, and therefore the reliability of the obtained key points is relatively high. Therefore, when the pointing direction of the object is determined based on these key points, the accuracy of the recognition result can be ensured.
[0064] In some embodiments, the predetermined value may be an integer greater than or equal to 4 and less than or equal to the maximum number of target keypoints (e.g., 18). For example, when the number of keypoints is 18, the predetermined value may be 10. The present invention is not limited thereto, and the predetermined condition may not be limited on the number of obtained keypoints.
[0065] In some embodiments, when the image is a deformed image, the distortion of the deformed image can be corrected, for example, so that the ratio of the distance between any two pixel points in the deformed image to the distance between the objects corresponding to the two pixel points is the same, or the difference between the two is smaller than a predetermined deformation threshold, thereby further improving the accuracy of the recognition result of the pointing direction of the object in the deformed image.
[0066] As shown in FIG. 1, the method may further include the following steps.
[0067] Step 103: The transformed image is rectified to generate a rectified image.
[0068] In step 101, keypoints of an object in the retrieval image can be obtained by performing keypoint recognition on the object.
[0069] In some embodiments, in step 103, the distortion of the deformed image can be corrected in various ways. For example, the deformed image can be corrected in a latitude-longitude mapping manner, a bilinear interpolation manner, etc. For specific methods of correcting the deformed image, reference can be made to the related art.
[0070] The above describes only the steps or processes according to the present invention, but the present invention is not limited thereto. The action recognition method may further include other steps or processes, and the specific contents of these steps or processes can be referred to the prior art. In addition, the above describes the embodiments of the present invention by taking several configurations of the action recognition model as examples, but the present invention is not limited to these configurations, and these configurations may be modified appropriately, and all of the implementation methods of these modifications fall within the scope of the embodiments of the present invention.
[0071] In addition, although the above-mentioned embodiments are illustrative of the embodiments of the present invention, the present invention is not limited to these, and furthermore, appropriate modifications can be made based on the above-mentioned embodiments. For example, the above-mentioned embodiments may be used alone, or a combination of two or more of the above-mentioned embodiments may be used.
[0072] As can be seen from the above embodiments, the pointing direction of the target can be determined using the included angle between the first connecting line of the target's two shoulder key points and the second connecting line between the elbow key point and the wrist key point located on the same side, thereby improving the accuracy of the action recognition result.
[0073] For example, an object shows different directions according to different positions of its arm (particularly, its forearm) relative to its torso (particularly, its shoulder), and among the multiple key points of the object, two shoulder key points can represent (or partially represent) the position of the torso, and an elbow key point and a wrist key point located on the same side can represent the position of the forearm on this side, so that the pointing direction of the object can be reasonably and accurately determined based on these key points. By determining the pointing direction of the object based on two shoulder key points, and an elbow key point and a wrist key point on the same side among the multiple key points, the pointing direction of the object can be determined in a simple manner. Therefore, the amount of calculation can be reduced and the calculation efficiency can be improved. In addition, by determining the pointing direction of the object based on the included angle between the first connecting line and the second connecting line of the two shoulder key points, the influence of the image acquisition angle and / or the posture of the object and / or whether distortion (or deformation) occurs in the image on the recognition result can be reduced.
[0074] <Example of the second aspect> The present invention provides a motion recognition device, and description of the same contents as those in the embodiment of the first aspect will be omitted here.
[0075] 11 is a diagram showing an action recognition device according to an embodiment of the present invention. As shown in FIG. 11, the action recognition device 1100 includes:
[0076] Acquisition unit 1101: performing keypoint recognition for an object in an image by a neural network, and acquiring keypoints of the object; and A determining unit 1102: among the obtained keypoints, determine the pointing direction of the object according to the included angle between a first connecting line between the left shoulder keypoint and the right shoulder keypoint and a second connecting line between the elbow keypoint and the wrist keypoint, where the elbow keypoint and the wrist keypoint are on the same side.
[0077] In some embodiments, the included angle is: a first angle in a clockwise direction between the second connecting line and the first connecting line between the right elbow key point and the right wrist key point when the subject is facing the front and the right wrist key point is lower than the right elbow key point; and / or a second angle in a counterclockwise direction between the second connecting line between the left elbow key point and the left wrist key point and the first connecting line when the subject is facing forward and the left wrist key point is lower than the left elbow key point; and / or a first angle in a counterclockwise direction between the second connecting line between the right elbow key point and the right wrist key point and the first connecting line when the subject is facing the front and the right wrist key point is located higher than the right elbow key point; and / or When the subject faces the front and the left wrist key point is located higher than the left elbow key point, a second angle is included in the clockwise direction between the second connecting line between the left elbow key point and the left wrist key point and the first connecting line.
[0078] In some embodiments, the determination unit determines a pointing direction of the object based on the first included angle and a first predetermined threshold, and / or based on the second included angle and a second predetermined threshold.
[0079] In some embodiments, the first predetermined threshold and / or the second predetermined threshold are established based on a relative position between an image capture device acquiring the images and the subject's left and right shoulders.
[0080] In some embodiments, the relative positional relationship includes a distance between the image capture device and the right and left shoulders, and a vertical position of the image capture device relative to the right and left shoulders.
[0081] In some embodiments, the determination unit determines the pointing direction of the object according to an included angle between the first connecting line, the second connecting line, and a third connecting line between the shoulder key point and the elbow key point, where the shoulder key point, the elbow key point and the wrist key point are located on the same side.
[0082] In some embodiments, the determination unit determines the pointing direction of the object when a predetermined condition is satisfied, in which the predetermined condition includes: a number of obtained key points of the object is greater than a predetermined value, and the key points of the object include two shoulder key points and at least one arm key point.
[0083] In some embodiments, the image is a deformed image and the apparatus further comprises:
[0084] A rectification unit 1103: rectifies the distortion of the deformed image to generate a rectified image.
[0085] The acquisition unit 1101 performs keypoint recognition on an object in the modified image to acquire keypoints of the object.
[0086] Although only the components or modules according to the present invention have been described above, the present invention is not limited thereto. The action recognition device 1100 may further include other components or modules, and the specific contents of these components or modules can be found in the related art.
[0087] 11 shows only the connection relationships or signal directions between each component or module, but various related technologies such as bus connection may be adopted as understood by those skilled in the art. Each of the above-mentioned components or modules may be realized by hardware such as a processor, a memory, etc., and the embodiment of the present invention is not limited thereto.
[0088] The above-mentioned embodiments are provided to exemplify the embodiments of the present invention, but the present invention is not limited to these, and appropriate modifications may be made based on the above-mentioned embodiments. For example, each of the above-mentioned embodiments may be used alone, or a combination of two or more of the above-mentioned embodiments may be used.
[0089] As can be seen from the above embodiments, the pointing direction of the target can be determined using the included angle between the first connecting line of the target's two shoulder key points and the second connecting line between the elbow key point and the wrist key point located on the same side, thereby improving the accuracy of the action recognition result.
[0090] For example, an object shows different directions according to different positions of its arm (particularly, its forearm) relative to its torso (particularly, its shoulder), and among the multiple key points of the object, two shoulder key points can represent (or partially represent) the position of the torso, and an elbow key point and a wrist key point located on the same side can represent the position of the forearm on this side, so that the pointing direction of the object can be reasonably and accurately determined based on these key points. By determining the pointing direction of the object based on two shoulder key points, and an elbow key point and a wrist key point on the same side among the multiple key points, the pointing direction of the object can be determined in a simple manner, so that the amount of calculation can be reduced and the calculation efficiency can be improved. In addition, by determining the pointing direction of the object based on the included angle between the first connecting line and the second connecting line of the two shoulder key points, the influence of the image acquisition angle and / or the posture of the object and / or whether distortion (or deformation) occurs in the image on the recognition result can be reduced.
[0091] <Example of the third aspect> The present invention provides an electronic device, which includes the motion recognition device 1100 according to the embodiment of the second aspect, the contents of which are incorporated herein. The electronic device may be, for example, a computer, a server, a workstation, a notebook computer, a smartphone, etc., but the embodiments of the present invention are not limited thereto.
[0092] Fig. 12 is a diagram showing an electronic device according to an embodiment of the present invention. As shown in Fig. 12, the electronic device 1200 may include a processor (e.g., a central processing unit CPU) 1210 and a memory 1220, and the memory 1220 is connected to the central processing unit 1210. The memory 1220 can store various data, and can further store a program for information processing, and can execute the program under the control of the processor 1210.
[0093] In some embodiments, the functionality of the action recognition device 1200 is implemented by integrating it into a processor 1210. In that case, the processor 1210 is configured to execute the action recognition method described in the embodiments of the first aspect.
[0094] In some embodiments, the action recognition device 1200 may be configured separately from the processor 1210, for example, the action recognition device 1200 may be provided as a chip connected to the processor 1210, and configured to realize the functions of the action recognition device 1200 under the control of the processor 1210.
[0095] For example, the processor 1210 is configured to perform the following control: recognize key points of an object in an image using a neural network, obtain key points of the object; and determine the pointing direction of the object based on the angle between a first connecting line between the left shoulder key point and the right shoulder key point and a second connecting line between the elbow key point and the wrist key point among the obtained key points, where the elbow key point and the wrist key point are on the same side.
[0096] 12, the electronic device 1200 may further include an input / output (I / O) device 1230, a display 1240, etc., among which the functions of these components are the same as those of the prior art, and detailed description thereof will be omitted here. Note that the electronic device 1200 does not need to include all the components shown in FIG. 12. The electronic device 1200 may further include components not shown in FIG. 12, and for this, reference may be made to the related art.
[0097] An embodiment of the present invention further provides a computer-readable program, which, when executed on an electronic device, causes a computer to execute the action recognition method described in the embodiment of the first aspect on the electronic device.
[0098] An embodiment of the present invention further provides a storage medium storing a computer readable program, wherein the computer readable program causes a computer to execute the gesture recognition method according to the embodiment of the first aspect in an electronic device.
[0099] The above-mentioned devices and methods may be realized by software or hardware, or may be realized by a combination of hardware and software. The present invention further relates to a computer readable program, which, when executed by a logic component, causes the logic component to realize the above-mentioned devices or components, or causes the logic component to realize the various methods or steps described above. The logic component may be, for example, a Field Programmable Gate Array (FPGA), a microprocessor, a processor for use in a computer, etc. The present invention also relates to a storage medium, such as a hard disk, a magnetic disk, an optical hard disk, a DVD, a flash memory, etc., storing the above-mentioned program.
[0100] Additionally, one or more combinations of the functional blocks depicted in the figures and / or one or more combinations of the functional blocks may be implemented as a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic component, a discrete gate or transistor logic component, a discrete hardware assembly, or any other suitable combination for performing the functions described herein. Also, one or more combinations of the functional blocks depicted in the figures and / or one or more combinations of the functional blocks may be further configured as a combination of computing devices, such as a combination of a DSP and a microprocessor, a combination of multiple microprocessors, one or more microprocessors in communication with a DSP, or any other configuration.
[0101] Furthermore, with respect to the above-mentioned embodiments, the following supplementary notes are disclosed.
[0102] (Appendix 1) A motion recognition method, comprising: Performing keypoint recognition on an object in an image using a neural network to obtain keypoints of the object; and determining a pointing direction of the object based on an included angle between a first connecting line between a left shoulder keypoint and a right shoulder keypoint and a second connecting line between an elbow keypoint and a wrist keypoint among the acquired keypoints; Wherein, the elbow key point and the wrist key point are located on the same side.
[0103] (Appendix 2) 2. The method according to claim 1, comprising: The included angle is: When facing the front of the object, a first angle in a clockwise direction between the second connecting line and the first connecting line between the right elbow key point and the right wrist key point; and / or a second included angle in a counterclockwise direction between the second connection line and the first connection line between a left elbow key point and a left wrist key point.
[0104] (Appendix 3) 3. The method according to claim 2, comprising: determining a pointing direction of the object based on an included angle between a first connecting line between a left shoulder key point and a right shoulder key point and a second connecting line between an elbow key point and a wrist key point among the acquired key points; determining a pointing direction of the object based on the first included angle and a first predetermined threshold and / or based on the second included angle and a second predetermined threshold.
[0105] (Appendix 4) 4. The method according to claim 3, comprising: A method, wherein the first and / or second predetermined thresholds are established based on a relative position between an image capture device acquiring the images and the subject's left and right shoulders.
[0106] (Appendix 5) 5. The method according to claim 4, The relative positional relationship is including a distance between the image capture device and the right and left shoulders, and a vertical position of the image capture device relative to the right and left shoulders.
[0107] (Appendix 6) 2. The method according to claim 1, comprising: determining a pointing direction of the object based on an included angle between a first connecting line between a left shoulder key point and a right shoulder key point and a second connecting line between an elbow key point and a wrist key point among the acquired key points; determining a pointing direction of the object according to an included angle between the first connecting line, the second connecting line, and a third connecting line between the shoulder key point and the elbow key point; Wherein, the shoulder key point, the elbow key point and the wrist key point are located on the same side.
[0108] (Appendix 7) 2. The method according to claim 1, comprising: determining a direction in which the object is pointing if a predetermined condition is satisfied; wherein the predetermined condition includes that the number of acquired key points of the object is greater than a third threshold, and the key points of the object include two shoulder key points and at least one arm key point.
[0109] (Appendix 8) 2. The method according to claim 1, comprising: the image is a distorted image, The method further includes rectifying the distortion of the distorted image to generate a rectified image.
[0110] (Appendix 9) A storage medium having a computer-readable program stored thereon, A storage medium comprising a computer-readable program that causes a computer to execute the action recognition method according to any one of appendixes 1 to 8 in an electronic device.
[0111] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to such embodiments, and any modifications to the present invention fall within the technical scope of the present invention as long as they do not depart from the spirit of the present invention.
Claims
1. A device for recognizing a motion, comprising: an acquisition unit for performing keypoint recognition for an object in an image by a neural network and acquiring keypoints of the object; and a determination unit for determining a pointing direction of the object based on an included angle between a first connecting line between a left shoulder keypoint and a right shoulder keypoint and a second connecting line between an elbow keypoint and a wrist keypoint among the acquired keypoints, where the elbow keypoint and the wrist keypoint are located on the same side.
2. 2. The apparatus of claim 1, The included angle is: a first angle in a clockwise direction between the second connecting line between the right elbow key point and the right wrist key point and the first connecting line when the subject is facing the front and the right wrist key point is lower than the right elbow key point; and / or a second angle in a counterclockwise direction between the second connecting line between the left elbow key point and the left wrist key point and the first connecting line when the subject is facing forward and the left wrist key point is lower than the left elbow key point; and / or a first angle in a counterclockwise direction between the second connecting line between the right elbow key point and the right wrist key point and the first connecting line when the subject is facing the front and the right wrist key point is located higher than the right elbow key point; and / or and a second included angle in a clockwise direction between the second connection line between the left elbow key point and the left wrist key point and the first connection line when the subject is facing forward and the left wrist key point is at a higher position than the left elbow key point.
3. 3. The apparatus of claim 2, The determining unit determines a pointing direction of the object based on the first included angle and a first predetermined threshold, and / or based on the second included angle and a second predetermined threshold.
4. 4. The apparatus of claim 3, The apparatus, wherein the first predetermined threshold and / or the second predetermined threshold are established based on a relative positional relationship between an image capture device that acquires the image and the subject's left and right shoulders.
5. 5. The apparatus of claim 4, The relative positional relationship includes a distance between the image capture device and the right and left shoulders, and a vertical position of the image capture device relative to the right and left shoulders.
6. 2. The apparatus of claim 1, The determining unit determines a pointing direction of the object according to an included angle between the first connecting line, the second connecting line, and a third connecting line between the shoulder key point and the elbow key point; The shoulder key point, the elbow key point and the wrist key point are on the same side Located, device.
7. 2. The apparatus of claim 1, When a predetermined condition is satisfied, the determination unit determines the direction in which the object is pointed; The apparatus, wherein the predetermined condition includes that a number of acquired key points of the object is greater than a predetermined value, and that the key points of the object include two shoulder key points and at least one arm key point.
8. 2. The apparatus of claim 1, the image is a distorted image, The apparatus further includes a correction unit for correcting distortion of the deformed image to generate a corrected image; The acquisition unit performs keypoint recognition on an object in the retrieval image to acquire keypoints of the object.
9. A method for recognizing an action, comprising: Performing keypoint recognition on an object in an image using a neural network to obtain keypoints of the object; and determining a pointing direction of the object based on an included angle between a first connecting line between a left shoulder keypoint and a right shoulder keypoint and a second connecting line between an elbow keypoint and a wrist keypoint among the acquired keypoints; The elbow keypoint and the wrist keypoint are on the same side.
10. An electronic device including a storage device and a processor connected to the storage device, The storage device stores a computer program, 10. An electronic device, wherein the processor is configured to execute the computer program to implement the method of claim 9.
