Motion type classification method and device based on direct incremental learning algorithm
Through the method based on the direct incremental learning algorithm, using sensors to acquire motion data and build a new classifier, the problem of simultaneous increase in features and categories in the action recognition task is solved, and efficient motion type classification under finite mark samples is realized.
Patent Information
- Application Number
- CN202310465156.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-04-26
AI Technical Summary
The prior art is difficult to effectively deal with the situation where features and categories increase simultaneously in action recognition tasks, especially to ensure classification performance when the labeling samples are limited.
A direct incremental learning algorithm is used to obtain raw and incremental motion data through sensors, a new classifier is built, and the cross entropy loss function, regular terms and direct similarity constraint terms are used to construct the objective function, and incremental learning is performed to identify the motion type.
With the increase of features and categories, the consistency and difference of the classifier are maintained, and effective identification and classification of motion types are achieved.
Smart Images

Figure CN116702020B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for classifying motion types based on a direct incremental learning algorithm. Background Art
[0002] With the emergence of new data collection methods in many dynamic environment applications, the feature space of samples continues to expand. As new types of features are added to the data, more observations can be obtained, resulting in the possibility of adding new categories to the data. For example, in the task of action recognition, the old features generated by sensors during warm-up can be used to identify different warm-up exercises. At the same time, the new attributes obtained by the newly added sensors can better identify newly emerging formal sports such as cycling and rowing. Learning the simultaneous addition of features and categories is crucial, but it has rarely been studied, especially when labeled samples with complete observations are limited but classification performance must be guaranteed. Summary of the Invention
[0003] Based on this, it is necessary to provide a motion type classification method, device, computer equipment and storage medium based on a direct incremental learning algorithm that can simultaneously increase features and classifications to address the above technical problems.
[0004] A motion type classification method based on a direct incremental learning algorithm, the method comprising:
[0005] Obtaining raw motion data based on sensors set at different locations on the moving object;
[0006] Training the original classifier according to the original motion data to obtain a trained original classifier;
[0007] Acquiring incremental motion data from sensors disposed on other parts of the moving object, and constructing a new classifier capable of processing the incremental motion data based on a classifier trained on the original motion data and the incremental motion data; wherein the incremental motion data includes additional categories;
[0008] Regularizing the new classifier capable of processing the incremental motion data to obtain a regularization term, and constructing a direct similarity constraint term based on the classifier trained on the original motion data and the new classifier trained on the incremental motion data with added categories;
[0009] Performing incremental learning on the trained original classifier according to the cross entropy loss function, the regularization term, the objective function of the direct incremental learning algorithm constructed by the direct similarity constraint term, and the training samples to obtain a trained incremental classifier;
[0010] Use the trained incremental classifier to classify the motion type.
[0011] In one embodiment, the method further includes: using the probability that i-n1 data in the training data belong to the jth category as follows:
[0012]
[0013] in, represents the feature representation of motion data, n1 represents the number of original motion data, represents the classifier parameters belonging to the jth column in the original motion data, a feature representation representing the incremental motion data, represents the classifier parameter belonging to the jth column in the incremental motion data, C represents the classification category of the original motion data, C+1 represents the classification category including the added category, and denote the classifier parameters belonging to the kth column in the original motion data and the incremental motion data, respectively. Indicates the probability that i-n1 data belongs to the jth category;
[0014] According to the probability that the i-n1 data belong to the jth class, the cross entropy loss function is constructed as follows:
[0015]
[0016] Where n2 represents the number of incremental motion data, is the true label that the i-n1th data belongs to the jth category.
[0017] In one embodiment, the method further includes: constructing a direct similarity constraint term based on the classifier trained on the original motion data and the classifier trained on the incremental motion data:
[0018]
[0019] in, represents the classifier parameters of the original motion data, Represents the classifier parameters of the first C columns of the incremental motion data after adding categories, where C represents the classification category.
[0020] In one embodiment, the objective function of the direct incremental learning algorithm constructed according to the cross entropy loss function, the regularization term, and the direct similarity constraint term is:
[0021]
[0022] Among them, α and β represent coefficients, Represents the regularization term.
[0023] In one embodiment, the method further includes: solving the objective function using a gradient descent algorithm.
[0024] A motion type classification device based on a direct incremental learning algorithm, the device comprising:
[0025] A data acquisition module is used to acquire raw motion data based on sensors set at different parts of the moving object;
[0026] An initial training module, used to train the original classifier based on the original data to obtain a trained original classifier;
[0027] an incremental data construction module, configured to obtain incremental motion data based on sensors disposed on other parts of the moving object, and to construct a new classifier capable of processing the incremental motion data based on a classifier trained on the original motion data and the incremental motion data; wherein the incremental motion data includes additional categories;
[0028] An incremental training module is configured to regularize the new classifier capable of processing incremental motion data to obtain a regularization term, construct a direct similarity constraint term based on the classifier trained on the original motion data and the new classifier trained on the incremental motion data after adding categories; and perform incremental learning on the trained original classifier based on the cross entropy loss function, the regularization term, the objective function constructed from the direct similarity constraint term, and the training samples to obtain a trained incremental classifier.
[0029] The classification module is used to classify the motion type using the trained incremental classifier.
[0030] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0031] Obtaining raw motion data based on sensors set at different locations on the moving object;
[0032] Training the original classifier according to the original motion data to obtain a trained original classifier;
[0033] Acquiring incremental motion data from sensors disposed on other parts of the moving object, and constructing a new classifier capable of processing the incremental motion data based on a classifier trained on the original motion data and the incremental motion data; wherein the incremental motion data includes additional categories;
[0034] Regularizing the new classifier capable of processing the incremental motion data to obtain a regularization term, and constructing a direct similarity constraint term based on the classifier trained on the original motion data and the new classifier trained on the incremental motion data with added categories;
[0035] Performing incremental learning on the trained original classifier according to the cross entropy loss function, the regularization term, the objective function of the direct incremental learning algorithm constructed by the direct similarity constraint term, and the training samples to obtain a trained incremental classifier;
[0036] Use the trained incremental classifier to classify the motion type.
[0037] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0038] Obtaining raw motion data based on sensors set at different locations on the moving object;
[0039] Training the original classifier according to the original motion data to obtain a trained original classifier;
[0040] Acquiring incremental motion data from sensors disposed on other parts of the moving object, and constructing a new classifier capable of processing the incremental motion data based on a classifier trained on the original motion data and the incremental motion data; wherein the incremental motion data includes additional categories;
[0041] Regularizing the new classifier capable of processing the incremental motion data to obtain a regularization term, and constructing a direct similarity constraint term based on the classifier trained on the original motion data and the new classifier trained on the incremental motion data with added categories;
[0042] Performing incremental learning on the trained original classifier according to the cross entropy loss function, the regularization term, the objective function of the direct incremental learning algorithm constructed by the direct similarity constraint term, and the training samples to obtain a trained incremental classifier;
[0043] Use the trained incremental classifier to classify the motion type.
[0044] The above-mentioned motion type classification method, device, computer equipment and storage medium based on the direct incremental learning algorithm, when faced with an increase in features and categories, first regularizes the classifier corresponding to the incremental data to extract the regularization term, and then constructs a similarity constraint term based on the similarity between the classifier learned on the original motion data and the classifier to be learned on the incremental data. The reason for extracting the direct similarity constraint is to ensure that the classifier learned on the original motion data and the classifier learned on the incremental data retain a certain similarity, and also need to have a certain difference. Ideally, in the classification result, consistency is maintained for multiple categories in the initial training, and inconsistency is maintained for new categories that appear in the incremental training. Therefore, the objective function of the direct incremental learning algorithm is constructed based on the cross-entropy loss function, the regularization term, and the direct similarity constraint term, and then the original classifier is trained using training samples to achieve the recognition of incremental types of motion types. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 1 is a flow chart of a method for classifying motion types based on a direct incremental learning algorithm in one embodiment;
[0046] Figure 2 is a structural block diagram of a motion type classification device based on a direct incremental learning algorithm in one embodiment;
[0047] Figure 3 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0049] In one embodiment, Figure 1 As shown, a motion type classification method based on a direct incremental learning algorithm is provided, comprising the following steps:
[0050] Step 102: acquiring raw motion data based on sensors disposed at different locations on the moving object.
[0051] Different motion data are collected for different parts of the moving object. The original motion data refers to the motion data collected at a certain stage.
[0052] It's worth noting that for exercise types, 11 warm-up exercises (such as jogging and jumping) are performed before the actual exercise (i.e., cycling, rowing, etc.). During the warm-up, multiple sensors are placed on the body (left forearm, right forearm, left upper arm, right upper arm, back, etc.). Towards the end of the warm-up, additional sensors are placed (left calf, right calf, left thigh, right thigh, etc.). This generates new features that better identify the subsequent actual exercise (new class).
[0053] Step 104: train the original classifier based on the original motion data to obtain a trained original classifier.
[0054] Step 106 , obtaining incremental motion data based on sensors installed on other parts of the moving object, and constructing a new classifier capable of processing the incremental motion data based on the classifier trained on the original motion data and the incremental motion data.
[0055] The training samples contain additional categories.
[0056] In step 108, regularization is performed on the new classifier capable of processing the incremental motion data to obtain a regularization term, and a direct similarity constraint term is constructed based on the classifier trained on the original motion data and the new classifier trained on the incremental motion data with added categories.
[0057] Step 110 , performing incremental learning on the trained original classifier according to the objective function of the direct incremental learning algorithm constructed by the cross entropy loss function, the regularization term, the direct similarity constraint term, and the training samples, to obtain a trained incremental classifier.
[0058] Step 112: Use the trained incremental classifier to classify the motion type.
[0059] In the above-mentioned motion type classification method based on the direct incremental learning algorithm, when faced with an increase in features and categories, the two parts of the data are first regularized to extract the regularization term. Then, based on the similarity between the original motion data and the incremental original motion data, a direct similarity constraint term is constructed. The reason for extracting the similarity constraint is to ensure that the original motion data and the incremental original motion data retain most of the similarity, but also need to have a certain degree of difference. Ideally, in the classification results, consistency is maintained for multiple categories in the initial training, and inconsistency is maintained for new categories that appear in the incremental training. Therefore, the objective function of the direct incremental learning algorithm is constructed based on the cross-entropy loss function, the regularization term, and the direct similarity constraint term, and then the original classifier is trained using training samples to achieve the recognition of incremental types of motion types.
[0060] In addition, there are at least two challenges in analyzing this type of data compared to traditional classification problems. (1) In these applications, the number of feature types and the number of classes increase simultaneously, which makes the problem very complicated, especially when the increase in classes is caused by the increase in feature types and they are coupled together. (2) Compared with the two simple implementations, namely, only using data with previous features or ignoring previous data without complete observations, it is necessary to design a better algorithm with performance guarantees, which is also difficult because the increase in features and classes violates the independent and identically distributed assumption in the traditional learning paradigm.
[0061] In one embodiment, the initial training and incremental training of the present invention are named as the preparation phase and the adaptation phase respectively, and the data format in the P phase is: Where n1 and d1 are the number of samples and feature dimensions. The i-th row is the data The corresponding label is C is the number of categories. The corresponding label matrix is If the kth sample belongs to the lth class, then Y1(k,l)=1, otherwise Y1(k,l)=0. Similarly, in stage A, the data form is in The corresponding part is the original feature. It corresponds to the newly added features, n2 is the number of data samples in stage A, and d2 is the newly added feature dimension in stage A. The label matrix of X2 is The data format of the testing phase is According to the above symbolic definition, our main task is to label the data according to C categories and C+1 labeled data X2 to classify C+1 data X te We can also train the classifier using only the {X2, Y2} data from stage A. However, in practice, the amount of data in stage A, n2, is usually very small and far less than the amount of data in stage P, n1. Training the classification model with only a small portion of the data from stage A often results in unreliable model performance. Therefore, it is best to train the model from stage P together with the data from stage A to maximize the utilization of all data information from both stages. Note that unless otherwise specified, the matrix norms used in this method are all Frobenius norms.
[0062] In one embodiment, the probability that i-n1 data in the training data belong to the jth class is:
[0063]
[0064] in, represents the feature representation of motion data, n1 represents the number of original motion data, represents the classifier parameters belonging to the jth column in the original motion data, The feature representation of the incremental motion data, represents the classifier parameter belonging to the jth column in the incremental motion data, C represents the classification category of the original motion data, and C+1 represents the classification category containing the added category. and denote the classifier parameters belonging to the kth column in the original motion data and the incremental motion data, respectively. Represents the probability that i-n1 data belongs to the jth class; according to the probability that i-n1 data belongs to the jth class, the cross entropy loss function is constructed as:
[0065]
[0066] Where n2 represents the number of incremental motion data, is the true label that the i-n1th data belongs to the jth category.
[0067] In one embodiment, based on the original motion data and the original motion data after adding categories, a direct similarity constraint is constructed as follows:
[0068]
[0069] in, represents the classifier parameters of the original motion data, Represents the classifier parameters of the first C columns of the original motion data after adding categories, where C represents the classification category.
[0070] Specifically, the model learned in the P phase Used to help learn the classification model W2 in stage A, taking into account and They are all classifiers defined on old features, so they can be constrained and Approximate inheritance However, due to the historical information and have different sizes, so it is difficult to directly measure their approximation in the form of norms. What we can know is that and It should have a similar classification effect on the data of the first C categories on the old features, so The matrix consisting of the first C columns is defined as By and Approximation, thus realizing the inheritance of historical information. The method that can be used is the direct approximation method
[0071] In one embodiment, the objective function SAFC-D of the direct incremental learning algorithm constructed based on the cross entropy loss function, the regularization term, and the direct similarity constraint term is:
[0072]
[0073] Among them, α and β represent coefficients, Represents the regularization term.
[0074] Specifically, the gradient descent algorithm is used to solve the problem. First, for the algorithm SAFC-D, its objective function is expressed as:
[0075]
[0076] make J1(W) represents the first term of the objective function. We first derive the gradient of the objective function with respect to W. Without loss of generality, we let Notice For any W pq (1≤p≤d,1≤q≤C+1), we have
[0077]
[0078]
[0079] Here, the second equality holds because the gradient is not equal to 0 if and only if u = i. We have
[0080]
[0081] Substitute (8) into (7), and combine We have
[0082]
[0083] because Substituting the above formula into formula (6), we have
[0084]
[0085] For a more concise description, we express the gradient matrix as:
[0086]
[0087] Since the regularization constraint is only imposed on some variables, we decompose the matrix into
[0088]
[0089] in yes Combining the above equation and the objective function, we have
[0090]
[0091] in Indicated by The submatrix consists of the first d1 rows and the first C columns of . Similarly, we have
[0092]
[0093]
[0094] in Indicated by The submatrix consists of the first d1 rows and the last column of . Indicated by The last d2 rows of the submatrix. In general, we have
[0095]
[0096] Using this formula, we have the following update rule:
[0097]
[0098] Where η is the update step size.
[0099] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0100] In one embodiment, Figure 2 As shown, a motion type classification device based on a direct incremental learning algorithm is provided, comprising: a data acquisition module 202, an initial training module 204, an incremental data construction module 206, an incremental training module 208 and a classification module 210, wherein:
[0101] The data acquisition module 202 is used to acquire raw motion data based on sensors installed at different locations on the moving object;
[0102] An initial training module 204 is used to train the original classifier based on the original data to obtain a trained original classifier;
[0103] an incremental data construction module 206 for acquiring incremental motion data based on sensors installed on other parts of the moving object, and constructing a new classifier capable of processing the incremental motion data based on the classifier trained on the original motion data and the incremental motion data; wherein the incremental motion data includes additional categories;
[0104] The incremental training module 208 is configured to perform regularization processing on the new classifier capable of processing the incremental motion data to obtain a regularization term, construct a direct similarity constraint term based on the classifier trained on the original motion data and the new classifier trained on the incremental motion data after adding categories, and perform incremental learning on the trained original classifier based on the cross entropy loss function, the regularization term, the objective function of the direct incremental learning algorithm constructed using the direct similarity constraint term, and the training samples to obtain a trained incremental classifier.
[0105] The classification module 210 is used to classify the motion type using the trained incremental classifier.
[0106] In one embodiment, the incremental training module 208 is further configured to use the probability that i-n1 data in the training data belong to the jth class as follows:
[0107]
[0108] in, represents the feature representation of motion data, n1 represents the number of original motion data, represents the classifier parameters belonging to the jth column in the original motion data, a feature representation representing the incremental motion data, represents the classifier parameter belonging to the jth column in the incremental motion data, C represents the classification category of the original motion data, C+1 represents the classification category including the added category, and denote the classifier parameters belonging to the kth column in the original motion data and the incremental motion data, respectively. Indicates the probability that i-n1 data belongs to the jth category;
[0109] According to the probability that the i-n1 data belong to the jth class, the cross entropy loss function is constructed as follows:
[0110]
[0111] Where n2 represents the number of incremental motion data, is the true label that the i-n1th data belongs to the jth category.
[0112] In one embodiment, the incremental training module 208 is further configured to construct a direct similarity constraint term based on the original motion data and the original motion data after adding categories:
[0113]
[0114] in, represents the classifier parameters of the original motion data, Represents the classifier parameters of the first C columns of the original motion data after adding categories, where C represents the classification category.
[0115] In one embodiment, the incremental training module 208 is further configured to construct an objective function of a direct incremental learning algorithm based on the cross entropy loss function, the regularization term, and the direct similarity constraint term:
[0116]
[0117] Among them, α and β represent coefficients, Represents the regularization term.
[0118] In one embodiment, the incremental training module 208 is further configured to solve the objective function using a gradient descent algorithm.
[0119] Regarding the specific limitations of the motion type classification device based on the direct incremental learning algorithm, please refer to the limitations of the motion type classification method based on the direct incremental learning algorithm above, and will not be repeated here. The various modules in the above-mentioned motion type classification device based on the direct incremental learning algorithm can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0120] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a motion type classification method based on a direct incremental learning algorithm is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0121] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0122] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.
[0123] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.
[0124] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0125] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0126] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A motion type classification method based on direct incremental learning algorithm, characterized in that: The method comprises: Obtaining raw motion data based on sensors set at different locations on the moving object; Training the original classifier according to the original motion data to obtain a trained original classifier; Acquiring incremental motion data from sensors disposed on other parts of the moving object, and constructing a new classifier capable of processing the incremental motion data based on a classifier trained on the original motion data and the incremental motion data; wherein the incremental motion data includes additional categories; Regularizing the new classifier capable of processing the incremental motion data to obtain a regularization term, and constructing a direct similarity constraint term based on the classifier trained on the original motion data and the new classifier trained on the incremental motion data with added categories; Performing incremental learning on the trained original classifier according to the cross entropy loss function, the regularization term, the objective function of the direct incremental learning algorithm constructed by the direct similarity constraint term, and the training samples to obtain a trained incremental classifier; Use the trained incremental classifier to classify the motion type; Based on the classifier trained on the original motion data and the new classifier trained on the incremental motion data after adding categories, a direct similarity constraint is constructed, including: Based on the classifier trained on the original motion data and the classifier trained on the incremental motion data after adding categories, a direct similarity constraint is constructed as follows: in, represents the classifier parameters of the original motion data, represents the classifier parameters of the first C columns of the incremental motion data after adding categories, where C represents the classification category; The objective function of the direct incremental learning algorithm is constructed according to the cross entropy loss function, the regularization term, and the direct similarity constraint term, including: The objective function of the direct incremental learning algorithm constructed according to the cross entropy loss function, the regularization term, and the direct similarity constraint term is: Among them, α and β represent coefficients, Represents the regularization term.
2. The method according to claim 1, characterized in that The steps of constructing the cross entropy loss function include: The probability that i-n1 data in the training sample belong to the jth class is: in, represents the feature representation of motion data, n1 represents the number of original motion data, represents the classifier parameters belonging to the jth column in the original motion data, a feature representation representing the incremental motion data, represents the classifier parameter belonging to the jth column in the incremental motion data, C represents the classification category of the original motion data, C+1 represents the classification category including the added category, and denote the classifier parameters belonging to the kth column in the original motion data and the incremental motion data, respectively. Indicates the probability that i-n1 data belongs to the jth category; According to the probability that the i-n1 data belong to the jth class, the cross entropy loss function is constructed as follows: Where n2 represents the number of incremental motion data, is the true label that the i-n1th data belongs to the jth category.
3. The method according to claim 1, characterized in that The method further comprises: The objective function is solved using a gradient descent algorithm.
4. A motion type classification device based on a direct incremental learning algorithm, characterized in that: The device comprises: A data acquisition module is used to acquire raw motion data based on sensors set at different parts of the moving object; An initial training module, configured to train an original classifier based on the original motion data to obtain a trained original classifier; an incremental data construction module, configured to obtain incremental motion data based on sensors disposed on other parts of the moving object, and to construct a new classifier capable of processing the incremental motion data based on a classifier trained on the original motion data and the incremental motion data; wherein the incremental motion data includes additional categories; An incremental training module is configured to regularize the new classifier capable of processing incremental motion data to obtain a regularization term, construct a direct similarity constraint term based on the classifier trained on the original motion data and the new classifier trained on the incremental motion data after adding categories; and perform incremental learning on the trained original classifier based on the cross entropy loss function, the regularization term, the objective function constructed from the direct similarity constraint term, and the training samples to obtain a trained incremental classifier. A classification module, used to classify the motion type using the trained incremental classifier; The incremental training module is further configured to construct a direct similarity constraint term based on the classifier trained on the original motion data and the classifier on the incremental motion data after adding categories: in, represents the classifier parameters of the original motion data, represents the classifier parameters of the first C columns of the original motion data after adding categories, where C represents the classification category; The incremental training module is further configured to construct the objective function of the direct incremental learning algorithm based on the cross entropy loss function, the regularization term, and the direct similarity constraint term: Among them, α and β represent coefficients, Represents the regularization term.
5. The device according to claim 4, characterized in that The incremental training module is further configured to use the probability that i-n1 data in the training sample belong to the jth class as follows: in, represents the feature representation of motion data, n1 represents the number of original motion data, represents the classifier parameters belonging to the jth column in the original motion data, a feature representation representing the incremental motion data, represents the classifier parameter belonging to the jth column in the incremental motion data, C represents the classification category of the original motion data, C+1 represents the classification category including the added category, and denote the classifier parameters belonging to the kth column in the original motion data and the incremental motion data, respectively. Indicates the probability that i-n1 data belongs to the jth category; According to the probability that the i-n1 data belong to the jth class, the cross entropy loss function is constructed as follows: Where n2 represents the number of incremental motion data, is the true label that the i-n1th data belongs to the jth category.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Image classification method and system based on incremental learning
CN112559784A
Incremental training method and device based on multiple classifiers, equipment and medium
CN114925828A