Attitude transition animation generation method and device, electronic equipment and storage medium

By optimizing the linear interpolation algorithm and interpolation strategy for nonlinear motion, efficient and natural pose transition animation is generated, and the problem of inefficient computing in the existing technology is solved, and efficient and natural transitions of animation generation are achieved.

CN119810268APending Publication Date: 2025-04-11NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411854004.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When handling complex nonlinear motion, the existing pose interpolation technology has low computational efficiency and requires a large amount of training data, making it difficult to generate high-quality interpolation results, and cannot meet the requirements of animation fluency and nature.

Method used

The optimized linear interpolation algorithm is used to generate the key points of the intermediate transition frame, and different interpolation strategies are adopted for nonlinear motion. By obtaining common and unique pose key points, pose transition animation is generated.

Benefits of technology

It improves the efficiency and fluency of animation generation, is suitable for nonlinear motion, reduces the need for manual adjustment, and improves the naturalness and automation of animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810268A_ABST
    Figure CN119810268A_ABST
Patent Text Reader

Abstract

The invention provides a posture transition animation generation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining first state information of a plurality of preset posture key points under a first posture, and second state information of a plurality of preset posture key points under a second posture, and generating a posture transition animation according to the first state information and the second state information; respectively determining a common attitude key point and a unique attitude key point of the first attitude and the second attitude, generating at least one frame of interpolation skeleton image between the first attitude and the second attitude according to the common attitude key point and the unique attitude key point, and generating at least one frame of interpolation skeleton image between the first attitude and the second attitude according to the first state information and the second state information. And respectively generating a starting skeleton image of the first posture and an ending skeleton image of the second posture, and generating a posture transition animation according to the starting skeleton image of the first posture, the at least one frame of interpolation skeleton image and the ending skeleton image of the second posture. The scheme is suitable for nonlinear motion, the animation generation efficiency is high, and the animation fluency and naturalness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a posture transition animation generation method, device, electronic device and storage medium. Background Art

[0002] With the continuous development of computer graphics, artificial intelligence and human-computer interaction technology, pose interpolation technology is the key to achieving smooth transitions and natural movements in fields such as animation production, video editing and virtual reality.

[0003] Currently, pose interpolation mainly relies on simple linear interpolation or complex machine learning models to generate intermediate transition frames, and manual adjustments and editing are performed to make the intermediate transition frames meet the expected requirements.

[0004] However, simple linear interpolation methods cannot handle complex nonlinear motions. Although complex machine learning models can generate high-quality interpolation results, they require a large amount of training data and computing resources, which is complex and inefficient. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a posture transition animation generation method, device, electronic device and storage medium, which are suitable for non-linear motion, have high animation generation efficiency, and improve animation fluency and naturalness.

[0006] In a first aspect, an embodiment of the present application provides a method for generating a posture transition animation, comprising:

[0007] Acquire first state information of a plurality of preset posture key points in a first posture, and second state information of a plurality of preset posture key points in a second posture;

[0008] Determining common posture key points and unique posture key points of the first posture and the second posture respectively according to the first state information and the second state information;

[0009] Generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points;

[0010] generating a starting skeleton image of the first posture and an ending skeleton image of the second posture respectively according to the first state information and the second state information;

[0011] A posture transition animation from the first posture to the second posture is generated according to the starting skeleton image of the first posture, the at least one frame of interpolated skeleton image and the ending skeleton image of the second posture.

[0012] In a second aspect, the embodiment of the present application further provides a posture transition animation generation device, comprising:

[0013] An acquisition module, used to acquire first state information of a plurality of preset posture key points in a first posture, and second state information of a plurality of preset posture key points in a second posture;

[0014] A determination module, configured to determine common posture key points and unique posture key points of the first posture and the second posture respectively according to the first state information and the second state information;

[0015] A generating module, configured to generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points;

[0016] The generating module is further used to generate a starting skeleton image of the first posture and an ending skeleton image of the second posture respectively according to the first state information and the second state information;

[0017] The generating module is further used to generate a posture transition animation from the first posture to the second posture according to the starting skeleton image of the first posture, the at least one frame of interpolated skeleton image and the ending skeleton image of the second posture.

[0018] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to execute any one of the methods described in the first aspect.

[0019] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in any one of the first aspects is executed.

[0020] The present application provides a posture transition animation generation method, device, electronic device and storage medium, wherein the method includes: obtaining first state information of multiple preset posture key points under a first posture, and second state information of multiple preset posture key points under a second posture, respectively determining the common posture key points and unique posture key points of the first posture and the second posture according to the first state information and the second state information, generating at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points, respectively generating the starting skeleton image of the first posture and the ending skeleton image of the second posture according to the first state information and the second state information, and generating posture transition animation according to the starting skeleton image of the first posture, at least one frame of interpolated skeleton image and the ending skeleton image of the second posture. This scheme is suitable for nonlinear motion, has high animation generation efficiency, and improves animation fluency and naturalness. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 Schematic diagram of the process of the posture transition animation generation method provided in the embodiment of the present application Figure 1 ;

[0023] Figure 2 Schematic diagram of the process of the posture transition animation generation method provided in the embodiment of the present application Figure 2 ;

[0024] Figure 3 Schematic diagram of the posture transition animation provided in the embodiment of the present application Figure 1 ;

[0025] Figure 4 Schematic diagram of the posture transition animation provided in the embodiment of the present application Figure 2 ;

[0026] Figure 5 Schematic diagram of the process of the posture transition animation generation method provided in the embodiment of the present application Figure 3 ;

[0027] Figure 6 A schematic diagram of the structure of a posture transition animation generating device provided in an embodiment of the present application;

[0028] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0030] With the continuous development of computer graphics, artificial intelligence and human-computer interaction technology, posture interpolation technology will play an important role in more fields. Pose interpolation technology is the key to achieving smooth transitions and natural motion, and is used to promote technological innovation and efficiency improvement in all walks of life, which is specifically reflected in the following scenarios:

[0031] 1. Animation production industry

[0032] In traditional animation production, animators need to draw each frame manually, which is a time-consuming and labor-intensive process. With the development of computer animation technology, keyframe animation has become the mainstream. Animators only need to create keyframes, and the intermediate transition frames are automatically generated by computers.

[0033] 2. Movie special effects industry

[0034] In movie special effects production, motion capture technology is widely used to create realistic character animations. However, motion capture data often needs to be post-processed and optimized. Sample pose interpolation technology can be used to smooth and interpolate motion capture data, helping special effects artists create smoother and more natural character animations.

[0035] 3. Game development industry

[0036] In game development, the smoothness of character animation directly affects the gaming experience. This technology can be applied to the action transition of game characters, such as the smooth transition between states such as standing to walking, and from walking to running. This can not only improve the naturalness of game character actions, but also reduce the storage requirements of animation resources.

[0037] 4. Virtual Reality (VR) and Augmented Reality (AR)

[0038] In VR and AR applications, user interactions and the actions of virtual characters need to be generated and rendered in real time. Due to its high computational efficiency, this technology is very suitable for generating smooth action transitions in real time, enhancing the immersion and realism of VR / AR experience.

[0039] 5. Human-computer interaction and computer vision

[0040] In the field of human-computer interaction, accurate recognition and prediction of human posture is a key issue. The use of posture interpolation technology can be used to optimize the results of human posture recognition, fill in the missing posture data caused by occlusion or recognition errors, and improve the stability and accuracy of the human-computer interaction system.

[0041] 6. Sports analysis and sports technology

[0042] In the field of sports training and sports medicine, accurate motion trajectory analysis is crucial. This technology can be used to process and optimize the data obtained from motion capture devices, helping coaches and doctors to more accurately analyze athletes' movements, optimize training programs or provide rehabilitation guidance.

[0043] 7. Robotics

[0044] In robot motion control, smooth trajectory planning is crucial to achieve smooth and precise robot movements. This technology can be applied to robot motion trajectory generation to help robots achieve more natural and efficient movements.

[0045] 8. Digital Twin Technology

[0046] In the field of industry and intelligent manufacturing, digital twin technology is becoming increasingly important. The use of posture interpolation technology can be used to optimize the simulation of human or machine motion in digital twin models and improve the accuracy and realism of the simulation.

[0047] 9. Education and training

[0048] In the field of distance education and vocational training, especially in courses that require action demonstration (such as dance, sports, handicrafts, etc.), posture interpolation technology can be used to generate detailed action decomposition teaching videos to help learners better understand and imitate complex actions.

[0049] 10. Medical rehabilitation

[0050] In physical therapy and rehabilitation training, accurate movement guidance and evaluation are very important. Posture interpolation technology can be used to generate standard movement demonstrations or analyze the patient's movement to help doctors develop more accurate rehabilitation plans.

[0051] In the above-mentioned application fields, the posture interpolation technology currently used mainly relies on simple linear interpolation or complex machine learning models. Although the simple linear interpolation method has a fast calculation speed, it cannot handle complex nonlinear motion. Although the complex machine learning model can generate high-quality interpolation results, it requires a large amount of training data and computing resources, which is relatively complex and inefficient.

[0052] It is worth noting that in the process of the intermediate transition frame between two motion postures, if the posture key points of the two motion postures are consistent, the motion is linear motion. If the posture key points of the two motion postures are inconsistent, that is, the posture key points may disappear or appear in these two postures, then the motion is nonlinear motion.

[0053] Based on this, the present application provides a posture transition animation generation method based on linear interpolation. Through an optimized linear interpolation algorithm, the key points of the intermediate transition frames are quickly generated, balancing the computational efficiency and animation quality. Different interpolation strategies are adopted for non-linear motion (key points disappear or appear), thereby improving the accuracy of interpolation. Therefore, this solution is suitable for non-linear motion, has high animation generation efficiency, and improves the smoothness and naturalness of the animation.

[0054] Figure 1 Schematic diagram of the process of the posture transition animation generation method provided in the embodiment of the present application Figure 1 The execution subject of this embodiment may be an electronic device, such as a terminal, a tablet computer, a desktop computer, etc.

[0055] like Figure 1 As shown, the method may include:

[0056] S101, obtaining first state information of a plurality of preset posture key points in a first posture, and second state information of a plurality of preset posture key points in a second posture.

[0057] The first posture and the second posture may be postures of the same type of object, and the object type may be, for example, a person or an animal. The first posture may be, for example, a posture of a person standing upright, and the second posture may be, for example, a posture of a person taking a step.

[0058] In an optional embodiment, the first gesture and the second gesture are gestures of the same type of object, and the gestures of the same object under the same type of object or gestures of different objects, for example, the object type is a person, the first gesture and the second gesture are gesture 1 and gesture 2 of person 1 respectively, or the first gesture is gesture 1 of person 1, and the second gesture is gesture 2 of person 2. That is, the object of gesture 1 and gesture 2 is person 1, or the object of gesture 1 is person 1, and the object of gesture 2 is person 2.

[0059] The plurality of preset posture key points are posture key points that can be detected in an unobstructed posture of the object, and may include, for example, head key points, torso key points, and limb key points, wherein the head key points include nose key points, neck key points, etc., the torso key points include shoulder key points, hip key points, etc., and the limb key points include elbow key points, wrist key points, knee key points, ankle key points, etc. The number of preset posture key points of the human body may be 18.

[0060] The first state information is used to indicate the state of each preset posture key point of the object in the first posture in the first posture, including a detectable state and an undetectable state. For example, if a person puts his hands behind his back in the first posture, the wrist key point and elbow key point of the person cannot be detected in the first posture, but the nose key point, neck key point, shoulder key point, knee key point, ankle key point, etc. of the person can be detected, that is, the state of the wrist key point and elbow key point of the person is an undetectable state, and the state of the nose key point, neck key point, shoulder key point, knee key point, and ankle key point is a detectable state.

[0061] Similarly, the second state information is used to indicate the states of each preset posture key point of the object in the second posture in the second posture, including a detectable state and an undetectable state.

[0062] The preset posture key points are detected for the first posture to obtain a plurality of first state information of the preset posture key points, and the preset key points are detected for the second posture to obtain a plurality of second state information of the preset posture key points.

[0063] S102: Determine common posture key points and unique posture key points of the first posture and the second posture respectively according to the first state information and the second state information.

[0064] The common posture key points are the intersections of posture key points detectable by the object in the first posture in the first posture and posture key points detectable by the object in the second posture in the second posture.

[0065] For example, character 1 in a first posture has his hands behind his back in the first posture, and the posture key points that can be detected in the first posture of character 1 include: nose key point, neck key point, shoulder key point, knee key point, and ankle key point; character 2 in a second posture raises his hands in the second posture, and the posture key points that can be detected in the second posture of character 2 include: nose key point, neck key point, shoulder key point, elbow key point, wrist key point, knee key point, and ankle key point, then the public posture key point package is determined to be the nose key point, neck key point, shoulder key point, knee key point, and ankle key point.

[0066] The unique posture key point is a posture key point unique to the object in the first posture in the first posture, that is, a posture key point that can be detected by the object in the first posture in the first posture, but cannot be detected by the object in the second posture in the second posture.

[0067] For example, character 1 in a first posture raises one hand in the first posture, and the posture key points of character 1 that can be detected in the first posture include: nose key point, neck key point, shoulder key point, elbow key point, wrist key point, knee key point, and ankle key point. Character 2 in a second posture lowers his head and turns around in the second posture, and the posture key points of character 2 that can be detected in the second posture include: shoulder key point, elbow key point, wrist key point, knee key point, and ankle key point. The unique posture key points are determined to be the nose key point and the neck key point.

[0068] Alternatively, the unique posture key point may also be a posture key point unique to the object in the second posture in the second posture, that is, a posture key point that can be detected by the object in the second posture in the second posture, but cannot be detected by the object in the first posture in the first posture.

[0069] For example, if character 2 in the second posture raises both hands in the second posture, the posture key points that can be detected in character 2 in the second posture include: nose key point, neck key point, shoulder key point, elbow key point, wrist key point, knee key point, and ankle key point; if character 1 in the first posture puts his hands behind his back in the first posture, the posture key points that can be detected in character 1 in the first posture include: nose key point, neck key point, shoulder key point, knee key point, and ankle key point, then the unique posture key points are determined to be the elbow key point and the wrist key point.

[0070] According to the first state information and the second state information, it can be determined that the posture key points of the object in the first posture in the first posture and the posture key points of the object in the second posture in the second posture are common key points (ie, posture key points that can be detected in both the first posture and the second posture).

[0071] If the object in the first posture can detect the posture key point in the first posture, but the object in the second posture cannot detect the posture key point in the second posture, then the posture key point is determined to be a unique posture key point of the object in the first posture in the first posture.

[0072] If the object in the second posture can detect the posture key point in the second posture, but the object in the first posture cannot detect the posture key point in the first posture, then the posture key point is determined to be a unique posture key point of the object in the second posture in the second posture.

[0073] Among them, the posture key points unique to the object in the first posture in the first posture explain the situation where the unique posture key points of the object in the first posture in the first posture disappear when appearing in the second posture. Similarly, the posture key points unique to the object in the second posture in the second posture explain the situation where the unique posture key points of the object in the second posture in the first posture appear when appearing in the second posture.

[0074] That is to say, the movement from the first posture to the second posture is a nonlinear movement, which leads to inconsistency between the posture key points in the first posture and the second posture.

[0075] Nonlinear motion can be reflected in the following scenarios:

[0076] In the scene where a person turns around, when the person is facing the camera, both hands can be seen. During the turning process, the hand behind will be blocked by the body. At this time, the key point of this hand "disappears". If the person continues to turn around, the originally invisible hand will "appear" again.

[0077] In the object occlusion scene, when a person walks behind a table, the lower body is blocked and the key points of the legs "disappear". After walking out, these points will "appear" again.

[0078] In the scene of entering and exiting the screen, when a person walks in from the edge of the screen, the key points of the posture gradually "appear", and when walking out of the screen, the key points of the posture gradually "disappear".

[0079] S103: Generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points.

[0080] Linear interpolation is performed on the shared posture key points to obtain at least one interpolation position of the shared posture key points, and linear interpolation is performed on the unique posture key points to obtain at least one interpolation position of the unique posture key points, and at least one frame of interpolation skeleton image between the first posture and the second posture is generated according to at least one interpolation position of the shared posture key points and at least one interpolation position of the unique posture key points, respectively, wherein each frame of interpolation skeleton image is an image generated by connecting the shared posture key points and the unique posture key points according to each interpolation position of the shared posture key points and each interpolation position of the unique posture key points.

[0081] S104 . Generate a starting skeleton image of the first posture and an ending skeleton image of the second posture respectively according to the first state information and the second state information.

[0082] According to the first state information, posture key points that can be detected by an object in a first posture in the first posture are determined from multiple preset posture key points, and according to the second state information, posture key points that can be detected by an object in a second posture in the second posture are determined from multiple preset posture key points, the posture key points that can be detected by the object in the first posture in the first posture are connected to generate a starting skeleton image of the first posture, and the posture key points that can be detected by the object in the second posture in the second posture are connected to generate an ending skeleton image of the second posture.

[0083] The starting skeleton image is an image obtained by connecting the posture key points of the object in the first posture that can be detected in the first posture, and the ending skeleton image is an image obtained by connecting the posture key points of the object in the second posture that can be detected in the second posture.

[0084] It is worth noting that, based on the relative position relationship of the posture key points detectable by the object in the first posture in the first posture, skeleton drawing is performed according to the posture key points detectable by the object in the first posture in the first posture to generate the initial skeleton image.

[0085] Based on the relative positional relationship of the posture key points that can be detected in the second posture of the object, skeleton drawing is performed according to the posture key points that can be detected in the second posture of the object to generate a starting skeleton image.

[0086] Among them, the relative position relationship of the posture key points that can be detected of the object in the first posture in the first posture is used to indicate the relative positions of the posture key points. For example, the detectable posture key points are the nose key point, the neck key point and the shoulder key point. Based on the relative positions of the nose key point, the neck key point and the shoulder key point on the human body, the nose key point and the neck key point are connected, and the neck key point and the shoulder key point are connected to perform skeleton drawing and generate a starting skeleton image.

[0087] Similarly, the relative position relationship of the posture key points that can be detected in the second posture of the object is used to indicate the relative positions of the posture key points.

[0088] S105 , generating a posture transition animation from the first posture to the second posture according to the starting skeleton image of the first posture, at least one frame of interpolated skeleton image, and the ending skeleton image of the second posture.

[0089] The starting skeleton image of the first posture, at least one frame of interpolated skeleton image and the ending skeleton image of the second posture are animatedly combined to generate a posture transition animation from the first posture to the second posture, wherein the posture transition animation includes: the starting skeleton image of the first posture, at least one frame of interpolated skeleton image and the ending skeleton image of the second posture.

[0090] It is worth noting that in the specific implementation, you can use the `run` method in the `Pose_Inter` class to call the `transform_keypoints` and `gen_skeleton` functions to generate a series of skeleton images (interpolated skeleton images, starting skeleton images, and ending skeleton images), that is, to generate pose transition animations. In addition, you can also convert a series of skeleton images into a preset tensor format for subsequent processing or visualization.

[0091] In this embodiment, the key points of the intermediate transition frames are quickly generated through an optimized linear interpolation algorithm, which balances the computational efficiency and animation quality. It is suitable for real-time applications and lightweight devices, and different interpolation strategies are used for non-linear motion (key points disappear or appear), which improves the accuracy of interpolation. Therefore, this solution is suitable for non-linear motion, has high animation generation efficiency, and improves the smoothness and naturalness of the animation. In addition, there is no need to manually adjust the interpolation skeleton image, which greatly improves the efficiency of animation production and has a high degree of automation.

[0092] In an optional embodiment, the first state information includes: a first confidence level, and the second state information includes: a second confidence level, the first confidence level is used to indicate the confidence level of the corresponding preset posture key point in the first posture, and the second confidence level is used to indicate the confidence level of the corresponding preset posture key point in the second posture.

[0093] Among them, the value range of the first confidence and the second confidence can be 0 to 1. If the first confidence is 0, it means that the object in the first posture cannot detect the corresponding preset posture key point in the first posture (may be blocked), that is, the corresponding preset posture key point is not in the first posture. If the second confidence is 0, it means that the object in the second posture cannot detect the corresponding preset posture key point in the second posture, that is, the corresponding preset posture key point is not in the second posture.

[0094] If the first confidence is 1, it means that the object in the first posture can detect the corresponding preset posture key point in the first posture, that is, the corresponding preset posture key point is in the first posture. If the second confidence is 1, it means that the object in the second posture can detect the corresponding preset posture key point in the second posture, that is, the corresponding preset posture key point is in the second posture. The confidence is an intermediate value between 0 and 1, which indicates different degrees of confidence.

[0095] For example, when you are looking at a person, if you can clearly see the person's hand, then the position of the hand is very certain, and the confidence level is 1. If the person's hand is half blocked by the table, then the specific position of the hand is not so certain, and the confidence level may be 0.5. If the hand is completely blocked and cannot be seen, then you have no idea where the hand is, and the confidence level is 0.

[0096] Figure 2Schematic diagram of the process of the posture transition animation generation method provided in the embodiment of the present application Figure 2 In an optional implementation, the above step S102, respectively determining the common posture key points and the unique posture key points of the first posture and the second posture according to the first state information and the second state information, may include:

[0097] S201. Determine common posture key points and unique posture key points according to the first confidence level and the second confidence level, respectively.

[0098] If the first confidence and the second confidence of the preset posture key point both exceed the preset confidence threshold, the preset posture key point is determined to be a common posture key point of the first posture and the second posture. The preset confidence threshold may be, for example, 0.5.

[0099] If the first confidence of the preset posture key point exceeds the preset confidence threshold, but the second confidence of the preset posture key point does not exceed the preset confidence threshold, then the preset posture key point is determined to be a unique posture key point of the object in the first posture in the first posture, that is, as a unique posture key point between the first posture and the second posture.

[0100] If the first confidence of the preset posture key point does not exceed the preset confidence threshold, but the second confidence of the preset posture key point exceeds the preset confidence threshold, then the preset posture key point is determined to be a unique posture key point of the object in the second posture in the second posture, that is, as a unique posture key point between the first posture and the second posture.

[0101] In an optional embodiment, the first state information also includes: the first position of the common posture key point, or the first position of the common posture key point and the first position of the unique posture key point, and the second state information also includes: the second position of the common posture key point, or the second position of the common posture key point and the second position of the unique posture key point.

[0102] If the unique posture key point is the unique posture key point of the object in the first posture in the first posture, the first state information also includes: the first position of the common posture key point and the first position of the unique posture key point, and the second state information includes: the second position of the common posture key point.

[0103] If the unique posture key point is the unique posture key point of the object in the second posture in the second posture, the first state information also includes: the first position of the common posture key point, and the second state information includes: the second position of the common posture key point and the second position of the unique posture key point.

[0104] The above step S103, generating at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points, includes:

[0105] S202: interpolate according to the first position of the common posture key point and the second position of the common posture key point to obtain at least one interpolation position of the common posture key point.

[0106] Interpolation is performed based on the first position of the shared posture key point and the second position of the shared posture key point to obtain at least one interpolation position of the shared posture key point, wherein the number of interpolation positions of the shared posture key point can be a default number, that is, a default number of linear interpolations are performed based on the first position of the shared posture key point and the second position of the shared posture key point to obtain at least one interpolation position of the shared posture key point.

[0107] In an optional implementation, the above step S202, interpolating according to the first position of the common posture key point and the second position of the common posture key point to obtain at least one interpolated position of the common posture key point, includes:

[0108] Interpolation is performed according to the first position of the common posture key point, the second position of the common posture key point and a preset number of interpolation frames to obtain interpolation positions of the common posture key point with a preset number of interpolation frames.

[0109] The preset interpolation frame number is a custom interpolation frame number, that is, the interpolation frame number can be flexibly set when interpolating, and interpolation is performed according to the first position of the common posture key point, the second position of the common posture key point and the preset interpolation frame number to obtain the preset interpolation frame number of interpolation positions of the common posture key point, that is, the number of interpolation positions of the common posture key point is the preset interpolation frame number.

[0110] For example, the first position and the second position of the common posture key point are the two-dimensional positions (x1, y1) and (x2, y2) in a preset two-dimensional coordinate system, and the preset number of interpolation frames is n. Then the two-dimensional position (x, y) of the common posture key point in the first frame (the first skeleton interpolation image) is expressed as x=x1+(x2-x1)×1 / n, y=y1+(y2-y1)×1 / n, and the two-dimensional position (x, y) of the common posture key point in the second frame (the second skeleton interpolation image) is expressed as x=x1+(x2-x1)×2 / n, y=y1+(y2-y1)×2 / n.

[0111] Take (x1=0.2, y1=0.3), (x2=0.8, y2=0.9), n=3 as an example:

[0112] Frame 1: x = 0.2 + (0.8 - 0.2) × 1 / 3 = 0.4, y = 0.3 + (0.9 - 0.3) × 1 / 3 = 0.5

[0113] Frame 2: x = 0.2 + (0.8 - 0.2) × 2 / 3 = 0.6, y = 0.3 + (0.9 - 0.3) × 2 / 3 = 0.7

[0114] Frame 3: x=0.2+(0.8-0.2)×3 / 3=0.8, y=0.3+(0.9-0.3)×3 / 3=0.9.

[0115] It is worth mentioning that in the specific implementation, the `transform_keypoints` function can be used to interpolate the posture key points. The input of this function is the first state information, the second state information and the preset interpolation frame number, and the output is the posture key points (including common posture key points and unique posture key points) of the intermediate transition frame (interpolated skeleton image).

[0116] S203 , generating interpolated skeleton images of each frame according to the interpolated positions of the common posture key points, and the first positions of the unique posture key points or the second positions of the unique posture key points.

[0117] If the unique posture key point is a unique posture key point of the object in the first posture in the first posture, skeleton drawing is performed according to each interpolation position of the common posture key point and the first position of the unique posture key point to connect the common posture key point and the unique posture key point to generate an interpolation skeleton image of each frame. In other words, for each interpolation skeleton image of each frame, the first position of the unique posture key point is directly used as the interpolation position of the unique posture key point in the interpolation skeleton image of each frame.

[0118] If the unique posture key point is a unique posture key point of the object in the second posture in the second posture, skeleton drawing is performed according to each interpolation position of the common posture key point and the second position of the unique posture key point to connect the common posture key point and the unique posture key point to generate an interpolation skeleton image of each frame. In other words, for each interpolation skeleton image of each frame, the second position of the unique posture key point is directly used as the interpolation position of the unique posture key point in the interpolation skeleton image of each frame.

[0119] It is worth noting that skeleton drawing is performed based on the first position of the posture key point that can be detected by the object in the first posture in the first posture and the second position of the posture key point that can be detected by the object in the second posture in the second posture to generate the starting skeleton image of the first posture and the ending skeleton image of the second posture.

[0120] In an optional implementation, the above step S203, generating interpolated skeleton images of each frame according to the interpolated positions of the common posture key points and the first position of the unique posture key points or the second position of the unique posture key points, may include:

[0121] Based on the relative position relationship between the common posture key points and the unique posture key points, skeleton drawing is performed according to each interpolation position of the common posture key points and the first position of the unique posture key points or the second position of the unique posture key points to generate each interpolation skeleton image.

[0122] Among them, the relative position relationship between the common posture key points and the unique posture key points is used to indicate the relative positions of the common posture key points and the unique posture key points. For example, the common posture key points are the nose key point, the neck key point and the shoulder key point, and the unique posture key points are the elbow key point and the wrist key point. Based on the relative positions of the nose key point, the neck key point and the shoulder key point and the elbow key point on the human body, respectively, according to the interpolated positions of the nose key point, the neck key point and the shoulder key point, and the first position or the second position of the elbow key point and the wrist key point, the nose key point and the neck key point are connected, the neck key point and the shoulder key point are connected, the shoulder key point and the elbow key point are connected, and the elbow key point and the wrist key point are connected for skeleton drawing to generate an interpolated skeleton image of each frame.

[0123] It is worth noting that in the specific implementation, the `gen_skeleton` function can be used to generate a skeleton image. The input of this function is the interpolated positions of the common posture key points, the first position of the unique posture key points or the second position of the unique posture key points, and the output is the interpolated skeleton images.

[0124] During the skeleton drawing process, a blank canvas can be created for each interpolated skeleton image, and then the common posture key points and unique posture key points can be drawn on the blank canvas using the cv2.circle function according to the interpolated positions of the common posture key points, and the first position of the unique posture key points or the second position of the unique posture key points. Small dots are drawn at the positions of the common posture key points and the unique posture key points, and the cv2.line function is used to draw straight lines to connect the dots for skeleton drawing.

[0125] In this embodiment, by customizing the number of interpolation frames to meet different animation requirements, the user can control the smoothness and detail of the animation by adjusting the number of interpolation frames, which is more flexible and ensures that each posture key point can transition smoothly by considering the situation where the posture key point may disappear or appear.

[0126] For example, in the first posture image, the first person is kneeling on one knee, and in the second posture image, the second person is standing with his feet on the ground. The preset interpolation frame number is 8 frames. Figure 3 Schematic diagram of the posture transition animation provided in the embodiment of the present application Figure 1 ,like Figure 3As shown, 8 interpolated skeleton images, 1 starting skeleton image (the first image from left to right), and 1 ending skeleton image (the last image from left to right) are generated by connecting the posture key points. It can be seen that the skeleton image is similar to a matchstick figure.

[0127] For example, in the first posture image, the first person waves with one hand, and in the second posture image, the second person stands with his feet on the ground. The preset interpolation frame number is 8 frames. Figure 4 Schematic diagram of the posture transition animation provided in the embodiment of the present application Figure 2 ,like Figure 4 As shown, 8 interpolated skeleton images, 1 starting skeleton image (the first image from left to right), and 1 ending skeleton image (the last image from left to right) are generated by connecting the posture key points. It can be seen that the skeleton image is similar to a matchstick figure.

[0128] Figure 5 Schematic diagram of the process of the posture transition animation generation method provided in the embodiment of the present application Figure 3 ,like Figure 5 As shown, in an optional implementation, the above step S101, obtaining the first state information of multiple preset posture key points in the first posture, and the second state information of multiple preset posture key points in the second posture, may include:

[0129] S301: Acquire a first posture image corresponding to a first posture, and a second posture image corresponding to a second posture.

[0130] S302 , performing key point detection on the first posture image and the second posture image respectively to obtain first state information and second state information.

[0131] A first posture image of an object in a first posture in a first posture and a second posture image of an object in a second posture in a second posture are obtained, key point detection is performed on the first posture image to obtain first state information of multiple preset posture key points, and key point detection is performed on the second posture image to obtain second state information of multiple preset posture key points.

[0132] The first posture and the second posture are both postures of the same type of object, and the plurality of preset posture key points are posture key points of the same type of object; the above step S302, respectively performing key point detection on the first posture image and the second posture image to obtain the first state information and the second state information, includes:

[0133] A posture key point detection model for the same type of object is used to perform key point detection on the first posture image and the second posture image respectively to obtain first state information and second state information.

[0134] Using the posture key point detection model of the same type of object, key point detection is performed on the first posture image to obtain first state information of multiple preset posture key points, and key point detection is performed on the second posture image to obtain second state information of multiple preset posture key points.

[0135] Among them, the posture key point detection model can be, for example, OpenPose or DWPose, and the detection result of the posture key point detection model (i.e., the first state information and the second state information) can be in the form of a triple: (x, y, confidence), wherein x and y respectively represent the horizontal position and vertical position of the posture key point in the posture image, and the value range can be 0 to 1, and confidence is the confidence level, which indicates the certainty of the posture key point predicted by the model in the corresponding posture.

[0136] In this embodiment, a corresponding posture key point detection model is adopted based on the object type, which can process posture data of different objects and is suitable for different application scenarios with strong adaptability and high flexibility.

[0137] In an optional implementation, the plurality of preset posture key points are posture key points of the same type of object, and the method may further include:

[0138] According to the object type of the same class of objects, the posture transition animation is model rendered to obtain a posture transition model of the object type.

[0139] The object type can be, for example, a person or an animal. According to the object type, the posture transition animation is model rendered to obtain a posture transition model of the same type of object. That is to say, according to the object type of the same type of object, the skeleton images in the posture transition animation are model rendered to generate a posture transition model of the object type.

[0140] It is worth noting that according to actual application fields, such as animation production, video editing, virtual reality, etc., based on actual needs, after generating posture transition animations for the same type of objects, the posture transition animations can be model rendered to obtain a posture transition model for the same type of objects. For the specific implementation of model rendering, please refer to the relevant description of the prior art, which will not be repeated here.

[0141] In this embodiment, different posture key point detection models are used for different object types, thereby supporting different types of posture markings and being suitable for different application fields.

[0142] Figure 6 This is a schematic diagram of the structure of a posture transition animation generation device provided in an embodiment of the present application, which can be integrated in an electronic device.

[0143] like Figure 6 As shown, the device may include:

[0144] An acquisition module 401 is used to acquire first state information of a plurality of preset posture key points in a first posture, and second state information of a plurality of preset posture key points in a second posture;

[0145] A determination module 402, for determining common posture key points and unique posture key points from the first posture to the second posture respectively according to the first state information and the second state information;

[0146] A generating module 403, for generating at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points;

[0147] The generating module 403 is further used to generate a starting skeleton image of the first posture and an ending skeleton image of the second posture respectively according to the first state information and the second state information;

[0148] The generating module 403 is further used to generate a posture transition animation from the first posture to the second posture according to the starting skeleton image of the first posture, at least one frame of interpolated skeleton image and the ending skeleton image of the second posture.

[0149] In an optional embodiment, the first state information includes: a first confidence, and the second state information includes: a second confidence, the first confidence is used to indicate the confidence of the corresponding preset posture key point in the first posture, and the second confidence is used to indicate the confidence of the corresponding preset posture key point in the second posture;

[0150] The determination module 402 is specifically configured to determine the common posture key points and the unique posture key points according to the first confidence level and the second confidence level, respectively.

[0151] In an optional embodiment, the first state information further includes: a first position of a common posture key point, or a first position of a common posture key point and a first position of a unique posture key point, and the second state information further includes: a second position of a common posture key point, or a second position of a common posture key point and a second position of a unique posture key point;

[0152] The generating module 403 is specifically used for:

[0153] Interpolate according to the first position of the common posture key point and the second position of the common posture key point to obtain at least one interpolation position of the common posture key point;

[0154] An interpolated skeleton image of each frame is generated according to each interpolated position of the common posture key point and the first position of the unique posture key point or the second position of the unique posture key point.

[0155] In an optional implementation, the generating module 403 is specifically configured to:

[0156] Interpolation is performed according to the first position of the common posture key point, the second position of the common posture key point and a preset number of interpolation frames to obtain interpolation positions of the common posture key point with a preset number of interpolation frames.

[0157] In an optional implementation, the generating module 403 is specifically configured to:

[0158] Based on the relative position relationship between the common posture key points and the unique posture key points, skeleton drawing is performed according to each interpolation position of the common posture key points and the first position of the unique posture key points or the second position of the unique posture key points to generate each interpolation skeleton image.

[0159] In an optional implementation manner, the acquisition module 401 is specifically configured to:

[0160] Acquire a first posture image corresponding to the first posture, and a second posture image corresponding to the second posture;

[0161] Key point detection is performed on the first posture image and the second posture image respectively to obtain first state information and second state information.

[0162] In an optional implementation, the first posture and the second posture are postures of the same type of object, and the plurality of preset posture key points are posture key points of the same type of object; the acquisition module is specifically used for: the acquisition module 401 is specifically used for:

[0163] A posture key point detection model for the same type of object is used to perform key point detection on the first posture image and the second posture image respectively to obtain first state information and second state information.

[0164] In an optional embodiment, the plurality of preset posture key points are posture key points of the same type of object; the device further comprises:

[0165] The rendering module 404 is used to perform model rendering on the posture transition animation according to the object type of the same type of objects to obtain a posture transition model of the object type.

[0166] In this embodiment, the acquisition module is used to acquire the first state information of multiple preset posture key points in the first posture, and the second state information of multiple preset posture key points in the second posture. The determination module is used to determine the common posture key points and the unique posture key points from the first posture to the second posture according to the first state information and the second state information, respectively. The generation module is used to generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points. The generation module is also used to generate the starting skeleton image of the first posture and the ending skeleton image of the second posture according to the first state information and the second state information, respectively. The generation module is also used to generate the posture transition animation from the first posture to the second posture according to the starting skeleton image of the first posture, the at least one frame of interpolated skeleton image and the ending skeleton image of the second posture. This solution is suitable for nonlinear motion, has high animation generation efficiency, and improves animation fluency and naturalness.

[0167] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 7 As shown, the device may include: a processor 501, a memory 502 and a bus 503, the memory 502 stores machine-readable instructions executable by the processor 501, when the electronic device is running, the processor 501 communicates with the memory 502 through the bus 503, and the processor 501 executes the machine-readable instructions to perform the following steps:

[0168] Determine, according to the first state information and the second state information, common posture key points and unique posture key points of the first posture and the second posture respectively;

[0169] Generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points;

[0170] Generating a starting skeleton image of a first posture and an ending skeleton image of a second posture respectively according to the first state information and the second state information;

[0171] A posture transition animation from the first posture to the second posture is generated according to the starting skeleton image of the first posture, at least one frame of interpolated skeleton image and the ending skeleton image of the second posture.

[0172] In an optional embodiment, the first state information includes: a first confidence, and the second state information includes: a second confidence, the first confidence is used to indicate the confidence of the corresponding preset posture key point in the first posture, and the second confidence is used to indicate the confidence of the corresponding preset posture key point in the second posture;

[0173] Determining common posture key points and unique posture key points from the first posture to the second posture respectively according to the first state information and the second state information, including:

[0174] According to the first confidence level and the second confidence level, the common posture key points and the unique posture key points are determined respectively.

[0175] In an optional implementation, the first state information further includes: a first position of a common posture key point, or a first position of a common posture key point and a first position of a unique posture key point, and the second state information further includes: a second position of a common posture key point, or a second position of a common posture key point and a second position of a unique posture key point; generating at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key point and the unique posture key point, including:

[0176] Interpolate according to the first position of the common posture key point and the second position of the common posture key point to obtain at least one interpolation position of the common posture key point;

[0177] An interpolated skeleton image of each frame is generated according to each interpolated position of the common posture key point and the first position of the unique posture key point or the second position of the unique posture key point.

[0178] In an optional implementation, interpolation is performed based on the first position of the common posture key point and the second position of the common posture key point to obtain at least one interpolated position of the common posture key point, including:

[0179] Interpolation is performed according to the first position of the common posture key point, the second position of the common posture key point and a preset number of interpolation frames to obtain interpolation positions of the common posture key point with a preset number of interpolation frames.

[0180] In an optional implementation, generating interpolated skeleton images of each frame according to each interpolated position of the common posture key point and the first position of the unique posture key point or the second position of the unique posture key point includes:

[0181] Based on the relative position relationship between the common posture key points and the unique posture key points, skeleton drawing is performed according to each interpolation position of the common posture key points and the first position of the unique posture key points or the second position of the unique posture key points to generate each interpolation skeleton image.

[0182] In an optional implementation, obtaining first state information of a plurality of preset posture key points in a first posture, and second state information of a plurality of preset posture key points in a second posture, includes:

[0183] Acquire a first posture image corresponding to the first posture, and a second posture image corresponding to the second posture;

[0184] Key point detection is performed on the first posture image and the second posture image respectively to obtain first state information and second state information.

[0185] In an optional implementation, the first posture and the second posture are postures of the same type of object, and the plurality of preset posture key points are posture key points of the same type of object; performing key point detection on the first posture image and the second posture image respectively to obtain the first state information and the second state information includes:

[0186] A posture key point detection model for the same type of object is used to perform key point detection on the first posture image and the second posture image respectively to obtain first state information and second state information.

[0187] In an optional implementation, the plurality of preset posture key points are posture key points of the same type of object; and the method further comprises:

[0188] According to the object type of the same class of objects, the posture transition animation is model rendered to obtain a posture transition model of the object type.

[0189] In this embodiment, the processor executes machine-readable instructions to obtain first state information of multiple preset posture key points in the first posture, and second state information of multiple preset posture key points in the second posture, respectively determine the common posture key points and unique posture key points of the first posture and the second posture according to the first state information and the second state information, generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points, respectively generate the starting skeleton image of the first posture and the ending skeleton image of the second posture according to the first state information and the second state information, and generate a posture transition animation according to the starting skeleton image of the first posture, at least one frame of interpolated skeleton image and the ending skeleton image of the second posture. This solution is suitable for nonlinear motion, has high animation generation efficiency, and improves animation fluency and naturalness.

[0190] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed when a processor is running, and the processor performs the following steps:

[0191] Determine, according to the first state information and the second state information, common posture key points and unique posture key points of the first posture and the second posture respectively;

[0192] Generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points;

[0193] Generating a starting skeleton image of a first posture and an ending skeleton image of a second posture respectively according to the first state information and the second state information;

[0194] A posture transition animation from the first posture to the second posture is generated according to the starting skeleton image of the first posture, at least one frame of interpolated skeleton image and the ending skeleton image of the second posture.

[0195] In an optional embodiment, the first state information includes: a first confidence, and the second state information includes: a second confidence, the first confidence is used to indicate the confidence of the corresponding preset posture key point in the first posture, and the second confidence is used to indicate the confidence of the corresponding preset posture key point in the second posture;

[0196] Determining common posture key points and unique posture key points from the first posture to the second posture respectively according to the first state information and the second state information, including:

[0197] According to the first confidence level and the second confidence level, the common posture key points and the unique posture key points are determined respectively.

[0198] In an optional implementation, the first state information further includes: a first position of a common posture key point, or a first position of a common posture key point and a first position of a unique posture key point, and the second state information further includes: a second position of a common posture key point, or a second position of a common posture key point and a second position of a unique posture key point; generating at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key point and the unique posture key point, including:

[0199] Interpolate according to the first position of the common posture key point and the second position of the common posture key point to obtain at least one interpolation position of the common posture key point;

[0200] An interpolated skeleton image of each frame is generated according to each interpolated position of the common posture key point and the first position of the unique posture key point or the second position of the unique posture key point.

[0201] In an optional implementation, interpolation is performed based on the first position of the common posture key point and the second position of the common posture key point to obtain at least one interpolated position of the common posture key point, including:

[0202] Interpolation is performed according to the first position of the common posture key point, the second position of the common posture key point and a preset number of interpolation frames to obtain interpolation positions of the common posture key point with a preset number of interpolation frames.

[0203] In an optional implementation, generating interpolated skeleton images of each frame according to each interpolated position of the common posture key point and the first position of the unique posture key point or the second position of the unique posture key point includes:

[0204] Based on the relative position relationship between the common posture key points and the unique posture key points, skeleton drawing is performed according to each interpolation position of the common posture key points and the first position of the unique posture key points or the second position of the unique posture key points to generate each interpolation skeleton image.

[0205] In an optional implementation, obtaining first state information of a plurality of preset posture key points in a first posture, and second state information of a plurality of preset posture key points in a second posture, includes:

[0206] Acquire a first posture image corresponding to the first posture, and a second posture image corresponding to the second posture;

[0207] Key point detection is performed on the first posture image and the second posture image respectively to obtain first state information and second state information.

[0208] In an optional implementation, the first posture and the second posture are postures of the same type of object, and the plurality of preset posture key points are posture key points of the same type of object; performing key point detection on the first posture image and the second posture image respectively to obtain the first state information and the second state information includes:

[0209] A posture key point detection model for the same type of object is used to perform key point detection on the first posture image and the second posture image respectively to obtain first state information and second state information.

[0210] In an optional implementation, the plurality of preset posture key points are posture key points of the same type of object; and the method further comprises:

[0211] According to the object type of the same class of objects, the posture transition animation is model rendered to obtain a posture transition model of the object type.

[0212] In this embodiment, the computer program is executed when the processor is running, and the processor executes to obtain the first state information of multiple preset posture key points in the first posture, and the second state information of multiple preset posture key points in the second posture, respectively determine the common posture key points and unique posture key points of the first posture and the second posture according to the first state information and the second state information, generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points, respectively generate the starting skeleton image of the first posture and the ending skeleton image of the second posture according to the first state information and the second state information, and generate the posture transition animation according to the starting skeleton image of the first posture, at least one frame of interpolated skeleton image and the ending skeleton image of the second posture. This scheme is suitable for nonlinear motion, has high animation generation efficiency, and improves the animation fluency and naturalness.

[0213] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.

[0214] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0215] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0216] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0217] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0218] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0219] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for generating a posture transition animation, characterized in that: include: Acquire first state information of a plurality of preset posture key points in a first posture, and second state information of a plurality of preset posture key points in a second posture; Determining common posture key points and unique posture key points of the first posture and the second posture respectively according to the first state information and the second state information; Generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points; generating a starting skeleton image of the first posture and an ending skeleton image of the second posture respectively according to the first state information and the second state information; A posture transition animation from the first posture to the second posture is generated according to the starting skeleton image of the first posture, the at least one frame of interpolated skeleton image and the ending skeleton image of the second posture.

2. The method according to claim 1, characterized in that: The first state information includes: a first confidence, and the second state information includes: a second confidence, the first confidence is used to indicate the confidence of the corresponding preset posture key point in the first posture, and the second confidence is used to indicate the confidence of the corresponding preset posture key point in the second posture; The determining, according to the first state information and the second state information, respectively the common posture key points and the unique posture key points of the first posture and the second posture comprises: The common posture key points and the unique posture key points are determined respectively according to the first confidence level and the second confidence level.

3. The method according to claim 1 or 2, characterized in that: The first state information further includes: a first position of the common posture key point, or a first position of the common posture key point and a first position of the unique posture key point; the second state information further includes: a second position of the common posture key point, or a second position of the common posture key point and a second position of the unique posture key point; generating at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key point and the unique posture key point, comprising: Interpolating according to the first position of the common posture key point and the second position of the common posture key point to obtain at least one interpolated position of the common posture key point; According to the interpolated positions of the common posture key points, and the first position of the unique posture key points or the second position of the unique posture key points, interpolated skeleton images of each frame are generated.

4. The method according to claim 3, characterized in that The interpolating according to the first position of the common posture key point and the second position of the common posture key point to obtain at least one interpolated position of the common posture key point comprises: Interpolation is performed according to the first position of the common posture key point, the second position of the common posture key point and a preset number of interpolation frames to obtain the preset number of interpolation frames of the common posture key point.

5. The method according to claim 4, characterized in that The generating of interpolated skeleton images of each frame according to each interpolated position of the common posture key point and the first position of the unique posture key point or the second position of the unique posture key point comprises: Based on the relative positional relationship between the common posture key points and the unique posture key points, skeleton drawing is performed according to the interpolated positions of the common posture key points and the first positions of the unique posture key points or the second positions of the unique posture key points to generate the interpolated skeleton images.

6. The method according to claim 1, characterized in that The step of obtaining first state information of a plurality of preset posture key points in a first posture and second state information of a plurality of preset posture key points in a second posture includes: Acquire a first posture image corresponding to the first posture, and a second posture image corresponding to the second posture; Key point detection is performed on the first posture image and the second posture image respectively to obtain the first state information and the second state information.

7. The method according to claim 6, characterized in that The first posture and the second posture are postures of the same type of object, and the plurality of preset posture key points are posture key points of the same type of object; The performing key point detection on the first posture image and the second posture image respectively to obtain the first state information and the second state information includes: The posture key point detection model of the same type of objects is used to perform key point detection on the first posture image and the second posture image respectively to obtain the first state information and the second state information.

8. The method according to claim 1, characterized in that The plurality of preset posture key points are posture key points of objects of the same type; the method further comprises: According to the object type of the same class of objects, the posture transition animation is model rendered to obtain a posture transition model of the object type.

9. A posture transition animation generation device, characterized in that: include: An acquisition module, used to acquire first state information of a plurality of preset posture key points in a first posture, and second state information of a plurality of preset posture key points in a second posture; A determination module, configured to determine common posture key points and unique posture key points of the first posture and the second posture respectively according to the first state information and the second state information; A generating module, configured to generate at least one frame of interpolated skeleton image between the first posture and the second posture according to the common posture key points and the unique posture key points; The generating module is further used to generate a starting skeleton image of the first posture and an ending skeleton image of the second posture respectively according to the first state information and the second state information; The generating module is further used to generate a posture transition animation from the first posture to the second posture according to the starting skeleton image of the first posture, the at least one frame of interpolated skeleton image and the ending skeleton image of the second posture.

10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and the processor executes the machine-readable instructions to perform the method described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is executed.