WO2022174605A1 - Gesture recognition method, gesture recognition apparatus, and smart device - Google Patents

Gesture recognition method, gesture recognition apparatus, and smart device Download PDF

Info

Publication number
WO2022174605A1
WO2022174605A1 PCT/CN2021/124613 CN2021124613W WO2022174605A1 WO 2022174605 A1 WO2022174605 A1 WO 2022174605A1 CN 2021124613 W CN2021124613 W CN 2021124613W WO 2022174605 A1 WO2022174605 A1 WO 2022174605A1
Authority
WO
WIPO (PCT)
Prior art keywords
gesture
information
target video
key point
gesture recognition
Prior art date
Application number
PCT/CN2021/124613
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 WO2022174605A1 publication Critical patent/WO2022174605A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/28Recognition of hand or arm movements, e.g. recognition of deaf sign language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames

Abstract

The present application is suitable for the technical field of gesture recognition, and provides a gesture recognition method, a gesture recognition apparatus, and a smart device. The method comprises: obtaining a target video comprising a gesture; and inputting the target video into a trained gesture recognition model so as to obtain category information, positioning box information and key point information of the gesture of the target video, wherein the gesture recognition model is obtained by training using a sample gesture image carrying annotation information, and the annotation information comprises category information, positioning box information and key point information of a gesture of the sample gesture image. By means of the solution of the present application, the accuracy and robustness of gesture recognition can be improved.

Description

一种手势识别方法、手势识别装置及智能设备Gesture recognition method, gesture recognition device and smart device
本申请要求于2021年02月21日在中国专利局提交的、申请号为202110194549.9的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202110194549.9 filed with the Chinese Patent Office on February 21, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于手势识别技术领域,尤其涉及一种手势识别方法、手势识别装置、智能设备及计算机可读存储介质。The present application belongs to the technical field of gesture recognition, and in particular, relates to a gesture recognition method, a gesture recognition device, a smart device, and a computer-readable storage medium.
背景技术Background technique
目前,手势识别在人机交互领域中有着重要的地位。通过手势识别技术,可以帮助人们解决相应场景下的问题,例如识别聋哑人的手语,以及与机器人进行猜拳游戏等。然而,目前的手势识别技术的识别准确性不高,不具备高鲁棒性。At present, gesture recognition plays an important role in the field of human-computer interaction. Gesture recognition technology can help people solve problems in corresponding scenarios, such as recognizing the sign language of deaf people and playing guessing games with robots. However, the current gesture recognition technology does not have high recognition accuracy and high robustness.
技术问题technical problem
有鉴于此,本申请提供了一种手势识别方法、手势识别装置、智能设备及计算机可读存储介质,可以提高手势识别的准确性和鲁棒性。In view of this, the present application provides a gesture recognition method, a gesture recognition device, a smart device, and a computer-readable storage medium, which can improve the accuracy and robustness of gesture recognition.
技术解决方案technical solutions
第一方面,本申请提供了一种手势识别方法,包括:In a first aspect, the present application provides a gesture recognition method, including:
获取包含手势的目标视频;Get the target video that contains the gesture;
将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息,其中,上述手势识别模型通过携带标注信息的样本手势图像进行训练得到,上述标注信息包括上述样本手势图像中的手势的类别信息、定位框信息和关键点信息。Input the above-mentioned target video into the trained gesture recognition model, and obtain the category information, positioning frame information and key point information of the gesture in the above-mentioned target video, wherein the above-mentioned gesture recognition model is obtained by training the sample gesture images carrying the annotation information, and the above-mentioned The annotation information includes the category information, positioning frame information, and key point information of the gesture in the above-mentioned sample gesture image.
第二方面,本申请提供了一种手势识别装置,包括:In a second aspect, the present application provides a gesture recognition device, including:
获取单元,用于获取包含手势的目标视频;an acquisition unit for acquiring a target video containing gestures;
识别单元,用于将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息,其中,上述手势识别模型通过携带标注信息的样本手势图像进行训练得到,上述标注信息包括上述样本手势图像中的手势的类别信息、定位框信息和关键点信息。The recognition unit is used to input the above-mentioned target video into the trained gesture recognition model, and obtain the category information, positioning frame information and key point information of the gesture in the above-mentioned target video, wherein the above-mentioned gesture recognition model uses the sample gesture image carrying the annotation information. It is obtained through training that the above-mentioned labeling information includes the category information, positioning frame information and key point information of the gesture in the above-mentioned sample gesture image.
第三方面,本申请提供了一种智能设备,包括存储器、处理器以及存储在上述存储器中并可在上述处理器上运行的计算机程序,上述处理器执行上述计算机程序时实现如上述第一方面的方法的步骤。In a third aspect, the present application provides a smart device, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the first aspect when the processor executes the computer program. steps of the method.
第四方面,本申请提供了一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现如上述第一方面的方法的步骤。In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps of the method in the first aspect.
第五方面,本申请提供了一种计算机程序产品,上述计算机程序产品包括计算机程序,上述计算机程序被一个或多个处理器执行时实现如上述第一方面的方法的步骤。In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by one or more processors, the steps of the method of the first aspect are implemented.
有益效果beneficial effect
由上可见,本申请方案中,在获取包含手势的目标视频后,将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息,其中,上述手势识别模型通过携带标注信息的样本手势图像进行训练得到,上述标注信息包括上述样本手势图像中的手势的类别信息、定位框信息和关键点信息。本申请方案采用携带标注信息的样本手势图像训练手势识别模型,由于标注信息包括多种手势信息(即类别信息、定位框信息和关键点信息),因此在训练手势识别模型的过程中,手势识别模型可以隐式地将该多种手势信息结合起来进行学习,从而使得训练得到的手势识别模型具有较高的准确性和鲁棒性。可以理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。As can be seen from the above, in the solution of the present application, after obtaining the target video containing gestures, the above target video is input into the trained gesture recognition model, and the category information, positioning frame information and key point information of the gesture in the above target video are obtained, wherein The above-mentioned gesture recognition model is obtained by training sample gesture images carrying annotation information, and the above-mentioned annotation information includes gesture category information, positioning frame information and key point information in the above-mentioned sample gesture images. The solution of the present application uses the sample gesture images carrying the annotation information to train the gesture recognition model. Since the annotation information includes a variety of gesture information (ie category information, positioning frame information and key point information), in the process of training the gesture recognition model, the gesture recognition The model can implicitly combine the various gesture information for learning, so that the trained gesture recognition model has high accuracy and robustness. It can be understood that, for the beneficial effects of the second aspect to the fifth aspect, reference may be made to the relevant description in the first aspect, which is not repeated here.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本申请实施例提供的手势识别方法的流程示意图;1 is a schematic flowchart of a gesture recognition method provided by an embodiment of the present application;
图2是本申请实施例提供的手势识别方法的应用环境示意图;FIG. 2 is a schematic diagram of an application environment of the gesture recognition method provided by an embodiment of the present application;
图3是本申请实施例提供的手势识别装置的结构框图;3 is a structural block diagram of a gesture recognition device provided by an embodiment of the present application;
图4是本申请实施例提供的智能设备的结构示意图。FIG. 4 is a schematic structural diagram of a smart device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
为了说明本申请所提出的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions proposed in the present application, the following specific embodiments are used for description.
下面对本申请实施例提供的一种手势识别方法进行描述。该手势识别方法应用于智能设备。请参阅图1,该手势识别方法包括:A gesture recognition method provided by an embodiment of the present application is described below. The gesture recognition method is applied to a smart device. Referring to Figure 1, the gesture recognition method includes:
步骤101,获取包含手势的目标视频。Step 101: Acquire a target video including gestures.
在本申请实施例中,目标视频中包含手势,也即是说,目标视频是通过拍摄装置对人的手部进行拍摄得到的视频。具体地,该目标视频可以是通过连接智能设备的摄像头实时 输入的视频,也可以是预先录制好的视频,此处不作限定。例如,用户可以预先通过自己的手机对正在做手势的手部进行拍摄,然后将拍摄得到的视频发送至智能设备,智能设备可以将该拍摄得到的视频作为目标视频。In this embodiment of the present application, the target video includes gestures, that is, the target video is a video obtained by photographing a human hand by a photographing device. Specifically, the target video can be a video input in real time through a camera connected to a smart device, or it can be a pre-recorded video, which is not limited here. For example, the user can pre-shoot the hand that is making the gesture through his mobile phone, and then send the captured video to the smart device, and the smart device can use the captured video as the target video.
其中,目标视频包括若干帧图像,在该若干帧图像中,存在至少一帧图像包含手势,也即存在两种情况,一种情况是目标视频的每一帧图像中均包含手势,另一种情况是目标视频的部分图像包含手势,另一部分图像不包含手势。The target video includes several frames of images, and among the several frames of images, at least one frame of images contains gestures, that is, there are two cases, one is that each frame of the target video contains gestures, and the other is The situation is that part of the image of the target video contains gestures and another part of the images does not contain gestures.
步骤102,将目标视频输入训练后的手势识别模型,得到目标视频中的手势的类别信息、定位框信息以及关键点信息。Step 102: Input the target video into the trained gesture recognition model, and obtain the category information, positioning frame information and key point information of the gesture in the target video.
在本申请实施例中,手势识别模型通过样本手势图像训练得到。为了提高手势识别模型的识别准确度,用于训练手势识别模型的样本手势图像的数量应该尽量多,例如,样本手势图像的数量可以为10000张。由于人手的灵活多变,人手可以做出的手势的类别数量非常多,因此手势识别模型无法做到识别出人手可以做出的所有手势的类别。基于此,可以基于应用场景与用户需求,选取至少一种手势作为预设手势,然后收集包含预设手势的样本手势图像,其中,每一张样本手势图像包含一种预设手势。示例性地,可以选取9种手势作为预设手势,这9种预设手势分别为手掌(palm)手势、石头(stone)手势、剪刀(scissor)手势、好的(OK)手势、帅气(awesome)手势、打电话(call)手势、发誓(swear)手势、摇滚(rock)手势以及第一(one)手势。In the embodiment of the present application, the gesture recognition model is obtained by training sample gesture images. In order to improve the recognition accuracy of the gesture recognition model, the number of sample gesture images used for training the gesture recognition model should be as large as possible, for example, the number of sample gesture images may be 10,000. Due to the flexibility of the human hand, the number of categories of gestures that the human hand can make is very large, so the gesture recognition model cannot recognize all the categories of gestures that the human hand can make. Based on this, at least one gesture can be selected as the preset gesture based on the application scenario and user requirements, and then sample gesture images including the preset gesture are collected, wherein each sample gesture image includes a preset gesture. Exemplarily, 9 kinds of gestures can be selected as preset gestures, and the 9 kinds of preset gestures are palm gestures, stone gestures, scissor gestures, OK gestures, and handsome gestures. ) gesture, call gesture, swear gesture, rock gesture, and one gesture.
对于每一张样本手势图像,可以对其进行标注,使得该样本手势图像携带标注信息,标注信息可以包括该样本手势图像中的手势的类别信息、定位框信息和关键点信息,其中,类别信息用于指示手势的类别,定位框信息用于指示手势的定位框,定位框为手势的外接矩形,关键点信息用于指示手势的关键点(即单手的21个骨骼点)。For each sample gesture image, it can be annotated, so that the sample gesture image carries annotation information, and the annotation information can include the category information, positioning frame information and key point information of the gesture in the sample gesture image, wherein the category information It is used to indicate the category of the gesture, the positioning frame information is used to indicate the positioning frame of the gesture, the positioning frame is the circumscribing rectangle of the gesture, and the key point information is used to indicate the key points of the gesture (ie, 21 skeleton points of a single hand).
通过样本手势图像对手势识别模型进行训练,即可得到训练后的手势识别模型。将目标视频输入该训练后的手势识别模型,该训练后的手势识别模型可以输出目标视频中的手势的类别信息、定位框信息以及关键点信息,也即是说,该手势识别模型是一个多任务模型,可以完成多个任务,分别是输出手势的类别信息、输出手势的定位框信息以及输出手势的关键点信息。在训练过程中,多任务模型可以通过学习不同任务的联系和差异,提高每个任务的学习效率和质量,因此,本申请实施例中训练后的手势识别模型的手势识别的准确度相比于传统的手势识别模型要更高。The gesture recognition model after training can be obtained by training the gesture recognition model through the sample gesture images. Input the target video into the trained gesture recognition model, and the trained gesture recognition model can output the category information, positioning box information and key point information of the gesture in the target video, that is to say, the gesture recognition model is a multi- The task model can complete multiple tasks, including the category information of the output gesture, the positioning box information of the output gesture, and the key point information of the output gesture. During the training process, the multi-task model can improve the learning efficiency and quality of each task by learning the connections and differences of different tasks. Therefore, the gesture recognition accuracy of the trained gesture recognition model in the embodiment of the present application is compared to Traditional gesture recognition models are higher.
需要注意的是,在将目标视频输入训练后的手势识别模型后,手势识别模型实际上是对目标视频的每帧图像进行手势识别。对于目标视频的每帧图像,手势识别模型可以检测该图像中是否包含手势,如果该图像中包含手势,则输出该图像中的手势的类别信息、定位框信息和关键点信息,如果该图像中不包含手势,则不输出信息。其中,目标视频中每 帧图像中的手势的类别信息用于指示该帧图像中的手势属于至少一种预设手势中的哪一种手势;目标视频中每帧图像中的手势的定位框信息用于指示该帧图像中的手势的定位框的位置,比如定位框信息为定位框的左上角坐标和右下角坐标;目标视频中每帧图像中的手势的关键点信息用于指示该帧图像中的手势的关键点的位置,比如关键点信息为关键点的坐标。It should be noted that after inputting the target video into the trained gesture recognition model, the gesture recognition model actually performs gesture recognition on each frame of the target video. For each frame of the target video, the gesture recognition model can detect whether the image contains gestures, and if the image contains gestures, output the category information, positioning frame information and key point information of the gestures in the image, if the image contains gestures If gestures are not included, no information is output. Wherein, the category information of the gesture in each frame of image in the target video is used to indicate which gesture in the at least one preset gesture the gesture in the frame of image belongs to; the positioning frame information of the gesture in each frame of image in the target video The position of the positioning frame used to indicate the gesture in the frame image, for example, the positioning frame information is the coordinates of the upper left corner and the lower right corner of the positioning frame; the key point information of the gesture in each frame image in the target video is used to indicate the frame image The position of the key point of the gesture in , for example, the key point information is the coordinate of the key point.
可选地,在将目标视频输入训练后的手势识别模型之前,还包括:Optionally, before inputting the target video into the trained gesture recognition model, the method further includes:
对目标视频的每帧图像进行归一化处理,得到归一化视频;Normalize each frame of the target video to obtain a normalized video;
相应地,上述步骤102具体包括:Correspondingly, the above step 102 specifically includes:
将归一化视频输入训练后的手势识别模型,得到目标视频中的手势的类别信息、定位框信息以及关键点信息。The normalized video is input into the trained gesture recognition model, and the category information, positioning frame information and key point information of the gesture in the target video are obtained.
在本申请实施例中,归一化处理可以是对目标视频的每帧图像在RGB三个通道的像素值进行均值和方差操作,使得像素值从0~255的范围内转变为-1~1的范围内。通过归一化处理,可以使目标视频的每帧图像满足手势识别模型对于图像格式的需求,便于后续利用手势识别模型进行手势识别。本申请实施例中将归一化处理后的目标视频记作归一化视频,将该归一化视频输入至训练后的手势识别模型,使得手势识别模型基于此而输出目标视频中的手势的类别信息、定位框信息以及关键定信息。In this embodiment of the present application, the normalization process may be to perform mean and variance operations on the pixel values of the three RGB channels in each frame of the target video, so that the pixel values are converted from a range of 0 to 255 to -1 to 1 In the range. Through normalization processing, each frame image of the target video can meet the requirements of the gesture recognition model for the image format, which facilitates the subsequent use of the gesture recognition model for gesture recognition. In the embodiment of the present application, the normalized target video is recorded as a normalized video, and the normalized video is input into the trained gesture recognition model, so that the gesture recognition model outputs the gesture recognition model in the target video based on this. Category information, positioning box information and key fixed information.
可选地,考虑到手势识别模型为多任务模型,能完成多种任务,因此,可以使手势识别模型包括手势分类分支、手势定位分支和关键点检测分支,其中每一分支相应地完成一种任务。Optionally, considering that the gesture recognition model is a multi-task model and can complete various tasks, the gesture recognition model can be made to include a gesture classification branch, a gesture localization branch and a key point detection branch, wherein each branch correspondingly completes a Task.
具体地,手势分类分支用于输出目标视频中的手势的类别信息。该手势分类分支的实现方式为对手势类别进行one-hot编码,利用softmax层输出手势类别的概率。通过手势分类分支,可以在至少一种预设手势中确定与目标视频中的手势匹配概率最高的目标预设手势,基于该目标预设手势确定目标视频中的手势的类别信息。例如,目标视频中包含未知手势X,在将该目标视频输入训练后的手势识别模型后,得到该手势X与预设手势A的匹配概率为14%,该手势X与预设手势B的匹配概率为85%,该手势X与预设手势C的匹配概率为1%,则可以确定预设手势B为目标预设手势,类别信息指示该未知手势X为预设手势B。Specifically, the gesture classification branch is used to output category information of gestures in the target video. The implementation of the gesture classification branch is to perform one-hot encoding on the gesture category, and use the softmax layer to output the probability of the gesture category. Through the gesture classification branch, a target preset gesture with the highest matching probability with the gesture in the target video can be determined among at least one preset gesture, and the category information of the gesture in the target video can be determined based on the target preset gesture. For example, the target video contains an unknown gesture X. After the target video is input into the trained gesture recognition model, the matching probability between the gesture X and the preset gesture A is 14%, and the matching probability between the gesture X and the preset gesture B is 14%. The probability is 85%, and the matching probability between the gesture X and the preset gesture C is 1%, then the preset gesture B can be determined as the target preset gesture, and the category information indicates that the unknown gesture X is the preset gesture B.
具体地,手势定位分支用于输出目标视频中的手势的定位框信息。通过手势定位分支,可以定位手势在目标视频中的位置,然后基于该位置确定目标视频中的手势的定位框信息。Specifically, the gesture positioning branch is used to output the positioning frame information of the gesture in the target video. Through the gesture positioning branch, the position of the gesture in the target video can be positioned, and then the positioning frame information of the gesture in the target video can be determined based on the position.
具体地,关键点检测分支用于输出目标视频中的手势的关键点信息。该关键点检测分支的实现方式为网络回归。通过该关键点检测分支,可以检测出目标视频中的手势的关键点的位置,然后基于该位置确定目标视频中的手势的关键点信息。Specifically, the keypoint detection branch is used to output keypoint information of gestures in the target video. The implementation of the keypoint detection branch is network regression. Through the key point detection branch, the position of the key point of the gesture in the target video can be detected, and then the key point information of the gesture in the target video can be determined based on the position.
可选地,手势识别模型还包括特征提取层(即BackBone网络),该特征提取层可以是深度残差网络(Deep residual network,ResNet),如ResNet50,也可以是shuffleNet和MobileNet等轻量级网络,具体选用何种网络作为特征提取层可以根据智能设备的性能确定,比如,如果智能设备为性能较强的台式电脑,可以选用ResNet50作为特征提取层,如果智能设备为性能较弱的手机,则可以选用MobileNet作为特征提取层。将目标视频输入手势识别模型后,通过该特征提取层可以对目标视频进行特征提取,从而得到目标视频的特征信息。请参阅图2,通过特征提取层得到目标视频的特征信息后,特征信息将会分别输入至手势分类分支、手势定位分支和关键点检测分支。然后手势分类分支可以基于特征信息输出目标视频中的手势的类别信息,手势定位分支可以基于特征信息输出目标视频中的手势的定位框信息,关键点检测分支可以基于特征信息输出目标视频中的手势的关键点信息。Optionally, the gesture recognition model further includes a feature extraction layer (ie BackBone network), which can be a deep residual network (ResNet), such as ResNet50, or a lightweight network such as shuffleNet and MobileNet. , which network to choose as the feature extraction layer can be determined according to the performance of the smart device. For example, if the smart device is a desktop computer with strong performance, ResNet50 can be selected as the feature extraction layer. If the smart device is a mobile phone with weak performance, then MobileNet can be selected as the feature extraction layer. After inputting the target video into the gesture recognition model, the feature extraction layer can perform feature extraction on the target video to obtain the feature information of the target video. Referring to Figure 2, after the feature information of the target video is obtained through the feature extraction layer, the feature information will be input to the gesture classification branch, the gesture localization branch and the key point detection branch respectively. Then the gesture classification branch can output the category information of the gesture in the target video based on the feature information, the gesture localization branch can output the positioning frame information of the gesture in the target video based on the feature information, and the key point detection branch can output the gesture in the target video based on the feature information. key point information.
可选地,手势分类分支、手势定位分支和关键点检测分支可以分别通过不同的损失函数训练得到。例如,在训练过程中,可以采用交叉熵损失函数对手势分类分支指导训练,采用GloU损失函数对手势定位分支指导训练,采用WingLoss损失函数对关键点检测分支指导训练。由于对不同的分支有针对性地采用不同的损失函数进行训练,可以使训练得到的分支的精确度更高。Optionally, the gesture classification branch, the gesture localization branch and the keypoint detection branch can be obtained by training with different loss functions respectively. For example, in the training process, the cross-entropy loss function can be used to guide the training of the gesture classification branch, the GloU loss function can be used to guide the training of the gesture location branch, and the WingLoss loss function can be used to guide the training of the key point detection branch. Since different branches are trained with different loss functions, the accuracy of the branches obtained by training can be higher.
可选地,在训练手势识别模型之前,还可以对样本手势图像进行增强处理,然后将使用增强处理后的样本手势图像对手势识别模型进行训练,从而使样本手势图像更加泛化,有利于手势识别模型的识别准确度的提高。其中,增强处理可以包括翻转和旋转等。Optionally, before training the gesture recognition model, the sample gesture images can also be enhanced, and then the enhanced sample gesture images are used to train the gesture recognition model, so that the sample gesture images are more generalized, which is beneficial to gestures. The recognition accuracy of the recognition model is improved. Among them, the enhancement processing may include flipping and rotation, etc.
可选地,在上述步骤102之后,还包括:Optionally, after the above step 102, it also includes:
基于目标视频中的手势的类别信息、定位框信息以及关键点信息,在目标视频中标示手势的类别、定位框和关键点;Based on the category information, positioning frame information and key point information of the gesture in the target video, mark the gesture category, positioning frame and key points in the target video;
输出标示有手势的类别、定位框和关键点的目标视频。Output a target video marked with the gesture's category, positioning box, and keypoints.
在本申请实施例中,手势识别模型输出目标视频中的手势的类别信息、定位框信息以及关键点信息后,可以基于目标视频中的手势的类别信息、定位框信息以及关键点信息,在目标视频中标示出手势的类别、定位框和关键点,然后输出标示有手势的类别、定位框和关键点的目标视频,以向用户展示该目标视频。用户在目标视频中,可以看到标示出的手势的类别、定位框和关键点,给用户带来更具视觉冲击力的体验感。In the embodiment of the present application, after the gesture recognition model outputs the category information, positioning frame information, and key point information of the gesture in the target video, it can be based on the category information, positioning frame information and key point information of the gesture in the target video. The category, positioning frame and key points of the gesture are marked in the video, and then a target video marked with the category, positioning frame and key points of the gesture is output to show the target video to the user. In the target video, users can see the categories, positioning boxes, and key points of the marked gestures, bringing users a more visually impactful experience.
示例性地,针对目标视频的每一帧手势图像,可以基于手势图像中的手势的类别信息在手势图像中标示手势的类别,基于手势图像中的手势的定位框信息在手势图像中标示手势的定位框,以及基于手势图像中的手势的关键点信息在手势图像中标示手势的关键点。其中,手势图像指的是包含手势的图像。可以理解的是,对于目标视频中的非手势图像, 将不会进行标示操作,其中,非手势图像指的是不包含手势的图像。Exemplarily, for each frame of the gesture image of the target video, the type of the gesture may be marked in the gesture image based on the type information of the gesture in the gesture image, and the type of the gesture may be marked in the gesture image based on the positioning frame information of the gesture in the gesture image. The positioning frame, and the key points of the gesture are marked in the gesture image based on the key point information of the gesture in the gesture image. The gesture image refers to an image containing gestures. It can be understood that, for the non-gesture images in the target video, no marking operation will be performed, wherein the non-gesture images refer to images that do not contain gestures.
在一种应用场景中,本申请实施例提供的手势识别方法可以应用在机器人上,机器人通过执行该手势识别方法,可以实现与用户进行猜拳游戏。具体地,机器人可以实时识别用户的手势属于石头、剪刀和布中的哪一种手势,进而确定机器人当前应该出石头、剪刀和布中的哪一种。In an application scenario, the gesture recognition method provided by the embodiment of the present application can be applied to a robot, and the robot can implement a guessing game with a user by executing the gesture recognition method. Specifically, the robot can recognize in real time which gesture of rock, scissors, and cloth the user's gesture belongs to, and then determine which of the rock, scissors, and cloth the robot should present.
由上可见,本申请方案中,在获取包含手势的目标视频后,将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息,其中,上述手势识别模型通过携带标注信息的样本手势图像进行训练得到,上述标注信息包括上述样本手势图像中的手势的类别信息、定位框信息和关键点信息。本申请方案采用携带标注信息的样本手势图像训练手势识别模型,由于标注信息包括多种手势信息(即类别信息、定位框信息和关键点信息),因此在训练手势识别模型的过程中,手势识别模型可以隐式地将该多种手势信息结合起来进行学习,从而使得训练得到的手势识别模型具有较高的准确性和鲁棒性。As can be seen from the above, in the solution of the present application, after obtaining the target video containing gestures, the above target video is input into the trained gesture recognition model, and the category information, positioning frame information and key point information of the gesture in the above target video are obtained, wherein The above-mentioned gesture recognition model is obtained by training sample gesture images carrying annotation information, and the above-mentioned annotation information includes gesture category information, positioning frame information and key point information in the above-mentioned sample gesture images. The solution of the present application uses the sample gesture images carrying the annotation information to train the gesture recognition model. Since the annotation information includes a variety of gesture information (ie category information, positioning frame information and key point information), in the process of training the gesture recognition model, the gesture recognition The model can implicitly combine the various gesture information for learning, so that the trained gesture recognition model has high accuracy and robustness.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
对应于前文所提出的手势识别方法,本申请实施例提供了一种手势识别装置。请参阅图3,本申请实施例中的手势识别装置300包括:Corresponding to the gesture recognition method proposed above, an embodiment of the present application provides a gesture recognition device. Referring to FIG. 3, the gesture recognition device 300 in the embodiment of the present application includes:
获取单元301,用于获取包含手势的目标视频;an acquisition unit 301, used to acquire a target video containing gestures;
识别单元302,用于将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息,其中,上述手势识别模型通过携带标注信息的样本手势图像进行训练得到,上述标注信息包括上述样本手势图像中的手势的类别信息、定位框信息和关键点信息。The identification unit 302 is configured to input the above-mentioned target video into a trained gesture recognition model, and obtain the category information, positioning frame information and key point information of the gesture in the above-mentioned target video, wherein the above-mentioned gesture recognition model uses sample gestures carrying label information The image is obtained by training, and the above-mentioned label information includes the category information, positioning frame information and key point information of the gesture in the above-mentioned sample gesture image.
可选地,上述手势识别装置300还包括:Optionally, the above gesture recognition apparatus 300 further includes:
标示单元,用于基于上述目标视频中的手势的类别信息、定位框信息以及关键点信息,在上述目标视频中标示手势的类别、定位框和关键点;a marking unit, configured to mark the category, positioning frame and key points of the gesture in the above-mentioned target video based on the category information, positioning frame information and key point information of the gesture in the above-mentioned target video;
输出单元,用于输出标示有手势的类别、定位框和关键点的上述目标视频。The output unit is used for outputting the above-mentioned target video marked with the category of the gesture, the positioning frame and the key points.
可选地,上述标示单元,具体针对上述目标视频的每一帧手势图像,基于上述手势图像中的手势的类别信息在上述手势图像中标示手势的类别,基于上述手势图像中的手势的定位框信息在上述手势图像中标示手势的定位框,以及基于上述手势图像中的手势的关键点信息在上述手势图像中标示手势的关键点,其中,上述手势图像为包含手势的图像。Optionally, the above-mentioned marking unit, specifically for each frame of the gesture image of the above-mentioned target video, marks the type of the gesture in the above-mentioned gesture image based on the category information of the gesture in the above-mentioned gesture image, based on the positioning frame of the gesture in the above-mentioned gesture image. The information indicates the positioning frame of the gesture in the gesture image, and indicates the key point of the gesture in the gesture image based on the key point information of the gesture in the gesture image, wherein the gesture image is an image including the gesture.
可选地,上述手势识别模型包括手势分类分支、手势定位分支和关键点检测分支;Optionally, the above gesture recognition model includes a gesture classification branch, a gesture positioning branch and a key point detection branch;
上述手势分类分支用于输出上述目标视频中的手势的类别信息;The above-mentioned gesture classification branch is used to output the category information of gestures in the above-mentioned target video;
上述手势定位分支用于输出上述目标视频中的手势的定位框信息;The above-mentioned gesture positioning branch is used to output the positioning frame information of the gesture in the above-mentioned target video;
上述关键点检测分支用于输出上述目标视频中的手势的关键点信息。The above-mentioned key point detection branch is used to output the key point information of the gesture in the above-mentioned target video.
可选地,上述手势识别模型还包括特征提取层,用于对上述目标视频进行特征提取,得到特征信息;Optionally, the above-mentioned gesture recognition model further includes a feature extraction layer, which is used to perform feature extraction on the above-mentioned target video to obtain feature information;
上述手势分类分支具体用于基于上述特征信息输出上述目标视频中的手势的类别信息;The above-mentioned gesture classification branch is specifically configured to output the category information of gestures in the above-mentioned target video based on the above-mentioned feature information;
上述手势定位分支具体用于基于上述特征信息输出上述目标视频中的手势的定位框信息;The above-mentioned gesture positioning branch is specifically configured to output the positioning frame information of the gesture in the above-mentioned target video based on the above-mentioned feature information;
上述关键点检测分支具体用于基于上述特征信息输出上述目标视频中的手势的关键点信息。The above-mentioned key point detection branch is specifically configured to output the key point information of the gesture in the above-mentioned target video based on the above-mentioned feature information.
可选地,上述手势分类分支、上述手势定位分支和上述关键点检测分支分别通过不同的损失函数训练得到。Optionally, the above-mentioned gesture classification branch, the above-mentioned gesture localization branch, and the above-mentioned key point detection branch are respectively obtained by training with different loss functions.
可选地,上述手势识别装置300还包括:Optionally, the above gesture recognition apparatus 300 further includes:
归一化单元,用于对上述目标视频的每帧图像进行归一化处理,得到归一化视频;a normalization unit, which is used to normalize each frame of the above-mentioned target video to obtain a normalized video;
相应地,上述识别单元302,具体用于将上述归一化视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息。Correspondingly, the above-mentioned recognition unit 302 is specifically configured to input the above-mentioned normalized video into the trained gesture recognition model, and obtain the category information, positioning frame information and key point information of the gesture in the above-mentioned target video.
由上可见,本申请方案中,在获取包含手势的目标视频后,将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息,其中,上述手势识别模型通过携带标注信息的样本手势图像进行训练得到,上述标注信息包括上述样本手势图像中的手势的类别信息、定位框信息和关键点信息。本申请方案采用携带标注信息的样本手势图像训练手势识别模型,由于标注信息包括多种手势信息(即类别信息、定位框信息和关键点信息),因此在训练手势识别模型的过程中,手势识别模型可以隐式地将该多种手势信息结合起来进行学习,从而使得训练得到的手势识别模型具有较高的准确性和鲁棒性。As can be seen from the above, in the solution of the present application, after obtaining the target video containing gestures, the above target video is input into the trained gesture recognition model, and the category information, positioning frame information and key point information of the gesture in the above target video are obtained, wherein The above-mentioned gesture recognition model is obtained by training sample gesture images carrying annotation information, and the above-mentioned annotation information includes gesture category information, positioning frame information and key point information in the above-mentioned sample gesture images. The solution of the present application uses the sample gesture images carrying the annotation information to train the gesture recognition model. Since the annotation information includes a variety of gesture information (ie category information, positioning frame information and key point information), in the process of training the gesture recognition model, the gesture recognition The model can implicitly combine the various gesture information for learning, so that the trained gesture recognition model has high accuracy and robustness.
本申请实施例还提供了一种智能设备,该智能设备可以是机器人、手机、台式电脑或平板电脑,此处不作限定。请参阅图4,本申请实施例中的智能设备4包括:存储器401,一个或多个处理器402(图4中仅示出一个)、双目摄像头403及存储在存储器401上并可在处理器上运行的计算机程序。其中,双目摄像头403包括第一摄像头及第二摄像头;存储器401用于存储软件程序以及单元,处理器402通过运行存储在存储器401的软件程序以及单元,从而执行各种功能应用以及数据处理,以获取上述预设事件对应的资源。具体地,处理器402通过运行存储在存储器401的上述计算机程序时实现以下步骤:The embodiment of the present application also provides a smart device, and the smart device may be a robot, a mobile phone, a desktop computer, or a tablet computer, which is not limited here. Referring to FIG. 4 , the smart device 4 in this embodiment of the present application includes: a memory 401 , one or more processors 402 (only one is shown in FIG. 4 ), a binocular camera 403 , and a binocular camera 403 , which is stored in the memory 401 and can be processed during processing. computer program running on the device. The binocular camera 403 includes a first camera and a second camera; the memory 401 is used to store software programs and units, and the processor 402 executes various functional applications and data processing by running the software programs and units stored in the memory 401, to obtain the resources corresponding to the above preset events. Specifically, the processor 402 implements the following steps by running the above-mentioned computer program stored in the memory 401:
获取包含手势的目标视频;Get the target video that contains the gesture;
将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、 定位框信息以及关键点信息,其中,上述手势识别模型通过携带标注信息的样本手势图像进行训练得到,上述标注信息包括上述样本手势图像中的手势的类别信息、定位框信息和关键点信息。Input the above-mentioned target video into the trained gesture recognition model, and obtain the category information, positioning frame information and key point information of the gesture in the above-mentioned target video, wherein the above-mentioned gesture recognition model is obtained by training the sample gesture images carrying the annotation information, and the above-mentioned The annotation information includes the category information, positioning frame information, and key point information of the gesture in the above-mentioned sample gesture image.
假设上述为第一种可能的实施方式,则在第一种可能的实施方式作为基础而提供的第二种可能的实施方式中,在上述将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息之后,处理器402通过运行存储在存储器401的上述计算机程序时还实现以下步骤:Assuming that the above is the first possible implementation, in the second possible implementation provided based on the first possible implementation, the above-mentioned target video is input into the trained gesture recognition model to obtain the above-mentioned After the category information, positioning frame information and key point information of the gesture in the target video, the processor 402 also implements the following steps by running the above computer program stored in the memory 401:
基于上述目标视频中的手势的类别信息、定位框信息以及关键点信息,在上述目标视频中标示手势的类别、定位框和关键点;Based on the category information, positioning frame information and key point information of the gesture in the above target video, the category, positioning frame and key points of the gesture are marked in the above target video;
输出标示有手势的类别、定位框和关键点的上述目标视频。Output the above target video marked with the category of the gesture, the positioning box and the key points.
在上述第二种可能的实施方式作为基础而提供的第三种可能的实施方式中,上述基于上述目标视频中的手势的类别信息、定位框信息以及关键点信息,在上述目标视频中标示手势的类别、定位框和关键点,包括:In the third possible implementation manner provided on the basis of the above-mentioned second possible implementation manner, the above-mentioned gesture is marked in the above-mentioned target video based on the category information, positioning frame information and key point information of the gesture in the above-mentioned target video categories, anchor boxes, and keypoints, including:
针对上述目标视频的每一帧手势图像,基于上述手势图像中的手势的类别信息在上述手势图像中标示手势的类别,基于上述手势图像中的手势的定位框信息在上述手势图像中标示手势的定位框,以及基于上述手势图像中的手势的关键点信息在上述手势图像中标示手势的关键点,其中,上述手势图像为包含手势的图像。For each frame of the gesture image in the target video, the type of the gesture is marked in the gesture image based on the type information of the gesture in the gesture image, and the type of the gesture is marked in the gesture image based on the positioning frame information of the gesture in the gesture image. The positioning frame, and marking the key points of the gesture in the gesture image based on the key point information of the gesture in the gesture image, wherein the gesture image is an image including the gesture.
在上述第一种可能的实施方式作为基础而提供的第四种可能的实施方式中,上述手势识别模型包括手势分类分支、手势定位分支和关键点检测分支;In a fourth possible implementation manner provided on the basis of the above-mentioned first possible implementation manner, the above-mentioned gesture recognition model includes a gesture classification branch, a gesture localization branch, and a key point detection branch;
上述手势分类分支用于输出上述目标视频中的手势的类别信息;The above-mentioned gesture classification branch is used to output the category information of gestures in the above-mentioned target video;
上述手势定位分支用于输出上述目标视频中的手势的定位框信息;The above-mentioned gesture positioning branch is used to output the positioning frame information of the gesture in the above-mentioned target video;
上述关键点检测分支用于输出上述目标视频中的手势的关键点信息。The above-mentioned key point detection branch is used to output the key point information of the gesture in the above-mentioned target video.
在上述第四种可能的实施方式作为基础而提供的第五种可能的实施方式中,上述手势识别模型还包括特征提取层,用于对上述目标视频进行特征提取,得到特征信息;In the fifth possible implementation manner provided on the basis of the above-mentioned fourth possible implementation manner, the above-mentioned gesture recognition model further includes a feature extraction layer, which is used to perform feature extraction on the above-mentioned target video to obtain characteristic information;
上述手势分类分支具体用于基于上述特征信息输出上述目标视频中的手势的类别信息;The above-mentioned gesture classification branch is specifically configured to output the category information of gestures in the above-mentioned target video based on the above-mentioned feature information;
上述手势定位分支具体用于基于上述特征信息输出上述目标视频中的手势的定位框信息;The above-mentioned gesture positioning branch is specifically configured to output the positioning frame information of the gesture in the above-mentioned target video based on the above-mentioned feature information;
上述关键点检测分支具体用于基于上述特征信息输出上述目标视频中的手势的关键点信息。The above-mentioned key point detection branch is specifically configured to output the key point information of the gesture in the above-mentioned target video based on the above-mentioned feature information.
在上述第四种可能的实施方式作为基础而提供的第六种可能的实施方式中,上述手势分类分支、上述手势定位分支和上述关键点检测分支分别通过不同的损失函数训练得到。In the sixth possible implementation manner provided based on the fourth possible implementation manner, the gesture classification branch, the gesture localization branch, and the key point detection branch are respectively obtained by training with different loss functions.
在上述第一种可能的实施方式作为基础,或上述第二种可能的实施方式作为基础,或上述第三种可能的实施方式作为基础,或上述第四种可能的实施方式作为基础,或上述第五种可能的实施方式作为基础,或上述第六种可能的实施方式作为基础而提供的第七种可能的实施方式中,在上述将上述目标视频输入训练后的手势识别模型之前,处理器402通过运行存储在存储器401的上述计算机程序时还实现以下步骤:On the basis of the above-mentioned first possible implementation manner, or the above-mentioned second possible implementation manner as a basis, or the above-mentioned third possible implementation manner as a basis, or the above-mentioned fourth possible implementation manner as a basis, or the above-mentioned In the fifth possible implementation manner as a basis, or in the seventh possible implementation manner provided on the basis of the sixth possible implementation manner, before the above-mentioned target video is input into the trained gesture recognition model, the processor 402 also implements the following steps by running the above-mentioned computer program stored in the memory 401:
对上述目标视频的每帧图像进行归一化处理,得到归一化视频;Normalize each frame of the target video to obtain a normalized video;
相应地,上述将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息,包括:Correspondingly, the above-mentioned target video is input into the trained gesture recognition model, and the category information, positioning frame information and key point information of the gesture in the above-mentioned target video are obtained, including:
将上述归一化视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息。The above normalized video is input into the trained gesture recognition model, and the category information, positioning frame information and key point information of the gesture in the target video are obtained.
应当理解,在本申请实施例中,所称处理器402可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in this embodiment of the present application, the processor 402 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP) , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
存储器401可以包括只读存储器和随机存取存储器,并向处理器402提供指令和数据。存储器401的一部分或全部还可以包括非易失性随机存取存储器。例如,存储器401还可以存储设备类别的信息。 Memory 401 may include read-only memory and random access memory, and provides instructions and data to processor 402 . Part or all of memory 401 may also include non-volatile random access memory. For example, the memory 401 may also store information of device categories.
由上可见,本申请方案中,在获取包含手势的目标视频后,将上述目标视频输入训练后的手势识别模型,得到上述目标视频中的手势的类别信息、定位框信息以及关键点信息,其中,上述手势识别模型通过携带标注信息的样本手势图像进行训练得到,上述标注信息包括上述样本手势图像中的手势的类别信息、定位框信息和关键点信息。本申请方案采用携带标注信息的样本手势图像训练手势识别模型,由于标注信息包括多种手势信息(即类别信息、定位框信息和关键点信息),因此在训练手势识别模型的过程中,手势识别模型可以隐式地将该多种手势信息结合起来进行学习,从而使得训练得到的手势识别模型具有较高的准确性和鲁棒性。As can be seen from the above, in the solution of the present application, after obtaining the target video containing gestures, the above target video is input into the trained gesture recognition model, and the category information, positioning frame information and key point information of the gesture in the above target video are obtained, wherein The above-mentioned gesture recognition model is obtained by training sample gesture images carrying annotation information, and the above-mentioned annotation information includes gesture category information, positioning frame information and key point information in the above-mentioned sample gesture images. The solution of the present application uses the sample gesture images carrying the annotation information to train the gesture recognition model. Since the annotation information includes a variety of gesture information (ie category information, positioning frame information and key point information), in the process of training the gesture recognition model, the gesture recognition The model can implicitly combine the various gesture information for learning, so that the trained gesture recognition model has high accuracy and robustness.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将上述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成 的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the above device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者外部设备软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,上述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the system embodiments described above are only illustrative. For example, the division of the above-mentioned modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined. Either it can be integrated into another system, or some features can be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关联的硬件来完成,上述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,上述计算机程序包括计算机程序代码,上述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。上述计算机可读存储介质可以包括:能够携带上述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机可读存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,上述计算机可读存储介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读存储介质不包括是电载波信号和电信信号。If the above-mentioned integrated units are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the associated hardware through a computer program, and the above computer program can be stored in a computer-readable storage medium, the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code may be in the form of source code, object code form, executable file or some intermediate form. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer-readable memory, a read-only memory (ROM, Read-Only Memory) ), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the above-mentioned computer-readable storage media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer-readable storage Excluded from the medium are electrical carrier signals and telecommunication signals.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in the application. within the scope of protection.

Claims (10)

  1. 一种手势识别方法,其特征在于,包括:A gesture recognition method, comprising:
    获取包含手势的目标视频;Get the target video that contains the gesture;
    将所述目标视频输入训练后的手势识别模型,得到所述目标视频中的手势的类别信息、定位框信息以及关键点信息,其中,所述手势识别模型通过携带标注信息的样本手势图像进行训练得到,所述标注信息包括所述样本手势图像中的手势的类别信息、定位框信息和关键点信息。Input the target video into the trained gesture recognition model, and obtain the category information, positioning frame information and key point information of the gesture in the target video, wherein the gesture recognition model is trained by the sample gesture images carrying the annotation information It is obtained that the annotation information includes category information, positioning frame information and key point information of the gesture in the sample gesture image.
  2. 根据权利要求1所述的手势识别方法,其特征在于,在所述将所述目标视频输入训练后的手势识别模型,得到所述目标视频中的手势的类别信息、定位框信息以及关键点信息之后,还包括:The gesture recognition method according to claim 1, wherein after inputting the target video into the trained gesture recognition model, the category information, positioning frame information and key point information of the gesture in the target video are obtained After that, also include:
    基于所述目标视频中的手势的类别信息、定位框信息以及关键点信息,在所述目标视频中标示手势的类别、定位框和关键点;Based on the category information, positioning frame information and key point information of the gesture in the target video, marking the gesture category, positioning frame and key point in the target video;
    输出标示有手势的类别、定位框和关键点的所述目标视频。Output the target video marked with the category of the gesture, the positioning box and the key points.
  3. 根据权利要求2所述的手势识别方法,其特征在于,所述基于所述目标视频中的手势的类别信息、定位框信息以及关键点信息,在所述目标视频中标示手势的类别、定位框和关键点,包括:The gesture recognition method according to claim 2, wherein the gesture category and the positioning frame are marked in the target video based on the category information, positioning frame information and key point information of the gesture in the target video. and key points, including:
    针对所述目标视频的每一帧手势图像,基于所述手势图像中的手势的类别信息在所述手势图像中标示手势的类别,基于所述手势图像中的手势的定位框信息在所述手势图像中标示手势的定位框,以及基于所述手势图像中的手势的关键点信息在所述手势图像中标示手势的关键点,其中,所述手势图像为包含手势的图像。For each frame of the gesture image of the target video, the type of the gesture is marked in the gesture image based on the type information of the gesture in the gesture image, and the gesture type is marked in the gesture image based on the positioning frame information of the gesture in the gesture image. The positioning frame of the gesture is marked in the image, and the key point of the gesture is marked in the gesture image based on the key point information of the gesture in the gesture image, wherein the gesture image is an image containing the gesture.
  4. 根据权利要求1所述的手势识别方法,其特征在于,所述手势识别模型包括手势分类分支、手势定位分支和关键点检测分支;The gesture recognition method according to claim 1, wherein the gesture recognition model comprises a gesture classification branch, a gesture localization branch and a key point detection branch;
    所述手势分类分支用于输出所述目标视频中的手势的类别信息;The gesture classification branch is used to output category information of gestures in the target video;
    所述手势定位分支用于输出所述目标视频中的手势的定位框信息;The gesture positioning branch is used to output the positioning frame information of the gesture in the target video;
    所述关键点检测分支用于输出所述目标视频中的手势的关键点信息。The key point detection branch is used to output the key point information of the gesture in the target video.
  5. 根据权利要求4所述的手势识别方法,其特征在于,所述手势识别模型还包括特征提取层,用于对所述目标视频进行特征提取,得到特征信息;The gesture recognition method according to claim 4, wherein the gesture recognition model further comprises a feature extraction layer for performing feature extraction on the target video to obtain feature information;
    所述手势分类分支具体用于基于所述特征信息输出所述目标视频中的手势的类别信息;The gesture classification branch is specifically configured to output category information of gestures in the target video based on the feature information;
    所述手势定位分支具体用于基于所述特征信息输出所述目标视频中的手势的定位框信息;The gesture positioning branch is specifically configured to output the positioning frame information of the gesture in the target video based on the feature information;
    所述关键点检测分支具体用于基于所述特征信息输出所述目标视频中的手势的关键点信息。The key point detection branch is specifically configured to output the key point information of the gesture in the target video based on the feature information.
  6. 根据权利要求4所述的手势识别方法,其特征在于,所述手势分类分支、所述手势定位分支和所述关键点检测分支分别通过不同的损失函数训练得到。The gesture recognition method according to claim 4, wherein the gesture classification branch, the gesture localization branch and the key point detection branch are respectively obtained by training with different loss functions.
  7. 根据权利要求1-6任一项所述的手势识别方法,其特征在于,在所述将所述目标视频输入训练后的手势识别模型之前,还包括:The gesture recognition method according to any one of claims 1-6, wherein before the inputting the target video into the trained gesture recognition model, further comprising:
    对所述目标视频的每帧图像进行归一化处理,得到归一化视频;Normalize each frame of the target video to obtain a normalized video;
    相应地,所述将所述目标视频输入训练后的手势识别模型,得到所述目标视频中的手势的类别信息、定位框信息以及关键点信息,包括:Correspondingly, inputting the target video into the trained gesture recognition model to obtain the category information, positioning frame information and key point information of the gesture in the target video, including:
    将所述归一化视频输入训练后的手势识别模型,得到所述目标视频中的手势的类别信息、定位框信息以及关键点信息。The normalized video is input into the trained gesture recognition model, and the category information, positioning frame information and key point information of the gesture in the target video are obtained.
  8. 一种手势识别装置,其特征在于,包括:A gesture recognition device, comprising:
    获取单元,用于获取包含手势的目标视频;an acquisition unit for acquiring a target video containing gestures;
    识别单元,用于将所述目标视频输入训练后的手势识别模型,得到所述目标视频中的手势的类别信息、定位框信息以及关键点信息,其中,所述手势识别模型通过携带标注信息的样本手势图像进行训练得到,所述标注信息包括所述样本手势图像中的手势的类别信息、定位框信息和关键点信息。The recognition unit is used to input the target video into the trained gesture recognition model, and obtain the category information, positioning frame information and key point information of the gesture in the target video, wherein the gesture recognition model is obtained by carrying the annotation information. The sample gesture image is obtained by training, and the annotation information includes the category information, positioning frame information and key point information of the gesture in the sample gesture image.
  9. 一种智能设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述的方法。An intelligent device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the computer program, the computer program according to claim 1 to 7. The method of any one.
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的方法。A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
PCT/CN2021/124613 2021-02-21 2021-10-19 Gesture recognition method, gesture recognition apparatus, and smart device WO2022174605A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110194549.9A CN112949437A (en) 2021-02-21 2021-02-21 Gesture recognition method, gesture recognition device and intelligent equipment
CN202110194549.9 2021-02-21

Publications (1)

Publication Number Publication Date
WO2022174605A1 true WO2022174605A1 (en) 2022-08-25

Family

ID=76244979

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/124613 WO2022174605A1 (en) 2021-02-21 2021-10-19 Gesture recognition method, gesture recognition apparatus, and smart device

Country Status (2)

Country Link
CN (1) CN112949437A (en)
WO (1) WO2022174605A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112949437A (en) * 2021-02-21 2021-06-11 深圳市优必选科技股份有限公司 Gesture recognition method, gesture recognition device and intelligent equipment
CN113407083A (en) * 2021-06-24 2021-09-17 上海商汤科技开发有限公司 Data labeling method and device, electronic equipment and storage medium
CN114155562A (en) * 2022-02-09 2022-03-08 北京金山数字娱乐科技有限公司 Gesture recognition method and device
CN117409473A (en) * 2022-07-04 2024-01-16 北京字跳网络技术有限公司 Multitasking prediction method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2980728A1 (en) * 2014-08-01 2016-02-03 Imersivo, S.L. Procedure for identifying a hand gesture
CN108229318A (en) * 2017-11-28 2018-06-29 北京市商汤科技开发有限公司 The training method and device of gesture identification and gesture identification network, equipment, medium
CN110796096A (en) * 2019-10-30 2020-02-14 北京达佳互联信息技术有限公司 Training method, device, equipment and medium for gesture recognition model
CN111104820A (en) * 2018-10-25 2020-05-05 中车株洲电力机车研究所有限公司 Gesture recognition method based on deep learning
CN112949437A (en) * 2021-02-21 2021-06-11 深圳市优必选科技股份有限公司 Gesture recognition method, gesture recognition device and intelligent equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229324B (en) * 2017-11-30 2021-01-26 北京市商汤科技开发有限公司 Gesture tracking method and device, electronic equipment and computer storage medium
CN109063653A (en) * 2018-08-07 2018-12-21 北京字节跳动网络技术有限公司 Image processing method and device
CN109359538B (en) * 2018-09-14 2020-07-28 广州杰赛科技股份有限公司 Training method of convolutional neural network, gesture recognition method, device and equipment
CN109657537A (en) * 2018-11-05 2019-04-19 北京达佳互联信息技术有限公司 Image-recognizing method, system and electronic equipment based on target detection
CN111126339A (en) * 2019-12-31 2020-05-08 北京奇艺世纪科技有限公司 Gesture recognition method and device, computer equipment and storage medium
CN111857356B (en) * 2020-09-24 2021-01-22 深圳佑驾创新科技有限公司 Method, device, equipment and storage medium for recognizing interaction gesture

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2980728A1 (en) * 2014-08-01 2016-02-03 Imersivo, S.L. Procedure for identifying a hand gesture
CN108229318A (en) * 2017-11-28 2018-06-29 北京市商汤科技开发有限公司 The training method and device of gesture identification and gesture identification network, equipment, medium
CN111104820A (en) * 2018-10-25 2020-05-05 中车株洲电力机车研究所有限公司 Gesture recognition method based on deep learning
CN110796096A (en) * 2019-10-30 2020-02-14 北京达佳互联信息技术有限公司 Training method, device, equipment and medium for gesture recognition model
CN112949437A (en) * 2021-02-21 2021-06-11 深圳市优必选科技股份有限公司 Gesture recognition method, gesture recognition device and intelligent equipment

Also Published As

Publication number Publication date
CN112949437A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
WO2022174605A1 (en) Gesture recognition method, gesture recognition apparatus, and smart device
CN109359538B (en) Training method of convolutional neural network, gesture recognition method, device and equipment
CN109902659B (en) Method and apparatus for processing human body image
WO2020207190A1 (en) Three-dimensional information determination method, three-dimensional information determination device, and terminal apparatus
WO2018028546A1 (en) Key point positioning method, terminal, and computer storage medium
WO2020143330A1 (en) Facial image capturing method, computer-readable storage medium and terminal device
WO2020024484A1 (en) Method and device for outputting data
CN112052186B (en) Target detection method, device, equipment and storage medium
WO2018170663A1 (en) Method and device for annotating image, and electronic apparatus
WO2023010758A1 (en) Action detection method and apparatus, and terminal device and storage medium
WO2021082692A1 (en) Pedestrian picture labeling method and device, storage medium, and intelligent apparatus
WO2020029466A1 (en) Image processing method and apparatus
Vazquez-Fernandez et al. Built-in face recognition for smart photo sharing in mobile devices
CN113011403B (en) Gesture recognition method, system, medium and device
CN111832449A (en) Engineering drawing display method and related device
CN111080670A (en) Image extraction method, device, equipment and storage medium
US20200211413A1 (en) Method, apparatus and terminal device for constructing parts together
CN111290684A (en) Image display method, image display device and terminal equipment
AU2021333957A1 (en) Information display method and device, and storage medium
CN109981989B (en) Method and device for rendering image, electronic equipment and computer readable storage medium
CN113128368B (en) Method, device and system for detecting character interaction relationship
KR20230051704A (en) Text input method and device based on virtual keyboard
CN111722700A (en) Man-machine interaction method and man-machine interaction equipment
CN110321009B (en) AR expression processing method, device, equipment and storage medium
WO2023197648A1 (en) Screenshot processing method and apparatus, electronic device, and computer readable medium

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: 21926319

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21926319

Country of ref document: EP

Kind code of ref document: A1