Learning device, learning method, and program
The learning device addresses the limitation of unidirectional human motion prediction by using data masking and loss function calculation to update model weights, resulting in a more accurate bidirectional model for human motion prediction.
Patent Information
- Application Number
- JP2023520718
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-05-14
- Publication Date
- 2024-09-26
- Estimated Expiration
- 2041-05-14
AI Technical Summary
Existing learning models, such as Non-Patent Document 1, fail to account for bidirectional relationships between preceding and succeeding movements in human motion prediction, limiting their versatility.
A learning device comprising a data processing unit that masks human motion data and a pre-learning unit that calculates a loss function from prediction errors to update model weights, enabling a pre-learning model to consider relationships between previous and subsequent actions.
The solution allows for a highly versatile pre-learning model that effectively learns bidirectional relationships in human motion, enhancing prediction accuracy.
Smart Images

Figure 0007556461000002 
Figure 0007556461000008 
Figure 0007556461000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a learning device, an estimation device, a learning method, an estimation method, and a program for learning a model. [Background technology]
[0002] An example of a conventional technique for predicting human movements is given in Non-Patent Document 1. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] Yujun Cai et al., "Learning Progressive Joint Propagation for Human Motion Prediction", Computer Vision -ECCV 2020, 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part VII, pp. 226-242 Summary of the Invention [Problem to be solved by the invention]
[0004] Non-Patent Document 1 considers only unidirectional relationships in time, and is unable to learn the relationships between previous and subsequent actions, which are important when dealing with human actions.
[0005] Therefore, an object of the present invention is to provide a learning device capable of learning a highly versatile pre-learning model that takes into account the relationship between previous and subsequent actions. [Means for solving the problem]
[0006] The learning device of the present invention includes a data processing unit and a pre-learning unit.
[0007] The data processing unit acquires human motion data and masks the entire data at an arbitrary time group of the human motion data. The pre-learning unit calculates a loss function from an error between a true value and predicted data, which is data obtained by predicting the masked data using a pre-learning model, and learns the pre-learning model by updating the weights of the pre-learning model. Effect of the Invention
[0008] According to the learning device of the present invention, it is possible to learn a highly versatile pre-learning model that takes into account the relationship between previous and subsequent actions. [Brief description of the drawings]
[0009] [Figure 1] FIG. 2 is a block diagram showing the functional configuration of a learning device, a fine tuning device, and an estimation device according to the first embodiment. [Diagram 2] 4 is a flowchart showing the operations of the learning device, the fine tuning device, and the estimation device according to the first embodiment. [Diagram 3] FIG. 2 is a block diagram showing the functional configuration of a data processing unit of the learning device according to the first embodiment. [Figure 4] 4 is a flowchart showing the operation of a data processing unit of the learning device according to the first embodiment. [Diagram 5] FIG. 1 is a diagram illustrating human motion data, masks, and tokens. [Figure 6] 6 is a diagram illustrating an example of a feature vector after embedding processing generated by the data processing unit; [Figure 7] FIG. 2 is a block diagram showing the functional configuration of a pre-learning unit of the learning device according to the first embodiment. [Figure 8] 4 is a flowchart showing the operation of a pre-learning unit of the learning device according to the first embodiment. [Figure 9] FIG. 2 is a diagram showing an example of the functional configuration of a computer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, an embodiment of the present invention will be described in detail. Note that components having the same functions are given the same reference numbers and duplicated explanations will be omitted. EXAMPLES
[0011] Hereinafter, the functional configurations of the learning device 1, the fine tuning device 2, and the estimation device 3 according to the first embodiment will be described with reference to FIG.
[0012] <Learning device 1> As shown in the figure, the learning device 1 of this embodiment includes a data processing unit 11, a pre-learning unit 12, and a pre-learning model database 13.
[0013] The data processing unit 11 acquires human motion data as pre-learning data, masks the entire data at an arbitrary time group of the human motion data, and replaces a portion of the human motion data with a corresponding portion of other human motion data (S11). Human motion data generally includes human posture information (such as the coordinates and joint angles of each joint, and bone lengths), but the data format is not limited. When the human motion data includes joint information, the number of joints can be set arbitrarily.
[0014] The pre-learning unit 12 calculates a loss function from the error between the predicted data, which is data predicted by the pre-learning model for the data to be masked, and the true value, updates the weights of the pre-learning model, calculates a loss function from the error between the result of predicting whether the human motion data is continuous or discontinuous using the pre-learning model, and the true value, updates the weights of the pre-learning model, and learns the pre-learning model (S12).
[0015] The pre-trained model database 13 stores the trained pre-trained model (S13).
[0016] <Fine tuning device 2> The fine tuning device 2 includes a pre-trained model database 21, a fine tuning unit 22, and a fine tuning model database 23.
[0017] The pre-learned model database 21 stores the pre-learned model learned by the learning device 1 (S21).
[0018] The fine-tuning unit 22 updates the pre-learned model learned by the learning device 1 with fine-tuning data corresponding to the task to obtain a fine-tuning model (S22). The fine-tuning data depends on the task to be fine-tuned. For example, in the case of a classification task of human motion, the fine-tuning data is a pair of human motion data and a label for each data. In this case, the fine-tuning unit 22 predicts a class distribution using the human motion data as an input of the model, calculates a cross-entropy error with the true value label, updates the weights, and outputs the weights of the network. The fine-tuning model database 23 stores the learned fine-tuning model.
[0019] <Estimation device 3> The estimation device 3 includes a fine-tuning model database 31 and an estimation unit 32 .
[0020] The fine tuning model database 31 stores the fine tuning models learned by the fine tuning device 2.
[0021] The estimation unit 32 acquires input data with unknown labels (for example, in the case of a human motion classification task, only human motion data), estimates a class distribution based on a fine-tuning model, and outputs an estimated label (estimated value) (S32).
[0022] Hereinafter, the detailed functional configuration and detailed operation of the data processing unit 11 of the learning device 1 will be described with reference to FIGS.
[0023] <Learning device 1, data processing unit 11, S11> As shown in FIG. 3, the data processing unit 11 includes a motion replacement unit 111, a mask replacement unit 112, and a token insertion unit 113.
[0024] The motion replacement unit 111 divides the input human motion data into a first half (motion A) and a second half (motion B), and replaces the second half (motion B) with another motion data in the data set with a predetermined probability (e.g., 50%) (S111). An example of division into motion A and motion B is shown in FIG.
[0025] The mask replacement unit 112 replaces a predetermined percentage of the input human motion data (for example, 15% of the data) with a mask (S112).
[0026] The token insertion unit 113 inserts a token into the human motion data (S113). Examples of tokens include [CLS] and [SEP]. As shown in FIG. 5, the token insertion unit 113 inserts [CLS] at the beginning of the human motion data, [SEP] between motions A and B, and [SEP] at the end of the human motion data. t are expressed in terms of the number of joints × degrees of freedom.
[0027] The data processing unit 11 performs embedding on the data after the processes in steps S111 to S113, and outputs the sum of the vectors after the embedding process.
[0028] The data processing unit 11 executes the following steps 1 to 4 as the embedding process.
[0029] <1. Pose Embedding> This process corresponds to Token Embedding in BERT. Pose Embedding plays a role of embedding a pose (input) in a feature space. The data processing unit 11 converts the data into a feature vector with an arbitrary number of dimensions. Any method of conversion may be used. For example, the data processing unit 11 may convert the data into a desired number of dimensions using any DNN. <2. Position Embedding> Position Embedding serves to embed the order of each Pose. For example, the data processing unit 11 provides scalar values such as 0, 1, 2, 3, 4, 5, ..., 9 as the position of each Pose, and converts this into a feature vector with an arbitrary number of dimensions. Any method of conversion may be used. For example, the data processing unit 11 may convert the above data into a desired number of dimensions using any DNN. <3.Segment Embedding> Segment Embedding serves to embed the classification of motion (A or B). For example, the data processing unit 11 may assign 0 to motion A and 1 to motion B (0,0,0,0,0,1,1,1,1,1). The data processing unit 11 converts this data into a feature vector with an arbitrary number of dimensions. Any method of conversion may be used. The data processing unit 11 may convert the data into a desired number of dimensions using any DNN.
[0030] <4. Token Embedding> Token Embedding plays a role in allowing the model to identify which input is which token when all tokens have the same value. Also, for example, when [MASK] is linearly interpolated, it allows the model to identify whether it is a normal Pose that is not [MASK] or [MASK]. For example, the data processing unit 11 gives values such as 0 to [CLS], 1 to [SEP], 2 to [MASK], and 3 to [POSE], and converts this data into a feature vector with an arbitrary number of dimensions. Any method of conversion may be used. The data processing unit 11 may convert the data into a desired number of dimensions using any DNN.
[0031] In order to handle [CLS], [SEP], and [MASK] in the Human Motion task, it is preferable for the data processing unit 11 to perform data processing in one of the following four patterns: The values of [CLS], [SEP], and [MASK] are each defined in advance.
[0032] <Pattern 1> For example, if a pose is expressed in three dimensions with one joint and three degrees of freedom, values such as [CLS] = [0,0,0], [SEP] = [1,0,2], and [MASK] = [2,2,2] are used. Any value can be used, but a different value should be used for each token. It is desirable that the value does not exist in the input data so that the model can distinguish between input data and tokens. For example, if the input data contains [1,0,2], the token should use a value other than that.
[0033] <Pattern 2> Fill [CLS], [SEP], and [MASK] with the same value and add Token Embedding. For example, if the Pose is expressed in 3D with 1 joint and 3 degrees of freedom, use values such as [CLS]=[0,0,0], [SEP]=[0,0,0], and [MASK]=[0,0,0]. Any value can be used, but it is preferable to use values that do not exist in the input data. Tokens are identified using the Token Embedding described above.
[0034] <Pattern 3> The values of [CLS] and [SEP] are defined in advance (same as in Pattern 1), and [MASK] is linearly interpolated from the values of the previous and next poses. Token Embedding is then added. [CLS] and [SEP] are the same as in Pattern 1. For example, in the case of [MASK], if the pose is expressed in 3D with 1 joint and 3 degrees of freedom, the pose at time t is replaced with [MASK], and if the pose at time t-1 is [0,1,0] and the pose at time t+1 is [0,0,1], linear interpolation is performed from the poses at time t-1 and t+1 to make [MASK]=[0,0.5,0.5]. There may be two or more consecutive [MASK]s. In this case, linear interpolation is also performed from the previous and next poses. For example, if times t and t+1 are [MASK], linear interpolation is performed from times t-1 and t+2. Tokens are identified by the Token Embedding described above.
[0035] <Pattern 4> The [CLS] and [SEP] values are all filled with the same value (same as pattern 2), and [MASK] is linearly interpolated from the previous and next Pose values (same as pattern 3). In addition, Token Embedding is added. [CLS] and [SEP] are the same as in pattern 2, and [MASK] is the same as in pattern 3. Tokens are identified by the Token Embedding described above. The pre-learning unit 12 receives the feature vector after the embedding process, and performs model learning by executing MLM (=Masked Language Modeling) and NSP (=Next Sentence Prediction) tasks. The detailed functional configuration and detailed operation of the pre-learning unit 12 will be described below with reference to Figs. 7 and 8.
[0036] <Learning device 1, pre-learning unit 12, S12> As shown in FIG. 7, the pre-learning unit 12 includes a mask pre-replacement data prediction unit 121, a motion continuity prediction unit 122, a loss function calculation unit 123, a weight update unit 124, and a true value storage unit 125.
[0037] The mask-previous data prediction unit 121 outputs a prediction of the original value of Pose replaced with a mask based on a pre-learning model (S121).
[0038] The motion continuity prediction unit 122 predicts whether motion A and motion B are continuous / discontinuous based on the pre-learning model (S122).
[0039] The loss function calculation unit 123 calculates a loss function from the error between the predicted pose and the true pose for the result of step S121. Any loss function may be used. For example, L1 distance or L2 distance may be used as the loss function. In addition, the loss function calculation unit 123 prepares a one-hot vector, such as 0 for continuity and 1 for discontinuity, as a true value for the result of step S122, performs binary classification, and calculates the loss function using cross entropy as the loss function (S123).
[0040] The weight update unit 124 updates the weights of the model so as to minimize the loss function (S124).
[0041] The true value storage unit 125 stores the true value used in step S123.
[0042] <Additional Notes> The device of the present invention has, as a single hardware entity, an input section to which a keyboard or the like can be connected, an output section to which a liquid crystal display or the like can be connected, a communication section to which a communication device (e.g., a communication cable) capable of communicating with the outside of the hardware entity can be connected, a CPU (which may also have a central processing unit, cache memory, registers, etc.), memories such as RAM and ROM, an external storage device such as a hard disk, and buses connecting the input section, output section, communication section, CPU, RAM, ROM, and external storage device so that data can be exchanged between them. If necessary, the hardware entity may also be provided with a device (drive) capable of reading and writing a recording medium such as a CD-ROM. A physical entity equipped with such hardware resources is, for example, a general-purpose computer.
[0043] The external storage device of the hardware entity stores the programs required to realize the above-mentioned functions and the data required in the processing of these programs (not limited to the external storage device, but for example the programs may be stored in a ROM, which is a read-only storage device). Data obtained by the processing of these programs is stored appropriately in the RAM, the external storage device, etc.
[0044] In the hardware entity, each program stored in an external storage device (or ROM, etc.) and the data required to process each program are loaded into memory as necessary, and interpreted, executed, and processed by the CPU as appropriate, so that the CPU realizes a predetermined function (each of the components represented as the above, "units," "means," etc.).
[0045] The present invention is not limited to the above-described embodiment, and can be modified as appropriate without departing from the spirit of the present invention. In addition, the processes described in the above-described embodiment are not limited to being executed in chronological order according to the order described, but may be executed in parallel or individually depending on the processing capacity of the device that executes the processes or as necessary.
[0046] As described above, when the processing functions of the hardware entities (the devices of the present invention) described in the above embodiments are realized by a computer, the processing contents of the functions that the hardware entities should have are described by a program. Then, by executing this program on a computer, the processing functions of the hardware entities are realized on the computer.
[0047] The various processes described above can be implemented by loading a program for executing each step of the above method into the recording unit 10020 of the computer 10000 shown in FIG. 9, and operating the control unit 10010, input unit 10030, output unit 10040, etc.
[0048] The program describing the processing contents can be recorded on a computer-readable recording medium. The computer-readable recording medium may be, for example, a magnetic recording device, an optical disk, a magneto-optical recording medium, a semiconductor memory, or any other suitable medium. Specifically, for example, a hard disk drive, a flexible disk, a magnetic tape, or the like can be used as the magnetic recording device, a DVD (Digital Versatile Disc), a DVD-RAM (Random Access Memory), a CD-ROM (Compact Disc Read Only Memory), a CD-R (Recordable) / RW (ReWritable), or the like can be used as the optical disk, an MO (Magneto-Optical disc), or the like can be used as the magneto-optical recording medium, and an EEP-ROM (Electrically Erasable and Programmable-Read Only Memory) or the like can be used as the semiconductor memory.
[0049] The program may be distributed, for example, by selling, transferring, lending, etc. portable recording media such as DVDs and CD-ROMs on which the program is recorded. Furthermore, the program may be distributed by storing the program in a storage device of a server computer and transferring the program from the server computer to other computers via a network.
[0050] A computer that executes such a program, for example, first stores the program recorded on a portable recording medium or the program transferred from a server computer in its own storage device. Then, when executing a process, the computer reads the program stored in its own recording medium and executes a process according to the read program. As another execution form of the program, the computer may directly read the program from the portable recording medium and execute a process according to the program, or may execute a process according to the received program each time a program is transferred from the server computer to the computer. The above-mentioned process may be executed by a so-called ASP (Application Service Provider) type service that realizes a processing function only by issuing an execution instruction and obtaining a result, without transferring a program from the server computer to the computer. Note that the program in this embodiment includes information used for processing by an electronic computer and equivalent to a program (data that is not a direct command to the computer but has a nature that specifies the processing of the computer, etc.).
[0051] In addition, in this embodiment, a hardware entity is configured by executing a specific program on a computer, but at least a part of the processing contents may be realized by hardware.
Claims
1. A data processing unit that acquires human motion data, masks all of the data at any time group of the human motion data, and replaces a portion of the human motion data with a corresponding portion of another of the human motion data with a predetermined probability; a pre-learning unit that calculates a loss function from an error between a true value and predicted data, which is data predicted by a pre-learning model for data to be masked, and updates a weight of the pre-learning model to learn the pre-learning model; calculates a loss function from an error between a true value and a result of prediction by the pre-learning model as to whether the human motion data is continuous or discontinuous, and updates the weight of the pre-learning model; Learning device.
2. A learning method executed by a learning device, comprising: a data processing step of acquiring human motion data, masking the entire data at any time group of the human motion data, and replacing a part of the human motion data with a corresponding part of another of the human motion data with a predetermined probability; A pre-learning step of calculating a loss function from an error between a true value and predicted data, which is data predicted by a pre-learning model for data to be masked, and updating weights of the pre-learning model to learn the pre-learning model, calculating a loss function from an error between a true value and a result of prediction by the pre-learning model as to whether the human motion data is continuous or discontinuous, and updating weights of the pre-learning model How to learn.
3. A program that causes a computer to function as the learning device according to claim 1.
