Motion recognition device and method and electronic equipment
The key points in the image are identified through the neural network, and the angle between the key points of the shoulder and the elbow and wrist is used to determine the pointing direction of the object, which solves the problem of low pointing direction recognition accuracy in the existing technology and improves the accuracy of action recognition. accuracy and computational efficiency.
Patent Information
- Application Number
- CN202310331449.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
Existing methods for determining the pointing direction of objects in images have low accuracy and are prone to misjudgments.
The neural network is used to identify the key points of the object in the image, and the object is determined by using the angle between the first connection line between the left shoulder key point and the right shoulder key point and the second connection line between the elbow key point and the wrist key point. In the pointing direction, the key points of the elbow and the key points of the wrist are on the same side.
It improves the accuracy of action recognition results, reduces the impact of image acquisition angle and object posture on recognition results, and simplifies the calculation of pointing direction.
Smart Images

Figure CN118736660A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing technology. Background Art
[0002] With the continuous development of computer technology, key point-based action recognition has been widely used in the fields of intelligent monitoring, motion analysis, human-computer interaction, etc. For example, for an image of a vehicle driver acquired by an image acquisition device, the driver's pointing direction can be determined based on the driver's body key points in the image, so that the driver's driving plan or whether the driver's action complies with the action specification can be confirmed based on the pointing direction, which is helpful for safe production and operation and maintenance.
[0003] It should be noted that the above introduction to the technical background is only for the convenience of providing a clear and complete description of the technical solutions of the present application and for the convenience of understanding by those skilled in the art. It cannot be considered that the above technical solutions are well known to those skilled in the art simply because these solutions are described in the background technology part of the present application. Summary of the invention
[0004] However, the inventors have found that the current method for determining the pointing direction of an object in an image has certain limitations, for example, the recognition result of the pointing direction is low in accuracy and prone to misjudgment.
[0005] In response to at least one of the above technical problems, the embodiments of the present application provide a motion recognition device and method and an electronic device, in the hope of improving the accuracy of motion recognition results.
[0006] According to one aspect of an embodiment of the present application, there is provided a motion recognition device, including:
[0007] an acquisition unit, which recognizes key points of an object in an image through a neural network to acquire key points of the object; and
[0008] A determination unit determines the pointing direction of the object according to an angle between a first connecting line of a left shoulder key point and a right shoulder key point among the acquired key points and a second connecting line of an elbow key point and a wrist key point, wherein the elbow key point and the wrist key point are located on the same side.
[0009] According to another aspect of an embodiment of the present application, there is provided a method for action recognition, comprising:
[0010] Recognize key points of the object in the image by using a neural network to obtain the key points of the object; and
[0011] The pointing direction of the object is determined according to the angle between a first connecting line of the left shoulder key point and the right shoulder key point among the acquired key points and a second connecting line of the elbow key point and the wrist key point, wherein the elbow key point and the wrist key point are located on the same side.
[0012] According to another aspect of an embodiment of the present application, there is provided an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the action recognition method as described above.
[0013] One of the beneficial effects of the embodiments of the present application is that the pointing direction of the object is determined by utilizing the angle between a first line connecting the two shoulder key points of the object and a second line connecting the elbow key point and the wrist key point, thereby improving the accuracy of the action recognition results.
[0014] With reference to the following description and accompanying drawings, the specific implementation of the embodiment of the present application is disclosed in detail, indicating the way in which the principle of the embodiment of the present application can be adopted. It should be understood that the implementation of the present application is not limited in scope. Within the scope of the spirit and clauses of the attached claims, the implementation of the present application includes many changes, modifications and equivalents. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The included drawings are used to provide a further understanding of the embodiments of the present application, which constitute a part of the specification, are used to illustrate the implementation methods of the present application, and together with the text description, explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other implementation methods can be obtained based on these drawings without creative work. In the drawings:
[0016] Figure 1 is a schematic diagram of the action recognition method according to an embodiment of the present application;
[0017] Figure 2 is a schematic diagram of a deformed image according to an embodiment of the present application;
[0018] Figure 3 is another schematic diagram of a deformed image according to an embodiment of the present application;
[0019] Figure 4 It is a schematic diagram of the key points of the embodiment of the present application;
[0020] Figure 5 is a schematic diagram of the angle of an embodiment of the present application;
[0021] Figure 6 is another schematic diagram of the angle of an embodiment of the present application;
[0022] Figure 7(a) to Figure 8(c) is a schematic diagram of the pointing direction of an embodiment of the present application;
[0023] Fig. 9 is another schematic diagram of the angle of an embodiment of the present application;
[0024] Fig.10 is another schematic diagram of the angle of an embodiment of the present application;
[0025] Fig.11 is a schematic diagram of a motion recognition device according to an embodiment of the present application;
[0026] Fig.12 It is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] With reference to the accompanying drawings, the foregoing and other features of the embodiments of the present application will become apparent through the following description. In the description and the accompanying drawings, specific embodiments of the present application are specifically disclosed, which show some embodiments in which the principles of the embodiments of the present application can be adopted. It should be understood that the present application is not limited to the described embodiments. On the contrary, the embodiments of the present application include all modifications, variations and equivalents that fall within the scope of the attached claims.
[0028] In the embodiments of the present application, the terms "first", "second", etc. are used to distinguish different elements in terms of title, but do not indicate the spatial arrangement or temporal order of these elements, etc., and these elements should not be limited by these terms. The term "and / or" includes any one and all combinations of one or more of the associated listed terms. The terms "comprising", "including", "having", etc. refer to the presence of the stated features, elements, components or components, but do not exclude the presence or addition of one or more other features, elements, components or components.
[0029] In the embodiments of the present application, the singular forms "a", "the", etc. include plural forms and should be broadly understood as "a kind" or "a type" rather than being limited to the meaning of "one"; in addition, the term "said" should be understood to include both singular and plural forms, unless the context clearly indicates otherwise. In addition, the term "according to" should be understood as "at least in part according to...", and the term "based on" should be understood as "at least in part based on...", unless the context clearly indicates otherwise.
[0030] Features described and / or shown for one embodiment may be used in one or more other embodiments in the same or similar manner, combined with features in other embodiments, or replace features in other embodiments. The term "includes / comprising" when used herein refers to the presence of a feature, an entirety, a step, or a component, but does not exclude the presence or addition of one or more other features, entireties, steps, or components.
[0031] In the embodiment of the present application, the object of motion recognition can be a human body of various ages, for example, it can be an elderly person, it can be a child, it can be an elderly person and / or a caregiver, a child and / or a guardian. The present application is not limited to this, and the object of the detection target can be a human body or other animal body with life characteristics, or a machine without life characteristics, etc.
[0032] Embodiments of the first aspect
[0033] The present application provides an action recognition method. Figure 1 is a schematic diagram of the action recognition method of the embodiment of the present application. Figure 1 As shown, the method includes:
[0034] Step 101, identifying key points of an object in an image through a neural network to obtain key points of the object;
[0035] Step 102, determining the pointing direction of the object according to the angle between a first line connecting the left shoulder key point and the right shoulder key point among the acquired key points and a second line connecting the elbow key point and the wrist key point, wherein the elbow key point and the wrist key point are located on the same side.
[0036] According to the above embodiment, the pointing direction of the object is determined by using the angle between a first line connecting two shoulder key points of the object and a second line connecting the elbow key point and the wrist key point on the same side, thereby improving the accuracy of the action recognition result.
[0037] For example, an object points to different directions through different positions of the arm (especially the forearm) relative to the trunk (especially the shoulder). Among the multiple key points of the object, two shoulder key points can represent (or partially represent) the position of the trunk, and the elbow key point and wrist key point located on the same side can represent the position of the forearm on that side. Therefore, the pointing direction of the object can be reasonably and accurately determined according to these key points. Among the multiple key points, the pointing direction of the object is determined according to the two shoulder key points and the elbow key point and wrist key point on the same side, which can determine the pointing direction in a simple manner, reduce the amount of calculation, and improve the calculation efficiency. In addition, the direction of the object is determined by the angle between the first connecting line and the second connecting line of the two shoulder key points, which can reduce the influence of the image acquisition angle (for example, front or side, etc.) and / or the posture of the object (for example, standing or sitting, etc.) and / or whether the image is distorted (for example, a normal image or a deformed image, etc.) on the recognition result.
[0038] It is worth noting that the above Figure 1The embodiments of the present application are only schematically described, but the present application is not limited thereto. For example, the execution order of the various operations can be appropriately adjusted, and other operations can be added or some operations can be reduced. Those skilled in the art can make appropriate modifications based on the above content, and are not limited to the above appended Figure 1 Records of.
[0039] In some embodiments, the image may be an image in various forms. For example, the image may be an ordinary image or a deformed image. An ordinary image is, for example, an image without distortion or an image with a distortion amount less than a specified value. For example, the ratio of the distance between any two pixels in the ordinary image and the distance between the objects corresponding to the two pixels may be the same or the difference may be less than a preset deformation threshold.
[0040] The deformed image is, for example, a distorted image or an image whose distortion amount is greater than a predetermined value. Figure 2 and Figure 3 is a schematic diagram of a deformed image of an embodiment of the present application, showing deformed images containing an object acquired from different angles (eg, front and side). Figure 2 and Figure 3 As shown, a first ratio of the distance between two pixels in the deformed image and the distance between the objects corresponding to the two pixels is different from a second ratio of the distance between another two pixels and the distance between the objects corresponding to the other two pixels, or the difference is greater than a preset deformation threshold.
[0041] In some embodiments, Figure 2 and Figure 3 As shown, the deformed image is, for example, a fisheye image. For example, the deformed image is an image of a forklift driver acquired by a fisheye camera mounted in a forklift, and the forklift is, for example, various types of forklifts, such as a counter fork truck or a reach fork truck, etc. The present application is not limited thereto, and the deformed image may also be other images.
[0042] In some embodiments, in step 101, the key points of the object in the normal image or the deformed image can be directly identified by a neural network to obtain the key points of the object. The pointing direction of the object is determined by using the angle between the first connecting line between the identified shoulder key points and the second connecting line between the elbow key point and the wrist key point on the same side, and the accuracy of the pointing direction identification result can be guaranteed even in a deformed image with a distorted (or deformed) shape of the object.
[0043] In some embodiments, in step 101, key points of objects in the image may be identified by a neural network in various ways. For example, key points may be identified by a neural network using algorithms such as openpose and DeepCut. For specific methods of key point identification, reference may be made to related technologies.
[0044] Figure 4 Schematic diagram of the key points of the embodiment of the present application. In some embodiments, Figure 4 As shown, an object may have one or more key points, each of which corresponds to a body part of the object. For example, the key points of an object 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. The present application is not limited thereto, and the key points of an object may also include other key points in addition to the above 18 key points.
[0045] In some embodiments, in step 102, various pointing directions of the object may be identified, such as up, down, left, right, front, back, one side of the torso, the other side of the torso, etc. In the following, step 102 is described exemplarily by taking the identification of the directions of one side of the torso and the other side of the torso as an example. It is understood that these contents are also applicable to the identification of other directions.
[0046] Figure 5 is a schematic diagram of the angle of the embodiment of the present application. In some embodiments, Figure 5 As shown, the first line C1 is the line between the left shoulder key point 6 and the right shoulder key point 7. The second line may be the line C2_L between the left elbow key point 8 and the left wrist key point 10, and / or the line C2_R between the right elbow key point 9 and the right wrist key point 11.
[0047] In some embodiments, Figure 5 As shown, 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.
[0048] like Figure 5 As shown, taking the front of the object as an example, when the right wrist key point 11 is located lower than the right elbow key point 9, the first angle between the first line C1 and the second line C2_R is the angle γ1 between the second line C2_R and the first line C1 in the clockwise direction, that is, the angle at which the second line C2_R rotates clockwise with the intersection A2 of the second line C2_R and the first line C1 as the center to the position where it coincides with the first line C1.
[0049] like Figure 5 As shown, taking the front of the object as an example, when the left wrist key point 10 is located lower than the left elbow key point 8, the second angle between the first line C1 and the second line C2_L is the angle γ2 between the second line C2_L and the first line C1 in the counterclockwise direction, that is, the angle at which the second line C2_L rotates counterclockwise with the intersection A1 of the second line C2_L and the first line C1 as the center to the position where it coincides with the first line C1.
[0050] Figure 6 is another schematic diagram of the angle of the embodiment of the present application. Figure 6 As shown, taking the front of the object as an example, when the right wrist key point 11 is located at a higher position than the right elbow key point 9, the first angle between the first line C1 and the second line C2_R is the angle γ1 between the second line C2_R and the first line C1 in the counterclockwise direction, that is, the angle at which the second line C2_R rotates counterclockwise with the intersection A2 of the second line C2_R and the first line C1 as the center to the position where it coincides with the first line C1.
[0051] like Figure 6 As shown, taking the front of the object as an example, when the left wrist key point 10 is located at a higher position than the left elbow key point 8, the second angle between the first line C1 and the second line C2_L is the angle γ2 between the second line C2_L and the first line C1 in the clockwise direction, that is, the angle at which the second line C2_L rotates in the clockwise direction with the intersection A1 of the second line C2_L and the first line C1 as the center to the position where it coincides with the first line C1.
[0052] Figure 5 and Figure 6 Taking the case where the right arm of the subject points to the right (right outer) or the left arm points to the left (left outer) as an example, the method of determining the first angle and the second angle is exemplarily described. It can be understood that Figure 5 and Figure 6 The manner of determining the first angle and the second angle shown is also applicable to the case where the subject's right arm points approximately to the left (right inner) or the left arm points approximately to the right (left inner).
[0053] By setting the first angle and the second angle in the above manner, the pointing direction can be determined in the same manner when the wrist key point is located above or below the elbow key point. Thus, the determination operation can be simplified. The present application is not limited thereto, and the first angle and the second angle can also be set in other manners.
[0054] In some embodiments, in step 102, the pointing direction of the object can be determined based on the first angle and the first preset threshold, and / or based on the second angle and the second preset threshold. The first preset threshold can be the same as the second preset threshold. Thus, the determination of the pointing direction can be simplified. The present application is not limited to this, and the first preset threshold and the second preset threshold can also be different, so that the first preset threshold and the second preset threshold can be flexibly set.
[0055] In some embodiments, the first preset threshold and the second preset threshold may be thresholds corresponding to the magnitudes of the first angle and the second angle, or may be thresholds corresponding to the trigonometric function of the first angle and the second angle.
[0056] In some embodiments, when determining the pointing direction of an object based on the size of the angle and a preset threshold, the first preset threshold may include a first threshold and a second threshold. For example, for the first angle γ1 between the first connecting line C1 and the second connecting line C2_R, when the first angle γ1 is less than the first threshold, the pointing direction of the object is right outside (approximately pointing to the right from the right side of the torso); when the first angle γ1 is greater than the second threshold, the pointing direction of the object is right inside (approximately pointing to the left from the right side of the torso). 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 be 90°; or the first threshold may be a value smaller than 90°, and the second threshold may be a value larger than 90°.
[0057] Figures 7(a), 7(b) and 7(c) are schematic diagrams of the pointing directions of an embodiment of the present application, wherein Figures 7(a), 7(b) and 7(c) respectively show the pointing directions of right outside, right inside and right outside.
[0058] In the above embodiment, the second threshold may include a third threshold and a fourth threshold. For example, for the second angle γ2 between the first line C1 and the second line C2_L, when the second angle γ2 is less than the third threshold, the pointing direction of the object is left outside (approximately pointing to the left from the left side of the torso); when the second angle γ2 is greater than the fourth threshold, the pointing direction of the object is left inside (approximately pointing to the right from the left side of the torso). The third threshold may be equal to the fourth threshold, or the third threshold may be smaller than the fourth threshold. For example, the third threshold and the fourth threshold may be 90°; or the third threshold may be a value smaller than 90°, and the fourth threshold may be a value larger than 90°.
[0059] Figures 8(a), 8(b) and 8(c) are schematic diagrams of the pointing directions of an embodiment of the present application, wherein Figures 8(a), 8(b) and 8(c) respectively show the pointing directions of left outside, left inside and left outside.
[0060] In some embodiments, the first threshold and / or the third threshold and / or the second threshold and / or the fourth threshold may be adjusted according to the accuracy requirement of the recognition result. For example, when the accuracy requirement is high, 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.
[0061] 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.
[0062] In some embodiments, when determining the pointing direction of an object based on the trigonometric function value of an angle and a preset threshold, the trigonometric function value of the angle may be various trigonometric function values. Taking the cosine function as an example, the first preset threshold may include a fifth threshold and a sixth threshold. For example, when the cosine function value of the first angle γ1 is greater than the fifth threshold, the pointing direction of the object is right outside (approximately pointing to the right from the right side of the torso); when the cosine function value of the first angle γ1 is less than the sixth threshold, the pointing direction of the object is right inside (approximately pointing to the left from the right side of the torso). Among them, 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 be 0; or, the fifth threshold may be a positive value and the sixth threshold may be a negative value.
[0063] In the above embodiment, the second preset threshold may include a seventh threshold and an eighth threshold. For example, when the cosine function value of the second angle γ2 is greater than the seventh threshold, the pointing direction of the object is left outer (approximately pointing to the left from the left side of the torso); when the second angle γ2 is less than the eighth threshold, the pointing direction of the object is left inner (approximately pointing to the right from the left side of the torso). Among them, the seventh threshold may be equal to the eighth threshold, or the seventh threshold may be greater than the eighth threshold. For example, the seventh threshold and the eighth threshold may be 0; or the seventh threshold may be a positive value and the eighth threshold may be a negative value.
[0064] In some embodiments, the fifth threshold and / or the sixth threshold and / or the seventh threshold and / or the eighth threshold can be adjusted according to the accuracy requirement of the recognition result. For example, when the accuracy requirement is higher, the fifth threshold and / or the seventh threshold can be set to a larger value, and the sixth threshold and / or the eighth threshold can be set to a smaller value.
[0065] 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.
[0066] In some embodiments, the first preset threshold and / or the second preset threshold may also be determined based on the relative positional relationship between the image acquisition device that acquires the image and the left shoulder and the right shoulder of the object. The relative positional relationship may include, for example, the distance between the image acquisition device and the left shoulder and the right shoulder of the object, and the position of the image acquisition device relative to the left shoulder and the right shoulder of the object in the up-down direction. By adjusting the first preset threshold and / or the second preset threshold accordingly based on the relative positional relationship between the image acquisition device that acquires the image and the left shoulder and the right shoulder of the object, the accuracy of the pointing direction can be further improved.
[0067] For example, the image acquisition device may be located at the following position: the distance between the image acquisition device and the left shoulder of the object is equal to the distance between the image acquisition device and the right shoulder of the object, and the image acquisition device is located at a position flush with the left shoulder and the right shoulder of the object in the vertical direction. In this case, the image acquisition device acquires a first image of the front of the object. By performing key point recognition on the object in the first image, the left shoulder key point, the right shoulder key point, the elbow key point and the wrist key point of the object can be acquired. Further, the pointing direction can be determined based on the angle (first angle and second angle) between the first connecting line between the left shoulder key point and the right shoulder key point and the second connecting line between the elbow key point and the wrist key point and the preset threshold (first preset threshold and second preset threshold). The first angle and the second angle corresponding to the first image are referred to as the first standard angle and the second standard angle, and the first preset threshold and the second preset threshold are referred to as the first standard value and the second standard value.
[0068] Assuming that the subject maintains an unchanged posture, the image acquisition device is adjusted to the following position: the distance between the image acquisition device and the left shoulder of the subject is not equal to the distance between the image acquisition device and the right shoulder of the subject, and the image acquisition device is located at a position that is not flush with the left shoulder and the right shoulder of the subject in the vertical direction. In this case, the image acquisition device acquires a second image of the side of the subject. Since the first angle and the second angle corresponding to the second image can be values different from the first standard angle and the second standard angle, the first preset threshold and the second preset threshold corresponding to the second image can be set to values different from the first standard value and the second standard value.
[0069] by Figure 5 Taking the case where the wrist key point is lower than the elbow key point as an example, when the image acquisition device is located above the left and right shoulders of the subject:
[0070] When the distance between the image acquisition device and the right shoulder key point 7 is smaller than the distance between the image acquisition device and the left shoulder key point 6, the first angle between the second connecting line C2_R of the right elbow key point 9 and the right wrist key point 11 and the first connecting line C1 becomes smaller relative to the first standard angle, and the second angle between the second connecting line C2_L of the left elbow key point 8 and the left wrist key point 10 and the first connecting line C1 becomes larger relative to the second standard angle. Thus, in the case where the first preset threshold and the second preset threshold are thresholds for the size of the angle (for example, the first preset threshold is the aforementioned first threshold and second threshold, and the second preset threshold is the aforementioned third threshold and fourth threshold), the first preset threshold can be set to a value smaller than the first standard value, and the second preset threshold can be set to a value larger than the second standard value.
[0071] Similarly, when the distance between the image acquisition device and the right shoulder key point 7 is greater than the distance between the image acquisition device and the left shoulder key point 6, the first preset threshold can be set to a value greater than the first standard value, and the second preset threshold can be set to a value smaller than the second standard value.
[0072] by Figure 5 As an example, the wrist key point is shown below the elbow key point, when the image acquisition device is located below the left and right shoulders of the subject:
[0073] When the distance between the image acquisition device and the right shoulder key point 7 is smaller than the distance between the image acquisition device and the left shoulder key point 6, the first angle between the second connecting line C2_R of the right elbow key point 9 and the right wrist key point 11 and the first connecting line C1 becomes larger relative to the first standard angle, and the second angle between the second connecting line C2_L of the left elbow key point 8 and the left wrist key point 10 and the first connecting line C1 becomes smaller relative to the second standard angle. Thus, in the case where the first preset threshold and the second preset threshold are thresholds for the size of the angle (for example, the first preset threshold is the aforementioned first threshold and second threshold, and the second preset threshold is the aforementioned third threshold and fourth threshold), the first preset threshold can be set to a value larger than the first standard value, and the second preset threshold can be set to a value smaller than the second standard value.
[0074] Similarly, when the distance between the image acquisition device and the right shoulder key point 7 is greater than the distance between the image acquisition device and the left shoulder key point 6, the first preset threshold can be set to a value smaller than the first standard value, and the second preset threshold can be set to a value larger than the second standard value.
[0075] The present application is not limited thereto, and the first preset threshold and the second preset threshold may also be adjusted in other ways.
[0076] In some embodiments, in step 102, in addition to determining the pointing direction of the object based on the angle between the first connecting line and the second connecting line, the pointing direction of the object can 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, wherein the shoulder key point, the elbow key point, and the wrist key point are located on the same side. By also considering the third connecting line in the process of determining the pointing direction, the accuracy of the pointing direction can be further improved.
[0077] In some embodiments, the angles among the first line, the second line, and the third line may include at least one of the following angles: the angle between the first line and the second line, the angle between the first line and the third line, and the angle between the second line and the third line.
[0078] Taking the determination of the pointing direction according to the angle between the first connecting line and the second connecting line and the angle between the first connecting line and the third connecting line as an example, the determination method is exemplarily described.
[0079] In some embodiments, the definition of the angle between the first connecting line and the third connecting line may be similar to the definition of the angle between the first connecting line and the second connecting line.
[0080] Fig. 9 is another schematic diagram of the angle of the embodiment of the present application. Fig. 9 As shown, taking the front facing the object as an example, when the right elbow key point 9 is located at a lower position than the right shoulder key point 7, the third angle between the first line C1 and the third line C3_R is the angle γ3 between the third line C3_R and the first line C1 in the clockwise direction; when the left elbow key point 8 is located at a lower position than the left shoulder key point 6, the fourth angle between the first line C1 and the third line C3_L is the angle γ4 between the third line C3_L and the first line C1 in the counterclockwise direction.
[0081] Fig.10 is another schematic diagram of the angle of the embodiment of the present application. Fig.10 As shown, taking the front facing the object as an example, when the right elbow key point 9 is located at a higher position than the right shoulder key point 7, the third angle between the first line C1 and the third line C3_R is the angle γ3 between the third line C3_R and the first line C1 in the counterclockwise direction; when the left elbow key point 8 is located at a higher position than the left shoulder key point 6, the fourth angle between the first line C1 and the third line C3_L is the angle γ4 between the third line C3_L and the first line C1 in the clockwise direction.
[0082] Fig. 9 and Fig.10Taking the case where the right arm of the subject points to the right (right outer) or the left arm points to the left (left outer) as an example, the method of determining the third angle and the fourth angle is exemplarily described. It can be understood that Fig. 9 and Fig.10 The manner of determining the third angle and the fourth angle shown is also applicable to the case where the subject's right arm points approximately to the left (right inner) or the left arm points approximately to the right (left inner).
[0083] In some embodiments, the pointing direction of the object can be determined based on the third angle and the third preset threshold and / or the fourth angle and the fourth preset threshold. When the pointing direction of the object is determined based on the size of the angle and the preset threshold, the third preset threshold may include a ninth threshold and a tenth threshold. For example, for the first angle γ1 between the first line C1 and the second line C2_R and the third angle γ3 between the first line C1 and the third line C3_R, when the first angle γ1 is less than the first threshold and the third angle γ3 is less than the ninth threshold, the pointing direction of the object is right outside (approximately pointing to the right from the right side of the torso); when the first angle γ1 is greater than the second threshold and the third angle γ3 is greater than the tenth threshold, the pointing direction of the object is right inside (approximately pointing to the left from the right side of the torso). Among them, the ninth threshold may be equal to or unequal to the tenth threshold.
[0084] In the above embodiment, the fourth preset threshold may include an eleventh threshold and a twelfth threshold. For example, for the second angle γ2 between the first line C1 and the second line C2_L and the fourth angle γ4 between the first line C1 and the third line C3_L, when the second angle γ2 is less than the third threshold and the fourth angle γ4 is less than the eleventh threshold, the pointing direction of the object is left outer (approximately pointing to the left from the left side of the torso); when the second angle γ2 is greater than the fourth threshold and the fourth angle γ4 is greater than the twelfth threshold, the pointing direction of the object is left inner (approximately pointing to the right from the left side of the torso). Among them, the eleventh threshold may be equal to or unequal to the twelfth threshold.
[0085] In some embodiments, in step 102, the pointing direction may be determined when a preset condition is met. The preset condition may include: the number of key points of the object acquired in step 101 is greater than a preset value, and the key points of the object acquired include two shoulder key points and at least one arm key points. Since the number of key points of the object acquired is greater than the preset value, it means that more key points are obtained, and the reliability of the acquired 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 guaranteed.
[0086] In some embodiments, the preset value may be an integer greater than or equal to 4 and less than or equal to the maximum value of the number of key points of the object (e.g., 18). For example, when the number of key points is 18, the preset value may be 10. The present application is not limited thereto, and the preset condition may not limit the number of key points obtained.
[0087] In some embodiments, when the image is a deformed image, the distortion of the deformed image may also be corrected. For example, the ratio of the distance between any two pixels in the deformed image and the distance between the objects corresponding to the two pixels is made the same or the difference is less than a preset deformation threshold. In this way, the accuracy of the recognition result of the pointing direction of the object in the deformed image can be further improved.
[0088] like Figure 1 As shown, the method may also include:
[0089] Step 103: Correct the distortion of the deformed image to generate a corrected image.
[0090] In step 101, key points of the object in the corrected image may be identified to obtain the key points of the object.
[0091] In some embodiments, in step 103, the distortion of the deformed image may be corrected in various ways. For example, the deformed image may be corrected by latitude and longitude mapping, bilinear interpolation, etc. For specific ways to correct the deformed image, reference may be made to related technologies.
[0092] The above only describes the steps or processes related to the present application, but the present application is not limited thereto. The action recognition method may also include other steps or processes. For the specific content of these steps or processes, reference may be made to the prior art. In addition, the above only uses some structures of the action recognition model as examples to exemplify the embodiments of the present application, but the present application is not limited to these structures, and these structures may also be appropriately modified, and the implementation methods of these modifications should all be included within the scope of the embodiments of the present application.
[0093] The above embodiments are merely exemplary of the embodiments of the present application, but the present application is not limited thereto, and appropriate modifications may be made based on the above embodiments. For example, the above embodiments may be used alone, or one or more of the above embodiments may be combined.
[0094] It can be seen from the above embodiments that the accuracy of the action recognition result can be improved by determining the pointing direction of the object by using the angle between a first line connecting two shoulder key points of the object and a second line connecting the elbow key point and the wrist key point on the same side.
[0095] For example, an object points to different directions through different positions of the arm (especially the forearm) relative to the trunk (especially the shoulder). Among the multiple key points of the object, two shoulder key points can represent (or partially represent) the position of the trunk, and the elbow key point and wrist key point located on the same side can represent the position of the forearm on that side. Therefore, the pointing direction of the object can be reasonably and accurately determined based on these key points. Among the multiple key points, the pointing direction of the object is determined based on the two shoulder key points and the elbow key point and wrist key point on the same side. The pointing direction can be determined in a simple manner, which reduces the amount of calculation and improves the calculation efficiency. In addition, the direction of the object is determined by the angle between the first connecting line and the second connecting line of the two shoulder key points, which can reduce the influence of the image acquisition angle and / or the posture of the object and / or whether the image is distorted (or deformed) on the recognition result.
[0096] Embodiments of the second aspect
[0097] The present application provides a motion recognition device, and the contents that are the same as those of the embodiment of the first aspect are not repeated here.
[0098] Fig.11 is a schematic diagram of a motion recognition device according to an embodiment of the present application. Fig.11 As shown, the motion recognition device 1100 includes:
[0099] An acquisition unit 1101, which performs key point recognition on an object in an image through a neural network to acquire key points of the object; and
[0100] A determination unit 1102 determines the pointing direction of the object according to an angle between a first line connecting a left shoulder key point and a right shoulder key point among the acquired key points and a second line connecting an elbow key point and a wrist key point, wherein the elbow key point and the wrist key point are located on the same side.
[0101] In some embodiments, the angle includes:
[0102] When facing the front of the object and the right wrist key point is located at a lower position than the right elbow key point, a first angle between the second connecting line between the right elbow key point and the right wrist key point and the first connecting line in a clockwise direction; and / or
[0103] When facing the front of the object and the left wrist key point is located lower than the left elbow key point, a second angle between the second connecting line between the left elbow key point and the left wrist key point and the first connecting line in the counterclockwise direction; and / or
[0104] When facing the front of the object and the right wrist key point is located at a higher position than the right elbow key point, a first angle between the second connecting line between the right elbow key point and the right wrist key point and the first connecting line in the counterclockwise direction; and / or
[0105] When facing the front of the object and the left wrist key point is located higher than the left elbow key point, the second connecting line between the left elbow key point and the left wrist key point forms a second angle with the first connecting line in a clockwise direction.
[0106] In some embodiments, the determining unit determines the pointing direction of the object based on the first angle and a first preset threshold, and / or based on the second angle and a second preset threshold.
[0107] In some embodiments, the first preset threshold and / or the second preset threshold is determined according to a relative positional relationship between an image acquisition device that acquires the image and a left shoulder and a right shoulder of the object.
[0108] In some embodiments, the relative position relationship includes:
[0109] The distance between the image acquisition device and the right shoulder and the left shoulder, and the position of the image acquisition device relative to the right shoulder and the left shoulder in the up-down direction.
[0110] In some embodiments, the determination unit determines the pointing direction of the object based on the angle between the first line, the second line, and a third 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.
[0111] In some embodiments, when a preset condition is met, the determining unit determines the pointing direction.
[0112] The preset conditions include: the number of key points of the object obtained is greater than a preset value, and the key points of the object include two shoulder key points and at least one arm key point.
[0113] In some embodiments, the image is a deformed image, and the apparatus further comprises:
[0114] a correction unit 1103, which corrects the distortion of the deformed image to generate a corrected image,
[0115] The acquisition unit 1101 performs key point recognition on the object in the corrected image to acquire the key points of the object.
[0116] It is worth noting that the above only describes the components or modules related to the present application, but the present application is not limited thereto. The motion recognition device 1100 may also include other components or modules, and the specific contents of these components or modules may refer to the relevant technology.
[0117] To keep it simple, Fig.11 The connection relationship or signal direction between various components or modules is only exemplified, but it should be clear to those skilled in the art that various related technologies such as bus connection can be used. The above-mentioned components or modules can be implemented by hardware facilities such as processors and memories; the embodiments of the present application are not limited to this.
[0118] The above embodiments are merely exemplary of the embodiments of the present application, but the present application is not limited thereto, and appropriate modifications may be made based on the above embodiments. For example, the above embodiments may be used alone, or one or more of the above embodiments may be combined.
[0119] It can be seen from the above embodiments that the accuracy of the action recognition result can be improved by determining the pointing direction of the object by using the angle between a first line connecting two shoulder key points of the object and a second line connecting the elbow key point and the wrist key point on the same side.
[0120] For example, an object points to different directions through different positions of the arm (especially the forearm) relative to the trunk (especially the shoulder). Among the multiple key points of the object, two shoulder key points can represent (or partially represent) the position of the trunk, and the elbow key point and wrist key point located on the same side can represent the position of the forearm on that side. Therefore, the pointing direction of the object can be reasonably and accurately determined based on these key points. Among the multiple key points, the pointing direction of the object is determined based on the two shoulder key points and the elbow key point and wrist key point on the same side. The pointing direction can be determined in a simple manner, which reduces the amount of calculation and improves the calculation efficiency. In addition, the direction of the object is determined by the angle between the first connecting line and the second connecting line of the two shoulder key points, which can reduce the influence of the image acquisition angle and / or the posture of the object and / or whether the image is distorted (or deformed) on the recognition result.
[0121] Embodiments of the third aspect
[0122] The present application provides an electronic device, including the motion recognition device 1100 as described in the embodiment of the second aspect, the contents of which are incorporated herein. The electronic device can be, for example, a computer, a server, a workstation, a laptop computer, a smart phone, etc., but the embodiments of the present application are not limited thereto.
[0123] Fig.12 Schematic diagram of an electronic device according to an embodiment of the present application. Fig.12 As shown, the electronic device 1200 may include: a processor (e.g., a central processing unit CPU) 1210 and a memory 1220; the memory 1220 is coupled to the central processing unit 1210. The memory 1220 may store various data; in addition, it may store information processing programs, and execute the programs under the control of the processor 1210.
[0124] In some embodiments, the functions of the motion recognition device 1200 are integrated into the processor 1210. The processor 1210 is configured to implement the motion recognition method as described in the embodiment of the first aspect.
[0125] In some embodiments, the motion recognition device 1200 and the processor 1210 are configured separately. For example, the motion recognition device 1200 can be configured as a chip connected to the processor 1210, and the functions of the motion recognition device 1200 are realized through the control of the processor 1210.
[0126] For example, the processor 1210 is configured to perform the following control: identify key points of an object in an image through a neural network to obtain the key points of the object; and determine the pointing direction of the object based on the angle between a first line connecting a left shoulder key point and a right shoulder key point among the key points obtained and a second line connecting an elbow key point and a wrist key point, wherein the elbow key point and the wrist key point are located on the same side.
[0127] In addition, if Fig.12 As shown, the electronic device 1200 may also include: an input / output (I / O) device 1230 and a display 1240, etc.; wherein the functions of the above components are similar to those of the prior art and are not described in detail here. It is worth noting that the electronic device 1200 does not necessarily have to include Fig.12 In addition, the electronic device 800 may also include Fig.12 For components not shown in the figure, reference may be made to the related art.
[0128] An embodiment of the present application also provides a computer-readable program, wherein when the program is executed in an electronic device, the program enables a computer to execute the action recognition method as described in the embodiment of the first aspect in the electronic device.
[0129] An embodiment of the present application also provides a storage medium storing a computer-readable program, wherein the computer-readable program enables a computer to execute the action recognition method as described in the embodiment of the first aspect in an electronic device.
[0130] The above devices and methods of the present application can be implemented by hardware, or by hardware combined with software. The present application relates to such a computer-readable program, which, when executed by a logic component, enables the logic component to implement the above-mentioned devices or components, or enables the logic component to implement the various methods or steps described above. The present application also relates to a storage medium for storing the above program, such as a hard disk, a magnetic disk, an optical disk, a DVD, a flash memory, etc.
[0131] The method / device described in conjunction with the embodiments of the present application may be directly embodied as hardware, a software module executed by a processor, or a combination of the two. For example, one or more of the functional block diagrams shown in the figure and / or one or more combinations of the functional block diagrams may correspond to various software modules of the computer program flow or to various hardware modules. These software modules may correspond to the various steps shown in the figure, respectively. These hardware modules may be implemented by solidifying these software modules, for example, using a field programmable gate array (FPGA).
[0132] The software module may be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. A storage medium may be coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium; or the storage medium may be an integral part of the processor. The processor and the storage medium may be located in an ASIC. The software module may be stored in a memory of a mobile terminal or in a memory card that can be inserted into the mobile terminal. For example, if a device (such as a mobile terminal) uses a large-capacity MEGA-SIM card or a large-capacity flash memory device, the software module may be stored in the MEGA-SIM card or the large-capacity flash memory device.
[0133] For one or more of the functional blocks described in the drawings and / or one or more combinations of functional blocks, it can be implemented as a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component or any appropriate combination thereof for performing the functions described in the present application. For one or more of the functional blocks described in the drawings and / or one or more combinations of functional blocks, it can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in communication with a DSP, or any other such configuration.
[0134] The present application is described above in conjunction with specific implementation methods, but it should be clear to those skilled in the art that these descriptions are exemplary and are not intended to limit the scope of protection of the present application. Those skilled in the art can make various modifications and variations to the present application based on the principles of the present application, and these modifications and variations are also within the scope of the present application.
[0135] Regarding the implementation methods including the above embodiments, the following additional notes are also disclosed:
[0136] Note 1. A method for motion recognition, wherein the method comprises:
[0137] Recognize key points of the object in the image by using a neural network to obtain the key points of the object; and
[0138] The pointing direction of the object is determined according to the angle between a first connecting line of the left shoulder key point and the right shoulder key point among the acquired key points and a second connecting line of the elbow key point and the wrist key point, wherein the elbow key point and the wrist key point are located on the same side.
[0139] Note 2. The method according to Note 1, wherein the angle comprises:
[0140] When facing the front of the object, the second line between the right elbow key point and the right wrist key point forms a first angle with the first line in the clockwise direction; and / or the second line between the left elbow key point and the left wrist key point forms a second angle with the first line in the counterclockwise direction.
[0141] Note 3. The method according to Note 2, wherein the pointing direction of the object is determined according to the 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 key points obtained, comprising:
[0142] The pointing direction of the object is determined according to the first angle and a first preset threshold, and / or according to the second angle and a second preset threshold.
[0143] Note 4. The method according to Note 3, wherein:
[0144] The first preset threshold and / or the second preset threshold is determined according to a relative position relationship between an image acquisition device that acquires the image and a left shoulder and a right shoulder of the object.
[0145] Note 5. The method according to Note 4, wherein the relative position relationship includes:
[0146] The distance between the image acquisition device and the right shoulder and the left shoulder, and the position of the image acquisition device relative to the right shoulder and the left shoulder in the up-down direction.
[0147] Note 6. The method according to Note 1, wherein the pointing direction of the object is determined according to the angle between a first line connecting the left shoulder key point and the right shoulder key point and a second line connecting the elbow key point and the wrist key point among the key points obtained, comprising:
[0148] The pointing direction of the object is determined according to an 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.
[0149] Note 7. The method according to Note 1, wherein:
[0150] When a preset condition is met, the determining unit determines the pointing direction.
[0151] The preset conditions include: the number of key points of the object obtained is greater than a third threshold, and the key points of the object include two shoulder key points and at least one arm key points.
[0152] Supplement 8. The method according to Supplement 1, wherein the image is a deformed image, and the method further comprises:
[0153] The distortion of the deformed image is corrected to generate a corrected image.
[0154] Note 9. A storage medium storing a computer-readable program, wherein the computer-readable program enables a computer to execute the motion recognition method as described in any one of Notes 1 to 8 in an electronic device.
Claims
1. A motion recognition device, characterized in that: The device comprises: an acquisition unit, which recognizes key points of an object in an image through a neural network to acquire key points of the object; and A determination unit determines the pointing direction of the object according to an angle between a first connecting line of a left shoulder key point and a right shoulder key point among the acquired key points and a second connecting line of an elbow key point and a wrist key point, wherein the elbow key point and the wrist key point are located on the same side.
2. The device according to claim 1, characterized in that The angles include: When facing the front of the object and the right wrist key point is located at a lower position than the right elbow key point, a first angle between the second connecting line between the right elbow key point and the right wrist key point and the first connecting line in a clockwise direction; and / or When facing the front of the object and the left wrist key point is located at a lower position than the left elbow key point, a second angle between the second connecting line between the left elbow key point and the left wrist key point and the first connecting line in the counterclockwise direction; and / or When facing the front of the object and the right wrist key point is located at a higher position than the right elbow key point, a first angle between the second connecting line between the right elbow key point and the right wrist key point and the first connecting line in the counterclockwise direction; and / or When facing the front of the object and the left wrist key point is located at a higher position than the left elbow key point, the second connecting line between the left elbow key point and the left wrist key point forms a second angle with the first connecting line in a clockwise direction.
3. The device according to claim 2, characterized in that The determining unit determines the pointing direction of the object according to the first angle and a first preset threshold, and / or according to the second angle and a second preset threshold.
4. The device according to claim 3, characterized in that The first preset threshold and / or the second preset threshold is determined according to a relative position relationship between an image acquisition device that acquires the image and a left shoulder and a right shoulder of the object.
5. The device according to claim 4, characterized in that The relative position relationship includes: The distance between the image acquisition device and the right shoulder and the left shoulder, and the position of the image acquisition device relative to the right shoulder and the left shoulder in the up-down direction.
6. The device according to claim 1, characterized in that The determination unit determines the pointing direction of the object 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, wherein the shoulder key point, the elbow key point, and the wrist key point are located on the same side.
7. The device according to claim 1, characterized in that When a preset condition is met, the determining unit determines the pointing direction. The preset conditions include: the number of key points of the object obtained is greater than a preset value, and the key points of the object include two shoulder key points and at least one arm key point.
8. The device according to claim 1, characterized in that The image is a deformed image, and the device further includes: a correction unit, which corrects the distortion of the deformed image to generate a corrected image, The acquisition unit performs key point recognition on the object in the corrected image to acquire the key points of the object.
9. A method for motion recognition, characterized in that: The method comprises: Recognize key points of the object in the image by using a neural network to obtain the key points of the object; and The pointing direction of the object is determined according to the angle between a first connecting line of the left shoulder key point and the right shoulder key point among the acquired key points and a second connecting line of the elbow key point and the wrist key point, wherein the elbow key point and the wrist key point are located on the same side.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: The processor is configured to execute the computer program to implement the action recognition method according to claim 9.
Citation Information
Patent Citations
Traffic police gesture recognition method based on human body key point features
CN111401188A
Equipment control method and device, electronic equipment and storage medium
CN112987933A
Attitude similarity judgment method, data processing device and storage medium
CN114492668A
Inward / outward vehicle monitoring for remote reporting and in-cab warning enhancements
US20210394775A1
