WO2023083030A1 - Posture recognition method and related device - Google Patents

Posture recognition method and related device Download PDF

Info

Publication number
WO2023083030A1
WO2023083030A1 PCT/CN2022/128504 CN2022128504W WO2023083030A1 WO 2023083030 A1 WO2023083030 A1 WO 2023083030A1 CN 2022128504 W CN2022128504 W CN 2022128504W WO 2023083030 A1 WO2023083030 A1 WO 2023083030A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
target
target object
pose
processed
Prior art date
Application number
PCT/CN2022/128504
Other languages
French (fr)
Chinese (zh)
Inventor
李志豪
张子霄
许松岑
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023083030A1 publication Critical patent/WO2023083030A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Definitions

  • This application relates to the technical field of artificial intelligence (AI), in particular to a gesture recognition method and related equipment.
  • AI artificial intelligence
  • Human body motion capture technology is a commonly used technology in the film and television and game industries. This technology can process the input video stream to capture the posture of the human body in each frame of image, so as to obtain the motion information of the human body. Based on this technology, the posture data of human body movement can be extracted from massive videos, which has a wide range of application scenarios.
  • human body motion capture can be realized based on AI technology.
  • the trained neural network can be used to process the area where the human body is located in the image, so as to obtain posture parameters, and the posture parameters can be used to determine the posture of the human body.
  • the neural network will determine the The posture parameters of the human body in the image are consistent, but in the actual environment, once the human body moves, although the postures of the human body in different positions are similar, there must be subtle differences between the postures of the human body. This is the current neural network. If it cannot be identified, the captured posture of the human body is not accurate enough, which in turn affects the accuracy of the motion information of the human body.
  • the embodiment of the present application provides a posture recognition method and related equipment, which can obtain the posture of the target object after processing the image containing the target object, which has high accuracy, and is conducive to improving the accuracy of the acquired target image. Accuracy of exercise information.
  • the first aspect of the embodiments of the present application provides a gesture recognition method, the method comprising:
  • the target image When it is necessary to perform gesture recognition on the target image, the target image can be obtained first.
  • the target image usually presents the target object and the environment in which the target object is located. It can be understood that the goal of gesture recognition is to obtain the pose of the target object in the target image .
  • the target image can be preprocessed. Specifically, the target image may be detected to determine an area where the target object is located in the target image, which may be called a target area, and position information of the target area in the target image may be acquired.
  • the target area and the position information of the target area in the target image can be input to the gesture recognition model, so that the target area of the target image and the target area in the target image can be identified by the gesture recognition model.
  • the position information in the target image is processed to obtain the attitude parameters. Then, the pose of the target object in the target image can be obtained based on the pose parameters.
  • the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target image of the target image can be identified by the gesture recognition model.
  • the position information of the area and the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters.
  • the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing
  • the impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object.
  • the factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
  • the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the target image.
  • a certain vertex of the target image can be used as the origin of the image coordinate system, then, the coordinates of the center point of the target area in the image coordinate system can be determined, as well as the length and width of the target area (which is equivalent to obtaining The size of the target area), this information can be used to indicate the position of the target area in the target image, so that after inputting the position information of the target area into the gesture recognition model, the gesture recognition model will perform image processing on the target area , can effectively take into account the influence of the position information of the target area in the target image on the pose of the target object, so the pose of the target object obtained based on these information has high accuracy.
  • the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the target image.
  • a certain vertex of the target image can be used as the origin of the image coordinate system, then the coordinates of all vertices of the target area in the image coordinate system can be determined, and this information can be used to indicate the position of the target area in the target image.
  • the gesture recognition model can effectively take into account the influence of the position information of the target area in the target image on the pose of the target object when processing the image of the target area. Therefore, the posture of the target object obtained based on these information has a high accuracy.
  • the pose recognition model is trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed to obtain .
  • the gesture recognition model is made to perceive the position of the target object in the whole image, and learn the relationship between the position and the pose of the target object. Then, in the application process of the gesture recognition model, the model can accurately capture the pose of the target object from the whole picture based on the position information of the target object in the whole picture.
  • the pose of the target object includes the orientation of the target object in the camera coordinate system (that is, the orientation of the target object relative to the camera) and the body behavior of the target object in the camera coordinate system (that is, the orientation of the target object in the three-dimensional action in space), the origin of the camera coordinate system is the camera that captures the target image.
  • the gesture recognition model can also recognize the difference between the poses of the target object in these multiple images. The difference between objects, that is, the difference between the orientation of the target object relative to the camera, and the difference between the motion of the target object in three-dimensional space.
  • the method further includes: processing the target area of the target image and the position information of the target area in the target image through the gesture recognition model to obtain shape parameters and displacement parameters, and the pose parameters, shape parameters and The displacement parameters are collectively used to obtain the pose of the target object.
  • the output of the gesture recognition model may include gesture parameters, shape parameters and displacement parameters.
  • the attitude parameter is used to indicate the rotation angle of the target object relative to the camera and the angle between each joint of the target object itself.
  • the shape parameter is used to indicate the three-dimensional shape of the target object.
  • the displacement parameter is used to indicate the range occupied by the target object in the target area, and the offset of the target object in the target area (for example, taking the center point of the target area as a reference point, the degree to which the target object shifts to the left or to degree of right offset).
  • the attitude of the target object can be accurately obtained by calculating based on the attitude parameters, shape parameters and displacement parameters.
  • the method further includes: performing normalization processing on the position information of the target area in the target image to obtain the normalized position information; Processing the position information of the target area in the target image to obtain the pose parameters includes: processing the target area of the target image and the normalized position information through a pose recognition model to obtain the pose parameters.
  • the gesture recognition model can be implemented based on the normalized position information when performing the gesture recognition operation. Since the processing of the normalized position information is less difficult, it is beneficial to reduce the calculation amount of the gesture recognition model and reduce The design cost of the model.
  • the target object is a human body.
  • the second aspect of the embodiment of the present application provides a gesture recognition method, the method comprising:
  • the target image When it is necessary to perform gesture recognition on the target image, the target image can be obtained first.
  • the target image usually presents the target object and the environment in which the target object is located. It can be understood that the goal of gesture recognition is to obtain the pose of the target object in the target image .
  • the position information of the pixels in the target image can be obtained, and the target image and the position information of the pixels in the target image can be input into the gesture recognition model, so that the target image and the pixel points in the target image can be detected by the gesture recognition model.
  • the position information is processed to obtain attitude parameters, and the attitude parameters are used to obtain the attitude of the target object included in the target image.
  • the target image and the position information of the pixels in the target image can be input to the gesture recognition model, so as to perform the target image and the position information of the pixels in the target image through the gesture recognition model.
  • the posture parameters are obtained, so the posture of the target object presented by the target image can be obtained based on the posture parameters.
  • the input of the gesture recognition model not only includes the target image, but also includes the position information of the pixels in the target image. Therefore, when the gesture recognition model performs image processing, it not only considers the image information of the target image itself to the pose of the target object.
  • the impact caused by this method also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object.
  • the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy. degree, which in turn helps to improve the accuracy of the acquired motion information of the target image.
  • the position information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the target image.
  • a certain vertex of the target image can be used as the origin of the image coordinate system, then the coordinates of all pixels in the target image in the image coordinate system can be determined, and this information can be used as the input of the gesture recognition model, so that , the input of the gesture recognition model not only includes each pixel of the target image, but also includes the coordinates of each pixel in the target image in the image coordinate system.
  • the pose recognition model can effectively consider the influence of the position information of all pixels in the target area on the pose of the target object when performing image processing on the target area, Therefore, the posture of the target object obtained based on these information has high accuracy.
  • the pose recognition model is trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed to obtain .
  • the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
  • the method further includes: processing the target image and the position information of the pixels in the target image through the gesture recognition model to obtain shape parameters and displacement parameters, and the posture parameters, shape parameters and displacement parameters are used in common to obtain the pose of the target object.
  • the method further includes: performing normalization processing on the position information of the pixels in the target image to obtain the normalized position information; Processing the position information of the point to obtain the attitude parameters includes: processing the target image and the normalized position information through the attitude recognition model to obtain the attitude parameters.
  • the target object is a human body.
  • the third aspect of the embodiment of the present application provides a model training method, the method includes: acquiring the image to be processed; processing the target area of the image to be processed by the model to be trained and the position information of the target area in the image to be processed, to obtain Attitude parameters, the target area is the area where the target object is located; based on the attitude parameters, the predicted attitude of the target object is obtained; based on the predicted attitude of the target object and the real attitude of the target object, the training model is trained to obtain the attitude recognition model.
  • the gesture recognition model obtained by the above method can make the gesture recognition model perceive the position of the target object in the whole image, and learn the relationship between the position and the pose of the target object, so as to capture the pose of the target object more accurately.
  • the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself.
  • the influence caused by the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object.
  • the factors considered are relatively comprehensive, so the posture of the target object obtained based on this method, It has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
  • the model to be trained is trained based on the predicted pose of the target object and the real pose of the target object
  • the gesture recognition model obtained includes: a predicted projection result based on the predicted pose of the target object on the image to be processed and The real projection result of the real pose of the target object on the image to be processed is used to train the model to be trained to obtain a pose recognition model.
  • the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the image to be processed.
  • the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  • the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
  • the method includes: processing the target area of the image to be processed by the model to be trained and the position information of the target area in the image to be processed to obtain shape parameters and displacement parameters, attitude parameters, shape parameters and The displacement parameters are collectively used to obtain the pose of the target object.
  • the method further includes: performing normalization processing on the position information of the target area in the image to be processed to obtain the normalized position information;
  • processing the position information of the target area in the image to be processed to obtain the attitude parameters includes: processing the target area of the image to be processed by the model to be trained and the normalized position information to obtain the attitude parameters.
  • the target object is a human body.
  • the fourth aspect of the embodiments of the present application provides a model training method, the method comprising: acquiring an image to be processed;
  • the attitude parameters are obtained by processing the image to be processed and the position information of the pixels in the image to be processed by the model to be trained; based on the attitude parameters, the predicted attitude of the target object is obtained; based on the predicted attitude of the target object and the real attitude of the target object, the attitude parameter
  • the model is trained to obtain a gesture recognition model.
  • the gesture recognition model obtained by the above method can make the gesture recognition model perceive the position of the target object in the whole image, and learn the relationship between the position and the pose of the target object, so as to capture the pose of the target object more accurately.
  • the pose recognition model is in image processing, its input not only includes the target image, but also includes the position information of the pixels in the target image, so the pose recognition model not only considers the influence of the image information of the target image itself on the pose of the target object , it also takes into account the impact of the position information of the pixel points in the target image on the attitude of the target object, and the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy, and further has It is beneficial to improve the accuracy of the acquired motion information of the target image.
  • the model to be trained is trained to obtain a pose recognition model: based on the predicted projection result of the predicted pose of the target object on the image to be processed and the target The real projection result of the real pose of the object on the image to be processed is used to train the model to be trained to obtain a pose recognition model.
  • the location information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  • the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
  • the method further includes: processing the target area of the image to be processed by the model to be trained and the position information of the pixels in the image to be processed to obtain attitude parameters, shape parameters and displacement parameters, attitude parameters, The shape parameter and the displacement parameter are jointly used to obtain the pose of the target object.
  • the method further includes: performing normalization processing on the position information of the pixels in the image to be processed to obtain the normalized position information; Processing the position information of the pixels to obtain the attitude parameters includes: processing the image to be processed and the normalized position information by the model to be trained to obtain the attitude parameters.
  • the target object is a human body.
  • the fifth aspect of the embodiment of the present application provides a gesture recognition device, the device includes: an acquisition module, used to acquire a target image; The position information in is processed to obtain the attitude parameters, the target area is the area where the target object is located, and the attitude parameters are used to obtain the attitude of the target object.
  • the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target image of the target image can be detected by the gesture recognition model.
  • the position information of the area and the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters.
  • the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing
  • the impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object.
  • the factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
  • the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the target image.
  • the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the target image.
  • the pose recognition model is obtained by training based on a predicted projection result of the predicted pose of the target object on the image to be processed and a real projection result of the real pose of the target object on the image to be processed.
  • the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
  • the processing module is also used to process the target area of the target image and the position information of the target area in the target image through the pose recognition model to obtain shape parameters and displacement parameters, pose parameters, shape parameters Together with the displacement parameter, it is used to obtain the pose of the target object.
  • the device further includes: a normalization module, configured to perform normalization processing on the position information of the target area in the target image to obtain normalized position information;
  • the target area of the target image and the normalized position information are processed by the gesture recognition model to obtain the gesture parameters.
  • the target object is a human body.
  • the sixth aspect of the embodiment of the present application provides a gesture recognition device, which includes: an acquisition module, used to acquire a target image; a processing module, used to use a gesture recognition model to process the target image and the position information of the pixels in the target image Processing is performed to obtain attitude parameters, and the attitude parameters are used to obtain the attitude of the target object included in the target image.
  • the target image and the position information of the pixels in the target image can be input to the gesture recognition model, so as to perform the target image and the position information of the pixels in the target image through the gesture recognition model.
  • the posture parameters are obtained, so the posture of the target object presented by the target image can be obtained based on the posture parameters.
  • the input of the gesture recognition model not only includes the target image, but also includes the position information of the pixels in the target image. Therefore, when the gesture recognition model performs image processing, it not only considers the image information of the target image itself to the pose of the target object.
  • the impact caused by this method also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object.
  • the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy. degree, which in turn helps to improve the accuracy of the acquired motion information of the target image.
  • the position information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the target image.
  • the pose recognition model is obtained by training based on a predicted projection result of the predicted pose of the target object on the image to be processed and a real projection result of the real pose of the target object on the image to be processed.
  • the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
  • the processing module is also used to process the target image and the position information of the pixels in the target image through the gesture recognition model to obtain the shape parameter and the displacement parameter, and the gesture parameter, the shape parameter and the displacement parameter are jointly Used to get the pose of the target object.
  • the device further includes: a normalization module, configured to perform normalization processing on the position information of pixels in the target image to obtain normalized position information; a processing module, configured to The target image and the normalized position information are processed by the gesture recognition model to obtain the gesture parameters.
  • a normalization module configured to perform normalization processing on the position information of pixels in the target image to obtain normalized position information
  • a processing module configured to The target image and the normalized position information are processed by the gesture recognition model to obtain the gesture parameters.
  • the target object is a human body.
  • the seventh aspect of the embodiment of the present application provides a model training device, the device includes: a first acquisition module, used to acquire the image to be processed; a processing module, used to use the model to be trained to target the target area of the image to be processed and the target area Process the position information in the image to be processed to obtain attitude parameters, and the target area is the area where the target object is located;
  • the second acquisition module is used to acquire the predicted pose of the target object based on the pose parameters; the training module is used to train the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
  • the gesture recognition model obtained by the above-mentioned device can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the posture of the target object, so as to capture the posture of the target object more accurately.
  • the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself.
  • the influence caused by the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object.
  • the factors considered are relatively comprehensive, so the posture of the target object obtained based on this method, It has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
  • the training module is configured to train the model to be trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed , to get the gesture recognition model.
  • the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the image to be processed.
  • the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  • the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
  • the processing module is also used to process the target area of the image to be processed and the position information of the target area in the image to be processed through the pose recognition model to obtain shape parameters and displacement parameters, pose parameters, shape The parameters and the displacement parameters are used together to obtain the pose of the target object.
  • the device further includes: a normalization module, configured to perform normalization processing on the position information of the target area in the image to be processed to obtain normalized position information; a processing module, It is used to process the target area of the image to be processed by the model to be trained and the normalized position information to obtain the pose parameters.
  • a normalization module configured to perform normalization processing on the position information of the target area in the image to be processed to obtain normalized position information
  • a processing module It is used to process the target area of the image to be processed by the model to be trained and the normalized position information to obtain the pose parameters.
  • the target object is a human body.
  • the eighth aspect of the embodiment of the present application provides a model training device, the device includes: a first acquisition module, used to acquire the image to be processed; a processing module, used to use the model to be trained to process the image to be processed and the pixels in the image to be processed The position information of the point is processed to obtain the attitude parameters; the second acquisition module is used to obtain the predicted attitude of the target object based on the attitude parameters; the training module is used to treat the training model based on the predicted attitude of the target object and the real attitude of the target object Perform training to obtain a gesture recognition model.
  • the gesture recognition model obtained by the above-mentioned device can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the posture of the target object, so as to capture the posture of the target object more accurately.
  • the pose recognition model is in image processing, its input not only includes the target image, but also includes the position information of the pixels in the target image, so the pose recognition model not only considers the influence of the image information of the target image itself on the pose of the target object , it also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object, and the factors considered are relatively comprehensive. Therefore, the attitude of the target object obtained based on this method has high accuracy, and further has It is beneficial to improve the accuracy of the acquired motion information of the target image.
  • the training module is configured to train the model to be trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed , to get the gesture recognition model.
  • the location information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  • the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
  • the processing module is also used to process the target area of the image to be processed and the position information of the pixels in the image to be processed through the pose recognition model to obtain shape parameters and displacement parameters, pose parameters, shape parameters Together with the displacement parameter, it is used to obtain the pose of the target object.
  • the device further includes: a normalization module, configured to perform normalization processing on the position information of pixels in the image to be processed, to obtain normalized position information; a processing module, configured to The attitude parameters are obtained by processing the image to be processed and the normalized position information by the model to be trained.
  • a normalization module configured to perform normalization processing on the position information of pixels in the image to be processed, to obtain normalized position information
  • a processing module configured to The attitude parameters are obtained by processing the image to be processed and the normalized position information by the model to be trained.
  • the target object is a human body.
  • the ninth aspect of the embodiment of the present application provides a gesture recognition device, the device includes a memory and a processor; the memory stores codes, the processor is configured to execute the codes, and when the codes are executed, the gesture recognition device performs the first aspect, any one possible implementation manner of the first aspect, the second aspect, or the method described in any one possible implementation manner of the second aspect.
  • the tenth aspect of the embodiments of the present application provides a model training device, the device includes a memory and a processor; the memory stores codes, the processor is configured to execute the codes, and when the codes are executed, the model training device executes the third aspect, any one possible implementation manner of the third aspect, the fourth aspect, or the method described in any one possible implementation manner of the fourth aspect.
  • An eleventh aspect of the embodiments of the present application provides a circuit system, where the circuit system includes a processing circuit configured to perform any one of the possible implementations in the first aspect, the first aspect, the second aspect, Any one of the possible implementations of the second aspect, the third aspect, any one of the possible implementations of the third aspect, the fourth aspect, or the method described in any one of the possible implementations of the fourth aspect.
  • the twelfth aspect of the embodiments of the present application provides a chip system, the chip system includes a processor, used to call the computer program or computer instruction stored in the memory, so that the processor executes the first aspect, the first aspect
  • the chip system includes a processor, used to call the computer program or computer instruction stored in the memory, so that the processor executes the first aspect, the first aspect
  • Any possible implementation of the second aspect, any possible implementation of the second aspect, the third aspect, any possible implementation of the third aspect, the fourth aspect or any of the fourth aspects The method described in one possible implementation.
  • the processor is coupled to the memory through an interface.
  • the chip system further includes a memory, where computer programs or computer instructions are stored.
  • the thirteenth aspect of the embodiments of the present application provides a computer storage medium, the computer storage medium stores a computer program, and when the program is executed by a computer, the computer implements any one of the possibilities in the first aspect and the first aspect.
  • the fourteenth aspect of the embodiments of the present application provides a computer program product, the computer program product stores instructions, and when the instructions are executed by a computer, the computer implements any one of the possible functions of the first aspect and the first aspect.
  • the computer program product stores instructions, and when the instructions are executed by a computer, the computer implements any one of the possible functions of the first aspect and the first aspect.
  • the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target area of the target image can be identified by the gesture recognition model.
  • the position information of the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters.
  • the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing
  • the impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object.
  • the factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
  • Fig. 1 is a schematic diagram of related technology
  • Fig. 2 is another schematic diagram of related technology
  • Fig. 3 is a kind of structural schematic diagram of main frame of artificial intelligence
  • FIG. 4a is a schematic structural diagram of an image processing system provided by an embodiment of the present application.
  • Fig. 4b is another schematic structural diagram of the image processing system provided by the embodiment of the present application.
  • FIG. 4c is a schematic diagram of related equipment for image processing provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of the architecture of the system 100 provided by the embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a gesture recognition method provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an application example of gesture recognition provided by the embodiment of the present application.
  • FIG. 8 is another schematic flowchart of the gesture recognition method provided by the embodiment of the present application.
  • Fig. 9a is a schematic diagram of another application example of gesture recognition provided by the embodiment of the present application.
  • Fig. 9b is a schematic structural diagram of the gesture recognition model provided by the embodiment of the present application.
  • Fig. 10 is a schematic diagram of the model training method provided by the embodiment of the present application.
  • Fig. 11 is a schematic diagram of the projection result provided by the embodiment of the present application.
  • FIG. 12 is another schematic diagram of the model training method provided by the embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a gesture recognition device provided by an embodiment of the present application.
  • Fig. 14 is another schematic structural diagram of the gesture recognition device provided by the embodiment of the present application.
  • Fig. 15 is another structural schematic diagram of the model training device provided by the embodiment of the present application.
  • Fig. 16 is another structural schematic diagram of the model training device provided by the embodiment of the present application.
  • Fig. 17 is a schematic structural diagram of the execution device provided by the embodiment of the present application.
  • FIG. 18 is a schematic structural diagram of a training device provided in an embodiment of the present application.
  • FIG. 19 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the embodiment of the present application provides a posture recognition method and related equipment, which can obtain the posture of the target object after processing the image containing the target object, which has high accuracy, and is conducive to improving the accuracy of the acquired target image. Accuracy of exercise information.
  • Human body motion capture technology is a commonly used technology in the film and television and game industries. This technology can process the input video stream to capture the posture of the human body in each frame of image, so as to obtain the motion information of the human body. Based on this technology, the posture data of human body movement can be extracted from massive videos, and has a wide range of application scenarios, for example, virtual characters in augmented reality (augmented reality, AR) scenes and virtual reality (virtual reality, VR) scenes drives, teleconferencing, and the metaverse, to name a few.
  • augmented reality augmented reality
  • VR virtual reality
  • human body motion capture can be realized based on AI technology.
  • the trained neural network can be used to process the area where the human body is located in the image, so as to obtain posture parameters, and the posture parameters can be used to determine the posture of the human body.
  • FIG. 1 is a schematic diagram of the related art
  • the human body if there are multiple images presenting the same environment, they are Image 1, Image 2, and Image 3 respectively.
  • the human body In the three images, the human body is located in three positions in the environment, and when they are located in different positions, the postures of the human body are extremely similar.
  • the neural network will determine that the posture parameters of the human body in the three images are consistent, that is, it is determined that the posture 1 of the human body in image 1, the posture 2 of the human body in image 2, and the posture 3 of the human body in image 3 are the same of.
  • Figure 2 is another schematic diagram of related technology
  • Figure 2 observes the three positions of the human body in the environment from the perspective of looking down.
  • the orientation of the human body is facing the camera sideways (tilted to the right).
  • the orientation of the human body is It is directly facing the camera.
  • the posture 3 of the human body the orientation of the human body is facing the camera sideways (leaning to the left). It can be seen that the difference between these three postures cannot be recognized by the neural network in the related technology, which leads to the inaccurate captured posture of the human body, which in turn affects the accuracy of the motion information of the human body.
  • an embodiment of the present application provides a gesture recognition method, which can be implemented in combination with artificial intelligence (AI) technology.
  • AI technology is a technical discipline that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence. AI technology obtains the best results by perceiving the environment, acquiring knowledge and using knowledge.
  • artificial intelligence technology is a branch of computer science that attempts to understand the nature of intelligence and produce a new kind of intelligent machine that can respond in a similar way to human intelligence.
  • Image processing using artificial intelligence is a common application of artificial intelligence.
  • Figure 3 is a schematic structural diagram of the main framework of artificial intelligence.
  • the following is from the “intelligent information chain” (horizontal axis) and “IT value chain” (vertical axis)
  • the "intelligent information chain” reflects a series of processes from data acquisition to processing. For example, it can be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data has undergone a condensed process of "data-information-knowledge-wisdom”.
  • the "IT value chain” reflects the value brought by artificial intelligence to the information technology industry from the underlying infrastructure of artificial intelligence, information (provided and processed by technology) to the industrial ecological process of the system.
  • the infrastructure provides computing power support for the artificial intelligence system, realizes communication with the outside world, and realizes support through the basic platform.
  • the basic platform includes distributed computing framework and network and other related platform guarantees and supports, which can include cloud storage and Computing, interconnection network, etc.
  • sensors communicate with the outside to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.
  • Data from the upper layer of the infrastructure is used to represent data sources in the field of artificial intelligence.
  • the data involves graphics, images, voice, text, and IoT data of traditional equipment, including business data of existing systems and sensory data such as force, displacement, liquid level, temperature, and humidity.
  • Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
  • machine learning and deep learning can symbolize and formalize intelligent information modeling, extraction, preprocessing, training, etc. of data.
  • Reasoning refers to the process of simulating human intelligent reasoning in a computer or intelligent system, and using formalized information to carry out machine thinking and solve problems according to reasoning control strategies.
  • the typical functions are search and matching.
  • Decision-making refers to the process of decision-making after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
  • some general capabilities can be formed based on the results of data processing, such as algorithms or a general system, such as translation, text analysis, computer vision processing, speech recognition, image processing identification, etc.
  • Intelligent products and industry applications refer to the products and applications of artificial intelligence systems in various fields. It is the packaging of the overall solution of artificial intelligence, which commercializes intelligent information decision-making and realizes landing applications. Its application fields mainly include: intelligent terminals, intelligent transportation, Smart healthcare, autonomous driving, smart cities, etc.
  • Fig. 4a is a schematic structural diagram of an image processing system provided by an embodiment of the present application, and the image processing system includes a user device and a data processing device.
  • the user equipment includes smart terminals such as a mobile phone, a personal computer, or an information processing center.
  • the user equipment is the initiator of the image processing, and as the initiator of the image processing request, usually the user initiates the request through the user equipment.
  • the above-mentioned data processing device may be a device or server having a data processing function such as a cloud server, a network server, an application server, and a management server.
  • the data processing device receives the image processing request from the intelligent terminal through the interactive interface, and then performs image processing such as machine learning, deep learning, search, reasoning, and decision-making through the memory for storing data and the processor link of data processing.
  • the storage in the data processing device can be a general term, including local storage and databases for storing historical data.
  • the database can be on the data processing device or on other network servers.
  • the user equipment can receive user instructions, for example, the user equipment can obtain an image input/selected by the user, and then initiate a request to the data processing equipment, so that the data processing equipment can obtain the user equipment.
  • An image processing application is performed on the image (for example, recognizing a pose of the target object, etc.), so as to obtain a corresponding processing result for the image.
  • the user device may acquire an image input by the user, and then initiate a gesture recognition request of the target object to the data processing device, so that the data processing device classifies the image, thereby obtaining the pose parameters of the target object in the image, thereby determining The pose of the target object in the image.
  • the data processing device can execute the image processing method of the embodiment of the present application.
  • Fig. 4b is another schematic structural diagram of the image processing system provided by the embodiment of the present application.
  • the user equipment is directly used as a data processing equipment, and the user equipment can directly obtain the input from the user and directly perform the processing by the hardware of the user equipment itself.
  • the specific process is similar to that in FIG. 4a , and reference may be made to the above description, and details are not repeated here.
  • the user equipment may receive an instruction from the user, for example, the user equipment may acquire an image selected by the user in the user equipment, and then the user equipment itself executes an image processing application (for example, the recognition gesture of the target object, etc.), so as to obtain the corresponding processing results for the image.
  • an image processing application For example, the recognition gesture of the target object, etc.
  • the user equipment itself can execute the gesture recognition method of the embodiment of the present application.
  • Fig. 4c is a schematic diagram of related equipment for image processing provided by the embodiment of the present application.
  • the above-mentioned user equipment in FIG. 4a and FIG. 4b may specifically be the local device 301 or local device 302 in FIG. 4c, and the data processing device in FIG. 4a may specifically be the execution device 210 in FIG.
  • the data storage system 250 may be integrated on the execution device 210, or set on the cloud or other network servers.
  • the processors in Figure 4a and Figure 4b can perform data training/machine learning/deep learning through a neural network model or other models (for example, a model based on a support vector machine), and use the data to finally train or learn the model for image execution Image processing application, so as to obtain the corresponding processing results.
  • a neural network model or other models for example, a model based on a support vector machine
  • FIG. 5 is a schematic diagram of the architecture of the system 100 provided by the embodiment of the present application.
  • the execution device 110 is configured with an input/output (I/O) interface 112 for data interaction with external devices, and the user Data can be input to the I/O interface 112 through the client device 140, and the input data in this embodiment of the application may include: various tasks to be scheduled, callable resources, and other parameters.
  • I/O input/output
  • the execution device 110 When the execution device 110 preprocesses the input data, or when the calculation module 111 of the execution device 110 executes calculations and other related processing (such as implementing the function of the neural network in this application), the execution device 110 can call the data storage system 150
  • the data, codes, etc. in the system can be used for corresponding processing, and the data, instructions, etc. obtained by corresponding processing can also be stored in the data storage system 150 .
  • the I/O interface 112 returns the processing result to the client device 140, thereby providing it to the user.
  • the training device 120 can generate corresponding target models/rules based on different training data for different goals or different tasks, and the corresponding target models/rules can be used to achieve the above-mentioned goals or complete the above-mentioned tasks , giving the user the desired result.
  • the training data can be stored in the database 130, and come from the training samples collected by the data collection device 160.
  • the user can manually specify the input data, and the manual specification can be operated through the interface provided by the I/O interface 112 .
  • the client device 140 can automatically send the input data to the I/O interface 112 . If the client device 140 is required to automatically send the input data to obtain the user's authorization, the user can set the corresponding authority in the client device 140 .
  • the user can view the results output by the execution device 110 on the client device 140, and the specific presentation form may be specific ways such as display, sound, and action.
  • the client device 140 can also be used as a data collection terminal, collecting the input data input to the I/O interface 112 as shown in the figure and the output results of the output I/O interface 112 as new sample data, and storing them in the database 130 .
  • the I/O interface 112 directly uses the input data input to the I/O interface 112 as shown in the figure and the output result of the output I/O interface 112 as a new sample The data is stored in database 130 .
  • FIG. 5 is only a schematic diagram of a system architecture provided by the embodiment of the present application, and the positional relationship between devices, devices, modules, etc. shown in the figure does not constitute any limitation.
  • the data The storage system 150 is an external memory relative to the execution device 110 , and in other cases, the data storage system 150 may also be placed in the execution device 110 .
  • the neural network can be obtained by training according to the training device 120 .
  • An embodiment of the present application also provides a chip, the chip includes a neural network processor (NPU).
  • the chip can be set in the execution device 110 shown in FIG. 5 to complete the computing work of the computing module 111 .
  • the chip can also be set in the training device 120 shown in FIG. 5 to complete the training work of the training device 120 and output the target model/rule.
  • NPU neural network processor
  • the neural network processor NPU is mounted on the main central processing unit (central processing unit, CPU) (host CPU) as a coprocessor, and the main CPU assigns tasks.
  • the core part of the NPU is the operation circuit, and the controller controls the operation circuit to extract the data in the memory (weight memory or input memory) and perform operations.
  • the operation circuit includes multiple processing units (process engine, PE).
  • the arithmetic circuit is a two-dimensional systolic array.
  • the arithmetic circuit may also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition.
  • the arithmetic circuit is a general purpose matrix processor.
  • the operation circuit fetches the data corresponding to the matrix B from the weight memory, and caches it on each PE in the operation circuit.
  • the operation circuit takes the data of matrix A from the input memory and performs matrix operation with matrix B, and the obtained partial or final results of the matrix are stored in the accumulator.
  • the vector calculation unit can further process the output of the operation circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison and so on.
  • the vector computing unit can be used for network calculations of non-convolution/non-FC layers in neural networks, such as pooling, batch normalization, local response normalization, etc.
  • the vector computation unit can store the processed output vectors to a unified register.
  • a vector computation unit may apply a non-linear function to the output of the arithmetic circuit, such as a vector of accumulated values, to generate activation values.
  • the vector computation unit generates normalized values, merged values, or both.
  • the vector of processed outputs can be used as an activation input to an operational circuit, for example for use in a subsequent layer in a neural network.
  • Unified memory is used to store input data and output data.
  • the weight data directly transfers the input data in the external memory to the input memory and/or the unified memory through the storage unit access controller (direct memory access controller, DMAC), stores the weight data in the external memory into the weight memory, and stores the weight data in the unified memory Store the data in the external memory.
  • DMAC direct memory access controller
  • bus interface unit (bus interface unit, BIU) is used to realize the interaction between the main CPU, DMAC and instruction fetch memory through the bus.
  • the instruction fetch buffer connected to the controller is used to store the instructions used by the controller
  • the controller is used for invoking instructions cached in the memory to control the working process of the computing accelerator.
  • the unified memory, the input memory, the weight memory and the instruction fetch memory are all on-chip (On-Chip) memory
  • the external memory is the memory outside the NPU
  • the external memory can be a double data rate synchronous dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM), high bandwidth memory (high bandwidth memory, HBM) or other readable and writable memory.
  • the neural network can be composed of neural units, and the neural unit can refer to an operation unit that takes xs and intercept 1 as input, and the output of the operation unit can be:
  • Ws is the weight of xs
  • b is the bias of the neuron unit.
  • f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer.
  • the activation function may be a sigmoid function.
  • a neural network is a network formed by connecting many of the above-mentioned single neural units, that is, the output of one neural unit can be the input of another neural unit.
  • the input of each neural unit can be connected with the local receptive field of the previous layer to extract the features of the local receptive field.
  • the local receptive field can be an area composed of several neural units.
  • W is a weight vector, and each value in the vector represents the weight value of a neuron in this layer of neural network.
  • the vector W determines the space transformation from the input space to the output space described above, that is, the weight W of each layer controls how to transform the space.
  • the purpose of training the neural network is to finally obtain the weight matrix of all layers of the trained neural network (the weight matrix formed by the vector W of many layers). Therefore, the training process of the neural network is essentially to learn the way to control the space transformation, and more specifically, to learn the weight matrix.
  • the neural network can use the error back propagation (back propagation, BP) algorithm to correct the size of the parameters in the initial neural network model during the training process, so that the reconstruction error loss of the neural network model becomes smaller and smaller. Specifically, passing the input signal forward until the output will generate an error loss, and updating the parameters in the initial neural network model by backpropagating the error loss information, so that the error loss converges.
  • the backpropagation algorithm is a backpropagation movement dominated by error loss, aiming to obtain the optimal parameters of the neural network model, such as the weight matrix.
  • the model training method provided in the embodiment of the present application involves image processing, and can be specifically applied to data processing methods such as data training, machine learning, and deep learning to symbolize and form the training data (such as the image to be processed in this application) intelligent information modeling, extraction, preprocessing, training, etc., and finally a trained neural network (such as the gesture recognition model in this application); and, the gesture recognition method provided in the embodiment of this application can use the above-mentioned trained A neural network, inputting input data (such as the target image in the present application, the target area of the target image) into the trained neural network to obtain output data (such as the pose parameters in the present application, etc.).
  • the model training method and gesture recognition method provided in the embodiment of the present application are inventions based on the same idea, and can also be understood as two parts in a system, or two stages of an overall process: such as model training phase and model application phase.
  • Fig. 6 is a schematic flow chart of the gesture recognition method provided by the embodiment of the present application. As shown in Fig. 6, the method includes:
  • the target image when it is necessary to perform gesture recognition on the target image, the target image may be acquired first, and the target image may be a certain frame image in the video stream, or may be a single image.
  • the target image usually presents the target object and the environment in which the target object is located, so the goal of gesture recognition is to obtain the pose of the target object in the target image.
  • Figure 7 Figure 7 is a schematic diagram of an application example of gesture recognition provided by the embodiment of the present application
  • the content presented by the target image is the human body and the environment in which the human body is located, so the gesture recognition target of the target image is Recognize the pose of the human body in the target image.
  • the target image can be preprocessed. Specifically, the target image can be detected to determine the area where the target object is located in the target image, and this area can be called a target area (also called a detection frame). Still as in the above example, after the area where the human body is located in the target image is detected, the area where the human body is located can be determined as the target area (that is, the area enclosed by the red frame in FIG. 7 ).
  • the position information of the target area in the target image can also be obtained, and the position information can have many situations: (1)
  • the position information of the target area in the target image includes the coordinates of the center point of the target area in the image coordinate system As well as the size of the target area, the image coordinate system is constructed based on the target image. Specifically, a certain vertex of the target image (for example, the vertex in the upper left corner of the target image) can be used as the origin of the image coordinate system, then the coordinates of the center point of the target area in the image coordinate system can be determined, as well as the length of the target area and width (which is equivalent to obtaining the size of the target area), these information can be used to indicate the position of the target area in the target image.
  • a certain vertex of the target image for example, the vertex in the upper left corner of the target image
  • the coordinates of the center point of the target area in the image coordinate system can be determined, as well as the length of the target area and width (which is equivalent to obtaining the size of the
  • the position information of the target area in the target image includes the coordinates of the vertices of the target area in the image coordinate system, and the image coordinate system is constructed based on the target image. Specifically, a certain vertex of the target image (for example, the vertex in the upper left corner of the target image) can be used as the origin of the image coordinate system, then the coordinates of all vertices of the target area in the image coordinate system can be determined, and this information can be used to indicate The position of the target area in the target image and so on.
  • a certain vertex of the target image for example, the vertex in the upper left corner of the target image
  • this information can be used to indicate The position of the target area in the target image and so on.
  • the position information may also be normalized to obtain the normalized position information of the target area in the target image.
  • I the position information of the target area in the target image
  • I' the position information of the target area in the target image after normalization processing
  • I' the position information of the target area in the target image after normalization processing
  • I' the position information of the target area in the target image after normalization processing
  • I' the position information of the target area in the target image after normalization processing
  • I' (I-mean(I))/F
  • F sqrt(w*w+h*h)
  • mean (I) is the mean value of the target area
  • w the width of the target area
  • h the length of the target area.
  • the target area and the normalized position information of the target area in the target image can be input to the pose recognition model (for the trained neural network Network), to process the target area of the target image and the position information of the normalized target area in the target image through the gesture recognition model (for example, a series of operations such as feature extraction) to obtain the pose parameters. Then, the pose of the target object in the target image can be obtained based on the pose parameters.
  • the pose recognition model for the trained neural network Network
  • the gesture recognition model for example, a series of operations such as feature extraction
  • the pose recognition model can output not only pose parameters, but also shape parameters and displacement parameters.
  • the posture parameters are usually composed of two parts of parameters, one part of parameters is used to indicate the rotation angle of the target object relative to the camera, and the other part of parameters is used to indicate the angles between the joints of the target object itself.
  • the shape parameter is used to indicate the three-dimensional shape of the target object.
  • the displacement parameter is used to indicate the range occupied by the target object in the target area, and the offset of the target object in the target area (for example, taking the center point of the target area as a reference point, the degree to which the target object shifts to the left or to degree of right offset). Based on the calculation of attitude parameters, shape parameters and displacement parameters, the attitude of the target object can be obtained.
  • the attitude of the target object can be represented by multiple three-dimensional key points (3D key points) of the target object.
  • 3D key points can describe the position of the target object.
  • the orientation in the camera coordinate system that is, the orientation of the target object relative to the camera
  • the body behavior of the target object in the camera coordinate system that is, the movement of the target object in three-dimensional space
  • the origin of the camera coordinate system is the shooting target image camera.
  • the pose recognition model outputs pose parameters ⁇ , shape parameters ⁇ , and displacement parameters S, T
  • these parameters can be calculated to obtain multiple 3D key points of the target object.
  • These 3D key points The points are combined to show the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system.
  • the gesture recognition of the target image is completed. If the target image is a certain frame image in the video stream, for the rest of the frame images in the video stream, the same operation as that performed on the target image can be performed to obtain the continuous multiple postures of the target object and form the motion information of the target object , so as to meet the various application needs of users.
  • the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target area of the target image can be identified by the gesture recognition model.
  • the position information of the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters.
  • the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing
  • the impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object.
  • the factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
  • Fig. 8 is another schematic flowchart of the posture recognition method provided by the embodiment of the present application. As shown in Fig. 8, the method includes:
  • the target image when it is necessary to perform gesture recognition on the target image, the target image may be acquired first, and the target image may be a certain frame image in the video stream, or may be a single image.
  • the target image usually presents the target object and the environment in which the target object is located, so the goal of gesture recognition is to obtain the pose of the target object in the target image.
  • Figure 9a Figure 9a is a schematic diagram of another application example of gesture recognition provided by the embodiment of the present application
  • the content presented by the target image is the human body and the environment in which the human body is located, so the gesture recognition target of the target image In order to recognize the posture presented by the human body in the target image.
  • the position information of the pixel in the target image can also be obtained, the position information includes the coordinates of the target image and the pixel in the image coordinate system, and the image coordinate system is constructed based on the target image. Specifically, a certain vertex of the target image (for example, the vertex in the upper left corner of the target image) can be used as the origin of the image coordinate system, then the coordinates of all pixels in the target image in the image coordinate system can be determined, and these information can be used as pose The input of the recognition model, so that the input of the pose recognition model not only includes each pixel of the target image, but also includes the coordinates of each pixel in the target image in the image coordinate system.
  • the position information may also be normalized to obtain the position information of the pixels in the target image after normalization processing.
  • the positional information of the pixel in the target image is I
  • the positional information of the pixel in the target image after the normalization process is I'
  • I' (I-mean(I))/F
  • F sqrt(w ⁇ w+h ⁇ h) wherein, mean(I) is the mean value of the target image, w is the width of the target image, and h is the length of the target image.
  • the target image and the position information of the pixels in the normalized target image can be input to the gesture recognition model (a trained neural network) , to process the target area of the target image and the position information of the pixels in the normalized target image through the gesture recognition model (for example, a series of operations such as feature extraction) to obtain the gesture parameters. Then, the pose of the target object in the target image can be obtained based on the pose parameters.
  • the gesture recognition model a trained neural network
  • the gesture recognition model can include two parts, one part is an encoder (encoder), and the other part is a plurality of convolutional layers (convolution ).
  • the encoder receives the target image, it can perform feature extraction processing on the target image to obtain a feature image (featrue map), and send the feature image to the convolutional layer.
  • Multiple convolutional layers can perform at least one convolution process on the feature image and the position information (location map) of the target image after normalization to obtain the attitude parameters, so the position of the target object in the target image can be determined based on the attitude parameters. attitude.
  • the method further includes: processing the target image and the position information of the pixels in the target image through the gesture recognition model to obtain shape parameters and displacement parameters, and the posture parameters, shape parameters and displacement parameters are used in common to obtain the pose of the target object.
  • the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
  • step 802 For descriptions of step 802, reference may be made to relevant descriptions of step 602 in the embodiment shown in FIG. 6 , and details are not repeated here.
  • gesture recognition model can also have other various structures, as long as the gesture recognition function can be realized. Can.
  • the target image and the position information of the pixel points in the target image can be input to the gesture recognition model, so as to process the target image and the position information of the pixel points in the target image through the gesture recognition model , to obtain the pose parameter, so the pose of the target object presented by the target image can be obtained based on the pose parameter.
  • the input of the gesture recognition model not only includes the target image, but also includes the position information of the pixels in the target image. Therefore, when the gesture recognition model performs image processing, it not only considers the image information of the target image itself to the pose of the target object.
  • the impact caused by this method also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object.
  • the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy. degree, which in turn helps to improve the accuracy of the acquired motion information of the target image.
  • the gesture recognition model provided by the embodiment of the present application can also be compared with the gesture recognition model of the related art, and the comparison results are shown in Table 1 and Table 2:
  • the posture recognition model provided by the embodiment of the present application has significantly reduced various error indicators, that is, the posture recognition model provided by the embodiment of the present application has a significant reduction in each error index. All the error indicators have excellent performance.
  • the posture recognition model provided by the embodiment of the present application has significantly reduced various error indicators in the data set 1 and data set 2, that is, the error index provided by the embodiment of the present application
  • the gesture recognition model also has superior performance in various error indicators.
  • Fig. 10 is a schematic diagram of the model training method provided by the embodiment of the present application. As shown in Fig. 10, the method includes:
  • a batch of training samples can be obtained, that is, images to be processed for training. It is worth noting that, for the image to be processed, the real pose of the target object in the image to be processed is known.
  • the image to be processed can be detected and processed to determine the target area in the image to be processed.
  • the location information of the target area in the image to be processed can also be obtained and normalized.
  • the target object is a human body.
  • the position information of the target area in the image to be processed includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the image to be processed.
  • the position information of the target area in the image to be processed includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  • step 100 For descriptions of step 1001, reference may be made to relevant descriptions of step 601 in the embodiment shown in FIG. 6 , and details are not repeated here.
  • the image to be processed and the position information of the normalized target area in the image to be processed can be input to the model to be trained to
  • the pose parameters are obtained by processing the target area of the image to be processed by the model to be trained and the normalized position information of the target area in the image to be processed.
  • the method further includes: processing the target area of the image to be processed and the normalized position information of the target area in the image to be processed by the gesture recognition model to obtain shape parameters and displacement parameters, Pose parameters, shape parameters and displacement parameters are jointly used to obtain the pose of the target object.
  • step 1002 For the description of step 1002, reference may be made to the related description of step 602 in the embodiment shown in FIG. 6 , which will not be repeated here.
  • the calculation can be performed based on the attitude parameters, shape parameters and displacement parameters to obtain the predicted attitude of the target object. express.
  • the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
  • step 1003 For the description of step 1003, reference may be made to the related description of step 602 in the embodiment shown in FIG. 6 , and details are not repeated here.
  • the model to be trained can be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
  • the model to be trained is trained based on the predicted pose of the target object and the real pose of the target object
  • the gesture recognition model obtained includes: a predicted projection result based on the predicted pose of the target object on the image to be processed and The real projection result of the real pose of the target object on the image to be processed is used to train the model to be trained to obtain a pose recognition model.
  • Figure 11 is a schematic diagram of the projection result provided by the embodiment of the present application
  • the predicted pose of the target object can be represented by multiple predicted 3D key points of the target object
  • the predicted pose of the target object The posture can be represented by multiple real 3D key points of the target object (these real 3D key points can be marked in advance and are known), so multiple predicted 3D key points of the target object can be projected onto the image to be processed, Obtain multiple predicted two-dimensional key points of the target object (that is, the predicted projection result of the predicted pose of the target object on the image to be processed), and similarly, multiple real three-dimensional key points of the target object can also be projected onto the image to be processed , to obtain multiple real two-dimensional key points of the target object (that is, the real projection result of the real pose of the target object on the image to be processed).
  • the target loss can be calculated based on multiple predicted 2D key points and multiple real 2D key points of the target object, and the target loss is used to indicate multiple predicted 2D key points and multiple real 2D key points of the target object difference between.
  • the model parameters of the model to be trained can be updated based on the target loss, and the next batch of training samples can be used to train the model to be trained after the updated parameters (that is, re-execute steps 1002 to 1004), until the model training conditions are met (such as , the target loss reaches convergence, etc.), the gesture recognition model in the embodiment shown in FIG. 6 can be obtained.
  • the gesture recognition model trained in the embodiment of the present application can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the pose of the target object, so as to more accurately capture the pose of the target object.
  • the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself.
  • the influence caused by the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object.
  • the factors considered are relatively comprehensive, so the posture of the target object obtained based on this method, It has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
  • Fig. 12 is another schematic diagram of the model training method provided by the embodiment of the present application. As shown in Fig. 12, the method includes:
  • a batch of training samples can be obtained, that is, images to be processed for training. It is worth noting that, for the image to be processed, the real pose of the target object in the image to be processed is known.
  • the position information of the pixels in the target area can be obtained and normalized.
  • the target object is a human body.
  • the position information of the pixels in the image to be processed includes coordinates of the pixels in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  • step 1201 For the description of step 1201, reference may be made to the related description of step 801 in the embodiment shown in FIG. 8 , and details are not repeated here.
  • the position information of the pixels in the image to be processed and the normalized image to be processed can be input to the model to be trained, so as to pass the
  • the training model processes the target area of the image to be processed and the normalized position information of the pixels in the image to be processed to obtain the pose parameters.
  • the method further includes: processing the target area of the image to be processed and the normalized position information of pixels in the image to be processed by the gesture recognition model to obtain shape parameters and displacement parameters, and pose parameters, shape parameters and displacement parameters are jointly used to obtain the pose of the target object.
  • step 1202 For the description of step 1202, reference may be made to the relevant description of step 802 in the embodiment shown in FIG. 8 , and details are not repeated here.
  • the calculation can be performed based on the attitude parameters, shape parameters and displacement parameters to obtain the predicted attitude of the target object. express.
  • the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
  • step 1203 For descriptions of step 1203, reference may be made to relevant descriptions of step 1003 in the embodiment shown in FIG. 10 , and details are not repeated here.
  • the model to be trained can be trained based on the predicted pose of the target object and the real pose of the target object, and the pose recognition in the embodiment shown in Figure 8 is obtained Model.
  • the model to be trained is trained to obtain a pose recognition model: based on the predicted projection result of the predicted pose of the target object on the image to be processed and the target The real projection result of the real pose of the object on the image to be processed is used to train the model to be trained to obtain a pose recognition model.
  • step 1204 For the description of step 1204, reference may be made to the related description of step 1004 in the embodiment shown in FIG. 10 , which will not be repeated here.
  • the gesture recognition model trained in the embodiment of the present application can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the pose of the target object, so as to more accurately capture the pose of the target object.
  • the pose recognition model is in image processing, its input not only includes the target image, but also includes the position information of the pixels in the target image, so the pose recognition model not only considers the influence of the image information of the target image itself on the pose of the target object , it also takes into account the impact of the position information of the pixel points in the target image on the attitude of the target object, and the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy, and further has It is beneficial to improve the accuracy of the acquired motion information of the target image.
  • Fig. 13 is a schematic structural diagram of the gesture recognition device provided by the embodiment of the present application. As shown in Fig. 13, the device includes:
  • the processing module 1302 is used to process the target area of the target image and the position information of the target area in the target image through the gesture recognition model to obtain gesture parameters, the target zone is the area where the target object is located, and the gesture parameters are used to obtain the target object attitude.
  • the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target area of the target image can be identified by the gesture recognition model.
  • the position information of the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters.
  • the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing
  • the impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object.
  • the factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
  • the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the target image.
  • the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the target image.
  • the pose recognition model is obtained by training based on a predicted projection result of the predicted pose of the target object on the image to be processed and a real projection result of the real pose of the target object on the image to be processed.
  • the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
  • the processing module 1302 is also configured to process the target area of the target image and the position information of the target area in the target image through the gesture recognition model to obtain shape parameters and displacement parameters, gesture parameters, shape The parameters and the displacement parameters are used together to obtain the pose of the target object.
  • the device further includes: a normalization module, configured to perform normalization processing on the position information of the target area in the target image to obtain normalized position information; the processing module 1302, It is used to process the target area of the target image and the normalized position information through the gesture recognition model to obtain the gesture parameters.
  • a normalization module configured to perform normalization processing on the position information of the target area in the target image to obtain normalized position information
  • the processing module 1302 It is used to process the target area of the target image and the normalized position information through the gesture recognition model to obtain the gesture parameters.
  • the target object is a human body.
  • Fig. 14 is another schematic structural diagram of the gesture recognition device provided by the embodiment of the present application. As shown in Fig. 14, the device includes:
  • the processing module 1402 is configured to process the target image and the position information of the pixels in the target image through the gesture recognition model to obtain a gesture parameter, and the gesture parameter is used to acquire the gesture of the target object included in the target image.
  • the target image and the position information of the pixel points in the target image can be input to the gesture recognition model, so as to process the target image and the position information of the pixel points in the target image through the gesture recognition model , to obtain the pose parameter, so the pose of the target object presented by the target image can be obtained based on the pose parameter.
  • the input of the gesture recognition model not only includes the target image, but also includes the position information of the pixels in the target image. Therefore, when the gesture recognition model performs image processing, it not only considers the image information of the target image itself to the pose of the target object.
  • the impact caused by this method also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object.
  • the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy. degree, which in turn helps to improve the accuracy of the acquired motion information of the target image.
  • the position information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the target image.
  • the pose recognition model is obtained by training based on a predicted projection result of the predicted pose of the target object on the image to be processed and a real projection result of the real pose of the target object on the image to be processed.
  • the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
  • the processing module 1402 is also configured to process the target image and the position information of the pixels in the target image through the pose recognition model to obtain shape parameters and displacement parameters, and pose parameters, shape parameters and displacement parameters Commonly used to obtain the pose of the target object.
  • the device further includes: a normalization module, configured to perform normalization processing on the position information of pixels in the target image to obtain normalized position information; the processing module 1402 uses The target image and the normalized position information are processed by the gesture recognition model to obtain the gesture parameters.
  • a normalization module configured to perform normalization processing on the position information of pixels in the target image to obtain normalized position information
  • the processing module 1402 uses The target image and the normalized position information are processed by the gesture recognition model to obtain the gesture parameters.
  • the target object is a human body.
  • Fig. 15 is another structural schematic diagram of the model training device provided by the embodiment of the present application. As shown in Fig. 15, the device includes:
  • the processing module 1502 is used to process the target area of the image to be processed by the model to be trained and the position information of the target area in the image to be processed to obtain posture parameters, and the target area is the area where the target object is located;
  • the second acquiring module 1503 is configured to acquire the predicted attitude of the target object based on the attitude parameter
  • the training module 1504 is configured to train the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
  • the gesture recognition model obtained in the embodiment of the present application can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the pose of the target object, so as to capture the pose of the target object more accurately.
  • the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself.
  • the influence caused by the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object.
  • the factors considered are relatively comprehensive, so the posture of the target object obtained based on this method, It has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
  • the training module 1504 is configured to perform the training on the model to be trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed. Training to get the gesture recognition model.
  • the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the image to be processed.
  • the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  • the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
  • the processing module 1502 is also configured to process the target area of the image to be processed and the position information of the target area in the image to be processed through the gesture recognition model to obtain shape parameters and displacement parameters, pose parameters, The shape parameter and the displacement parameter are jointly used to obtain the pose of the target object.
  • the device further includes: a normalization module, configured to perform normalization processing on the position information of the target area in the image to be processed to obtain the normalized position information; the processing module 1502 , which is used to process the target area of the image to be processed and the normalized position information through the model to be trained to obtain the pose parameters.
  • a normalization module configured to perform normalization processing on the position information of the target area in the image to be processed to obtain the normalized position information
  • the processing module 1502 which is used to process the target area of the image to be processed and the normalized position information through the model to be trained to obtain the pose parameters.
  • the target object is a human body.
  • Fig. 16 is another structural schematic diagram of the model training device provided by the embodiment of the present application. As shown in Fig. 16, the device includes:
  • the processing module 1602 is used to process the image to be processed and the position information of the pixels in the image to be processed through the model to be trained to obtain the attitude parameter;
  • the second acquiring module 1603 is configured to acquire the predicted attitude of the target object based on the attitude parameter
  • the training module 1604 is configured to train the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
  • the gesture recognition model obtained in the embodiment of the present application can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the pose of the target object, so as to capture the pose of the target object more accurately.
  • the pose recognition model is in image processing, its input not only includes the target image, but also includes the position information of the pixels in the target image, so the pose recognition model not only considers the influence of the image information of the target image itself on the pose of the target object , it also takes into account the impact of the position information of the pixel points in the target image on the attitude of the target object, and the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy, and further has It is beneficial to improve the accuracy of the acquired motion information of the target image.
  • the training module 1604 is configured to perform the training on the model to be trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed. Training to get the gesture recognition model.
  • the location information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  • the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
  • the processing module 1602 is also used to process the target area of the image to be processed and the position information of the pixels in the image to be processed through the pose recognition model to obtain shape parameters and displacement parameters, pose parameters, shape The parameters and the displacement parameters are used together to obtain the pose of the target object.
  • the device further includes: a normalization module, configured to perform normalization processing on the position information of pixels in the image to be processed to obtain normalized position information; the processing module 1602 uses The attitude parameter is obtained by processing the image to be processed and the normalized position information through the model to be trained.
  • a normalization module configured to perform normalization processing on the position information of pixels in the image to be processed to obtain normalized position information
  • the processing module 1602 uses The attitude parameter is obtained by processing the image to be processed and the normalized position information through the model to be trained.
  • the target object is a human body.
  • FIG. 17 is a schematic structural diagram of the execution device provided in the embodiment of the present application.
  • the execution device 1700 may specifically be a mobile phone, a tablet, a notebook computer, a smart wearable device, a server, etc., which is not limited here.
  • the image classification apparatus described in the embodiment corresponding to FIG. 13 or FIG. 14 may be deployed on the execution device 1700 to realize the gesture recognition function in the embodiment corresponding to FIG. 6 or FIG. 8 .
  • the execution device 1700 includes: a receiver 1701, a transmitter 1702, a processor 1703, and a memory 1704 (the number of processors 1703 in the execution device 1700 may be one or more, and one processor is taken as an example in FIG. 17 ) , where the processor 1703 may include an application processor 17031 and a communication processor 17032 .
  • the receiver 1701 , the transmitter 1702 , the processor 1703 and the memory 1704 may be connected through a bus or in other ways.
  • the memory 1704 may include read-only memory and random-access memory, and provides instructions and data to the processor 1703 .
  • a part of the memory 1704 may also include a non-volatile random access memory (non-volatile random access memory, NVRAM).
  • NVRAM non-volatile random access memory
  • the memory 1704 stores processors and operating instructions, executable modules or data structures, or their subsets, or their extended sets, wherein the operating instructions may include various operating instructions for implementing various operations.
  • the processor 1703 controls the operations of the execution device.
  • various components of the execution device are coupled together through a bus system, where the bus system may include not only a data bus, but also a power bus, a control bus, and a status signal bus.
  • the various buses are referred to as bus systems in the figures.
  • the methods disclosed in the foregoing embodiments of the present application may be applied to the processor 1703 or implemented by the processor 1703 .
  • the processor 1703 may be an integrated circuit chip, which has a signal processing capability. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 1703 or instructions in the form of software.
  • the above-mentioned processor 1703 may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and may further include an application specific integrated circuit (ASIC), field programmable Field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processing
  • FPGA field programmable Field-programmable gate array
  • the processor 1703 may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory 1704, and the processor 1703 reads the information in the memory 1704, and completes the steps of the above method in combination with its hardware.
  • the receiver 1701 can be used to receive input digital or character information, and generate signal input related to performing device related settings and function control.
  • the transmitter 1702 can be used to output digital or character information through the first interface; the transmitter 1702 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 1702 can also include a display device such as a display screen .
  • the processor 1703 is configured to perform gesture recognition on the image by using the gesture recognition model in the embodiment corresponding to FIG. 6 or FIG. 8 .
  • FIG. 18 is a schematic structural diagram of the training device provided in the embodiment of the present application.
  • the training device 1800 is implemented by one or more servers, and the training device 1800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (central processing units, CPU) 1814 (eg, one or more processors) and memory 1832, one or more storage media 1830 (eg, one or more mass storage devices) for storing application programs 1842 or data 1844.
  • the memory 1832 and the storage medium 1830 may be temporary storage or persistent storage.
  • the program stored in the storage medium 1830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the training device. Furthermore, the central processing unit 1814 may be configured to communicate with the storage medium 1830 , and execute a series of instruction operations in the storage medium 1830 on the training device 1800 .
  • the training device 1800 can also include one or more power supplies 1826, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1858; or, one or more operating systems 1841, such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM and so on.
  • operating systems 1841 such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM and so on.
  • the training device may execute the model training method in the embodiment corresponding to FIG. 10 or FIG. 12 .
  • the embodiment of the present application also relates to a computer storage medium, where a program for signal processing is stored in the computer-readable storage medium, and when the program is run on the computer, the computer executes the steps performed by the aforementioned execution device, or, The computer is caused to perform the steps as performed by the aforementioned training device.
  • the embodiment of the present application also relates to a computer program product, where instructions are stored in the computer program product, and when executed by a computer, the instructions cause the computer to perform the steps performed by the aforementioned executing device, or cause the computer to perform the steps performed by the aforementioned training device.
  • the execution device, training device or terminal device provided in the embodiment of the present application may specifically be a chip.
  • the chip includes: a processing unit and a communication unit.
  • the processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface, pins or circuits etc.
  • the processing unit can execute the computer-executed instructions stored in the storage unit, so that the chips in the execution device execute the data processing methods described in the above embodiments, or make the chips in the training device execute the data processing methods described in the above embodiments.
  • the storage unit is a storage unit in the chip, such as a register, a cache, etc.
  • the storage unit may also be a storage unit located outside the chip in the wireless access device, such as only Read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), etc.
  • ROM Read-only memory
  • RAM random access memory
  • FIG. 19 is a schematic structural diagram of a chip provided by the embodiment of the present application.
  • the chip can be represented as a neural network processor NPU 1900, and the NPU 1900 is mounted to the main CPU (Host CPU) as a coprocessor ), the tasks are assigned by the Host CPU.
  • the core part of the NPU is the operation circuit 1903, and the operation circuit 1903 is controlled by the controller 1904 to extract matrix data in the memory and perform multiplication operations.
  • the operation circuit 1903 includes multiple processing units (Process Engine, PE).
  • arithmetic circuit 1903 is a two-dimensional systolic array.
  • the arithmetic circuit 1903 may also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition.
  • arithmetic circuit 1903 is a general-purpose matrix processor.
  • the operation circuit fetches the data corresponding to the matrix B from the weight memory 1902, and caches it in each PE in the operation circuit.
  • the operation circuit takes the data of matrix A from the input memory 1901 and performs matrix operation with matrix B, and the obtained partial or final results of the matrix are stored in the accumulator (accumulator) 1908 .
  • the unified memory 1906 is used to store input data and output data.
  • the weight data directly accesses the controller (Direct Memory Access Controller, DMAC) 1905 through the storage unit, and the DMAC is transferred to the weight storage 1902.
  • Input data is also transferred to unified memory 1906 by DMAC.
  • DMAC Direct Memory Access Controller
  • the BIU is the Bus Interface Unit, that is, the bus interface unit 1913, which is used for the interaction between the AXI bus and the DMAC and the instruction fetch buffer (Instruction Fetch Buffer, IFB) 1909.
  • IFB Instruction Fetch Buffer
  • the bus interface unit 1913 (Bus Interface Unit, BIU for short), is used for the instruction fetch memory 1909 to obtain instructions from the external memory, and is also used for the storage unit access controller 1905 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
  • BIU Bus Interface Unit
  • the DMAC is mainly used to move the input data in the external memory DDR to the unified memory 1906 , move the weight data to the weight memory 1902 , or move the input data to the input memory 1901 .
  • the vector computing unit 1907 includes a plurality of computing processing units, and if necessary, further processes the output of the computing circuit 1903, such as vector multiplication, vector addition, exponent operation, logarithmic operation, size comparison and so on. It is mainly used for non-convolutional/fully connected layer network calculations in neural networks, such as Batch Normalization (batch normalization), pixel-level summation, upsampling of predicted label planes, etc.
  • the vector computation unit 1907 can store the vector of the processed output to unified memory 1906 .
  • the vector calculation unit 1907 can apply a linear function; or, a non-linear function to the output of the operation circuit 1903, such as performing linear interpolation on the predicted label plane extracted by the convolutional layer, and then for example, a vector of accumulated values to generate an activation value .
  • the vector calculation unit 1907 generates normalized values, pixel-level summed values, or both.
  • the vector of processed outputs can be used as an activation input to operational circuitry 1903, for example for use in subsequent layers in a neural network.
  • An instruction fetch buffer (instruction fetch buffer) 1909 connected to the controller 1904 is used to store instructions used by the controller 1904;
  • the unified memory 1906, the input memory 1901, the weight memory 1902 and the fetch memory 1909 are all On-Chip memories. External memory is private to the NPU hardware architecture.
  • the processor mentioned above can be a general-purpose central processing unit, microprocessor, ASIC, or one or more integrated circuits for controlling the execution of the above-mentioned programs.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be A physical unit can be located in one place, or it can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the connection relationship between the modules indicates that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
  • the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to make a computer device (which can be a personal computer, training device, or network device, etc.) execute the instructions described in various embodiments of the present application method.
  • a computer device which can be a personal computer, training device, or network device, etc.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, training device, or data
  • the center transmits to another website site, computer, training device or data center via wired (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • wired eg, coaxial cable, fiber optic, digital subscriber line (DSL)
  • wireless eg, infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a training device or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (Solid State Disk, SSD)), etc.

Abstract

Provided in the present application are a posture recognition method and a related device. The posture of a target object, which is obtained after an image including the target object is processed, has relatively high accuracy, thereby facilitating the improvement of the accuracy of motion information of an acquired target image. The method in the present application comprises: acquiring a target image; and processing, by means of a posture recognition model, a target area of the target image and position information of the target area in the target image, so as to obtain a posture parameter, wherein the target area is the area where the target object is located, and the posture parameter is used for acquiring the posture of the target object.

Description

一种姿态识别方法及其相关设备A gesture recognition method and related equipment
本申请要求于2021年11月15日提交中国专利局,申请号为202111350981.9,发明名称为“一种姿态识别方法及其相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111350981.9 filed on November 15, 2021, and the title of the invention is "a gesture recognition method and related equipment", the entire contents of which are incorporated herein by reference. Applying.
技术领域technical field
本申请涉及人工智能(artificial intelligence,AI)技术领域,尤其涉及一种姿态识别方法及其相关设备。This application relates to the technical field of artificial intelligence (AI), in particular to a gesture recognition method and related equipment.
背景技术Background technique
人体动作捕捉技术是影视、游戏行业中常用的技术,该技术可对输入的视频流进行处理,以捕捉每一帧图像中人体的姿态,从而得到人体的运动信息。基于这种技术,可以从海量的视频中提取人体运动时的姿态数据,具有广阔的应用场景。Human body motion capture technology is a commonly used technology in the film and television and game industries. This technology can process the input video stream to capture the posture of the human body in each frame of image, so as to obtain the motion information of the human body. Based on this technology, the posture data of human body movement can be extracted from massive videos, which has a wide range of application scenarios.
目前,可基于AI技术中实现人体动作捕捉。具体地,对于某一个图像而言,可通过已训练的神经网络对该图像中人体所在的区域进行处理,从而得到姿态参数,该姿态参数可用于确定人体的姿态。At present, human body motion capture can be realized based on AI technology. Specifically, for a certain image, the trained neural network can be used to process the area where the human body is located in the image, so as to obtain posture parameters, and the posture parameters can be used to determine the posture of the human body.
若存在呈现相同环境的多个图像,而人体在这多个图像中,分别位于该环境中的不同位置,且人体的姿态是极度相似的,在这种情况下,神经网络会判定这多个图像中人体的姿态参数是一致的,但在实际环境中,人体一旦发生移动,虽然人体在不同位置的姿态是相似的,但人体的姿态之间肯定存在细微的差别,这是目前的神经网络所无法识别出来的,导致所捕捉到的人体姿态不够准确,进而影响人体的运动信息的准确度。If there are multiple images showing the same environment, and the human body is located in different positions in the environment in these multiple images, and the postures of the human body are extremely similar, in this case, the neural network will determine the The posture parameters of the human body in the image are consistent, but in the actual environment, once the human body moves, although the postures of the human body in different positions are similar, there must be subtle differences between the postures of the human body. This is the current neural network. If it cannot be identified, the captured posture of the human body is not accurate enough, which in turn affects the accuracy of the motion information of the human body.
发明内容Contents of the invention
本申请实施例提供了一种姿态识别方法及其相关设备,对包含目标对象的图像进行处理后所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。The embodiment of the present application provides a posture recognition method and related equipment, which can obtain the posture of the target object after processing the image containing the target object, which has high accuracy, and is conducive to improving the accuracy of the acquired target image. Accuracy of exercise information.
本申请实施例的第一方面提供了一种姿态识别方法,该方法包括:The first aspect of the embodiments of the present application provides a gesture recognition method, the method comprising:
当需要对目标图像进行姿态识别时,可先获取目标图像,目标图像通常呈现有目标对象和目标对象所处的环境,可以理解的是,姿态识别的目标是为了获取目标图像中目标对象的姿态。When it is necessary to perform gesture recognition on the target image, the target image can be obtained first. The target image usually presents the target object and the environment in which the target object is located. It can be understood that the goal of gesture recognition is to obtain the pose of the target object in the target image .
为了减小姿态识别模型的计算量,可对目标图像进行预处理。具体地,可对目标图像进行检测,以确定目标图像中目标对象所在的区域,该区域可称为目标区域,并获取目标区域在目标图像中的位置信息。In order to reduce the computational load of the pose recognition model, the target image can be preprocessed. Specifically, the target image may be detected to determine an area where the target object is located in the target image, which may be called a target area, and position information of the target area in the target image may be acquired.
得到目标区域以及目标区域在目标图像中的位置信息后,可将目标区域以及目标区域在目标图像中的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数。那么,基于姿态参数可获取目标图像中目标对象的姿态。After obtaining the target area and the position information of the target area in the target image, the target area and the position information of the target area in the target image can be input to the gesture recognition model, so that the target area of the target image and the target area in the target image can be identified by the gesture recognition model. The position information in the target image is processed to obtain the attitude parameters. Then, the pose of the target object in the target image can be obtained based on the pose parameters.
从上述方法可以看出:在获取目标图像后,可将目标图像中目标对象所在的目标区域和目标区域在目标图像中的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数,故基于姿态参数可获取目标对象的姿态。前述过程中,姿态识别模型的输入不仅包含被裁剪过的目标区域,还包含目标区域在目标图像中的位置信息,故姿态识别模型在进行图像处理时,不仅至考虑了目标区域本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。It can be seen from the above method that after the target image is acquired, the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target image of the target image can be identified by the gesture recognition model. The position information of the area and the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters. In the aforementioned process, the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing The impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object. The factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,位置信息包括目标区域的中心点在图像坐标系中的坐标以及目标区域的尺寸,图像坐标系基于目标图像构建。前述实现方式中,可以目标图像的某一个顶点作为图像坐标系的原点,那么,可确定目标区域的中心点在该图像坐标系中的坐标,以及目标区域的长和宽(也就相当于得到了目标区域的尺寸),这些信息可用于指示目标区域在目标图像中的位置,如此一来,将目标区域的这些位置信息输入至姿态识别模型后,姿态识别模型在对目标区域进行图像处理时,可有效考虑到目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,故基于这些信息所得到的目标对象的姿态,具有较高的准确度。In a possible implementation manner, the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the target image. In the aforementioned implementation manner, a certain vertex of the target image can be used as the origin of the image coordinate system, then, the coordinates of the center point of the target area in the image coordinate system can be determined, as well as the length and width of the target area (which is equivalent to obtaining The size of the target area), this information can be used to indicate the position of the target area in the target image, so that after inputting the position information of the target area into the gesture recognition model, the gesture recognition model will perform image processing on the target area , can effectively take into account the influence of the position information of the target area in the target image on the pose of the target object, so the pose of the target object obtained based on these information has high accuracy.
在一种可能的实现方式中,位置信息包括目标区域的顶点在图像坐标系中的坐标,图像坐标系基于目标图像构建。前述实现方式中,可以目标图像的某一个顶点作为图像坐标系的原点,那么,可确定目标区域的所有顶点在该图像坐标系中的坐标,这些信息可用于指示目标区域在目标图像中的位置,如此一来,将目标区域的这些位置信息输入至姿态识别模型后,姿态识别模型在对目标区域进行图像处理时,可有效考虑到目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,故基于这些信息所得到的目标对象的姿态,具有较高的准确度。In a possible implementation manner, the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the target image. In the aforementioned implementation, a certain vertex of the target image can be used as the origin of the image coordinate system, then the coordinates of all vertices of the target area in the image coordinate system can be determined, and this information can be used to indicate the position of the target area in the target image In this way, after inputting the position information of the target area into the gesture recognition model, the gesture recognition model can effectively take into account the influence of the position information of the target area in the target image on the pose of the target object when processing the image of the target area. Therefore, the posture of the target object obtained based on these information has a high accuracy.
在一种可能的实现方式中,姿态识别模型基于所述目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在所述待处理图像上的真实投影结果,进行训练得到。前述过程中,由于在姿态识别模型的训练过程中,令姿态识别模型感知目标对象在全图中的位置,学习该位置与目标对象的姿态之间的关系。那么,在姿态识别模型的应用过程中,该模型可基于目标对象在全图中的位置信息,从全图中精准地捕捉目标对象的姿态。In a possible implementation, the pose recognition model is trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed to obtain . In the foregoing process, during the training process of the gesture recognition model, the gesture recognition model is made to perceive the position of the target object in the whole image, and learn the relationship between the position and the pose of the target object. Then, in the application process of the gesture recognition model, the model can accurately capture the pose of the target object from the whole picture based on the position information of the target object in the whole picture.
在一种可能的实现方式中,目标对象的姿态包括目标对象在相机坐标系中的朝向(即目标对象相对于相机的朝向)以及目标对象在相机坐标系中的肢体行为(即目标对象在三维空间中的动作),相机坐标系的原点为拍摄目标图像的相机。前述实现方式中,即使获得目标对象在同一环境中处于不同位置的多个图像,且目标对象在这多个图像中的姿态相似,姿态识别模型也可识别这多个图像中目标对象的姿态之间的差别,即目标对象相对于相机的朝向之间的差别,以及目标对象在三维空间中的动作之间的差别。In a possible implementation, the pose of the target object includes the orientation of the target object in the camera coordinate system (that is, the orientation of the target object relative to the camera) and the body behavior of the target object in the camera coordinate system (that is, the orientation of the target object in the three-dimensional action in space), the origin of the camera coordinate system is the camera that captures the target image. In the aforementioned implementation, even if multiple images of the target object in different positions in the same environment are obtained, and the poses of the target object in these multiple images are similar, the gesture recognition model can also recognize the difference between the poses of the target object in these multiple images. The difference between objects, that is, the difference between the orientation of the target object relative to the camera, and the difference between the motion of the target object in three-dimensional space.
在一种可能的实现方式中,该方法还包括:通过姿态识别模型对目标图像的目标区域 以及目标区域在目标图像中的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。前述实现方式中,姿态识别模型的输出可包括姿态参数、形状参数和位移参数。其中,姿态参数用于指示目标对象相对于相机的旋转角和目标对象自身各个关节之间的夹角。形状参数用于指示目标对象的三维形状。位移参数用于指示目标对象在目标区域中所占的幅度,以及目标对象在目标区域中的偏移量(例如,以目标区域的中心点为参考点,目标对象向左偏移的程度或向右偏移的程度)。基于姿态参数、形状参数和位移参数进行计算,可准确得到目标对象的姿态。In a possible implementation, the method further includes: processing the target area of the target image and the position information of the target area in the target image through the gesture recognition model to obtain shape parameters and displacement parameters, and the pose parameters, shape parameters and The displacement parameters are collectively used to obtain the pose of the target object. In the aforementioned implementation manners, the output of the gesture recognition model may include gesture parameters, shape parameters and displacement parameters. Wherein, the attitude parameter is used to indicate the rotation angle of the target object relative to the camera and the angle between each joint of the target object itself. The shape parameter is used to indicate the three-dimensional shape of the target object. The displacement parameter is used to indicate the range occupied by the target object in the target area, and the offset of the target object in the target area (for example, taking the center point of the target area as a reference point, the degree to which the target object shifts to the left or to degree of right offset). The attitude of the target object can be accurately obtained by calculating based on the attitude parameters, shape parameters and displacement parameters.
在一种可能的实现方式中,该方法还包括:对目标区域在目标图像中的位置信息进行归一化处理,得到归一化后的位置信息;通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数包括:通过姿态识别模型对目标图像的目标区域以及归一化后的位置信息进行处理,得到姿态参数。前述实现方式中,姿态识别模型在执行姿态识别操作时,可基于归一化后的位置信息实现,由于归一化后的位置信息的处理难度小,有利于减少姿态识别模型的计算量,降低模型的设计成本。In a possible implementation, the method further includes: performing normalization processing on the position information of the target area in the target image to obtain the normalized position information; Processing the position information of the target area in the target image to obtain the pose parameters includes: processing the target area of the target image and the normalized position information through a pose recognition model to obtain the pose parameters. In the aforementioned implementation, the gesture recognition model can be implemented based on the normalized position information when performing the gesture recognition operation. Since the processing of the normalized position information is less difficult, it is beneficial to reduce the calculation amount of the gesture recognition model and reduce The design cost of the model.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
本申请实施例的第二方面提供了一种姿态识别方法,该方法包括:The second aspect of the embodiment of the present application provides a gesture recognition method, the method comprising:
当需要对目标图像进行姿态识别时,可先获取目标图像,目标图像通常呈现有目标对象和目标对象所处的环境,可以理解的是,姿态识别的目标是为了获取目标图像中目标对象的姿态。When it is necessary to perform gesture recognition on the target image, the target image can be obtained first. The target image usually presents the target object and the environment in which the target object is located. It can be understood that the goal of gesture recognition is to obtain the pose of the target object in the target image .
得到目标图像后,可获取目标图像中像素点的位置信息,并将目标图像和目标图像中像素点的位置信息输入值姿态识别模型,以通过姿态识别模型对目标图像和目标图像中像素点的位置信息进行处理,得到姿态参数,姿态参数用于获取目标图像包含的目标对象的姿态。After the target image is obtained, the position information of the pixels in the target image can be obtained, and the target image and the position information of the pixels in the target image can be input into the gesture recognition model, so that the target image and the pixel points in the target image can be detected by the gesture recognition model. The position information is processed to obtain attitude parameters, and the attitude parameters are used to obtain the attitude of the target object included in the target image.
从上述方法可以看出:在获取目标图像后,可将目标图像以及目标图像中像素点的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到姿态参数,故基于姿态参数可获取目标图像所呈现的目标对象的姿态。前述过程中,姿态识别模型的输入不仅包含目标图像,还包含目标图像中像素点的位置信息,故姿态识别模型在进行图像处理时,不仅至考虑了目标图像本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标图像中像素点的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。It can be seen from the above method that after the target image is acquired, the target image and the position information of the pixels in the target image can be input to the gesture recognition model, so as to perform the target image and the position information of the pixels in the target image through the gesture recognition model. After processing, the posture parameters are obtained, so the posture of the target object presented by the target image can be obtained based on the posture parameters. In the aforementioned process, the input of the gesture recognition model not only includes the target image, but also includes the position information of the pixels in the target image. Therefore, when the gesture recognition model performs image processing, it not only considers the image information of the target image itself to the pose of the target object. The impact caused by this method also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object. The factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy. degree, which in turn helps to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,位置信息包括像素点在图像坐标系中的坐标,图像坐标系基于目标图像构建。前述实现方式中,可以目标图像的某一个顶点作为图像坐标系的原点,那么,可确定目标图像中所有像素点在图像坐标系中的坐标,这些信息可作为姿态识别模型的输入,如此一来,姿态识别模型的输入不仅包含目标图像的每个像素点,还包含目标图像中每个像素点在图像坐标系中的坐标。那么,将目标区域的这些信息输入至姿态识别模型后,姿态识别模型在对目标区域进行图像处理时,可有效考虑到目标区域中所有像素 点的位置信息对目标对象的姿态所造成的影响,故基于这些信息所得到的目标对象的姿态,具有较高的准确度。In a possible implementation manner, the position information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the target image. In the aforementioned implementation, a certain vertex of the target image can be used as the origin of the image coordinate system, then the coordinates of all pixels in the target image in the image coordinate system can be determined, and this information can be used as the input of the gesture recognition model, so that , the input of the gesture recognition model not only includes each pixel of the target image, but also includes the coordinates of each pixel in the target image in the image coordinate system. Then, after inputting the information of the target area into the pose recognition model, the pose recognition model can effectively consider the influence of the position information of all pixels in the target area on the pose of the target object when performing image processing on the target area, Therefore, the posture of the target object obtained based on these information has high accuracy.
在一种可能的实现方式中,姿态识别模型基于所述目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在所述待处理图像上的真实投影结果,进行训练得到。In a possible implementation, the pose recognition model is trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed to obtain .
在一种可能的实现方式中,目标对象的姿态包括目标对象在相机坐标系中的朝向以及目标对象在相机坐标系中的肢体行为,相机坐标系基于拍摄目标图像的相机构建。In a possible implementation manner, the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
在一种可能的实现方式中,该方法还包括:通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the method further includes: processing the target image and the position information of the pixels in the target image through the gesture recognition model to obtain shape parameters and displacement parameters, and the posture parameters, shape parameters and displacement parameters are used in common to obtain the pose of the target object.
在一种可能的实现方式中,该方法还包括:对目标图像中像素点的位置信息进行归一化处理,得到归一化后的位置信息;通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到姿态参数包括:通过姿态识别模型对目标图像以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation, the method further includes: performing normalization processing on the position information of the pixels in the target image to obtain the normalized position information; Processing the position information of the point to obtain the attitude parameters includes: processing the target image and the normalized position information through the attitude recognition model to obtain the attitude parameters.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
本申请实施例的第三方面提供了一种模型训练方法,该方法包括:获取待处理图像;通过待训练模型对待处理图像的目标区域以及目标区域在待处理图像中的位置信息进行处理,得到姿态参数,目标区域为目标对象所在的区域;基于姿态参数,获取目标对象的预测姿态;基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型。The third aspect of the embodiment of the present application provides a model training method, the method includes: acquiring the image to be processed; processing the target area of the image to be processed by the model to be trained and the position information of the target area in the image to be processed, to obtain Attitude parameters, the target area is the area where the target object is located; based on the attitude parameters, the predicted attitude of the target object is obtained; based on the predicted attitude of the target object and the real attitude of the target object, the training model is trained to obtain the attitude recognition model.
上述方法所得到的姿态识别模型,可令姿态识别模型感知目标对象在全图中的位置,学习该位置与目标对象的姿态之间的关系,从而更精准地捕捉目标对象的姿态。当姿态识别模型在图像处理时,姿态识别模型的输入不仅包含被裁剪过的目标区域,还包含目标区域在目标图像中的位置信息,故姿态识别模型不仅至考虑了目标区域本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。The gesture recognition model obtained by the above method can make the gesture recognition model perceive the position of the target object in the whole image, and learn the relationship between the position and the pose of the target object, so as to capture the pose of the target object more accurately. When the gesture recognition model is in image processing, the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself. The influence caused by the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object. The factors considered are relatively comprehensive, so the posture of the target object obtained based on this method, It has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型包括:基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,对待训练模型进行训练,得到姿态识别模型。In a possible implementation, the model to be trained is trained based on the predicted pose of the target object and the real pose of the target object, and the gesture recognition model obtained includes: a predicted projection result based on the predicted pose of the target object on the image to be processed and The real projection result of the real pose of the target object on the image to be processed is used to train the model to be trained to obtain a pose recognition model.
在一种可能的实现方式中,位置信息包括目标区域的中心点在图像坐标系中的坐标以及目标区域的尺寸,图像坐标系基于待处理图像构建。In a possible implementation manner, the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,位置信息包括目标区域的顶点在图像坐标系中的坐标,图像坐标系基于待处理图像构建。In a possible implementation manner, the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,目标对象的预测姿态包括目标对象在相机坐标系中的预测 朝向以及目标对象在相机坐标系中的预测肢体行为,相机坐标系基于拍摄待处理图像的相机构建。In a possible implementation, the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
在一种可能的实现方式中,该方法包括:通过待训练模型对待处理图像的目标区域以及目标区域在待处理图像中的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the method includes: processing the target area of the image to be processed by the model to be trained and the position information of the target area in the image to be processed to obtain shape parameters and displacement parameters, attitude parameters, shape parameters and The displacement parameters are collectively used to obtain the pose of the target object.
在一种可能的实现方式中,该方法还包括:对目标区域在待处理图像中的位置信息进行归一化处理,得到归一化后的位置信息;通过待训练模型对待处理图像的目标区域以及目标区域在待处理图像中的位置信息进行处理,得到姿态参数包括:通过待训练模型对待处理图像的目标区域以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation, the method further includes: performing normalization processing on the position information of the target area in the image to be processed to obtain the normalized position information; And processing the position information of the target area in the image to be processed to obtain the attitude parameters includes: processing the target area of the image to be processed by the model to be trained and the normalized position information to obtain the attitude parameters.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
本申请实施例的第四方面提供了一种模型训练方法,该方法包括:获取待处理图像;The fourth aspect of the embodiments of the present application provides a model training method, the method comprising: acquiring an image to be processed;
通过待训练模型对待处理图像以及待处理图像中像素点的位置信息进行处理,得到姿态参数;基于姿态参数,获取目标对象的预测姿态;基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型。The attitude parameters are obtained by processing the image to be processed and the position information of the pixels in the image to be processed by the model to be trained; based on the attitude parameters, the predicted attitude of the target object is obtained; based on the predicted attitude of the target object and the real attitude of the target object, the attitude parameter The model is trained to obtain a gesture recognition model.
上述方法所得到的姿态识别模型,可令姿态识别模型感知目标对象在全图中的位置,学习该位置与目标对象的姿态之间的关系,从而更精准地捕捉目标对象的姿态。当姿态识别模型在图像处理时,其输入不仅包含目标图像,还包含目标图像中像素点的位置信息,故姿态识别模型不仅至考虑了目标图像本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标图像中像素点的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。The gesture recognition model obtained by the above method can make the gesture recognition model perceive the position of the target object in the whole image, and learn the relationship between the position and the pose of the target object, so as to capture the pose of the target object more accurately. When the pose recognition model is in image processing, its input not only includes the target image, but also includes the position information of the pixels in the target image, so the pose recognition model not only considers the influence of the image information of the target image itself on the pose of the target object , it also takes into account the impact of the position information of the pixel points in the target image on the attitude of the target object, and the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy, and further has It is beneficial to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型:基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,对待训练模型进行训练,得到姿态识别模型。In a possible implementation, based on the predicted pose of the target object and the real pose of the target object, the model to be trained is trained to obtain a pose recognition model: based on the predicted projection result of the predicted pose of the target object on the image to be processed and the target The real projection result of the real pose of the object on the image to be processed is used to train the model to be trained to obtain a pose recognition model.
在一种可能的实现方式中,位置信息包括像素点在图像坐标系中的坐标,图像坐标系基于待处理图像构建。In a possible implementation manner, the location information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,目标对象的预测姿态包括目标对象在相机坐标系中的预测朝向以及目标对象在相机坐标系中的预测肢体行为,相机坐标系基于拍摄待处理图像的相机构建。In a possible implementation, the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
在一种可能的实现方式中,该方法还包括:通过待训练模型对待处理图像的目标区域以及待处理图像中像素点的位置信息进行处理,得到姿态参数、形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the method further includes: processing the target area of the image to be processed by the model to be trained and the position information of the pixels in the image to be processed to obtain attitude parameters, shape parameters and displacement parameters, attitude parameters, The shape parameter and the displacement parameter are jointly used to obtain the pose of the target object.
在一种可能的实现方式中,该方法还包括:对待处理图像中像素点的位置信息进行归一化处理,得到归一化后的位置信息;通过待训练模型对待处理图像以及待处理图像中像素点的位置信息进行处理,得到姿态参数包括:通过待训练模型对待处理图像以及归一化 后的位置信息进行处理,得到姿态参数。In a possible implementation, the method further includes: performing normalization processing on the position information of the pixels in the image to be processed to obtain the normalized position information; Processing the position information of the pixels to obtain the attitude parameters includes: processing the image to be processed and the normalized position information by the model to be trained to obtain the attitude parameters.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
本申请实施例的第五方面提供了一种姿态识别装置,该装置包括:获取模块,用于获取目标图像;处理模块,用于通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数,目标区域为目标对象所在的区域,姿态参数用于获取目标对象的姿态。The fifth aspect of the embodiment of the present application provides a gesture recognition device, the device includes: an acquisition module, used to acquire a target image; The position information in is processed to obtain the attitude parameters, the target area is the area where the target object is located, and the attitude parameters are used to obtain the attitude of the target object.
从上述装置可以看出:在获取目标图像后,可将目标图像中目标对象所在的目标区域和目标区域在目标图像中的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数,故基于姿态参数可获取目标对象的姿态。前述过程中,姿态识别模型的输入不仅包含被裁剪过的目标区域,还包含目标区域在目标图像中的位置信息,故姿态识别模型在进行图像处理时,不仅至考虑了目标区域本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。It can be seen from the above device that after the target image is acquired, the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target image of the target image can be detected by the gesture recognition model. The position information of the area and the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters. In the aforementioned process, the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing The impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object. The factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,位置信息包括目标区域的中心点在图像坐标系中的坐标以及目标区域的尺寸,图像坐标系基于目标图像构建。In a possible implementation manner, the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the target image.
在一种可能的实现方式中,位置信息包括目标区域的顶点在图像坐标系中的坐标,图像坐标系基于目标图像构建。In a possible implementation manner, the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the target image.
在一种可能的实现方式中,姿态识别模型基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,进行训练得到。In a possible implementation manner, the pose recognition model is obtained by training based on a predicted projection result of the predicted pose of the target object on the image to be processed and a real projection result of the real pose of the target object on the image to be processed.
在一种可能的实现方式中,目标对象的姿态包括目标对象在相机坐标系中的朝向以及目标对象在相机坐标系中的肢体行为,相机坐标系基于拍摄目标图像的相机构建。In a possible implementation manner, the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
在一种可能的实现方式中,处理模块,还用于通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the processing module is also used to process the target area of the target image and the position information of the target area in the target image through the pose recognition model to obtain shape parameters and displacement parameters, pose parameters, shape parameters Together with the displacement parameter, it is used to obtain the pose of the target object.
在一种可能的实现方式中,该装置还包括:归一化模块,用于对目标区域在目标图像中的位置信息进行归一化处理,得到归一化后的位置信息;处理模块,用于通过姿态识别模型对目标图像的目标区域以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation manner, the device further includes: a normalization module, configured to perform normalization processing on the position information of the target area in the target image to obtain normalized position information; The target area of the target image and the normalized position information are processed by the gesture recognition model to obtain the gesture parameters.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
本申请实施例的第六方面提供了一种姿态识别装置,该装置包括:获取模块,用于获取目标图像;处理模块,用于通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到姿态参数,姿态参数用于获取目标图像包含的目标对象的姿态。The sixth aspect of the embodiment of the present application provides a gesture recognition device, which includes: an acquisition module, used to acquire a target image; a processing module, used to use a gesture recognition model to process the target image and the position information of the pixels in the target image Processing is performed to obtain attitude parameters, and the attitude parameters are used to obtain the attitude of the target object included in the target image.
从上述装置可以看出:在获取目标图像后,可将目标图像以及目标图像中像素点的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像以及目标图像中像素点的位 置信息进行处理,得到姿态参数,故基于姿态参数可获取目标图像所呈现的目标对象的姿态。前述过程中,姿态识别模型的输入不仅包含目标图像,还包含目标图像中像素点的位置信息,故姿态识别模型在进行图像处理时,不仅至考虑了目标图像本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标图像中像素点的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。It can be seen from the above device that after the target image is acquired, the target image and the position information of the pixels in the target image can be input to the gesture recognition model, so as to perform the target image and the position information of the pixels in the target image through the gesture recognition model. After processing, the posture parameters are obtained, so the posture of the target object presented by the target image can be obtained based on the posture parameters. In the aforementioned process, the input of the gesture recognition model not only includes the target image, but also includes the position information of the pixels in the target image. Therefore, when the gesture recognition model performs image processing, it not only considers the image information of the target image itself to the pose of the target object. The impact caused by this method also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object. The factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy. degree, which in turn helps to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,位置信息包括像素点在图像坐标系中的坐标,图像坐标系基于目标图像构建。In a possible implementation manner, the position information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the target image.
在一种可能的实现方式中,姿态识别模型基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,进行训练得到。In a possible implementation manner, the pose recognition model is obtained by training based on a predicted projection result of the predicted pose of the target object on the image to be processed and a real projection result of the real pose of the target object on the image to be processed.
在一种可能的实现方式中,目标对象的姿态包括目标对象在相机坐标系中的朝向以及目标对象在相机坐标系中的肢体行为,相机坐标系基于拍摄目标图像的相机构建。In a possible implementation manner, the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
在一种可能的实现方式中,处理模块,还用于通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the processing module is also used to process the target image and the position information of the pixels in the target image through the gesture recognition model to obtain the shape parameter and the displacement parameter, and the gesture parameter, the shape parameter and the displacement parameter are jointly Used to get the pose of the target object.
在一种可能的实现方式中,该装置还包括:归一化模块,用于对目标图像中像素点的位置信息进行归一化处理,得到归一化后的位置信息;处理模块,用于通过姿态识别模型对目标图像以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation manner, the device further includes: a normalization module, configured to perform normalization processing on the position information of pixels in the target image to obtain normalized position information; a processing module, configured to The target image and the normalized position information are processed by the gesture recognition model to obtain the gesture parameters.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
本申请实施例的第七方面提供了一种模型训练装置,该装置包括:第一获取模块,用于获取待处理图像;处理模块,用于通过待训练模型对待处理图像的目标区域以及目标区域在待处理图像中的位置信息进行处理,得到姿态参数,目标区域为目标对象所在的区域;The seventh aspect of the embodiment of the present application provides a model training device, the device includes: a first acquisition module, used to acquire the image to be processed; a processing module, used to use the model to be trained to target the target area of the image to be processed and the target area Process the position information in the image to be processed to obtain attitude parameters, and the target area is the area where the target object is located;
第二获取模块,用于基于姿态参数,获取目标对象的预测姿态;训练模块,用于基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型。The second acquisition module is used to acquire the predicted pose of the target object based on the pose parameters; the training module is used to train the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
上述装置所得到的姿态识别模型,可令姿态识别模型感知目标对象在全图中的位置,学习该位置与目标对象的姿态之间的关系,从而更精准地捕捉目标对象的姿态。当姿态识别模型在图像处理时,姿态识别模型的输入不仅包含被裁剪过的目标区域,还包含目标区域在目标图像中的位置信息,故姿态识别模型不仅至考虑了目标区域本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。The gesture recognition model obtained by the above-mentioned device can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the posture of the target object, so as to capture the posture of the target object more accurately. When the gesture recognition model is in image processing, the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself. The influence caused by the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object. The factors considered are relatively comprehensive, so the posture of the target object obtained based on this method, It has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,训练模块,用于基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,对待训练模型进行训练,得到姿态识别模型。In a possible implementation, the training module is configured to train the model to be trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed , to get the gesture recognition model.
在一种可能的实现方式中,位置信息包括目标区域的中心点在图像坐标系中的坐标以及目标区域的尺寸,图像坐标系基于待处理图像构建。In a possible implementation manner, the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,位置信息包括目标区域的顶点在图像坐标系中的坐标,图像坐标系基于待处理图像构建。In a possible implementation manner, the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,目标对象的预测姿态包括目标对象在相机坐标系中的预测朝向以及目标对象在相机坐标系中的预测肢体行为,相机坐标系基于拍摄待处理图像的相机构建。In a possible implementation, the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
在一种可能的实现方式中,处理模块,还用于通过姿态识别模型对待处理图像的目标区域以及目标区域在待处理图像中的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the processing module is also used to process the target area of the image to be processed and the position information of the target area in the image to be processed through the pose recognition model to obtain shape parameters and displacement parameters, pose parameters, shape The parameters and the displacement parameters are used together to obtain the pose of the target object.
在一种可能的实现方式中,该装置还包括:归一化模块,用于对目标区域在待处理图像中的位置信息进行归一化处理,得到归一化后的位置信息;处理模块,用于通过待训练模型对待处理图像的目标区域以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation manner, the device further includes: a normalization module, configured to perform normalization processing on the position information of the target area in the image to be processed to obtain normalized position information; a processing module, It is used to process the target area of the image to be processed by the model to be trained and the normalized position information to obtain the pose parameters.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
本申请实施例的第八方面提供了一种模型训练装置,该装置包括:第一获取模块,用于获取待处理图像;处理模块,用于通过待训练模型对待处理图像以及待处理图像中像素点的位置信息进行处理,得到姿态参数;第二获取模块,用于基于姿态参数,获取目标对象的预测姿态;训练模块,用于基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型。The eighth aspect of the embodiment of the present application provides a model training device, the device includes: a first acquisition module, used to acquire the image to be processed; a processing module, used to use the model to be trained to process the image to be processed and the pixels in the image to be processed The position information of the point is processed to obtain the attitude parameters; the second acquisition module is used to obtain the predicted attitude of the target object based on the attitude parameters; the training module is used to treat the training model based on the predicted attitude of the target object and the real attitude of the target object Perform training to obtain a gesture recognition model.
上述装置所得到的姿态识别模型,可令姿态识别模型感知目标对象在全图中的位置,学习该位置与目标对象的姿态之间的关系,从而更精准地捕捉目标对象的姿态。当姿态识别模型在图像处理时,其输入不仅包含目标图像,还包含目标图像中像素点的位置信息,故姿态识别模型不仅至考虑了目标图像本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标图像中像素点的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。The gesture recognition model obtained by the above-mentioned device can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the posture of the target object, so as to capture the posture of the target object more accurately. When the pose recognition model is in image processing, its input not only includes the target image, but also includes the position information of the pixels in the target image, so the pose recognition model not only considers the influence of the image information of the target image itself on the pose of the target object , it also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object, and the factors considered are relatively comprehensive. Therefore, the attitude of the target object obtained based on this method has high accuracy, and further has It is beneficial to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,训练模块,用于基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,对待训练模型进行训练,得到姿态识别模型。In a possible implementation, the training module is configured to train the model to be trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed , to get the gesture recognition model.
在一种可能的实现方式中,位置信息包括像素点在图像坐标系中的坐标,图像坐标系基于待处理图像构建。In a possible implementation manner, the location information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,目标对象的预测姿态包括目标对象在相机坐标系中的预测朝向以及目标对象在相机坐标系中的预测肢体行为,相机坐标系基于拍摄待处理图像的相机构建。In a possible implementation, the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
在一种可能的实现方式中,处理模块,还用于通过姿态识别模型对待处理图像的目标区域以及待处理图像中像素点的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the processing module is also used to process the target area of the image to be processed and the position information of the pixels in the image to be processed through the pose recognition model to obtain shape parameters and displacement parameters, pose parameters, shape parameters Together with the displacement parameter, it is used to obtain the pose of the target object.
在一种可能的实现方式中,该装置还包括:归一化模块,用于对待处理图像中像素点 的位置信息进行归一化处理,得到归一化后的位置信息;处理模块,用于通过待训练模型对待处理图像以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation manner, the device further includes: a normalization module, configured to perform normalization processing on the position information of pixels in the image to be processed, to obtain normalized position information; a processing module, configured to The attitude parameters are obtained by processing the image to be processed and the normalized position information by the model to be trained.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
本申请实施例的第九方面提供了一种姿态识别装置,该装置包括存储器和处理器;存储器存储有代码,处理器被配置为执行代码,当代码被执行时,姿态识别装置执行如第一方面、第一方面中任意一种可能的实现方式、第二方面或第二方面中任意一种可能的实现方式所述的方法。The ninth aspect of the embodiment of the present application provides a gesture recognition device, the device includes a memory and a processor; the memory stores codes, the processor is configured to execute the codes, and when the codes are executed, the gesture recognition device performs the first aspect, any one possible implementation manner of the first aspect, the second aspect, or the method described in any one possible implementation manner of the second aspect.
本申请实施例的第十方面提供了一种模型训练装置,该装置包括存储器和处理器;存储器存储有代码,处理器被配置为执行代码,当代码被执行时,模型训练装置执行如第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。The tenth aspect of the embodiments of the present application provides a model training device, the device includes a memory and a processor; the memory stores codes, the processor is configured to execute the codes, and when the codes are executed, the model training device executes the third aspect, any one possible implementation manner of the third aspect, the fourth aspect, or the method described in any one possible implementation manner of the fourth aspect.
本申请实施例的第十一方面提供了一种电路系统,该电路系统包括处理电路,该处理电路配置为执行如第一方面、第一方面中任意一种可能的实现方式、第二方面、第二方面中任意一种可能的实现方式、第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。An eleventh aspect of the embodiments of the present application provides a circuit system, where the circuit system includes a processing circuit configured to perform any one of the possible implementations in the first aspect, the first aspect, the second aspect, Any one of the possible implementations of the second aspect, the third aspect, any one of the possible implementations of the third aspect, the fourth aspect, or the method described in any one of the possible implementations of the fourth aspect.
本申请实施例的第十二方面提供了一种芯片系统,该芯片系统包括处理器,用于调用存储器中存储的计算机程序或计算机指令,以使得该处理器执行如第一方面、第一方面中任意一种可能的实现方式、第二方面、第二方面中任意一种可能的实现方式、第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。The twelfth aspect of the embodiments of the present application provides a chip system, the chip system includes a processor, used to call the computer program or computer instruction stored in the memory, so that the processor executes the first aspect, the first aspect Any possible implementation of the second aspect, any possible implementation of the second aspect, the third aspect, any possible implementation of the third aspect, the fourth aspect or any of the fourth aspects The method described in one possible implementation.
在一种可能的实现方式中,该处理器通过接口与存储器耦合。In a possible implementation manner, the processor is coupled to the memory through an interface.
在一种可能的实现方式中,该芯片系统还包括存储器,该存储器中存储有计算机程序或计算机指令。In a possible implementation manner, the chip system further includes a memory, where computer programs or computer instructions are stored.
本申请实施例的第十三方面提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,该程序在由计算机执行时,使得计算机实施如第一方面、第一方面中任意一种可能的实现方式、第二方面、第二方面中任意一种可能的实现方式、第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。The thirteenth aspect of the embodiments of the present application provides a computer storage medium, the computer storage medium stores a computer program, and when the program is executed by a computer, the computer implements any one of the possibilities in the first aspect and the first aspect. implementation of the second aspect, any possible implementation of the second aspect, the third aspect, any possible implementation of the third aspect, the fourth aspect, or any possible implementation of the fourth aspect method described in the method.
本申请实施例的第十四方面提供了一种计算机程序产品,该计算机程序产品存储有指令,该指令在由计算机执行时,使得计算机实施如第一方面、第一方面中任意一种可能的实现方式、第二方面、第二方面中任意一种可能的实现方式、第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。The fourteenth aspect of the embodiments of the present application provides a computer program product, the computer program product stores instructions, and when the instructions are executed by a computer, the computer implements any one of the possible functions of the first aspect and the first aspect. Implementation, the second aspect, any possible implementation of the second aspect, the third aspect, any possible implementation of the third aspect, the fourth aspect, or any possible implementation of the fourth aspect the method described.
本申请实施例中,在获取目标图像后,可将目标图像中目标对象所在的目标区域和目标区域在目标图像中的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数,故基于姿态参数可获取目标对象的姿态。前述过程中,姿态识别模型的输入不仅包含被裁剪过的目标区域,还包含目标区域在目标图像中的位置信息,故姿态识别模型在进行图像处理时,不仅至考虑了目标区域本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。In the embodiment of the present application, after the target image is acquired, the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target area of the target image can be identified by the gesture recognition model. And the position information of the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters. In the aforementioned process, the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing The impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object. The factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
附图说明Description of drawings
图1为相关技术的一个示意图;Fig. 1 is a schematic diagram of related technology;
图2为相关技术的另一示意图;Fig. 2 is another schematic diagram of related technology;
图3为人工智能主体框架的一种结构示意图;Fig. 3 is a kind of structural schematic diagram of main frame of artificial intelligence;
图4a为本申请实施例提供的图像处理系统的一个结构示意图;FIG. 4a is a schematic structural diagram of an image processing system provided by an embodiment of the present application;
图4b为本申请实施例提供的图像处理系统的另一结构示意图;Fig. 4b is another schematic structural diagram of the image processing system provided by the embodiment of the present application;
图4c为本申请实施例提供的图像处理的相关设备的一个示意图;FIG. 4c is a schematic diagram of related equipment for image processing provided by the embodiment of the present application;
图5为本申请实施例提供的系统100架构的一个示意图;FIG. 5 is a schematic diagram of the architecture of the system 100 provided by the embodiment of the present application;
图6为本申请实施例提供的姿态识别方法的一个流程示意图;FIG. 6 is a schematic flowchart of a gesture recognition method provided in an embodiment of the present application;
图7为本申请实施例提供的姿态识别的一个应用例示意图;FIG. 7 is a schematic diagram of an application example of gesture recognition provided by the embodiment of the present application;
图8为本申请实施例提供的姿态识别方法的另一流程示意图;FIG. 8 is another schematic flowchart of the gesture recognition method provided by the embodiment of the present application;
图9a为本申请实施例提供的姿态识别的另一应用例示意图;Fig. 9a is a schematic diagram of another application example of gesture recognition provided by the embodiment of the present application;
图9b为本申请实施例提供的姿态识别模型的一个结构示意图;Fig. 9b is a schematic structural diagram of the gesture recognition model provided by the embodiment of the present application;
图10为本申请实施例提供的模型训练方法的一个示意图;Fig. 10 is a schematic diagram of the model training method provided by the embodiment of the present application;
图11为本申请实施例提供的投影结果的一个示意图;Fig. 11 is a schematic diagram of the projection result provided by the embodiment of the present application;
图12为本申请实施例提供的模型训练方法的另一示意图;FIG. 12 is another schematic diagram of the model training method provided by the embodiment of the present application;
图13为本申请实施例提供的姿态识别装置的一个结构示意图;FIG. 13 is a schematic structural diagram of a gesture recognition device provided by an embodiment of the present application;
图14为本申请实施例提供的姿态识别装置的另一结构示意图;Fig. 14 is another schematic structural diagram of the gesture recognition device provided by the embodiment of the present application;
图15为本申请实施例提供的模型训练装置的另一结构示意图;Fig. 15 is another structural schematic diagram of the model training device provided by the embodiment of the present application;
图16为本申请实施例提供的模型训练装置的另一结构示意图;Fig. 16 is another structural schematic diagram of the model training device provided by the embodiment of the present application;
图17为本申请实施例提供的执行设备的一个结构示意图;Fig. 17 is a schematic structural diagram of the execution device provided by the embodiment of the present application;
图18为本申请实施例提供的训练设备的一个结构示意图;FIG. 18 is a schematic structural diagram of a training device provided in an embodiment of the present application;
图19为本申请实施例提供的芯片的一个结构示意图。FIG. 19 is a schematic structural diagram of a chip provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供了一种姿态识别方法及其相关设备,对包含目标对象的图像进行处理后所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的 运动信息的准确度。The embodiment of the present application provides a posture recognition method and related equipment, which can obtain the posture of the target object after processing the image containing the target object, which has high accuracy, and is conducive to improving the accuracy of the acquired target image. Accuracy of exercise information.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”并他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, and this is merely a description of the manner in which objects with the same attribute are described in the embodiments of the present application. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, product, or apparatus comprising a series of elements is not necessarily limited to those elements, but may include elements not expressly included. Other elements listed explicitly or inherent to the process, method, product, or apparatus.
人体动作捕捉技术是影视、游戏行业中常用的技术,该技术可对输入的视频流进行处理,以捕捉每一帧图像中人体的姿态,从而得到人体的运动信息。基于这种技术,可以从海量的视频中提取人体运动时的姿态数据,具有广阔的应用场景,例如,增强现实(augmented reality,AR)场景和虚拟现实(virtual reality,VR)场景中的虚拟人物驱动、远程会议以及元宇宙等等。Human body motion capture technology is a commonly used technology in the film and television and game industries. This technology can process the input video stream to capture the posture of the human body in each frame of image, so as to obtain the motion information of the human body. Based on this technology, the posture data of human body movement can be extracted from massive videos, and has a wide range of application scenarios, for example, virtual characters in augmented reality (augmented reality, AR) scenes and virtual reality (virtual reality, VR) scenes drives, teleconferencing, and the metaverse, to name a few.
目前,可基于AI技术中实现人体动作捕捉。具体地,对于某一个图像而言,可通过已训练的神经网络对该图像中人体所在的区域进行处理,从而得到姿态参数,该姿态参数可用于确定人体的姿态。At present, human body motion capture can be realized based on AI technology. Specifically, for a certain image, the trained neural network can be used to process the area where the human body is located in the image, so as to obtain posture parameters, and the posture parameters can be used to determine the posture of the human body.
如图1所示(图1为相关技术的一个示意图),在相关技术中,若存在呈现相同环境的多个图像,分别为图像1、图像2和图像3。而人体在这3个图像中,分别位于该环境中的3个位置,且位于不同的位置时,人体的姿态是极度相似的。在这种情况下,神经网络会判定这3个图像中人体的姿态参数是一致的,即判定图像1中人体的姿态1、图像2中人体的姿态2和图像3中人体的姿态3是相同的。但在实际环境中,人体一旦发生移动,虽然人体在不同位置的姿态是相似的,但人体的姿态之间肯定存在细微的差别,如图2所示(图2为相关技术的另一示意图),从俯视的角度去观察人体在该环境中的3个位置,对于人体的姿态1而言,人体的朝向是侧对(往右倾斜)着相机,对于人体的姿态2而言,人体的朝向是正对着相机,对于人体的姿态3而言,人体的朝向是侧对(往左倾斜)着相机。由此可见,这3个姿态之间的差别,是相关技术中的神经网络所无法识别出来的,导致所捕捉到的人体姿态不够准确,进而影响人体的运动信息的准确度。As shown in FIG. 1 (FIG. 1 is a schematic diagram of the related art), in the related art, if there are multiple images presenting the same environment, they are Image 1, Image 2, and Image 3 respectively. In the three images, the human body is located in three positions in the environment, and when they are located in different positions, the postures of the human body are extremely similar. In this case, the neural network will determine that the posture parameters of the human body in the three images are consistent, that is, it is determined that the posture 1 of the human body in image 1, the posture 2 of the human body in image 2, and the posture 3 of the human body in image 3 are the same of. But in the actual environment, once the human body moves, although the postures of the human body in different positions are similar, there must be subtle differences between the postures of the human body, as shown in Figure 2 (Figure 2 is another schematic diagram of related technology) , observe the three positions of the human body in the environment from the perspective of looking down. For the posture 1 of the human body, the orientation of the human body is facing the camera sideways (tilted to the right). For the posture 2 of the human body, the orientation of the human body is It is directly facing the camera. For the posture 3 of the human body, the orientation of the human body is facing the camera sideways (leaning to the left). It can be seen that the difference between these three postures cannot be recognized by the neural network in the related technology, which leads to the inaccurate captured posture of the human body, which in turn affects the accuracy of the motion information of the human body.
为了解决上述问题,本申请实施例提供了一种姿态识别方法,该方法可结合人工智能(artificial intelligence,AI)技术实现。AI技术是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能的技术学科,AI技术通过感知环境、获取知识并使用知识获得最佳结果。换句话说,人工智能技术是计算机科学的一个分支,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。利用人工智能进行图像处理是人工智能常见的一个应用方式。In order to solve the above problems, an embodiment of the present application provides a gesture recognition method, which can be implemented in combination with artificial intelligence (AI) technology. AI technology is a technical discipline that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence. AI technology obtains the best results by perceiving the environment, acquiring knowledge and using knowledge. In other words, artificial intelligence technology is a branch of computer science that attempts to understand the nature of intelligence and produce a new kind of intelligent machine that can respond in a similar way to human intelligence. Image processing using artificial intelligence is a common application of artificial intelligence.
首先对人工智能系统总体工作流程进行描述,请参见图3,图3为人工智能主体框架的一种结构示意图,下面从“智能信息链”(水平轴)和“IT价值链”(垂直轴)两个维度对上述人工智能主题框架进行阐述。其中,“智能信息链”反映从数据的获取到处理的一列过程。举例来说,可以是智能信息感知、智能信息表示与形成、智能推理、智能决策、智能执行与输出的一般过程。在这个过程中,数据经历了“数据—信息—知识—智慧”的 凝练过程。“IT价值链”从人智能的底层基础设施、信息(提供和处理技术实现)到系统的产业生态过程,反映人工智能为信息技术产业带来的价值。First, describe the overall workflow of the artificial intelligence system. Please refer to Figure 3. Figure 3 is a schematic structural diagram of the main framework of artificial intelligence. The following is from the "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis) Two dimensions are used to elaborate the above artificial intelligence theme framework. Among them, the "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data has undergone a condensed process of "data-information-knowledge-wisdom". The "IT value chain" reflects the value brought by artificial intelligence to the information technology industry from the underlying infrastructure of artificial intelligence, information (provided and processed by technology) to the industrial ecological process of the system.
(1)基础设施(1) Infrastructure
基础设施为人工智能系统提供计算能力支持,实现与外部世界的沟通,并通过基础平台实现支撑。通过传感器与外部沟通;计算能力由智能芯片(CPU、NPU、GPU、ASIC、FPGA等硬件加速芯片)提供;基础平台包括分布式计算框架及网络等相关的平台保障和支持,可以包括云存储和计算、互联互通网络等。举例来说,传感器和外部沟通获取数据,这些数据提供给基础平台提供的分布式计算系统中的智能芯片进行计算。The infrastructure provides computing power support for the artificial intelligence system, realizes communication with the outside world, and realizes support through the basic platform. Communicate with the outside through sensors; computing power is provided by smart chips (CPU, NPU, GPU, ASIC, FPGA and other hardware acceleration chips); the basic platform includes distributed computing framework and network and other related platform guarantees and supports, which can include cloud storage and Computing, interconnection network, etc. For example, sensors communicate with the outside to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.
(2)数据(2) data
基础设施的上一层的数据用于表示人工智能领域的数据来源。数据涉及到图形、图像、语音、文本,还涉及到传统设备的物联网数据,包括已有系统的业务数据以及力、位移、液位、温度、湿度等感知数据。Data from the upper layer of the infrastructure is used to represent data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data of traditional equipment, including business data of existing systems and sensory data such as force, displacement, liquid level, temperature, and humidity.
(3)数据处理(3) Data processing
数据处理通常包括数据训练,机器学习,深度学习,搜索,推理,决策等方式。Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
其中,机器学习和深度学习可以对数据进行符号化和形式化的智能信息建模、抽取、预处理、训练等。Among them, machine learning and deep learning can symbolize and formalize intelligent information modeling, extraction, preprocessing, training, etc. of data.
推理是指在计算机或智能系统中,模拟人类的智能推理方式,依据推理控制策略,利用形式化的信息进行机器思维和求解问题的过程,典型的功能是搜索与匹配。Reasoning refers to the process of simulating human intelligent reasoning in a computer or intelligent system, and using formalized information to carry out machine thinking and solve problems according to reasoning control strategies. The typical functions are search and matching.
决策是指智能信息经过推理后进行决策的过程,通常提供分类、排序、预测等功能。Decision-making refers to the process of decision-making after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
(4)通用能力(4) General ability
对数据经过上面提到的数据处理后,进一步基于数据处理的结果可以形成一些通用的能力,比如可以是算法或者一个通用系统,例如,翻译,文本的分析,计算机视觉的处理,语音识别,图像的识别等等。After the above-mentioned data processing is performed on the data, some general capabilities can be formed based on the results of data processing, such as algorithms or a general system, such as translation, text analysis, computer vision processing, speech recognition, image processing identification, etc.
(5)智能产品及行业应用(5) Smart products and industry applications
智能产品及行业应用指人工智能系统在各领域的产品和应用,是对人工智能整体解决方案的封装,将智能信息决策产品化、实现落地应用,其应用领域主要包括:智能终端、智能交通、智能医疗、自动驾驶、智慧城市等。Intelligent products and industry applications refer to the products and applications of artificial intelligence systems in various fields. It is the packaging of the overall solution of artificial intelligence, which commercializes intelligent information decision-making and realizes landing applications. Its application fields mainly include: intelligent terminals, intelligent transportation, Smart healthcare, autonomous driving, smart cities, etc.
接下来介绍几种本申请的应用场景。Next, several application scenarios of this application are introduced.
图4a为本申请实施例提供的图像处理系统的一个结构示意图,该图像处理系统包括用户设备以及数据处理设备。其中,用户设备包括手机、个人电脑或者信息处理中心等智能终端。用户设备为图像处理的发起端,作为图像处理请求的发起方,通常由用户通过用户设备发起请求。Fig. 4a is a schematic structural diagram of an image processing system provided by an embodiment of the present application, and the image processing system includes a user device and a data processing device. Wherein, the user equipment includes smart terminals such as a mobile phone, a personal computer, or an information processing center. The user equipment is the initiator of the image processing, and as the initiator of the image processing request, usually the user initiates the request through the user equipment.
上述数据处理设备可以是云服务器、网络服务器、应用服务器以及管理服务器等具有数据处理功能的设备或服务器。数据处理设备通过交互接口接收来自智能终端的图像处理请求,再通过存储数据的存储器以及数据处理的处理器环节进行机器学习,深度学习,搜索,推理,决策等方式的图像处理。数据处理设备中的存储器可以是一个统称,包括本地 存储以及存储历史数据的数据库,数据库可以在数据处理设备上,也可以在其它网络服务器上。The above-mentioned data processing device may be a device or server having a data processing function such as a cloud server, a network server, an application server, and a management server. The data processing device receives the image processing request from the intelligent terminal through the interactive interface, and then performs image processing such as machine learning, deep learning, search, reasoning, and decision-making through the memory for storing data and the processor link of data processing. The storage in the data processing device can be a general term, including local storage and databases for storing historical data. The database can be on the data processing device or on other network servers.
在图4a所示的图像处理系统中,用户设备可以接收用户的指令,例如用户设备可以获取用户输入/选择的一张图像,然后向数据处理设备发起请求,使得数据处理设备针对用户设备得到的该图像执行图像处理应用(例如,目标对象的识别姿态等等),从而得到针对该图像的对应的处理结果。示例性的,用户设备可以获取用户输入的一张图像,然后向数据处理设备发起目标对象的姿态识别请求,使得数据处理设备对该图像进行分类,从而得到图像中目标对象的姿态参数,从而确定图像中目标对象的姿态。In the image processing system shown in Figure 4a, the user equipment can receive user instructions, for example, the user equipment can obtain an image input/selected by the user, and then initiate a request to the data processing equipment, so that the data processing equipment can obtain the user equipment. An image processing application is performed on the image (for example, recognizing a pose of the target object, etc.), so as to obtain a corresponding processing result for the image. Exemplarily, the user device may acquire an image input by the user, and then initiate a gesture recognition request of the target object to the data processing device, so that the data processing device classifies the image, thereby obtaining the pose parameters of the target object in the image, thereby determining The pose of the target object in the image.
在图4a中,数据处理设备可以执行本申请实施例的图像处理方法。In FIG. 4a, the data processing device can execute the image processing method of the embodiment of the present application.
图4b为本申请实施例提供的图像处理系统的另一结构示意图,在图4b中,用户设备直接作为数据处理设备,该用户设备能够直接获取来自用户的输入并直接由用户设备本身的硬件进行处理,具体过程与图4a相似,可参考上面的描述,在此不再赘述。Fig. 4b is another schematic structural diagram of the image processing system provided by the embodiment of the present application. In Fig. 4b, the user equipment is directly used as a data processing equipment, and the user equipment can directly obtain the input from the user and directly perform the processing by the hardware of the user equipment itself. For processing, the specific process is similar to that in FIG. 4a , and reference may be made to the above description, and details are not repeated here.
在图4b所示的图像处理系统中,用户设备可以接收用户的指令,例如用户设备可以获取用户在用户设备中所选择的一张图像,然后再由用户设备自身针对该图像执行图像处理应用(例如目标对象的识别姿态等),从而得到针对该图像的对应的处理结果。In the image processing system shown in FIG. 4b, the user equipment may receive an instruction from the user, for example, the user equipment may acquire an image selected by the user in the user equipment, and then the user equipment itself executes an image processing application ( For example, the recognition gesture of the target object, etc.), so as to obtain the corresponding processing results for the image.
在图4b中,用户设备自身就可以执行本申请实施例的姿态识别方法。In FIG. 4b, the user equipment itself can execute the gesture recognition method of the embodiment of the present application.
图4c为本申请实施例提供的图像处理的相关设备的一个示意图。Fig. 4c is a schematic diagram of related equipment for image processing provided by the embodiment of the present application.
上述图4a和图4b中的用户设备具体可以是图4c中的本地设备301或者本地设备302,图4a中的数据处理设备具体可以是图4c中的执行设备210,其中,数据存储系统250可以存储执行设备210的待处理数据,数据存储系统250可以集成在执行设备210上,也可以设置在云上或其它网络服务器上。The above-mentioned user equipment in FIG. 4a and FIG. 4b may specifically be the local device 301 or local device 302 in FIG. 4c, and the data processing device in FIG. 4a may specifically be the execution device 210 in FIG. To store the data to be processed by the execution device 210, the data storage system 250 may be integrated on the execution device 210, or set on the cloud or other network servers.
图4a和图4b中的处理器可以通过神经网络模型或者其它模型(例如,基于支持向量机的模型)进行数据训练/机器学习/深度学习,并利用数据最终训练或者学习得到的模型针对图像执行图像处理应用,从而得到相应的处理结果。The processors in Figure 4a and Figure 4b can perform data training/machine learning/deep learning through a neural network model or other models (for example, a model based on a support vector machine), and use the data to finally train or learn the model for image execution Image processing application, so as to obtain the corresponding processing results.
图5为本申请实施例提供的系统100架构的一个示意图,在图5中,执行设备110配置输入/输出(input/output,I/O)接口112,用于与外部设备进行数据交互,用户可以通过客户设备140向I/O接口112输入数据,所述输入数据在本申请实施例中可以包括:各个待调度任务、可调用资源以及其他参数。FIG. 5 is a schematic diagram of the architecture of the system 100 provided by the embodiment of the present application. In FIG. 5, the execution device 110 is configured with an input/output (I/O) interface 112 for data interaction with external devices, and the user Data can be input to the I/O interface 112 through the client device 140, and the input data in this embodiment of the application may include: various tasks to be scheduled, callable resources, and other parameters.
在执行设备110对输入数据进行预处理,或者在执行设备110的计算模块111执行计算等相关的处理(比如进行本申请中神经网络的功能实现)过程中,执行设备110可以调用数据存储系统150中的数据、代码等以用于相应的处理,也可以将相应处理得到的数据、指令等存入数据存储系统150中。When the execution device 110 preprocesses the input data, or when the calculation module 111 of the execution device 110 executes calculations and other related processing (such as implementing the function of the neural network in this application), the execution device 110 can call the data storage system 150 The data, codes, etc. in the system can be used for corresponding processing, and the data, instructions, etc. obtained by corresponding processing can also be stored in the data storage system 150 .
最后,I/O接口112将处理结果返回给客户设备140,从而提供给用户。Finally, the I/O interface 112 returns the processing result to the client device 140, thereby providing it to the user.
值得说明的是,训练设备120可以针对不同的目标或称不同的任务,基于不同的训练数据生成相应的目标模型/规则,该相应的目标模型/规则即可以用于实现上述目标或完成上述任务,从而为用户提供所需的结果。其中,训练数据可以存储在数据库130中,且来 自于数据采集设备160采集的训练样本。It is worth noting that the training device 120 can generate corresponding target models/rules based on different training data for different goals or different tasks, and the corresponding target models/rules can be used to achieve the above-mentioned goals or complete the above-mentioned tasks , giving the user the desired result. Wherein, the training data can be stored in the database 130, and come from the training samples collected by the data collection device 160.
在图5中所示情况下,用户可以手动给定输入数据,该手动给定可以通过I/O接口112提供的界面进行操作。另一种情况下,客户设备140可以自动地向I/O接口112发送输入数据,如果要求客户设备140自动发送输入数据需要获得用户的授权,则用户可以在客户设备140中设置相应权限。用户可以在客户设备140查看执行设备110输出的结果,具体的呈现形式可以是显示、声音、动作等具体方式。客户设备140也可以作为数据采集端,采集如图所示输入I/O接口112的输入数据及输出I/O接口112的输出结果作为新的样本数据,并存入数据库130。当然,也可以不经过客户设备140进行采集,而是由I/O接口112直接将如图所示输入I/O接口112的输入数据及输出I/O接口112的输出结果,作为新的样本数据存入数据库130。In the situation shown in FIG. 5 , the user can manually specify the input data, and the manual specification can be operated through the interface provided by the I/O interface 112 . In another case, the client device 140 can automatically send the input data to the I/O interface 112 . If the client device 140 is required to automatically send the input data to obtain the user's authorization, the user can set the corresponding authority in the client device 140 . The user can view the results output by the execution device 110 on the client device 140, and the specific presentation form may be specific ways such as display, sound, and action. The client device 140 can also be used as a data collection terminal, collecting the input data input to the I/O interface 112 as shown in the figure and the output results of the output I/O interface 112 as new sample data, and storing them in the database 130 . Of course, it is also possible not to collect through the client device 140, but the I/O interface 112 directly uses the input data input to the I/O interface 112 as shown in the figure and the output result of the output I/O interface 112 as a new sample The data is stored in database 130 .
值得注意的是,图5仅是本申请实施例提供的一种系统架构的示意图,图中所示设备、器件、模块等之间的位置关系不构成任何限制,例如,在图5中,数据存储系统150相对执行设备110是外部存储器,在其它情况下,也可以将数据存储系统150置于执行设备110中。如图5所示,可以根据训练设备120训练得到神经网络。It should be noted that FIG. 5 is only a schematic diagram of a system architecture provided by the embodiment of the present application, and the positional relationship between devices, devices, modules, etc. shown in the figure does not constitute any limitation. For example, in FIG. 5, the data The storage system 150 is an external memory relative to the execution device 110 , and in other cases, the data storage system 150 may also be placed in the execution device 110 . As shown in FIG. 5 , the neural network can be obtained by training according to the training device 120 .
本申请实施例还提供的一种芯片,该芯片包括神经网络处理器NPU。该芯片可以被设置在如图5所示的执行设备110中,用以完成计算模块111的计算工作。该芯片也可以被设置在如图5所示的训练设备120中,用以完成训练设备120的训练工作并输出目标模型/规则。An embodiment of the present application also provides a chip, the chip includes a neural network processor (NPU). The chip can be set in the execution device 110 shown in FIG. 5 to complete the computing work of the computing module 111 . The chip can also be set in the training device 120 shown in FIG. 5 to complete the training work of the training device 120 and output the target model/rule.
神经网络处理器NPU,NPU作为协处理器挂载到主中央处理器(central processing unit,CPU)(host CPU)上,由主CPU分配任务。NPU的核心部分为运算电路,控制器控制运算电路提取存储器(权重存储器或输入存储器)中的数据并进行运算。The neural network processor NPU is mounted on the main central processing unit (central processing unit, CPU) (host CPU) as a coprocessor, and the main CPU assigns tasks. The core part of the NPU is the operation circuit, and the controller controls the operation circuit to extract the data in the memory (weight memory or input memory) and perform operations.
在一些实现中,运算电路内部包括多个处理单元(process engine,PE)。在一些实现中,运算电路是二维脉动阵列。运算电路还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路是通用的矩阵处理器。In some implementations, the operation circuit includes multiple processing units (process engine, PE). In some implementations, the arithmetic circuit is a two-dimensional systolic array. The arithmetic circuit may also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit is a general purpose matrix processor.
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)中。For example, suppose there is an input matrix A, a weight matrix B, and an output matrix C. The operation circuit fetches the data corresponding to the matrix B from the weight memory, and caches it on each PE in the operation circuit. The operation circuit takes the data of matrix A from the input memory and performs matrix operation with matrix B, and the obtained partial or final results of the matrix are stored in the accumulator.
向量计算单元可以对运算电路的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。例如,向量计算单元可以用于神经网络中非卷积/非FC层的网络计算,如池化(pooling),批归一化(batch normalization),局部响应归一化(local response normalization)等。The vector calculation unit can further process the output of the operation circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison and so on. For example, the vector computing unit can be used for network calculations of non-convolution/non-FC layers in neural networks, such as pooling, batch normalization, local response normalization, etc.
在一些实现种,向量计算单元能将经处理的输出的向量存储到统一缓存器。例如,向量计算单元可以将非线性函数应用到运算电路的输出,例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元生成归一化的值、合并值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路的激活输入,例如用于在神经网络中的后续层中的使用。In some implementations, the vector computation unit can store the processed output vectors to a unified register. For example, a vector computation unit may apply a non-linear function to the output of the arithmetic circuit, such as a vector of accumulated values, to generate activation values. In some implementations, the vector computation unit generates normalized values, merged values, or both. In some implementations, the vector of processed outputs can be used as an activation input to an operational circuit, for example for use in a subsequent layer in a neural network.
统一存储器用于存放输入数据以及输出数据。Unified memory is used to store input data and output data.
权重数据直接通过存储单元访问控制器(direct memory access controller,DMAC)将外部存储器中的输入数据搬运到输入存储器和/或统一存储器、将外部存储器中的权重数据存入权重存储器,以及将统一存储器中的数据存入外部存储器。The weight data directly transfers the input data in the external memory to the input memory and/or the unified memory through the storage unit access controller (direct memory access controller, DMAC), stores the weight data in the external memory into the weight memory, and stores the weight data in the unified memory Store the data in the external memory.
总线接口单元(bus interface unit,BIU),用于通过总线实现主CPU、DMAC和取指存储器之间进行交互。The bus interface unit (bus interface unit, BIU) is used to realize the interaction between the main CPU, DMAC and instruction fetch memory through the bus.
与控制器连接的取指存储器(instruction fetch buffer),用于存储控制器使用的指令;The instruction fetch buffer connected to the controller is used to store the instructions used by the controller;
控制器,用于调用指存储器中缓存的指令,实现控制该运算加速器的工作过程。The controller is used for invoking instructions cached in the memory to control the working process of the computing accelerator.
一般地,统一存储器,输入存储器,权重存储器以及取指存储器均为片上(On-Chip)存储器,外部存储器为该NPU外部的存储器,该外部存储器可以为双倍数据率同步动态随机存储器(double data rate synchronous dynamic random access memory,DDR SDRAM)、高带宽存储器(high bandwidth memory,HBM)或其他可读可写的存储器。Generally, the unified memory, the input memory, the weight memory and the instruction fetch memory are all on-chip (On-Chip) memory, and the external memory is the memory outside the NPU, and the external memory can be a double data rate synchronous dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM), high bandwidth memory (high bandwidth memory, HBM) or other readable and writable memory.
由于本申请实施例涉及大量神经网络的应用,为了便于理解,下面先对本申请实施例涉及的相关术语及神经网络等相关概念进行介绍。Since the embodiment of the present application involves the application of a large number of neural networks, in order to facilitate understanding, the following first introduces related terms and neural network related concepts involved in the embodiment of the present application.
(1)神经网络(1) neural network
神经网络可以是由神经单元组成的,神经单元可以是指以xs和截距1为输入的运算单元,该运算单元的输出可以为:The neural network can be composed of neural units, and the neural unit can refer to an operation unit that takes xs and intercept 1 as input, and the output of the operation unit can be:
Figure PCTCN2022128504-appb-000001
Figure PCTCN2022128504-appb-000001
其中,s=1、2、……n,n为大于1的自然数,Ws为xs的权重,b为神经单元的偏置。f为神经单元的激活函数(activation functions),用于将非线性特性引入神经网络中,来将神经单元中的输入信号转换为输出信号。该激活函数的输出信号可以作为下一层卷积层的输入。激活函数可以是sigmoid函数。神经网络是将许多个上述单一的神经单元联结在一起形成的网络,即一个神经单元的输出可以是另一个神经单元的输入。每个神经单元的输入可以与前一层的局部接受域相连,来提取局部接受域的特征,局部接受域可以是由若干个神经单元组成的区域。Wherein, s=1, 2, ... n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neuron unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer. The activation function may be a sigmoid function. A neural network is a network formed by connecting many of the above-mentioned single neural units, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected with the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.
神经网络中的每一层的工作可以用数学表达式y=a(Wx+b)来描述:从物理层面神经网络中的每一层的工作可以理解为通过五种对输入空间(输入向量的集合)的操作,完成输入空间到输出空间的变换(即矩阵的行空间到列空间),这五种操作包括:1、升维/降维;2、放大/缩小;3、旋转;4、平移;5、“弯曲”。其中1、2、3的操作由Wx完成,4的操作由+b完成,5的操作则由a()来实现。这里之所以用“空间”二字来表述是因为被分类的对象并不是单个事物,而是一类事物,空间是指这类事物所有个体的集合。其中,W是权重向量,该向量中的每一个值表示该层神经网络中的一个神经元的权重值。该向量W决定着上文所述的输入空间到输出空间的空间变换,即每一层的权重W控制着如何变换空间。训练神经网络的目的,也就是最终得到训练好的神经网络的所有层的权重矩阵(由很多层的向量W形成的权重矩阵)。因此,神经网络的训练过程本质上就是学习控制空间变换的 方式,更具体的就是学习权重矩阵。The work of each layer in the neural network can be described by the mathematical expression y=a(Wx+b): From the physical level, the work of each layer in the neural network can be understood as through five kinds of input space (input vector set) to complete the transformation from the input space to the output space (that is, the row space of the matrix to the column space), these five operations include: 1. Dimension enhancement/dimension reduction; Translation; 5. "Bending". Among them, the operations of 1, 2, and 3 are completed by Wx, the operation of 4 is completed by +b, and the operation of 5 is realized by a(). The reason why the word "space" is used here is because the classified object is not a single thing, but a kind of thing, and space refers to the collection of all individuals of this kind of thing. Wherein, W is a weight vector, and each value in the vector represents the weight value of a neuron in this layer of neural network. The vector W determines the space transformation from the input space to the output space described above, that is, the weight W of each layer controls how to transform the space. The purpose of training the neural network is to finally obtain the weight matrix of all layers of the trained neural network (the weight matrix formed by the vector W of many layers). Therefore, the training process of the neural network is essentially to learn the way to control the space transformation, and more specifically, to learn the weight matrix.
因为希望神经网络的输出尽可能的接近真正想要预测的值,所以可以通过比较当前网络的预测值和真正想要的目标值,再根据两者之间的差异情况来更新每一层神经网络的权重向量(当然,在第一次更新之前通常会有初始化的过程,即为神经网络中的各层预先配置参数),比如,如果网络的预测值高了,就调整权重向量让它预测低一些,不断的调整,直到神经网络能够预测出真正想要的目标值。因此,就需要预先定义“如何比较预测值和目标值之间的差异”,这便是损失函数(loss function)或目标函数(objective function),它们是用于衡量预测值和目标值的差异的重要方程。其中,以损失函数举例,损失函数的输出值(loss)越高表示差异越大,那么神经网络的训练就变成了尽可能缩小这个loss的过程。Because we want the output of the neural network to be as close as possible to the value we really want to predict, we can compare the predicted value of the current network with the target value we really want, and then update each layer of neural network according to the difference between the two (Of course, there is usually an initialization process before the first update, that is, to pre-configure parameters for each layer in the neural network). For example, if the network's predicted value is high, adjust the weight vector to make it predict low Some, keep adjusting until the neural network can predict the desired target value. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value", which is the loss function (loss function) or objective function (objective function), which is used to measure the difference between the predicted value and the target value important equation. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the neural network becomes a process of reducing the loss as much as possible.
(2)反向传播算法(2) Back propagation algorithm
神经网络可以采用误差反向传播(back propagation,BP)算法在训练过程中修正初始的神经网络模型中参数的大小,使得神经网络模型的重建误差损失越来越小。具体地,前向传递输入信号直至输出会产生误差损失,通过反向传播误差损失信息来更新初始的神经网络模型中参数,从而使误差损失收敛。反向传播算法是以误差损失为主导的反向传播运动,旨在得到最优的神经网络模型的参数,例如权重矩阵。The neural network can use the error back propagation (back propagation, BP) algorithm to correct the size of the parameters in the initial neural network model during the training process, so that the reconstruction error loss of the neural network model becomes smaller and smaller. Specifically, passing the input signal forward until the output will generate an error loss, and updating the parameters in the initial neural network model by backpropagating the error loss information, so that the error loss converges. The backpropagation algorithm is a backpropagation movement dominated by error loss, aiming to obtain the optimal parameters of the neural network model, such as the weight matrix.
下面从神经网络的训练侧和神经网络的应用侧对本申请提供的方法进行描述。The method provided by this application is described below from the training side of the neural network and the application side of the neural network.
本申请实施例提供的模型训练方法,涉及图像的处理,具体可以应用于数据训练、机器学习、深度学习等数据处理方法,对训练数据(如本申请中的待处理图像)进行符号化和形式化的智能信息建模、抽取、预处理、训练等,最终得到训练好的神经网络(如本申请中的姿态识别模型);并且,本申请实施例提供的姿态识别方法可以运用上述训练好的神经网络,将输入数据(如本申请中的目标图像、目标图像的目标区域)输入到所述训练好的神经网络中,得到输出数据(如本申请中的姿态参数等等)。需要说明的是,本申请实施例提供的模型训练方法和姿态识别方法是基于同一个构思产生的发明,也可以理解为一个系统中的两个部分,或一个整体流程的两个阶段:如模型训练阶段和模型应用阶段。The model training method provided in the embodiment of the present application involves image processing, and can be specifically applied to data processing methods such as data training, machine learning, and deep learning to symbolize and form the training data (such as the image to be processed in this application) intelligent information modeling, extraction, preprocessing, training, etc., and finally a trained neural network (such as the gesture recognition model in this application); and, the gesture recognition method provided in the embodiment of this application can use the above-mentioned trained A neural network, inputting input data (such as the target image in the present application, the target area of the target image) into the trained neural network to obtain output data (such as the pose parameters in the present application, etc.). It should be noted that the model training method and gesture recognition method provided in the embodiment of the present application are inventions based on the same idea, and can also be understood as two parts in a system, or two stages of an overall process: such as model training phase and model application phase.
图6为本申请实施例提供的姿态识别方法的一个流程示意图,如图6所示,该方法包括:Fig. 6 is a schematic flow chart of the gesture recognition method provided by the embodiment of the present application. As shown in Fig. 6, the method includes:
601、获取目标图像。601. Acquire a target image.
本实施例中,当需要对目标图像进行姿态识别时,可先获取目标图像,目标图像可以为视频流中的某一帧图像,也可以为单独的一个图像。目标图像通常呈现有目标对象和目标对象所处的环境,那么,姿态识别的目标是为了获取目标图像中目标对象的姿态。例如,如图7所示(图7为本申请实施例提供的姿态识别的一个应用例示意图),目标图像所呈现的内容为人体以及人体所处的环境,故对目标图像的姿态识别目标为识别人体在目标图像中所呈现的姿态。In this embodiment, when it is necessary to perform gesture recognition on the target image, the target image may be acquired first, and the target image may be a certain frame image in the video stream, or may be a single image. The target image usually presents the target object and the environment in which the target object is located, so the goal of gesture recognition is to obtain the pose of the target object in the target image. For example, as shown in Figure 7 (Figure 7 is a schematic diagram of an application example of gesture recognition provided by the embodiment of the present application), the content presented by the target image is the human body and the environment in which the human body is located, so the gesture recognition target of the target image is Recognize the pose of the human body in the target image.
为了减小姿态识别模型的计算量,可对目标图像进行预处理。具体地,可对目标图像进行检测,以确定目标图像中目标对象所在的区域,该区域可称为目标区域(也可以称为 检测框)。依旧如上述的例子,在检测出目标图像中人体所在区域后,可将人体所在区域确定为目标区域(即图7中红色框围住的区域)。In order to reduce the computational load of the pose recognition model, the target image can be preprocessed. Specifically, the target image can be detected to determine the area where the target object is located in the target image, and this area can be called a target area (also called a detection frame). Still as in the above example, after the area where the human body is located in the target image is detected, the area where the human body is located can be determined as the target area (that is, the area enclosed by the red frame in FIG. 7 ).
进一步地,还可获取目标区域在目标图像中的位置信息,该位置信息可存在多种情况:(1)目标区域在目标图像中的位置信息包括目标区域的中心点在图像坐标系中的坐标以及目标区域的尺寸,图像坐标系基于目标图像构建。具体地,可以目标图像的某一个顶点(例如,目标图像左上角的顶点)作为图像坐标系的原点,那么,可确定目标区域的中心点在该图像坐标系中的坐标,以及目标区域的长和宽(也就相当于得到了目标区域的尺寸),这些信息可用于指示目标区域在目标图像中的位置。(2)目标区域在目标图像中的位置信息包括目标区域的顶点在图像坐标系中的坐标,图像坐标系基于目标图像构建。具体地,可以目标图像的某一个顶点(例如,目标图像左上角的顶点)作为图像坐标系的原点,那么,可确定目标区域的所有顶点在该图像坐标系中的坐标,这些信息可用于指示目标区域在目标图像中的位置等等。Further, the position information of the target area in the target image can also be obtained, and the position information can have many situations: (1) The position information of the target area in the target image includes the coordinates of the center point of the target area in the image coordinate system As well as the size of the target area, the image coordinate system is constructed based on the target image. Specifically, a certain vertex of the target image (for example, the vertex in the upper left corner of the target image) can be used as the origin of the image coordinate system, then the coordinates of the center point of the target area in the image coordinate system can be determined, as well as the length of the target area and width (which is equivalent to obtaining the size of the target area), these information can be used to indicate the position of the target area in the target image. (2) The position information of the target area in the target image includes the coordinates of the vertices of the target area in the image coordinate system, and the image coordinate system is constructed based on the target image. Specifically, a certain vertex of the target image (for example, the vertex in the upper left corner of the target image) can be used as the origin of the image coordinate system, then the coordinates of all vertices of the target area in the image coordinate system can be determined, and this information can be used to indicate The position of the target area in the target image and so on.
更进一步地,得到目标区域在目标图像中的位置信息后,还可对该位置信息进行归一化处理,得到归一化处理后的目标区域在目标图像中的位置信息。具体地,设目标区域在目标图像中的位置信息为I,归一化处理后的目标区域在目标图像中的位置信息为I’,那么,I’=(I-mean(I))/F,F=sqrt(w×w+h×h)其中,mean(I)为目标区域的均值,w为目标区域的宽,h为目标区域的长。如此一来,得到归一化处理后的信息后,有利于实现后续模型的姿态识别操作。Furthermore, after obtaining the position information of the target area in the target image, the position information may also be normalized to obtain the normalized position information of the target area in the target image. Specifically, assuming that the position information of the target area in the target image is I, and the position information of the target area in the target image after normalization processing is I', then, I'=(I-mean(I))/F , F=sqrt(w*w+h*h) Wherein, mean (I) is the mean value of the target area, w is the width of the target area, and h is the length of the target area. In this way, after obtaining the normalized information, it is beneficial to realize the posture recognition operation of the subsequent model.
602、通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数,目标区域为目标对象所在的区域,姿态参数用于获取目标对象的姿态。602. Process the target area of the target image and the position information of the target area in the target image through a gesture recognition model to obtain a pose parameter, where the target area is the area where the target object is located, and the pose parameter is used to obtain the pose of the target object.
得到目标区域以及归一化后的目标区域在目标图像中的位置信息后,可将目标区域以及归一化后的目标区域在目标图像中的位置信息输入至姿态识别模型(为已训练的神经网络),以通过姿态识别模型对目标图像的目标区域以及归一化后的目标区域在目标图像中的位置信息进行处理(例如,特征提取等一系列操作),得到姿态参数。那么,基于姿态参数可获取目标图像中目标对象的姿态。After obtaining the target area and the normalized position information of the target area in the target image, the target area and the normalized position information of the target area in the target image can be input to the pose recognition model (for the trained neural network Network), to process the target area of the target image and the position information of the normalized target area in the target image through the gesture recognition model (for example, a series of operations such as feature extraction) to obtain the pose parameters. Then, the pose of the target object in the target image can be obtained based on the pose parameters.
需要说明的是,姿态识别模型不仅可输出姿态参数,还可输出形状参数和位移参数。其中,姿态参数通常由两部分参数构成,一部分参数用于指示目标对象相对于相机的旋转角,另一部分参数用于指示目标对象自身各个关节之间的夹角。形状参数用于指示目标对象的三维形状。位移参数用于指示目标对象在目标区域中所占的幅度,以及目标对象在目标区域中的偏移量(例如,以目标区域的中心点为参考点,目标对象向左偏移的程度或向右偏移的程度)。基于姿态参数、形状参数和位移参数进行计算,可得到目标对象的姿态,目标对象的姿态可通过目标对象的多个三维关键点(3D关键点)进行表示,这些三维关键点可描述目标对象在相机坐标系中的朝向(即目标对象相对于相机的朝向)以及目标对象在相机坐标系中的肢体行为(即目标对象在三维空间中的动作),其中,该相机坐标系的原点为拍摄目标图像的相机。依旧如上述例子,如图7所示,姿态识别模型输出姿态参数θ、形状参数β和位移参数S、T后,可对这些参数进行计算,得到目标对象的多个3D关 键点,这些3D关键点组合在一起,可呈现出目标对象在相机坐标系中的朝向以及目标对象在相机坐标系中的肢体行为。It should be noted that the pose recognition model can output not only pose parameters, but also shape parameters and displacement parameters. Among them, the posture parameters are usually composed of two parts of parameters, one part of parameters is used to indicate the rotation angle of the target object relative to the camera, and the other part of parameters is used to indicate the angles between the joints of the target object itself. The shape parameter is used to indicate the three-dimensional shape of the target object. The displacement parameter is used to indicate the range occupied by the target object in the target area, and the offset of the target object in the target area (for example, taking the center point of the target area as a reference point, the degree to which the target object shifts to the left or to degree of right offset). Based on the calculation of attitude parameters, shape parameters and displacement parameters, the attitude of the target object can be obtained. The attitude of the target object can be represented by multiple three-dimensional key points (3D key points) of the target object. These three-dimensional key points can describe the position of the target object. The orientation in the camera coordinate system (that is, the orientation of the target object relative to the camera) and the body behavior of the target object in the camera coordinate system (that is, the movement of the target object in three-dimensional space), where the origin of the camera coordinate system is the shooting target image camera. Still as in the above example, as shown in Figure 7, after the pose recognition model outputs pose parameters θ, shape parameters β, and displacement parameters S, T, these parameters can be calculated to obtain multiple 3D key points of the target object. These 3D key points The points are combined to show the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system.
至此,则完成了目标图像的姿态识别。若目标图像为视频流中的某一帧图像,对于视频流中的其余帧图像,也可执行如同对目标图像所执行的操作,以得到目标对象的连续多个姿态,形成目标对象的运动信息,从而满足用户的各种应用需求。So far, the gesture recognition of the target image is completed. If the target image is a certain frame image in the video stream, for the rest of the frame images in the video stream, the same operation as that performed on the target image can be performed to obtain the continuous multiple postures of the target object and form the motion information of the target object , so as to meet the various application needs of users.
本申请实施例中,在获取目标图像后,可将目标图像中目标对象所在的目标区域和目标区域在目标图像中的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数,故基于姿态参数可获取目标对象的姿态。前述过程中,姿态识别模型的输入不仅包含被裁剪过的目标区域,还包含目标区域在目标图像中的位置信息,故姿态识别模型在进行图像处理时,不仅至考虑了目标区域本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。In the embodiment of the present application, after the target image is acquired, the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target area of the target image can be identified by the gesture recognition model. And the position information of the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters. In the aforementioned process, the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing The impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object. The factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
图8为本申请实施例提供的姿态识别方法的另一流程示意图,如图8所示,该方法包括:Fig. 8 is another schematic flowchart of the posture recognition method provided by the embodiment of the present application. As shown in Fig. 8, the method includes:
801、获取目标图像。801. Acquire a target image.
本实施例中,当需要对目标图像进行姿态识别时,可先获取目标图像,目标图像可以为视频流中的某一帧图像,也可以为单独的一个图像。目标图像通常呈现有目标对象和目标对象所处的环境,那么,姿态识别的目标是为了获取目标图像中目标对象的姿态。例如,如图9a所示(图9a为本申请实施例提供的姿态识别的另一应用例示意图),目标图像所呈现的内容为人体以及人体所处的环境,故对目标图像的姿态识别目标为识别人体在目标图像中所呈现的姿态。In this embodiment, when it is necessary to perform gesture recognition on the target image, the target image may be acquired first, and the target image may be a certain frame image in the video stream, or may be a single image. The target image usually presents the target object and the environment in which the target object is located, so the goal of gesture recognition is to obtain the pose of the target object in the target image. For example, as shown in Figure 9a (Figure 9a is a schematic diagram of another application example of gesture recognition provided by the embodiment of the present application), the content presented by the target image is the human body and the environment in which the human body is located, so the gesture recognition target of the target image In order to recognize the posture presented by the human body in the target image.
进一步地,还可获取目标图像中像素点的位置信息,该位置信息包含目标图像中与像素点在图像坐标系中的坐标,图像坐标系基于目标图像构建。具体地,可以目标图像的某一个顶点(例如,目标图像左上角的顶点)作为图像坐标系的原点,那么,可确定目标图像中所有像素点在图像坐标系中的坐标,这些信息可作为姿态识别模型的输入,如此一来,姿态识别模型的输入不仅包含目标图像的每个像素点,还包含目标图像中每个像素点在图像坐标系中的坐标。Furthermore, the position information of the pixel in the target image can also be obtained, the position information includes the coordinates of the target image and the pixel in the image coordinate system, and the image coordinate system is constructed based on the target image. Specifically, a certain vertex of the target image (for example, the vertex in the upper left corner of the target image) can be used as the origin of the image coordinate system, then the coordinates of all pixels in the target image in the image coordinate system can be determined, and these information can be used as pose The input of the recognition model, so that the input of the pose recognition model not only includes each pixel of the target image, but also includes the coordinates of each pixel in the target image in the image coordinate system.
更进一步地,得到目标图像中像素点的位置信息后,还可对该位置信息进行归一化处理,得到归一化处理后的目标图像中像素点的位置信息。具体地,设目标图像中像素点的位置信息为I,归一化处理后的目标图像中像素点的位置信息为I’,那么,I’=(I-mean(I))/F,F=sqrt(w×w+h×h)其中,mean(I)为目标图像的均值,w为目标图像的宽,h为目标图像的长。如此一来,得到归一化处理后的信息后,有利于实现后续模型的姿态识别操作。Furthermore, after obtaining the position information of the pixels in the target image, the position information may also be normalized to obtain the position information of the pixels in the target image after normalization processing. Specifically, assuming that the positional information of the pixel in the target image is I, the positional information of the pixel in the target image after the normalization process is I', then, I'=(I-mean(I))/F, F =sqrt(w×w+h×h) wherein, mean(I) is the mean value of the target image, w is the width of the target image, and h is the length of the target image. In this way, after obtaining the normalized information, it is beneficial to realize the posture recognition operation of the subsequent model.
802、通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到姿态参数,姿态参数用于获取目标图像包含的目标对象的姿态。802. Process the target image and the position information of the pixels in the target image through the gesture recognition model to obtain a gesture parameter, and the gesture parameter is used to acquire the gesture of the target object included in the target image.
得到目标图像以及归一化后的目标图像中像素点的位置信息后,可将目标图像以及归一化后的目标图像中像素点的位置信息输入至姿态识别模型(为已训练的神经网络),以通过姿态识别模型对目标图像的目标区域以及归一化后的目标图像中像素点的位置信息进行处理(例如,特征提取等一系列操作),得到姿态参数。那么,基于姿态参数可获取目标图像中目标对象的姿态。After obtaining the target image and the position information of the pixels in the normalized target image, the target image and the position information of the pixels in the normalized target image can be input to the gesture recognition model (a trained neural network) , to process the target area of the target image and the position information of the pixels in the normalized target image through the gesture recognition model (for example, a series of operations such as feature extraction) to obtain the gesture parameters. Then, the pose of the target object in the target image can be obtained based on the pose parameters.
如图9b所示(图9b为本申请实施例提供的姿态识别模型的一个结构示意图),姿态识别模型可包含两部分,一部分为编码器(encoder),另一部分为多个卷积层(convolution)。其中,编码器接收到目标图像后,可对目标图像进行特征提取处理,得到特征图像(featrue map),并将特征图像发送至卷积层。多个卷积层可对特征图像和归一化后的目标图像中点的位置信息(location map)进行至少一次卷积处理,得到姿态参数,故可基于该姿态参数确定目标图像中目标对象的姿态。As shown in Figure 9b (Figure 9b is a schematic structural diagram of the gesture recognition model provided by the embodiment of the present application), the gesture recognition model can include two parts, one part is an encoder (encoder), and the other part is a plurality of convolutional layers (convolution ). Among them, after the encoder receives the target image, it can perform feature extraction processing on the target image to obtain a feature image (featrue map), and send the feature image to the convolutional layer. Multiple convolutional layers can perform at least one convolution process on the feature image and the position information (location map) of the target image after normalization to obtain the attitude parameters, so the position of the target object in the target image can be determined based on the attitude parameters. attitude.
在一种可能的实现方式中,该方法还包括:通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the method further includes: processing the target image and the position information of the pixels in the target image through the gesture recognition model to obtain shape parameters and displacement parameters, and the posture parameters, shape parameters and displacement parameters are used in common to obtain the pose of the target object.
在一种可能的实现方式中,目标对象的姿态包括目标对象在相机坐标系中的朝向以及目标对象在相机坐标系中的肢体行为,相机坐标系基于拍摄目标图像的相机构建。In a possible implementation manner, the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
关于步骤802的说明,可参考图6所示实施例中步骤602的相关说明部分,此处不再赘述。For descriptions of step 802, reference may be made to relevant descriptions of step 602 in the embodiment shown in FIG. 6 , and details are not repeated here.
应理解,本实施例仅以图9b所示的例子进行示意性介绍,并不对本申请中姿态识别模型的结构构成限制,姿态识别模型还可具备其它各种结构,只要可实现姿态识别功能即可。It should be understood that this embodiment is only schematically introduced with the example shown in FIG. 9b, and does not limit the structure of the gesture recognition model in this application. The gesture recognition model can also have other various structures, as long as the gesture recognition function can be realized. Can.
本申请实施例中,在获取目标图像后,可将目标图像以及目标图像中像素点的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到姿态参数,故基于姿态参数可获取目标图像所呈现的目标对象的姿态。前述过程中,姿态识别模型的输入不仅包含目标图像,还包含目标图像中像素点的位置信息,故姿态识别模型在进行图像处理时,不仅至考虑了目标图像本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标图像中像素点的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。In the embodiment of the present application, after the target image is acquired, the target image and the position information of the pixel points in the target image can be input to the gesture recognition model, so as to process the target image and the position information of the pixel points in the target image through the gesture recognition model , to obtain the pose parameter, so the pose of the target object presented by the target image can be obtained based on the pose parameter. In the aforementioned process, the input of the gesture recognition model not only includes the target image, but also includes the position information of the pixels in the target image. Therefore, when the gesture recognition model performs image processing, it not only considers the image information of the target image itself to the pose of the target object. The impact caused by this method also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object. The factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy. degree, which in turn helps to improve the accuracy of the acquired motion information of the target image.
此外,还可将本申请实施例提供的姿态识别模型与相关技术的姿态识别模型进行比较,比较结果如表1和表2所示:In addition, the gesture recognition model provided by the embodiment of the present application can also be compared with the gesture recognition model of the related art, and the comparison results are shown in Table 1 and Table 2:
表1Table 1
Figure PCTCN2022128504-appb-000002
Figure PCTCN2022128504-appb-000002
Figure PCTCN2022128504-appb-000003
Figure PCTCN2022128504-appb-000003
表2Table 2
Figure PCTCN2022128504-appb-000004
Figure PCTCN2022128504-appb-000004
基于表1可知,在数据集一上,相较于其余相关技术,本申请实施例提供的姿态识别模型在各项误差指标上均有明显降低,即本申请实施例提供的姿态识别模型在各项误差指标上均有优越的表现。Based on Table 1, it can be seen that in the data set 1, compared with other related technologies, the posture recognition model provided by the embodiment of the present application has significantly reduced various error indicators, that is, the posture recognition model provided by the embodiment of the present application has a significant reduction in each error index. All the error indicators have excellent performance.
基于表2可知,在数据集一和数据集二上,相较于其余相关技术,本申请实施例提供的姿态识别模型在各项误差指标上也均有明显降低,即本申请实施例提供的姿态识别模型 在各项误差指标上也均有优越的表现。Based on Table 2, it can be seen that, compared with other related technologies, the posture recognition model provided by the embodiment of the present application has significantly reduced various error indicators in the data set 1 and data set 2, that is, the error index provided by the embodiment of the present application The gesture recognition model also has superior performance in various error indicators.
以上是对本申请实施例提供的姿态识别方法所进行的详细说明,以下将对本申请实施例提供的模型训练方法进行介绍。图10为本申请实施例提供的模型训练方法的一个示意图,如图10所示,该方法包括:The above is a detailed description of the gesture recognition method provided by the embodiment of the present application, and the model training method provided by the embodiment of the present application will be introduced below. Fig. 10 is a schematic diagram of the model training method provided by the embodiment of the present application. As shown in Fig. 10, the method includes:
1001、获取待处理图像。1001. Acquire an image to be processed.
在需要对待训练模型进行训练时,可获取一批训练样本,即用于训练的待处理图像。值得注意的是,对于待处理图像而言,待处理图像中目标对象的真实姿态是已知的。When the model to be trained needs to be trained, a batch of training samples can be obtained, that is, images to be processed for training. It is worth noting that, for the image to be processed, the real pose of the target object in the image to be processed is known.
得到待处理图像后,可对待处理图像进行检测处理,以确定待处理图像中的目标区域。还可获取目标区域在待处理图像中的位置信息,并对其进行归一化。After the image to be processed is obtained, the image to be processed can be detected and processed to determine the target area in the image to be processed. The location information of the target area in the image to be processed can also be obtained and normalized.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
在一种可能的实现方式中,目标区域在待处理图像中的位置信息包括目标区域的中心点在图像坐标系中的坐标以及目标区域的尺寸,图像坐标系基于待处理图像构建。In a possible implementation manner, the position information of the target area in the image to be processed includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,目标区域在待处理图像中的位置信息包括目标区域的顶点在图像坐标系中的坐标,图像坐标系基于待处理图像构建。In a possible implementation manner, the position information of the target area in the image to be processed includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
关于步骤1001的说明,可参考图6所示实施例中步骤601的相关说明部分,此处不再赘述。For descriptions of step 1001, reference may be made to relevant descriptions of step 601 in the embodiment shown in FIG. 6 , and details are not repeated here.
1002、通过待训练模型对待处理图像的目标区域以及目标区域在待处理图像中的位置信息进行处理,得到姿态参数,目标区域为目标对象所在的区域。1002. Process the target area of the image to be processed by the model to be trained and the position information of the target area in the image to be processed to obtain attitude parameters, where the target area is the area where the target object is located.
得到待处理图像和归一化后的目标区域在待处理图像中的位置信息后,可将待处理图像和归一化后的目标区域在待处理图像中的位置信息输入至待训练模型,以通过待训练模型对待处理图像的目标区域以及归一化后的目标区域在待处理图像中的位置信息进行处理,得到姿态参数。After obtaining the position information of the image to be processed and the normalized target area in the image to be processed, the image to be processed and the position information of the normalized target area in the image to be processed can be input to the model to be trained to The pose parameters are obtained by processing the target area of the image to be processed by the model to be trained and the normalized position information of the target area in the image to be processed.
在一种可能的实现方式中,该方法还包括:通过姿态识别模型对待处理图像的目标区域以及归一化后的目标区域在待处理图像中的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the method further includes: processing the target area of the image to be processed and the normalized position information of the target area in the image to be processed by the gesture recognition model to obtain shape parameters and displacement parameters, Pose parameters, shape parameters and displacement parameters are jointly used to obtain the pose of the target object.
关于步骤1002的说明,可参考图6所示实施例中步骤602的相关说明部分,此处不再赘述。For the description of step 1002, reference may be made to the related description of step 602 in the embodiment shown in FIG. 6 , which will not be repeated here.
1003、基于姿态参数,获取目标对象的预测姿态。1003. Acquire a predicted pose of the target object based on the pose parameter.
得到姿态参数、形状参数和位移参数后,可基于姿态参数、形状参数和位移参数进行计算,得到目标对象的预测姿态,需要说明的是,目标对象的预测姿态可通过多个预测三维关键点进行表示。After the attitude parameters, shape parameters and displacement parameters are obtained, the calculation can be performed based on the attitude parameters, shape parameters and displacement parameters to obtain the predicted attitude of the target object. express.
在一种可能的实现方式中,目标对象的预测姿态包括目标对象在相机坐标系中的预测朝向以及目标对象在相机坐标系中的预测肢体行为,相机坐标系基于拍摄待处理图像的相机构建。In a possible implementation, the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
关于步骤1003的说明,可参考图6所示实施例中步骤602的相关说明部分,此处不再赘述。For the description of step 1003, reference may be made to the related description of step 602 in the embodiment shown in FIG. 6 , and details are not repeated here.
1004、基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型。1004. Based on the predicted pose of the target object and the real pose of the target object, train the model to be trained to obtain a pose recognition model.
得到目标对象的预测姿态后,由于目标对象的真实姿态已知,故可基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型。After obtaining the predicted pose of the target object, since the real pose of the target object is known, the model to be trained can be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
在一种可能的实现方式中,基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型包括:基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,对待训练模型进行训练,得到姿态识别模型。具体地,如图11所示(图11为本申请实施例提供的投影结果的一个示意图),由于目标对象的预测姿态可通过目标对象的多个预测三维关键点进行表示,且目标对象的预测姿态可通过目标对象的多个真实三维关键点(这些真实三维关键点可提前标记得到,是已知的)进行表示,故可将目标对象的多个预测三维关键点投影至待处理图像上,得到目标对象的多个预测二维关键点(即目标对象的预测姿态在待处理图像上的预测投影结果),同样地,也可将目标对象的多个真实三维关键点投影至待处理图像上,得到目标对象的多个真实二维关键点(即目标对象的真实姿态在待处理图像上的真实投影结果)。那么,可基于目标对象的多个预测二维关键点和多个真实二维关键点,计算目标损失,目标损失用于指示目标对象的多个预测二维关键点和多个真实二维关键点之间的差异。然后,可基于目标损失对待训练模型的模型参数进行更新,并利用下一批训练样本对更新参数后的待训练模型进行训练(即重新执行步骤1002至步骤1004),直至满足模型训练条件(例如,目标损失达到收敛等等),可得到图6所示实施例中的姿态识别模型。In a possible implementation, the model to be trained is trained based on the predicted pose of the target object and the real pose of the target object, and the gesture recognition model obtained includes: a predicted projection result based on the predicted pose of the target object on the image to be processed and The real projection result of the real pose of the target object on the image to be processed is used to train the model to be trained to obtain a pose recognition model. Specifically, as shown in Figure 11 (Figure 11 is a schematic diagram of the projection result provided by the embodiment of the present application), since the predicted pose of the target object can be represented by multiple predicted 3D key points of the target object, and the predicted pose of the target object The posture can be represented by multiple real 3D key points of the target object (these real 3D key points can be marked in advance and are known), so multiple predicted 3D key points of the target object can be projected onto the image to be processed, Obtain multiple predicted two-dimensional key points of the target object (that is, the predicted projection result of the predicted pose of the target object on the image to be processed), and similarly, multiple real three-dimensional key points of the target object can also be projected onto the image to be processed , to obtain multiple real two-dimensional key points of the target object (that is, the real projection result of the real pose of the target object on the image to be processed). Then, the target loss can be calculated based on multiple predicted 2D key points and multiple real 2D key points of the target object, and the target loss is used to indicate multiple predicted 2D key points and multiple real 2D key points of the target object difference between. Then, the model parameters of the model to be trained can be updated based on the target loss, and the next batch of training samples can be used to train the model to be trained after the updated parameters (that is, re-execute steps 1002 to 1004), until the model training conditions are met (such as , the target loss reaches convergence, etc.), the gesture recognition model in the embodiment shown in FIG. 6 can be obtained.
本申请实施例训练得到的姿态识别模型,可令姿态识别模型感知目标对象在全图中的位置,学习该位置与目标对象的姿态之间的关系,从而更精准地捕捉目标对象的姿态。当姿态识别模型在图像处理时,姿态识别模型的输入不仅包含被裁剪过的目标区域,还包含目标区域在目标图像中的位置信息,故姿态识别模型不仅至考虑了目标区域本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。The gesture recognition model trained in the embodiment of the present application can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the pose of the target object, so as to more accurately capture the pose of the target object. When the gesture recognition model is in image processing, the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself. The influence caused by the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object. The factors considered are relatively comprehensive, so the posture of the target object obtained based on this method, It has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
图12为本申请实施例提供的模型训练方法的另一示意图,如图12所示,该方法包括:Fig. 12 is another schematic diagram of the model training method provided by the embodiment of the present application. As shown in Fig. 12, the method includes:
1201、获取待处理图像。1201. Acquire images to be processed.
在需要对待训练模型进行训练时,可获取一批训练样本,即用于训练的待处理图像。值得注意的是,对于待处理图像而言,待处理图像中目标对象的真实姿态是已知的。When the model to be trained needs to be trained, a batch of training samples can be obtained, that is, images to be processed for training. It is worth noting that, for the image to be processed, the real pose of the target object in the image to be processed is known.
得到待处理图像后,可获取目标区域中像素点的位置信息,并对其进行归一化。After obtaining the image to be processed, the position information of the pixels in the target area can be obtained and normalized.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
在一种可能的实现方式中,待处理图像中像素点的位置信息包括像素点在图像坐标系中的坐标,图像坐标系基于待处理图像构建。In a possible implementation manner, the position information of the pixels in the image to be processed includes coordinates of the pixels in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
关于步骤1201的说明,可参考图8所示实施例中步骤801的相关说明部分,此处不再赘述。For the description of step 1201, reference may be made to the related description of step 801 in the embodiment shown in FIG. 8 , and details are not repeated here.
1202、通过待训练模型对待处理图像以及待处理图像中像素点的位置信息进行处理,得到姿态参数。1202. Process the image to be processed and the position information of the pixels in the image to be processed by the model to be trained to obtain the pose parameters.
得到待处理图像和归一化后的待处理图像中像素点的位置信息后,可将待处理图像和归一化后的待处理图像中像素点的位置信息输入至待训练模型,以通过待训练模型对待处理图像的目标区域以及归一化后的待处理图像中像素点的位置信息进行处理,得到姿态参数。After obtaining the position information of the pixels in the image to be processed and the normalized image to be processed, the position information of the pixels in the image to be processed and the normalized image to be processed can be input to the model to be trained, so as to pass the The training model processes the target area of the image to be processed and the normalized position information of the pixels in the image to be processed to obtain the pose parameters.
在一种可能的实现方式中,该方法还包括:通过姿态识别模型对待处理图像的目标区域以及归一化后的待处理图像中像素点的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the method further includes: processing the target area of the image to be processed and the normalized position information of pixels in the image to be processed by the gesture recognition model to obtain shape parameters and displacement parameters, and pose parameters, shape parameters and displacement parameters are jointly used to obtain the pose of the target object.
关于步骤1202的说明,可参考图8所示实施例中步骤802的相关说明部分,此处不再赘述。For the description of step 1202, reference may be made to the relevant description of step 802 in the embodiment shown in FIG. 8 , and details are not repeated here.
1203、基于姿态参数,获取目标对象的预测姿态。1203. Acquire a predicted pose of the target object based on the pose parameter.
得到姿态参数、形状参数和位移参数后,可基于姿态参数、形状参数和位移参数进行计算,得到目标对象的预测姿态,需要说明的是,目标对象的预测姿态可通过多个预测三维关键点进行表示。After the attitude parameters, shape parameters and displacement parameters are obtained, the calculation can be performed based on the attitude parameters, shape parameters and displacement parameters to obtain the predicted attitude of the target object. express.
在一种可能的实现方式中,目标对象的预测姿态包括目标对象在相机坐标系中的预测朝向以及目标对象在相机坐标系中的预测肢体行为,相机坐标系基于拍摄待处理图像的相机构建。In a possible implementation, the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
关于步骤1203的说明,可参考图10所示实施例中步骤1003的相关说明部分,此处不再赘述。For descriptions of step 1203, reference may be made to relevant descriptions of step 1003 in the embodiment shown in FIG. 10 , and details are not repeated here.
1204、基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型。1204. Based on the predicted pose of the target object and the real pose of the target object, train the model to be trained to obtain a pose recognition model.
得到目标对象的预测姿态后,由于目标对象的真实姿态已知,故可基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到如图8所示实施例中的姿态识别模型。After obtaining the predicted pose of the target object, since the real pose of the target object is known, the model to be trained can be trained based on the predicted pose of the target object and the real pose of the target object, and the pose recognition in the embodiment shown in Figure 8 is obtained Model.
在一种可能的实现方式中,基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型:基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,对待训练模型进行训练,得到姿态识别模型。In a possible implementation, based on the predicted pose of the target object and the real pose of the target object, the model to be trained is trained to obtain a pose recognition model: based on the predicted projection result of the predicted pose of the target object on the image to be processed and the target The real projection result of the real pose of the object on the image to be processed is used to train the model to be trained to obtain a pose recognition model.
关于步骤1204的说明,可参考图10所示实施例中步骤1004的相关说明部分,此处不再赘述。For the description of step 1204, reference may be made to the related description of step 1004 in the embodiment shown in FIG. 10 , which will not be repeated here.
本申请实施例训练得到的姿态识别模型,可令姿态识别模型感知目标对象在全图中的位置,学习该位置与目标对象的姿态之间的关系,从而更精准地捕捉目标对象的姿态。当姿态识别模型在图像处理时,其输入不仅包含目标图像,还包含目标图像中像素点的位置信息,故姿态识别模型不仅至考虑了目标图像本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标图像中像素点的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利 于提高获取到的目标图像的运动信息的准确度。The gesture recognition model trained in the embodiment of the present application can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the pose of the target object, so as to more accurately capture the pose of the target object. When the pose recognition model is in image processing, its input not only includes the target image, but also includes the position information of the pixels in the target image, so the pose recognition model not only considers the influence of the image information of the target image itself on the pose of the target object , it also takes into account the impact of the position information of the pixel points in the target image on the attitude of the target object, and the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy, and further has It is beneficial to improve the accuracy of the acquired motion information of the target image.
以上是对本申请实施例提供的模型训练方法所进行的详细说明,以下将对本申请实施例提供的姿态识别装置和模型训练装置进行介绍。图13为本申请实施例提供的姿态识别装置的一个结构示意图,如图13所示,该装置包括:The above is the detailed description of the model training method provided by the embodiment of the present application, and the gesture recognition device and the model training device provided by the embodiment of the present application will be introduced below. Fig. 13 is a schematic structural diagram of the gesture recognition device provided by the embodiment of the present application. As shown in Fig. 13, the device includes:
获取模块1301,用于获取目标图像;An acquisition module 1301, configured to acquire a target image;
处理模块1302,用于通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数,目标区域为目标对象所在的区域,姿态参数用于获取目标对象的姿态。The processing module 1302 is used to process the target area of the target image and the position information of the target area in the target image through the gesture recognition model to obtain gesture parameters, the target zone is the area where the target object is located, and the gesture parameters are used to obtain the target object attitude.
本申请实施例中,在获取目标图像后,可将目标图像中目标对象所在的目标区域和目标区域在目标图像中的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到姿态参数,故基于姿态参数可获取目标对象的姿态。前述过程中,姿态识别模型的输入不仅包含被裁剪过的目标区域,还包含目标区域在目标图像中的位置信息,故姿态识别模型在进行图像处理时,不仅至考虑了目标区域本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标区域在目标图像中的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。In the embodiment of the present application, after the target image is acquired, the target area where the target object is located in the target image and the position information of the target area in the target image can be input into the gesture recognition model, so that the target area of the target image can be identified by the gesture recognition model. And the position information of the target area in the target image is processed to obtain the pose parameters, so the pose of the target object can be obtained based on the pose parameters. In the aforementioned process, the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself when performing image processing The impact on the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object. The factors considered are relatively comprehensive, so the posture of the target object obtained based on this method , has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,位置信息包括目标区域的中心点在图像坐标系中的坐标以及目标区域的尺寸,图像坐标系基于目标图像构建。In a possible implementation manner, the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the target image.
在一种可能的实现方式中,位置信息包括目标区域的顶点在图像坐标系中的坐标,图像坐标系基于目标图像构建。In a possible implementation manner, the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the target image.
在一种可能的实现方式中,姿态识别模型基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,进行训练得到。In a possible implementation manner, the pose recognition model is obtained by training based on a predicted projection result of the predicted pose of the target object on the image to be processed and a real projection result of the real pose of the target object on the image to be processed.
在一种可能的实现方式中,目标对象的姿态包括目标对象在相机坐标系中的朝向以及目标对象在相机坐标系中的肢体行为,相机坐标系基于拍摄目标图像的相机构建。In a possible implementation manner, the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
在一种可能的实现方式中,处理模块1302,还用于通过姿态识别模型对目标图像的目标区域以及目标区域在目标图像中的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the processing module 1302 is also configured to process the target area of the target image and the position information of the target area in the target image through the gesture recognition model to obtain shape parameters and displacement parameters, gesture parameters, shape The parameters and the displacement parameters are used together to obtain the pose of the target object.
在一种可能的实现方式中,该装置还包括:归一化模块,用于对目标区域在目标图像中的位置信息进行归一化处理,得到归一化后的位置信息;处理模块1302,用于通过姿态识别模型对目标图像的目标区域以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation manner, the device further includes: a normalization module, configured to perform normalization processing on the position information of the target area in the target image to obtain normalized position information; the processing module 1302, It is used to process the target area of the target image and the normalized position information through the gesture recognition model to obtain the gesture parameters.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
图14为本申请实施例提供的姿态识别装置的另一结构示意图,如图14所示,该装置包括:Fig. 14 is another schematic structural diagram of the gesture recognition device provided by the embodiment of the present application. As shown in Fig. 14, the device includes:
获取模块1401,用于获取目标图像;An acquisition module 1401, configured to acquire a target image;
处理模块1402,用于通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到姿态参数,姿态参数用于获取目标图像包含的目标对象的姿态。The processing module 1402 is configured to process the target image and the position information of the pixels in the target image through the gesture recognition model to obtain a gesture parameter, and the gesture parameter is used to acquire the gesture of the target object included in the target image.
本申请实施例中,在获取目标图像后,可将目标图像以及目标图像中像素点的位置信息输入至姿态识别模型,以通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到姿态参数,故基于姿态参数可获取目标图像所呈现的目标对象的姿态。前述过程中,姿态识别模型的输入不仅包含目标图像,还包含目标图像中像素点的位置信息,故姿态识别模型在进行图像处理时,不仅至考虑了目标图像本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标图像中像素点的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。In the embodiment of the present application, after the target image is acquired, the target image and the position information of the pixel points in the target image can be input to the gesture recognition model, so as to process the target image and the position information of the pixel points in the target image through the gesture recognition model , to obtain the pose parameter, so the pose of the target object presented by the target image can be obtained based on the pose parameter. In the aforementioned process, the input of the gesture recognition model not only includes the target image, but also includes the position information of the pixels in the target image. Therefore, when the gesture recognition model performs image processing, it not only considers the image information of the target image itself to the pose of the target object. The impact caused by this method also takes into account the influence of the position information of the pixel points in the target image on the attitude of the target object. The factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy. degree, which in turn helps to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,位置信息包括像素点在图像坐标系中的坐标,图像坐标系基于目标图像构建。In a possible implementation manner, the position information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the target image.
在一种可能的实现方式中,姿态识别模型基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,进行训练得到。In a possible implementation manner, the pose recognition model is obtained by training based on a predicted projection result of the predicted pose of the target object on the image to be processed and a real projection result of the real pose of the target object on the image to be processed.
在一种可能的实现方式中,目标对象的姿态包括目标对象在相机坐标系中的朝向以及目标对象在相机坐标系中的肢体行为,相机坐标系基于拍摄目标图像的相机构建。In a possible implementation manner, the pose of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the target image.
在一种可能的实现方式中,处理模块1402,还用于通过姿态识别模型对目标图像以及目标图像中像素点的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the processing module 1402 is also configured to process the target image and the position information of the pixels in the target image through the pose recognition model to obtain shape parameters and displacement parameters, and pose parameters, shape parameters and displacement parameters Commonly used to obtain the pose of the target object.
在一种可能的实现方式中,该装置还包括:归一化模块,用于对目标图像中像素点的位置信息进行归一化处理,得到归一化后的位置信息;处理模块1402,用于通过姿态识别模型对目标图像以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation manner, the device further includes: a normalization module, configured to perform normalization processing on the position information of pixels in the target image to obtain normalized position information; the processing module 1402 uses The target image and the normalized position information are processed by the gesture recognition model to obtain the gesture parameters.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
图15为本申请实施例提供的模型训练装置的另一结构示意图,如图15所示,该装置包括:Fig. 15 is another structural schematic diagram of the model training device provided by the embodiment of the present application. As shown in Fig. 15, the device includes:
第一获取模块1501,用于获取待处理图像;A first acquisition module 1501, configured to acquire an image to be processed;
处理模块1502,用于通过待训练模型对待处理图像的目标区域以及目标区域在待处理图像中的位置信息进行处理,得到姿态参数,目标区域为目标对象所在的区域;The processing module 1502 is used to process the target area of the image to be processed by the model to be trained and the position information of the target area in the image to be processed to obtain posture parameters, and the target area is the area where the target object is located;
第二获取模块1503,用于基于姿态参数,获取目标对象的预测姿态;The second acquiring module 1503 is configured to acquire the predicted attitude of the target object based on the attitude parameter;
训练模块1504,用于基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型。The training module 1504 is configured to train the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
本申请实施例所得到的姿态识别模型,可令姿态识别模型感知目标对象在全图中的位置,学习该位置与目标对象的姿态之间的关系,从而更精准地捕捉目标对象的姿态。当姿态识别模型在图像处理时,姿态识别模型的输入不仅包含被裁剪过的目标区域,还包含目标区域在目标图像中的位置信息,故姿态识别模型不仅至考虑了目标区域本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标区域在目标图像中的位置信息对目标对 象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。The gesture recognition model obtained in the embodiment of the present application can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the pose of the target object, so as to capture the pose of the target object more accurately. When the gesture recognition model is in image processing, the input of the gesture recognition model not only includes the cropped target area, but also includes the position information of the target area in the target image, so the gesture recognition model not only considers the image information of the target area itself. The influence caused by the posture of the target object also takes into account the influence of the position information of the target area in the target image on the posture of the target object. The factors considered are relatively comprehensive, so the posture of the target object obtained based on this method, It has higher accuracy, which is beneficial to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,训练模块1504,用于基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,对待训练模型进行训练,得到姿态识别模型。In a possible implementation, the training module 1504 is configured to perform the training on the model to be trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed. Training to get the gesture recognition model.
在一种可能的实现方式中,位置信息包括目标区域的中心点在图像坐标系中的坐标以及目标区域的尺寸,图像坐标系基于待处理图像构建。In a possible implementation manner, the location information includes the coordinates of the center point of the target area in the image coordinate system and the size of the target area, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,位置信息包括目标区域的顶点在图像坐标系中的坐标,图像坐标系基于待处理图像构建。In a possible implementation manner, the location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,目标对象的预测姿态包括目标对象在相机坐标系中的预测朝向以及目标对象在相机坐标系中的预测肢体行为,相机坐标系基于拍摄待处理图像的相机构建。In a possible implementation, the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
在一种可能的实现方式中,处理模块1502,还用于通过姿态识别模型对待处理图像的目标区域以及目标区域在待处理图像中的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the processing module 1502 is also configured to process the target area of the image to be processed and the position information of the target area in the image to be processed through the gesture recognition model to obtain shape parameters and displacement parameters, pose parameters, The shape parameter and the displacement parameter are jointly used to obtain the pose of the target object.
在一种可能的实现方式中,该装置还包括:归一化模块,用于对目标区域在待处理图像中的位置信息进行归一化处理,得到归一化后的位置信息;处理模块1502,用于通过待训练模型对待处理图像的目标区域以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation manner, the device further includes: a normalization module, configured to perform normalization processing on the position information of the target area in the image to be processed to obtain the normalized position information; the processing module 1502 , which is used to process the target area of the image to be processed and the normalized position information through the model to be trained to obtain the pose parameters.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
图16为本申请实施例提供的模型训练装置的另一结构示意图,如图16所示,该装置包括:Fig. 16 is another structural schematic diagram of the model training device provided by the embodiment of the present application. As shown in Fig. 16, the device includes:
第一获取模块1601,用于获取待处理图像;A first acquisition module 1601, configured to acquire an image to be processed;
处理模块1602,用于通过待训练模型对待处理图像以及待处理图像中像素点的位置信息进行处理,得到姿态参数;The processing module 1602 is used to process the image to be processed and the position information of the pixels in the image to be processed through the model to be trained to obtain the attitude parameter;
第二获取模块1603,用于基于姿态参数,获取目标对象的预测姿态;The second acquiring module 1603 is configured to acquire the predicted attitude of the target object based on the attitude parameter;
训练模块1604,用于基于目标对象的预测姿态和目标对象的真实姿态,对待训练模型进行训练,得到姿态识别模型。The training module 1604 is configured to train the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
本申请实施例所得到的姿态识别模型,可令姿态识别模型感知目标对象在全图中的位置,学习该位置与目标对象的姿态之间的关系,从而更精准地捕捉目标对象的姿态。当姿态识别模型在图像处理时,其输入不仅包含目标图像,还包含目标图像中像素点的位置信息,故姿态识别模型不仅至考虑了目标图像本身的图像信息对目标对象的姿态所造成的影响,还考虑到了目标图像中像素点的位置信息对目标对象的姿态所造成的影响,考虑的因素比较全面,故基于此种方式所得到的目标对象的姿态,具有较高的准确度,进而有利于提高获取到的目标图像的运动信息的准确度。The gesture recognition model obtained in the embodiment of the present application can make the gesture recognition model perceive the position of the target object in the whole picture, and learn the relationship between the position and the pose of the target object, so as to capture the pose of the target object more accurately. When the pose recognition model is in image processing, its input not only includes the target image, but also includes the position information of the pixels in the target image, so the pose recognition model not only considers the influence of the image information of the target image itself on the pose of the target object , it also takes into account the impact of the position information of the pixel points in the target image on the attitude of the target object, and the factors considered are relatively comprehensive, so the attitude of the target object obtained based on this method has high accuracy, and further has It is beneficial to improve the accuracy of the acquired motion information of the target image.
在一种可能的实现方式中,训练模块1604,用于基于目标对象的预测姿态在待处理图像上的预测投影结果和目标对象的真实姿态在待处理图像上的真实投影结果,对待训练模 型进行训练,得到姿态识别模型。In a possible implementation, the training module 1604 is configured to perform the training on the model to be trained based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed. Training to get the gesture recognition model.
在一种可能的实现方式中,位置信息包括像素点在图像坐标系中的坐标,图像坐标系基于待处理图像构建。In a possible implementation manner, the location information includes the coordinates of the pixel points in the image coordinate system, and the image coordinate system is constructed based on the image to be processed.
在一种可能的实现方式中,目标对象的预测姿态包括目标对象在相机坐标系中的预测朝向以及目标对象在相机坐标系中的预测肢体行为,相机坐标系基于拍摄待处理图像的相机构建。In a possible implementation, the predicted pose of the target object includes the predicted orientation of the target object in the camera coordinate system and the predicted body behavior of the target object in the camera coordinate system, and the camera coordinate system is constructed based on the camera that captures the image to be processed.
在一种可能的实现方式中,处理模块1602,还用于通过姿态识别模型对待处理图像的目标区域以及待处理图像中像素点的位置信息进行处理,得到形状参数和位移参数,姿态参数、形状参数和位移参数共同用于获取目标对象的姿态。In a possible implementation, the processing module 1602 is also used to process the target area of the image to be processed and the position information of the pixels in the image to be processed through the pose recognition model to obtain shape parameters and displacement parameters, pose parameters, shape The parameters and the displacement parameters are used together to obtain the pose of the target object.
在一种可能的实现方式中,该装置还包括:归一化模块,用于对待处理图像中像素点的位置信息进行归一化处理,得到归一化后的位置信息;处理模块1602,用于通过待训练模型对待处理图像以及归一化后的位置信息进行处理,得到姿态参数。In a possible implementation manner, the device further includes: a normalization module, configured to perform normalization processing on the position information of pixels in the image to be processed to obtain normalized position information; the processing module 1602 uses The attitude parameter is obtained by processing the image to be processed and the normalized position information through the model to be trained.
在一种可能的实现方式中,目标对象为人体。In a possible implementation manner, the target object is a human body.
需要说明的是,上述装置各模块/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其带来的技术效果与本申请方法实施例相同,具体内容可参考本申请实施例前述所示的方法实施例中的叙述,此处不再赘述。It should be noted that the information interaction and execution process between the modules/units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effect it brings is the same as that of the method embodiment of the present application. The specific content can be Reference is made to the descriptions in the foregoing method embodiments shown in the embodiments of the present application, and details are not repeated here.
本申请实施例还涉及一种执行设备,图17为本申请实施例提供的执行设备的一个结构示意图。如图17所示,执行设备1700具体可以表现为手机、平板、笔记本电脑、智能穿戴设备、服务器等,此处不做限定。其中,执行设备1700上可部署有图13或图14对应实施例中所描述的图像分类装置,用于实现图6或图8对应实施例中姿态识别的功能。具体的,执行设备1700包括:接收器1701、发射器1702、处理器1703和存储器1704(其中执行设备1700中的处理器1703的数量可以一个或多个,图17中以一个处理器为例),其中,处理器1703可以包括应用处理器17031和通信处理器17032。在本申请的一些实施例中,接收器1701、发射器1702、处理器1703和存储器1704可通过总线或其它方式连接。The embodiment of the present application also relates to an execution device, and FIG. 17 is a schematic structural diagram of the execution device provided in the embodiment of the present application. As shown in FIG. 17 , the execution device 1700 may specifically be a mobile phone, a tablet, a notebook computer, a smart wearable device, a server, etc., which is not limited here. Wherein, the image classification apparatus described in the embodiment corresponding to FIG. 13 or FIG. 14 may be deployed on the execution device 1700 to realize the gesture recognition function in the embodiment corresponding to FIG. 6 or FIG. 8 . Specifically, the execution device 1700 includes: a receiver 1701, a transmitter 1702, a processor 1703, and a memory 1704 (the number of processors 1703 in the execution device 1700 may be one or more, and one processor is taken as an example in FIG. 17 ) , where the processor 1703 may include an application processor 17031 and a communication processor 17032 . In some embodiments of the present application, the receiver 1701 , the transmitter 1702 , the processor 1703 and the memory 1704 may be connected through a bus or in other ways.
存储器1704可以包括只读存储器和随机存取存储器,并向处理器1703提供指令和数据。存储器1704的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。存储器1704存储有处理器和操作指令、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,操作指令可包括各种操作指令,用于实现各种操作。The memory 1704 may include read-only memory and random-access memory, and provides instructions and data to the processor 1703 . A part of the memory 1704 may also include a non-volatile random access memory (non-volatile random access memory, NVRAM). The memory 1704 stores processors and operating instructions, executable modules or data structures, or their subsets, or their extended sets, wherein the operating instructions may include various operating instructions for implementing various operations.
处理器1703控制执行设备的操作。具体的应用中,执行设备的各个组件通过总线系统耦合在一起,其中总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都称为总线系统。The processor 1703 controls the operations of the execution device. In a specific application, various components of the execution device are coupled together through a bus system, where the bus system may include not only a data bus, but also a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the various buses are referred to as bus systems in the figures.
上述本申请实施例揭示的方法可以应用于处理器1703中,或者由处理器1703实现。处理器1703可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1703中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1703可以是通用处理器、数字信号处理器(digital signal processing,DSP)、微 处理器或微控制器,还可进一步包括专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。该处理器1703可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1704,处理器1703读取存储器1704中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing embodiments of the present application may be applied to the processor 1703 or implemented by the processor 1703 . The processor 1703 may be an integrated circuit chip, which has a signal processing capability. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 1703 or instructions in the form of software. The above-mentioned processor 1703 may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and may further include an application specific integrated circuit (ASIC), field programmable Field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The processor 1703 may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 1704, and the processor 1703 reads the information in the memory 1704, and completes the steps of the above method in combination with its hardware.
接收器1701可用于接收输入的数字或字符信息,以及产生与执行设备的相关设置以及功能控制有关的信号输入。发射器1702可用于通过第一接口输出数字或字符信息;发射器1702还可用于通过第一接口向磁盘组发送指令,以修改磁盘组中的数据;发射器1702还可以包括显示屏等显示设备。The receiver 1701 can be used to receive input digital or character information, and generate signal input related to performing device related settings and function control. The transmitter 1702 can be used to output digital or character information through the first interface; the transmitter 1702 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 1702 can also include a display device such as a display screen .
本申请实施例中,在一种情况下,处理器1703,用于通过图6或图8对应实施例中的姿态识别模型,对图像进行姿态识别。In the embodiment of the present application, in one case, the processor 1703 is configured to perform gesture recognition on the image by using the gesture recognition model in the embodiment corresponding to FIG. 6 or FIG. 8 .
本申请实施例还涉及一种训练设备,图18为本申请实施例提供的训练设备的一个结构示意图。如图18所示,训练设备1800由一个或多个服务器实现,训练设备1800可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1814(例如,一个或一个以上处理器)和存储器1832,一个或一个以上存储应用程序1842或数据1844的存储介质1830(例如一个或一个以上海量存储设备)。其中,存储器1832和存储介质1830可以是短暂存储或持久存储。存储在存储介质1830的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对训练设备中的一系列指令操作。更进一步地,中央处理器1814可以设置为与存储介质1830通信,在训练设备1800上执行存储介质1830中的一系列指令操作。The embodiment of the present application also relates to a training device, and FIG. 18 is a schematic structural diagram of the training device provided in the embodiment of the present application. As shown in Figure 18, the training device 1800 is implemented by one or more servers, and the training device 1800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (central processing units, CPU) 1814 (eg, one or more processors) and memory 1832, one or more storage media 1830 (eg, one or more mass storage devices) for storing application programs 1842 or data 1844. Wherein, the memory 1832 and the storage medium 1830 may be temporary storage or persistent storage. The program stored in the storage medium 1830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the training device. Furthermore, the central processing unit 1814 may be configured to communicate with the storage medium 1830 , and execute a series of instruction operations in the storage medium 1830 on the training device 1800 .
训练设备1800还可以包括一个或一个以上电源1826,一个或一个以上有线或无线网络接口1850,一个或一个以上输入输出接口1858;或,一个或一个以上操作系统1841,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。The training device 1800 can also include one or more power supplies 1826, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1858; or, one or more operating systems 1841, such as Windows Server™, Mac OS X™ , UnixTM, LinuxTM, FreeBSDTM and so on.
具体的,训练设备可以执行图10或图12对应实施例中的模型训练方法。Specifically, the training device may execute the model training method in the embodiment corresponding to FIG. 10 or FIG. 12 .
本申请实施例还涉及一种计算机存储介质,该计算机可读存储介质中存储有用于进行信号处理的程序,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。The embodiment of the present application also relates to a computer storage medium, where a program for signal processing is stored in the computer-readable storage medium, and when the program is run on the computer, the computer executes the steps performed by the aforementioned execution device, or, The computer is caused to perform the steps as performed by the aforementioned training device.
本申请实施例还涉及一种计算机程序产品,该计算机程序产品存储有指令,该指令在由计算机执行时使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。The embodiment of the present application also relates to a computer program product, where instructions are stored in the computer program product, and when executed by a computer, the instructions cause the computer to perform the steps performed by the aforementioned executing device, or cause the computer to perform the steps performed by the aforementioned training device. A step of.
本申请实施例提供的执行设备、训练设备或终端设备具体可以为芯片,芯片包括:处 理单元和通信单元,所述处理单元例如可以是处理器,所述通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行存储单元存储的计算机执行指令,以使执行设备内的芯片执行上述实施例描述的数据处理方法,或者,以使训练设备内的芯片执行上述实施例描述的数据处理方法。可选地,所述存储单元为所述芯片内的存储单元,如寄存器、缓存等,所述存储单元还可以是所述无线接入设备端内的位于所述芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。The execution device, training device or terminal device provided in the embodiment of the present application may specifically be a chip. The chip includes: a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface, pins or circuits etc. The processing unit can execute the computer-executed instructions stored in the storage unit, so that the chips in the execution device execute the data processing methods described in the above embodiments, or make the chips in the training device execute the data processing methods described in the above embodiments. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit located outside the chip in the wireless access device, such as only Read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), etc.
具体的,请参阅图19,图19为本申请实施例提供的芯片的一个结构示意图,所述芯片可以表现为神经网络处理器NPU 1900,NPU 1900作为协处理器挂载到主CPU(Host CPU)上,由Host CPU分配任务。NPU的核心部分为运算电路1903,通过控制器1904控制运算电路1903提取存储器中的矩阵数据并进行乘法运算。Specifically, please refer to FIG. 19. FIG. 19 is a schematic structural diagram of a chip provided by the embodiment of the present application. The chip can be represented as a neural network processor NPU 1900, and the NPU 1900 is mounted to the main CPU (Host CPU) as a coprocessor ), the tasks are assigned by the Host CPU. The core part of the NPU is the operation circuit 1903, and the operation circuit 1903 is controlled by the controller 1904 to extract matrix data in the memory and perform multiplication operations.
在一些实现中,运算电路1903内部包括多个处理单元(Process Engine,PE)。在一些实现中,运算电路1903是二维脉动阵列。运算电路1903还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路1903是通用的矩阵处理器。In some implementations, the operation circuit 1903 includes multiple processing units (Process Engine, PE). In some implementations, arithmetic circuit 1903 is a two-dimensional systolic array. The arithmetic circuit 1903 may also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, arithmetic circuit 1903 is a general-purpose matrix processor.
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器1902中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器1901中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)1908中。For example, suppose there is an input matrix A, a weight matrix B, and an output matrix C. The operation circuit fetches the data corresponding to the matrix B from the weight memory 1902, and caches it in each PE in the operation circuit. The operation circuit takes the data of matrix A from the input memory 1901 and performs matrix operation with matrix B, and the obtained partial or final results of the matrix are stored in the accumulator (accumulator) 1908 .
统一存储器1906用于存放输入数据以及输出数据。权重数据直接通过存储单元访问控制器(Direct Memory Access Controller,DMAC)1905,DMAC被搬运到权重存储器1902中。输入数据也通过DMAC被搬运到统一存储器1906中。The unified memory 1906 is used to store input data and output data. The weight data directly accesses the controller (Direct Memory Access Controller, DMAC) 1905 through the storage unit, and the DMAC is transferred to the weight storage 1902. Input data is also transferred to unified memory 1906 by DMAC.
BIU为Bus Interface Unit即,总线接口单元1913,用于AXI总线与DMAC和取指存储器(Instruction Fetch Buffer,IFB)1909的交互。The BIU is the Bus Interface Unit, that is, the bus interface unit 1913, which is used for the interaction between the AXI bus and the DMAC and the instruction fetch buffer (Instruction Fetch Buffer, IFB) 1909.
总线接口单元1913(Bus Interface Unit,简称BIU),用于取指存储器1909从外部存储器获取指令,还用于存储单元访问控制器1905从外部存储器获取输入矩阵A或者权重矩阵B的原数据。The bus interface unit 1913 (Bus Interface Unit, BIU for short), is used for the instruction fetch memory 1909 to obtain instructions from the external memory, and is also used for the storage unit access controller 1905 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
DMAC主要用于将外部存储器DDR中的输入数据搬运到统一存储器1906或将权重数据搬运到权重存储器1902中或将输入数据数据搬运到输入存储器1901中。The DMAC is mainly used to move the input data in the external memory DDR to the unified memory 1906 , move the weight data to the weight memory 1902 , or move the input data to the input memory 1901 .
向量计算单元1907包括多个运算处理单元,在需要的情况下,对运算电路1903的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。主要用于神经网络中非卷积/全连接层网络计算,如Batch Normalization(批归一化),像素级求和,对预测标签平面进行上采样等。The vector computing unit 1907 includes a plurality of computing processing units, and if necessary, further processes the output of the computing circuit 1903, such as vector multiplication, vector addition, exponent operation, logarithmic operation, size comparison and so on. It is mainly used for non-convolutional/fully connected layer network calculations in neural networks, such as Batch Normalization (batch normalization), pixel-level summation, upsampling of predicted label planes, etc.
在一些实现中,向量计算单元1907能将经处理的输出的向量存储到统一存储器1906。例如,向量计算单元1907可以将线性函数;或,非线性函数应用到运算电路1903的输出,例如对卷积层提取的预测标签平面进行线性插值,再例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元1907生成归一化的值、像素级求和的值,或二者均有。在一 些实现中,处理过的输出的向量能够用作到运算电路1903的激活输入,例如用于在神经网络中的后续层中的使用。In some implementations, the vector computation unit 1907 can store the vector of the processed output to unified memory 1906 . For example, the vector calculation unit 1907 can apply a linear function; or, a non-linear function to the output of the operation circuit 1903, such as performing linear interpolation on the predicted label plane extracted by the convolutional layer, and then for example, a vector of accumulated values to generate an activation value . In some implementations, the vector calculation unit 1907 generates normalized values, pixel-level summed values, or both. In some implementations, the vector of processed outputs can be used as an activation input to operational circuitry 1903, for example for use in subsequent layers in a neural network.
控制器1904连接的取指存储器(instruction fetch buffer)1909,用于存储控制器1904使用的指令;An instruction fetch buffer (instruction fetch buffer) 1909 connected to the controller 1904 is used to store instructions used by the controller 1904;
统一存储器1906,输入存储器1901,权重存储器1902以及取指存储器1909均为On-Chip存储器。外部存储器私有于该NPU硬件架构。The unified memory 1906, the input memory 1901, the weight memory 1902 and the fetch memory 1909 are all On-Chip memories. External memory is private to the NPU hardware architecture.
其中,上述任一处提到的处理器,可以是一个通用中央处理器,微处理器,ASIC,或一个或多个用于控制上述程序执行的集成电路。Wherein, the processor mentioned above can be a general-purpose central processing unit, microprocessor, ASIC, or one or more integrated circuits for controlling the execution of the above-mentioned programs.
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。In addition, it should be noted that the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be A physical unit can be located in one place, or it can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware, and of course it can also be realized by special hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, Special components, etc. to achieve. In general, all functions completed by computer programs can be easily realized by corresponding hardware, and the specific hardware structure used to realize the same function can also be varied, such as analog circuits, digital circuits or special-purpose circuit etc. However, for this application, software program implementation is a better implementation mode in most cases. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to make a computer device (which can be a personal computer, training device, or network device, etc.) execute the instructions described in various embodiments of the present application method.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, training device, or data The center transmits to another website site, computer, training device or data center via wired (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a training device or a data center integrated with one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (Solid State Disk, SSD)), etc.

Claims (33)

  1. 一种姿态识别方法,其特征在于,所述方法包括:A gesture recognition method, characterized in that the method comprises:
    获取目标图像;Get the target image;
    通过姿态识别模型对所述目标图像的目标区域以及所述目标区域在所述目标图像中的位置信息进行处理,得到姿态参数,所述目标区域为目标对象所在的区域,所述姿态参数用于获取所述目标对象的姿态。Process the target area of the target image and the position information of the target area in the target image through a gesture recognition model to obtain a gesture parameter, the target zone is an area where the target object is located, and the gesture parameter is used for Get the pose of the target object.
  2. 根据权利要求1所述的方法,其特征在于,所述位置信息包括所述目标区域的中心点在图像坐标系中的坐标以及所述目标区域的尺寸,所述图像坐标系基于所述目标图像构建;或,The method according to claim 1, wherein the location information includes the coordinates of the center point of the target area in an image coordinate system and the size of the target area, and the image coordinate system is based on the target image build; or,
    所述位置信息包括所述目标区域的顶点在图像坐标系中的坐标,所述图像坐标系基于所述目标图像构建。The location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the target image.
  3. 根据权利要求1或2所述的方法,其特征在于,所述姿态识别模型是基于所述目标对象的预测姿态在待处理图像上的预测投影结果和所述目标对象的真实姿态在所述待处理图像上的真实投影结果进行训练得到的。The method according to claim 1 or 2, wherein the pose recognition model is based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real pose of the target object on the image to be processed. It is obtained by processing the real projection results on the image for training.
  4. 根据权利要求1至3任意一项所述的方法,其特征在于,所述目标对象的姿态包括所述目标对象在相机坐标系中的朝向以及所述目标对象在相机坐标系中的肢体行为,所述相机坐标系基于拍摄所述目标图像的相机构建。The method according to any one of claims 1 to 3, wherein the posture of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, The camera coordinate system is constructed based on the camera that captures the target image.
  5. 根据权利要求1至4任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    通过姿态识别模型对所述目标图像的目标区域以及所述目标区域在所述目标图像中的位置信息进行处理,得到形状参数和位移参数,所述姿态参数、所述形状参数和所述位移参数共同用于获取所述目标对象的姿态。Processing the target area of the target image and the position information of the target area in the target image through a gesture recognition model to obtain a shape parameter and a displacement parameter, the posture parameter, the shape parameter and the displacement parameter Commonly used to obtain the pose of the target object.
  6. 根据权利要求1至5任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 5, wherein the method further comprises:
    对所述目标区域在所述目标图像中的位置信息进行归一化处理,得到归一化后的位置信息;performing normalization processing on the position information of the target area in the target image to obtain normalized position information;
    所述通过姿态识别模型对所述目标图像的目标区域以及所述目标区域在所述目标图像中的位置信息进行处理,得到姿态参数包括:The gesture recognition model is used to process the target area of the target image and the position information of the target area in the target image, and the gesture parameters obtained include:
    通过姿态识别模型对所述目标图像的目标区域以及所述归一化后的位置信息进行处理,得到姿态参数。The target area of the target image and the normalized position information are processed by a gesture recognition model to obtain gesture parameters.
  7. 一种姿态识别方法,其特征在于,所述方法包括:A gesture recognition method, characterized in that the method comprises:
    获取目标图像;Get the target image;
    通过姿态识别模型对所述目标图像以及所述目标图像中像素点的位置信息进行处理,得到姿态参数,所述姿态参数用于获取所述目标图像包含的目标对象的姿态。The target image and the position information of the pixel points in the target image are processed by a gesture recognition model to obtain a gesture parameter, and the gesture parameter is used to acquire the gesture of the target object included in the target image.
  8. 根据权利要求7所述的方法,其特征在于,所述位置信息包括像素点在图像坐标系中的坐标,所述图像坐标系基于所述目标图像构建。The method according to claim 7, wherein the position information includes coordinates of pixels in an image coordinate system, and the image coordinate system is constructed based on the target image.
  9. 根据权利要求7或8所述的方法,其特征在于,所述姿态识别模型基于所述目标对象的预测姿态在待处理图像上的预测投影结果和所述目标对象的真实姿态在所述待处理图像上的真实投影结果,进行训练得到。The method according to claim 7 or 8, wherein the pose recognition model is based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real pose of the target object on the image to be processed. The real projection result on the image is obtained by training.
  10. 根据权利要求7至9任意一项所述的方法,其特征在于,所述目标对象的姿态包括所述目标对象在相机坐标系中的朝向以及所述目标对象在相机坐标系中的肢体行为,所述相机坐标系基于拍摄所述目标图像的相机构建。The method according to any one of claims 7 to 9, wherein the posture of the target object includes the orientation of the target object in the camera coordinate system and the body behavior of the target object in the camera coordinate system, The camera coordinate system is constructed based on the camera that captures the target image.
  11. 根据权利要求7至10任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 10, further comprising:
    通过姿态识别模型对所述目标图像以及所述目标图像中像素点的位置信息进行处理,得到形状参数和位移参数,所述姿态参数、所述形状参数和所述位移参数共同用于获取所述目标对象的姿态。Process the target image and the position information of the pixels in the target image through a gesture recognition model to obtain a shape parameter and a displacement parameter, and the gesture parameter, the shape parameter and the displacement parameter are jointly used to obtain the The pose of the target object.
  12. 根据权利要求7至11任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 11, further comprising:
    对所述目标图像中像素点的位置信息进行归一化处理,得到归一化后的位置信息;performing normalization processing on the position information of pixels in the target image to obtain normalized position information;
    所述通过姿态识别模型对所述目标图像以及所述目标图像中像素点的位置信息进行处理,得到姿态参数包括:The position information of the target image and the pixel points in the target image is processed by the gesture recognition model, and the gesture parameters obtained include:
    通过姿态识别模型对所述目标图像以及所述归一化后的位置信息进行处理,得到姿态参数。The target image and the normalized position information are processed by a gesture recognition model to obtain gesture parameters.
  13. 一种模型训练方法,其特征在于,所述方法包括:A method for model training, characterized in that the method comprises:
    获取待处理图像;Get the image to be processed;
    通过待训练模型对所述待处理图像的目标区域以及所述目标区域在所述待处理图像中的位置信息进行处理,得到姿态参数,所述目标区域为目标对象所在的区域;Processing the target area of the image to be processed and the position information of the target area in the image to be processed by the model to be trained to obtain attitude parameters, the target area being the area where the target object is located;
    基于所述姿态参数,获取所述目标对象的预测姿态;Obtaining a predicted pose of the target object based on the pose parameters;
    基于所述目标对象的预测姿态和所述目标对象的真实姿态,对所述待训练模型进行训练,得到姿态识别模型。Based on the predicted pose of the target object and the real pose of the target object, the model to be trained is trained to obtain a pose recognition model.
  14. 根据权利要求13所述的方法,其特征在于,所述基于所述目标对象的预测姿态和所述目标对象的真实姿态,对所述待训练模型进行训练,得到姿态识别模型包括:The method according to claim 13, wherein the training of the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model includes:
    基于所述目标对象的预测姿态在所述待处理图像上的预测投影结果和所述目标对象的真实姿态在所述待处理图像上的真实投影结果,对所述待训练模型进行训练,得到姿态识别模型。Based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed, train the model to be trained to obtain a pose Identify the model.
  15. 根据权利要求13或14所述的方法,其特征在于,所述位置信息包括所述目标区域的中心点在图像坐标系中的坐标以及所述目标区域的尺寸,所述图像坐标系基于所述待处理图像构建;或,The method according to claim 13 or 14, wherein the position information includes the coordinates of the center point of the target area in an image coordinate system and the size of the target area, and the image coordinate system is based on the pending image construction; or,
    所述位置信息包括所述目标区域的顶点在图像坐标系中的坐标,所述图像坐标系基于所述待处理图像构建。The location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  16. 一种模型训练方法,其特征在于,所述方法包括:A method for model training, characterized in that the method comprises:
    获取待处理图像;Get the image to be processed;
    通过待训练模型对所述待处理图像以及所述待处理图像中像素点的位置信息进行处理,得到姿态参数;Processing the image to be processed and the position information of pixels in the image to be processed by the model to be trained to obtain attitude parameters;
    基于所述姿态参数,获取所述目标对象的预测姿态;Obtaining a predicted pose of the target object based on the pose parameters;
    基于所述目标对象的预测姿态和所述目标对象的真实姿态,对所述待训练模型进行训练,得到姿态识别模型。Based on the predicted pose of the target object and the real pose of the target object, the model to be trained is trained to obtain a pose recognition model.
  17. 根据权利要求16所述的方法,其特征在于,所述基于所述目标对象的预测姿态和所述目标对象的真实姿态,对所述待训练模型进行训练,得到姿态识别模型包括:The method according to claim 16, wherein the training of the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model includes:
    基于所述目标对象的预测姿态在所述待处理图像上的预测投影结果和所述目标对象的真实姿态在所述待处理图像上的真实投影结果,对所述待训练模型进行训练,得到姿态识别模型。Based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real projection result of the real pose of the target object on the image to be processed, train the model to be trained to obtain a pose Identify the model.
  18. 根据权利要求16或17所述的方法,其特征在于,所述位置信息包括像素点在图像坐标系中的坐标,所述图像坐标系基于所述待处理图像构建。The method according to claim 16 or 17, wherein the position information includes coordinates of pixels in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  19. 一种姿态识别装置,其特征在于,所述装置包括:A gesture recognition device, characterized in that the device comprises:
    获取模块,用于获取目标图像;An acquisition module, configured to acquire a target image;
    处理模块,用于通过姿态识别模型对所述目标图像的目标区域以及所述目标区域在所述目标图像中的位置信息进行处理,得到姿态参数,所述目标区域为目标对象所在的区域,所述姿态参数用于获取所述目标对象的姿态。A processing module, configured to process the target area of the target image and the position information of the target area in the target image through a gesture recognition model to obtain gesture parameters, the target area is the area where the target object is located, and the The pose parameters are used to obtain the pose of the target object.
  20. 根据权利要求19所述的装置,其特征在于,所述位置信息包括所述目标区域的中心点在图像坐标系中的坐标以及所述目标区域的尺寸,所述图像坐标系基于所述目标图像构建;或,The device according to claim 19, wherein the position information includes the coordinates of the center point of the target area in an image coordinate system and the size of the target area, and the image coordinate system is based on the target image Build; or,
    所述位置信息包括所述目标区域的顶点在图像坐标系中的坐标,所述图像坐标系基于所述目标图像构建。The location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the target image.
  21. 根据权利要求19或20所述的方法,其特征在于,所述姿态识别模型是基于所述目标对象的预测姿态在待处理图像上的预测投影结果和所述目标对象的真实姿态在所述待处理图像上的真实投影结果进行训练得到的。The method according to claim 19 or 20, wherein the pose recognition model is based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real pose of the target object on the image to be processed. It is obtained by processing the real projection results on the image for training.
  22. 一种姿态识别装置,其特征在于,所述装置包括:A gesture recognition device, characterized in that the device comprises:
    获取模块,用于获取目标图像;An acquisition module, configured to acquire a target image;
    处理模块,用于通过姿态识别模型对所述目标图像以及所述目标图像中像素点的位置信息进行处理,得到姿态参数,所述姿态参数用于获取所述目标图像包含的目标对象的姿态。The processing module is configured to process the target image and the position information of the pixel points in the target image through a gesture recognition model to obtain a gesture parameter, and the gesture parameter is used to acquire the gesture of the target object included in the target image.
  23. 根据权利要求22所述的装置,其特征在于,所述位置信息包括像素点在图像坐标系中的坐标,所述图像坐标系基于所述目标图像构建。The device according to claim 22, wherein the position information includes coordinates of pixels in an image coordinate system, and the image coordinate system is constructed based on the target image.
  24. 根据权利要求22或23所述的装置,其特征在于,所述姿态识别模型是基于所述目标对象的预测姿态在待处理图像上的预测投影结果和所述目标对象的真实姿态在所述待处理图像上的真实投影结果进行训练得到的。The device according to claim 22 or 23, wherein the pose recognition model is based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real pose of the target object on the image to be processed. It is obtained by processing the real projection results on the image for training.
  25. 一种模型训练装置,其特征在于,所述装置包括:A model training device, characterized in that the device comprises:
    第一获取模块,用于获取待处理图像;The first acquisition module is used to acquire the image to be processed;
    处理模块,用于通过待训练模型对所述待处理图像的目标区域以及所述目标区域在所述待处理图像中的位置信息进行处理,得到姿态参数,所述目标区域为目标对象所在的区域;A processing module, configured to process the target area of the image to be processed and the position information of the target area in the image to be processed by the model to be trained to obtain posture parameters, the target area being the area where the target object is located ;
    第二获取模块,用于基于所述姿态参数,获取所述目标对象的预测姿态;A second acquisition module, configured to acquire the predicted attitude of the target object based on the attitude parameters;
    训练模块,用于基于所述目标对象的预测姿态和所述目标对象的真实姿态,对所述待 训练模型进行训练,得到姿态识别模型。The training module is used to train the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
  26. 根据权利要求25所述的装置,其特征在于,所述训练模块,用于基于所述目标对象的预测姿态在所述待处理图像上的预测投影结果和所述目标对象的真实姿态在所述待处理图像上的真实投影结果,对所述待训练模型进行训练,得到姿态识别模型。The device according to claim 25, wherein the training module is configured to predict projection results based on the predicted pose of the target object on the image to be processed and the real pose of the target object in the The real projection result on the image to be processed is used to train the model to be trained to obtain a gesture recognition model.
  27. 根据权利要求25或26所述的装置,其特征在于,所述位置信息包括所述目标区域的中心点在图像坐标系中的坐标以及所述目标区域的尺寸,所述图像坐标系基于所述待处理图像构建;或,The device according to claim 25 or 26, wherein the position information includes the coordinates of the center point of the target area in an image coordinate system and the size of the target area, and the image coordinate system is based on the pending image construction; or,
    所述位置信息包括所述目标区域的顶点在图像坐标系中的坐标,所述图像坐标系基于所述待处理图像构建。The location information includes coordinates of vertices of the target area in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  28. 一种模型训练装置,其特征在于,所述装置包括:A model training device, characterized in that the device comprises:
    第一获取模块,用于获取待处理图像;The first acquisition module is used to acquire the image to be processed;
    处理模块,用于通过待训练模型对所述待处理图像以及所述待处理图像中像素点的位置信息进行处理,得到姿态参数;A processing module, configured to process the image to be processed and the position information of pixels in the image to be processed through the model to be trained to obtain attitude parameters;
    第二获取模块,用于基于所述姿态参数,获取所述目标对象的预测姿态;A second acquisition module, configured to acquire the predicted attitude of the target object based on the attitude parameters;
    训练模块,用于基于所述目标对象的预测姿态和所述目标对象的真实姿态,对所述待训练模型进行训练,得到姿态识别模型。A training module, configured to train the model to be trained based on the predicted pose of the target object and the real pose of the target object to obtain a pose recognition model.
  29. 根据权利要求28所述的装置,其特征在于,所述训练模块,用于基于所述目标对象的预测姿态在所述待处理图像上的预测投影结果和所述目标对象的真实姿态在所述待处理图像上的真实投影结果,对所述待训练模型进行训练,得到姿态识别模型。The device according to claim 28, wherein the training module is configured to be based on the predicted projection result of the predicted pose of the target object on the image to be processed and the real pose of the target object in the The real projection result on the image to be processed is used to train the model to be trained to obtain a gesture recognition model.
  30. 根据权利要求28或29所述的装置,其特征在于,所述位置信息包括像素点在图像坐标系中的坐标,所述图像坐标系基于所述待处理图像构建。The device according to claim 28 or 29, wherein the position information includes coordinates of pixels in an image coordinate system, and the image coordinate system is constructed based on the image to be processed.
  31. 一种姿态识别装置,其特征在于,所述装置包括存储器和处理器;所述存储器存储有代码,所述处理器被配置为执行所述代码,当所述代码被执行时,所述姿态识别装置执行如权利要求1至18任一所述的方法。A gesture recognition device, characterized in that the device includes a memory and a processor; the memory stores codes, the processor is configured to execute the codes, and when the codes are executed, the gesture recognition The device executes the method as claimed in any one of claims 1-18.
  32. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有一个或多个指令,所述指令在由一个或多个计算机执行时使得所述一个或多个计算机实施权利要求1至18任一所述的方法。A computer storage medium, wherein the computer storage medium stores one or more instructions which, when executed by one or more computers, cause the one or more computers to implement any of claims 1 to 18 a method as described.
  33. 一种计算机程序产品,其特征在于,所述计算机程序产品存储有指令,所述指令在由计算机执行时,使得所述计算机实施权利要求1至18任意一项所述的方法。A computer program product, characterized in that the computer program product stores instructions, and when the instructions are executed by a computer, the computer implements the method according to any one of claims 1 to 18.
PCT/CN2022/128504 2021-11-15 2022-10-31 Posture recognition method and related device WO2023083030A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111350981.9A CN114241597A (en) 2021-11-15 2021-11-15 Posture recognition method and related equipment thereof
CN202111350981.9 2021-11-15

Publications (1)

Publication Number Publication Date
WO2023083030A1 true WO2023083030A1 (en) 2023-05-19

Family

ID=80749470

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/128504 WO2023083030A1 (en) 2021-11-15 2022-10-31 Posture recognition method and related device

Country Status (2)

Country Link
CN (1) CN114241597A (en)
WO (1) WO2023083030A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114241597A (en) * 2021-11-15 2022-03-25 华为技术有限公司 Posture recognition method and related equipment thereof
CN115376203A (en) * 2022-07-20 2022-11-22 华为技术有限公司 Data processing method and device
CN116912951B (en) * 2023-09-13 2023-12-22 华南理工大学 Human body posture evaluation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190205668A1 (en) * 2017-11-22 2019-07-04 Kabushiki Kaisha Toshiba Object detecting apparatus, object detecting method, and computer program product
CN112446917A (en) * 2019-09-03 2021-03-05 北京地平线机器人技术研发有限公司 Attitude determination method and device
CN112668549A (en) * 2021-01-15 2021-04-16 北京格灵深瞳信息技术股份有限公司 Pedestrian attitude analysis method, system, terminal and storage medium
CN114241597A (en) * 2021-11-15 2022-03-25 华为技术有限公司 Posture recognition method and related equipment thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190205668A1 (en) * 2017-11-22 2019-07-04 Kabushiki Kaisha Toshiba Object detecting apparatus, object detecting method, and computer program product
CN112446917A (en) * 2019-09-03 2021-03-05 北京地平线机器人技术研发有限公司 Attitude determination method and device
CN112668549A (en) * 2021-01-15 2021-04-16 北京格灵深瞳信息技术股份有限公司 Pedestrian attitude analysis method, system, terminal and storage medium
CN114241597A (en) * 2021-11-15 2022-03-25 华为技术有限公司 Posture recognition method and related equipment thereof

Also Published As

Publication number Publication date
CN114241597A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
WO2022022274A1 (en) Model training method and apparatus
US11232286B2 (en) Method and apparatus for generating face rotation image
WO2023083030A1 (en) Posture recognition method and related device
WO2022042713A1 (en) Deep learning training method and apparatus for use in computing device
WO2022179581A1 (en) Image processing method and related device
EP4322056A1 (en) Model training method and apparatus
US20230401799A1 (en) Augmented reality method and related device
CN113034652A (en) Virtual image driving method, device, equipment and storage medium
US20220198836A1 (en) Gesture recognition method, electronic device, computer-readable storage medium, and chip
WO2021103731A1 (en) Semantic segmentation method, and model training method and apparatus
WO2023274052A1 (en) Image classification method and related device thereof
WO2022052782A1 (en) Image processing method and related device
WO2021190433A1 (en) Method and device for updating object recognition model
WO2022179586A1 (en) Model training method, and device associated therewith
WO2023165361A1 (en) Data processing method and related device
CN111414915A (en) Character recognition method and related equipment
CN110738650A (en) infectious disease infection identification method, terminal device and storage medium
CN114359289A (en) Image processing method and related device
CN113627163A (en) Attention model, feature extraction method and related device
CN114169393A (en) Image classification method and related equipment thereof
WO2022165722A1 (en) Monocular depth estimation method, apparatus and device
WO2024017282A1 (en) Data processing method and device
CN113627421A (en) Image processing method, model training method and related equipment
WO2024046144A1 (en) Video processing method and related device thereof
WO2023020185A1 (en) Image classification method and related device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22891826

Country of ref document: EP

Kind code of ref document: A1