Classification method and device based on lightweight classifier, electronic equipment and medium
By combining a lightweight classifier with a decision tree ensemble model and online training technology, the problems of high sample cost and low recognition performance in radar-based human dynamic pose recognition are solved, and efficient and personalized dynamic pose recognition is achieved on a lightweight platform.
Patent Information
- Application Number
- CN202211597080.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2042-12-12
AI Technical Summary
Existing radar-based human dynamic posture recognition algorithms face problems such as high sample collection costs, overfitting due to limited sample quantity, large differences in posture among different people, and high computational complexity on lightweight platforms. In particular, their recognition performance is insufficient when facing unknown users.
A lightweight classifier-based approach is adopted. By acquiring dynamic pose samples to be predicted, a lightweight classifier is trained using offline sample sets and online unlabeled samples. The reference module, incremental module, and sample caching module of the decision tree ensemble model are combined to perform online training and pseudo-label sample management, and the final category is selected by fusing probability vectors.
It reduces the cost of training samples, improves the recognition performance of unknown users, reduces computational complexity, is suitable for lightweight platforms, and achieves efficient personalized recognition.
Smart Images

Figure CN115952452B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of radar target recognition technology, and in particular to a classification method, device, electronic device and medium based on a lightweight classifier. Background Technology
[0002] Radar-based human dynamic posture recognition is a novel human-computer interaction method that uses radar as a front-end sensor, coupled with radar signal processing and recognition technologies, to classify specific human dynamic postures. Its workflow generally includes transmitting radar signals to the dynamic posture, receiving radar echo signals, signal processing, feature extraction, and classification. Due to its characteristics of being independent of lighting, having low privacy leakage, and requiring no contact, radar-based human dynamic posture recognition is more natural and efficient than traditional interaction methods based on mice, keyboards, and touchscreens in some special devices and application scenarios (such as wearable devices, smart cockpit control, and virtual / augmented reality).
[0003] A typical radar signal system for human dynamic posture recognition, along with its associated signal processing and feature extraction methods, is as follows: The transmitted signal uses a coherent pulse train; a single-channel or multi-channel receiver receives the echo signal; the echo signal from each channel is first converted to a digital signal by an analog-to-digital converter (A / D converter), then demodulated by I / Q to obtain the baseband signal. A sliding window technique is then used to divide the baseband signal into several frames, arranging each frame into a two-dimensional matrix. A Fast Fourier Transform (FFT) is then performed row-by-row along the slow time axis to obtain the range-Doppler map (RDM). Features such as scattering center velocity, range, and total energy are extracted from each frame's RDM to form a frame-level feature vector. Furthermore, statistical features such as mean, maximum, minimum, and standard deviation are extracted based on these frame-level features. Finally, all frame-level features and statistical features are concatenated to obtain the feature vector input to the classifier.
[0004] Classification algorithms for radar-based human dynamic pose recognition mainly face the following three technical challenges: (1) The cost of collecting and labeling radar-based human dynamic pose samples is high, and the number of available labeled samples is limited, which makes it easy for classification models (such as some complex models based on deep neural networks) to overfit; (2) The dynamic poses demonstrated by different people have significant differences in the time-space dimension, which leads to a decrease in the recognition performance of classification algorithms when facing new users (i.e., users whose dynamic pose samples have not been used for training); (3) For systems deployed on lightweight platforms, the recognition algorithm is required to have a small model size and low computational complexity. Currently, existing radar-based human dynamic pose recognition algorithms are mainly offline supervised algorithms, such as Random Forest (RF), Convolutional Neural Network (CNN), and Long Short-Term Memory (LSTM); such algorithms can only be trained on pre-collected labeled sample sets. Since the capacity of the available sample set is often small, and it is usually impossible to collect the user's dynamic pose samples in advance, such algorithms cannot guarantee recognition performance when facing unknown users in actual use.
[0005] To address the aforementioned issues, one possible solution is to use unlabeled dynamic pose samples collected from users during system operation to adjust the structure or parameters of the classifier online, thereby adapting it to the unique dynamic pose characteristics of users and improving personalized recognition performance for those users.
[0006] In related technologies, an online semi-supervised learning classifier and its classification method based on extreme random forests with a pseudo-label centralized storage mechanism are proposed. This scheme sets up two binary extreme random forests for each defined dynamic pose category: a reference sub-forest and an incremental sub-forest. During the training of the incremental sub-forest, the reference sub-forest, which is pre-trained offline, is first used to predict binary pseudo-labels for newly arrived unlabeled samples. Then, the pseudo-labeled samples are filtered according to the probability given by the reference sub-forest. If they pass the filtering, the pseudo-labeled samples are stored in the feature cache module, and their index information is stored in the incremental sub-forest. Then, the decision trees in the incremental sub-forest that meet specific conditions are incrementally split.
[0007] However, in this related technology, the utilization efficiency of unlabeled sample streams is low, the computational complexity of the incremental training phase is high, and the timing of triggering incremental training is coupled with the timing of user demonstration poses, which makes it difficult to allocate computing resources. Summary of the Invention
[0008] This application provides a classification method, apparatus, electronic device, and medium based on a lightweight classifier, which solves the problems of high cost of offline training sample collection and low generalization performance of offline supervised machine learning algorithms on users who have not provided training samples. At the same time, the algorithm has low complexity and can be deployed on a lightweight platform.
[0009] The first aspect of this application provides a classification method based on a lightweight classifier, comprising the following steps: acquiring a dynamic pose sample to be predicted; inputting the dynamic pose sample to be predicted into a lightweight classifier to obtain a first probability vector and a second probability vector to which the dynamic pose sample belongs to each preset dynamic pose category, wherein the lightweight classifier is trained from an offline sample set and / or unlabeled samples input online; fusing the first probability vector and the second probability vector to obtain a target probability vector, and selecting the category with the highest probability as the label of the dynamic pose sample to be predicted based on the target probability vector.
[0010] Optionally, before inputting the dynamic pose sample to be predicted into the lightweight classifier, the method further includes: acquiring the offline sample set, wherein the offline sample set includes a radar-based human dynamic pose sample set; determining a lightweight classifier to be trained, wherein the lightweight classifier to be trained includes a reference module based on a decision tree ensemble model, an incremental module based on a decision tree ensemble model, and a sample cache module with a preset sampling mechanism; and pre-training each binary decision tree ensemble model in the reference module using the radar-based human dynamic pose sample set based on a preset training algorithm to obtain an initial lightweight classifier.
[0011] Optionally, the above-described classification method based on a lightweight classifier further includes: using the online input unlabeled samples to train the incremental module, the reference module, and the sample cache module online to obtain the lightweight classifier.
[0012] Optionally, the step of using the online input unlabeled samples to train the incremental module, the reference module, and the sample cache module online includes: determining whether a new unlabeled sample has arrived; if the new unlabeled sample has arrived, assigning a pseudo-label to the new unlabeled sample through the reference module to obtain a new pseudo-labeled sample, and obtaining a pseudo-label prediction result based on the new pseudo-labeled sample and all historical pseudo-labeled samples; updating the voting weights of the decision tree in the reference module based on the pseudo-label prediction result, and storing the new pseudo-labeled sample and its index information in the sample cache module.
[0013] Optionally, after determining whether a new unlabeled sample has arrived, the method further includes: if no new unlabeled sample has arrived, determining whether the sample caching module has received a sampling command, and when the sampling command is received, designating any batch in the incremental module as the current training batch, and sampling multiple pseudo-labeled samples and the index information of each pseudo-labeled sample from the sample caching module according to the preset sampling mechanism and outputting them to the incremental module; for each pseudo-labeled sample input to the incremental module, finding each decision leaf node along the decision path of each decision tree in the current training batch, storing the index information of each pseudo-labeled sample input to the incremental module in the corresponding index pool and updating the pseudo-label counter, and calculating the preset splitting criterion for each decision leaf node according to the updated pseudo-label counter result; for any decision leaf node whose preset splitting criterion value is greater than a preset splitting threshold, retrieving the corresponding pseudo-labeled sample from the sample caching module to form a mini training set according to the index information stored in the index pool of any decision leaf node, and performing incremental splitting on any decision leaf node on the mini training set based on the preset decision tree training algorithm.
[0014] Optionally, after incrementally splitting any decision leaf node on the mini training set, the method further includes: determining whether a pause command has been received; if the pause command is received, the incremental training phase of the incremental module is terminated; otherwise, the method re-determines whether a new unlabeled sample has arrived.
[0015] A second aspect of this application provides a classification device based on a lightweight classifier, comprising: a first acquisition module for acquiring a dynamic pose sample to be predicted; a second acquisition module for inputting the dynamic pose sample to be predicted into a lightweight classifier to obtain a first probability vector and a second probability vector to which the dynamic pose sample belongs to each preset dynamic pose category, wherein the lightweight classifier is trained from an offline sample set and / or unlabeled samples input online; and a classification module for fusing the first probability vector and the second probability vector to obtain a target probability vector, and selecting the category with the highest probability as the label of the dynamic pose sample to be predicted based on the target probability vector.
[0016] Optionally, before inputting the dynamic pose sample to be predicted into the lightweight classifier, the second acquisition module further includes: determining a lightweight classifier to be trained, wherein the lightweight classifier to be trained includes a reference module based on a decision tree ensemble model, an incremental module based on a decision tree ensemble model, and a sample cache module with a preset sampling mechanism; and pre-training each binary decision tree ensemble model in the reference module using the radar-based human dynamic pose sample set based on a preset training algorithm to obtain an initial lightweight classifier.
[0017] Optionally, the above-described classification device based on a lightweight classifier further includes: an online training module, used to train the incremental module, the reference module, and the sample caching module online using the online input unlabeled samples to obtain the lightweight classifier.
[0018] Optionally, the online training module is further configured to: determine whether a new unlabeled sample has arrived; if the new unlabeled sample has arrived, assign a pseudo-label to the new unlabeled sample through the reference module to obtain a new pseudo-label sample, and obtain a pseudo-label prediction result based on the new pseudo-label sample and all historical pseudo-label samples; based on the pseudo-label prediction result, update the voting weight of the decision tree in the reference module, and store the new pseudo-label sample and its index information in the sample cache module;
[0019] Optionally, after determining whether the newly arrived unlabeled sample exists, the online training module is further configured to: if the newly arrived unlabeled sample does not exist, determine whether the sample caching module has received a sampling command, and when the sampling command is received, designate any batch in the incremental module as the current training batch, and sample multiple pseudo-labeled samples and the index information of each pseudo-labeled sample from the sample caching module according to the preset sampling mechanism and output them to the incremental module; for each pseudo-labeled sample input to the incremental module, find each decision leaf node along the decision path of each decision tree in the current training batch, store the index information of each pseudo-labeled sample input to the incremental module in the corresponding index pool and update the pseudo-label counter, and calculate the preset splitting criterion of each decision leaf node according to the updated pseudo-label counter result; for any decision leaf node whose preset splitting criterion value is greater than the preset splitting threshold, retrieve the corresponding pseudo-labeled sample from the sample caching module to form a mini training set according to the index information stored in the index pool of any decision leaf node, and perform incremental splitting on any decision leaf node on the mini training set based on the preset decision tree training algorithm.
[0020] Optionally, after incrementally splitting any decision leaf node on the mini training set, the online training module is further configured to: determine whether a pause command has been received; if the pause command is received, the incremental training phase of the incremental module is terminated; otherwise, the existence of the newly arrived unlabeled sample is re-determined.
[0021] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the classification method based on a lightweight classifier as described in the above embodiments.
[0022] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the classification method based on a lightweight classifier as described in the above embodiments.
[0023] This application inputs a dynamic pose sample to be predicted into a lightweight classifier to obtain a first probability vector and a second probability vector indicating which of the dynamic pose sample belongs to each preset dynamic pose category. These are then fused to obtain a target probability vector. The category with the highest probability from the target probability vector is selected as the label for the dynamic pose sample to be predicted. This solves the problems of high cost of offline training sample acquisition and low generalization performance of offline supervised machine learning algorithms on users who have not provided training samples. Furthermore, this algorithm has low complexity and can be deployed on lightweight platforms.
[0024] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0025] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0026] Figure 1 This is a flowchart of a classification method based on a lightweight classifier provided according to an embodiment of this application;
[0027] Figure 2 Eight predefined dynamic gestures are provided for one implementation of this application;
[0028] Figure 3 This is a schematic diagram illustrating the workflow of a radar-based dynamic gesture recognition system according to an embodiment of this application;
[0029] Figure 4 This is a schematic diagram of the structure of a lightweight classifier according to an embodiment of this application;
[0030] Figure 5 This is a schematic diagram of an incremental training phase implementation according to this application;
[0031] Figure 6 This is a block diagram of a classification device based on a lightweight classifier according to an embodiment of this application;
[0032] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0033] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0034] The classification method, apparatus, electronic device, and medium based on a lightweight classifier according to embodiments of this application are described below with reference to the accompanying drawings. Addressing the issues of high cost of offline training sample acquisition and low generalization performance of offline supervised machine learning algorithms on users without training samples, as mentioned in the background section, this application provides a classification method based on a lightweight classifier. In this method, a dynamic pose sample to be predicted is input into a lightweight classifier to obtain a first probability vector and a second probability vector indicating which of the dynamic pose sample belongs to each preset dynamic pose category. These are then fused to obtain a target probability vector. The category with the highest probability is selected as the label of the dynamic pose sample to be predicted based on the target probability vector. This solves the problems of high cost of offline training sample acquisition and low generalization performance of offline supervised machine learning algorithms on users without training samples. Furthermore, this algorithm has low complexity and can be deployed on lightweight platforms.
[0035] Specifically, Figure 1 This is a flowchart illustrating a classification method based on a lightweight classifier provided in an embodiment of this application.
[0036] like Figure 1 As shown, this classification method based on a lightweight classifier includes the following steps:
[0037] In step S101, a dynamic pose sample to be predicted is obtained.
[0038] Specifically, this application defines eight dynamic poses to be predicted, such as... Figure 2 As shown, gestures 1 to 8 are named "swipe left", "swipe right", "retreat", "reach forward", "open", "close", "wave" and "slide".
[0039] In this embodiment, seven volunteers participated in the dynamic gesture collection. Each volunteer collected 100 samples for each type of dynamic gesture, with each sample collection lasting one second. The dataset was then divided for subsequent training and testing: it was divided into seven folds, each containing an offline training set, an incremental training set, and a test set. Each fold assigned a different volunteer as the user. The offline training set contained all labeled samples from six non-volunteers, the incremental training set contained 400 samples from the user (50 samples in each of the eight gesture categories), and the labels on these samples were removed to simulate the scenario of the system collecting unlabeled samples in a real-world setting. The test set contained the remaining 400 labeled samples from the user.
[0040] In step S102, the dynamic pose sample to be predicted is input into a lightweight classifier to obtain a first probability vector and a second probability vector of the dynamic pose sample belonging to each preset dynamic pose category. The lightweight classifier is trained from an offline sample set and / or unlabeled samples input online.
[0041] Optionally, in some embodiments, before inputting the dynamic pose sample to be predicted into the lightweight classifier, the method further includes: acquiring an offline sample set, wherein the offline sample set includes a radar-based human dynamic pose sample set; determining a lightweight classifier to be trained, wherein the lightweight classifier to be trained includes a reference module based on a decision tree ensemble model, an incremental module based on a decision tree ensemble model, and a sample cache module with a preset sampling mechanism; and pre-training each binary decision tree ensemble model in the reference module using the radar-based human dynamic pose sample set based on a preset training algorithm to obtain an initial lightweight classifier.
[0042] Optionally, in some embodiments, the above-described classification method based on a lightweight classifier further includes: using online input unlabeled samples to train the incremental module, the reference module, and the sample cache module online to obtain a lightweight classifier.
[0043] The workflow of the radar-based dynamic gesture recognition system used in this application embodiment is as follows: Figure 3As shown, a 40kHz ultrasonic radar is used, and the transmitted signal is a coherent pulse train. There is one transmitter and three receivers. After receiving the echo signals from the three channels, the signals are first bandpass filtered to suppress aliasing. Then, they are converted into digital signals through digital-to-analog conversion. Subsequently, I / Q demodulation, downsampling, and FFT are performed to obtain the RDM stream. Frame-level features, including scattering center velocity, position, and energy, are extracted from the RDM stream frame by frame. Then, statistical features, including mean, maximum, minimum, and standard deviation, are extracted based on the obtained frame-level features. Finally, the frame-level features and statistical features are concatenated to obtain a 1080-dimensional feature vector, which is used as input to a lightweight classifier for classification or incremental training.
[0044] The reference module consists of multiple binary decision tree ensemble models, where each predefined human dynamic pose category corresponds to one of these models. The decision trees in the reference module have variable voting weights. The incremental module also consists of multiple binary decision tree ensemble models, where each predefined human dynamic pose category corresponds to one of these models. The incremental module is divided into several batches based on the training order, with each batch containing several decision trees. Each leaf node of a decision tree in the incremental module contains an index pool and a pseudo-label counter. The index pool has a fixed capacity and a specific replacement mechanism for temporarily storing the indexes of some pseudo-labeled samples. The pseudo-label counter counts the pseudo-labels of all indexed samples specified in the index pool. The sample cache module has a fixed capacity and a preset replacement mechanism for temporarily storing some pseudo-labeled samples and their index information. The sample cache module also has a preset sampling mechanism for selecting some temporarily stored pseudo-labeled samples and their index information to be output to the incremental module at a system-specified time.
[0045] Specifically, the structure of the lightweight classifier to be trained is as follows: Figure 4As shown, the lightweight classifier to be trained consists of a reference module, an incremental module, and a sample cache module. The reference module consists of 8 binary random forest classifiers, each containing 20 decision trees. The incremental module consists of 8 binary random forest classifiers, each containing 50 decision trees. The incremental module is divided into 5 batches, designated batch 0, batch 1, batch 2, batch 3, and batch 4. Each batch contains 10 decision trees from each of the binary random forest classifiers, and the decision trees within each batch do not overlap. The index pool capacity of the leaf nodes in the incremental module is set to 20, and the replacement strategy is set to random replacement. The sample caching module consists of 8 sub-caching modules, each storing one type of pseudo-label sample. Each sub-caching module has a capacity of 10, and its replacement strategy is random replacement. The sampling strategy of the sample caching module is Max-Gini sampling. Specifically, the Max-Gini sampling method means that when the i-th type of gesture is specified as a positive gesture and non-i-th type gestures as negative gestures, the system first generates a random value uniformly distributed from 0 to 1. If the value is greater than 0.5, a pseudo-label sample is randomly selected from the i-th sub-caching module; otherwise, a non-i-th sub-caching module is randomly selected, and a pseudo-label sample is randomly selected from it.
[0046] Optionally, in some embodiments, the incremental module, reference module, and sample cache module are trained online using online input unlabeled samples, including: determining whether a new unlabeled sample has arrived; if a new unlabeled sample has arrived, assigning a pseudo-label to the new unlabeled sample through the reference module to obtain a new pseudo-labeled sample, and obtaining a pseudo-label prediction result based on the new pseudo-labeled sample and all historical pseudo-labeled samples; updating the voting weight of the decision tree in the reference module based on the pseudo-label prediction result, and storing the new pseudo-labeled sample and its index information in the sample cache module.
[0047] In the reference module, when assigning pseudo-labels to newly arriving unlabeled samples, firstly, each binary classification decision tree ensemble model in the reference module provides the probability that the sample to be predicted belongs to each predefined dynamic pose category. Then, the dynamic pose category with the highest probability is selected as the pseudo-label for that sample. The probability is calculated as the ratio of the weighted sum of positive votes in the binary classification decision tree ensemble model to the weighted sum of all votes.
[0048] This application embodiment trains the aforementioned classifier, specifically by performing offline training and incremental training sequentially within each iteration. During the offline training phase, a preset training algorithm (e.g., random forest training algorithm, extreme random forest algorithm, etc.) is invoked to train each binary random forest classifier in the reference module. When training the binary random forest classifier corresponding to the i-th type of gesture, the offline training set is first binary-coded, that is, all i-th type gesture samples are set as positive examples, and all non-i-th type gesture samples are set as negative examples. After completing offline training, the voting weights of all decision trees in the reference module are initialized to 1. During the online training phase, unlabeled samples from the incremental training set are input sequentially, and the classifier is trained and adjusted according to the following process:
[0049] Specifically, such as Figure 5 As shown, if a new unlabeled sample x arrives, the reference module assigns a pseudo-label to the newly arrived unlabeled sample x. The steps are as follows: First, the probability that x belongs to each class is given by each binary random forest classifier in the reference module, where the probability that x belongs to the i-th class gesture is... The calculation formula is as follows:
[0050]
[0051] in, and Let be the number of decision trees that predict positive and negative, respectively, in the i-th binary random forest classifier. and These are the voting weights of the decision trees that predict positive and negative in the i-th binary random forest classifier in the reference module, respectively. Both are initialized to 1 after offline training is completed.
[0052] Next, order Equals the gesture category with the highest probability:
[0053]
[0054] Furthermore, based on historical (including current) pseudo-label prediction results, the voting weights of the decision tree in the reference module are updated, using the following method:
[0055]
[0056] in, and , respectively, represent the number of times the i-th binary random forest has historically predicted negative and positive, and 0.125 represents the prior probability of dynamic gestures appearing in each category.
[0057] The pseudo-label sample and its index information are stored in the sample cache module, and the pseudo-label sample and its index information are stored in the first... If a sub-caching module is full, a preset replacement mechanism is used to replace an existing item in the sample cache module with a newly arrived pseudo-label sample.
[0058] Optionally, in some embodiments, after determining whether a new unlabeled sample has arrived, the method further includes: if no new unlabeled sample has arrived, determining whether the sample caching module has received a sampling command, and if a sampling command is received, designating any batch in the incremental module as the current training batch, and sampling multiple pseudo-labeled samples and the index information of each pseudo-labeled sample from the sample caching module according to a preset sampling mechanism, and outputting them to the incremental module; for each pseudo-labeled sample input to the incremental module, finding each decision leaf node along the decision path of each decision tree in the current training batch, storing the index information of each pseudo-labeled sample input to the incremental module in the corresponding index pool and updating the pseudo-label counter, and calculating the preset splitting criterion for each decision leaf node based on the updated pseudo-label counter result; for any decision leaf node whose preset splitting criterion value is greater than a preset splitting threshold, retrieving the corresponding pseudo-labeled sample from the sample caching module to form a mini training set based on the index information stored in the index pool of any decision leaf node, and performing incremental splitting on any decision leaf node in the mini training set based on a preset decision tree training algorithm. Here, sampling refers to sampling with replacement. A batch in the incremental module contains several decision trees. Initializing a batch involves pruning the decision trees within that batch to a certain extent, such as retaining only the root nodes of the decision trees within the batch. Any batch can be determined according to preset rules or randomly selected; no specific limitation is made here.
[0059] It should be understood that if no new unlabeled samples arrive and the cumulative number of output samples to the current training batch in the incremental module reaches 120, then the process switches to the next training batch. In this batch, all decision trees are reset to root nodes. Then, based on the Max-Gini sampling mechanism, 20 pseudo-labeled samples and their index information are sequentially output from the sample cache module to each binary random forest classifier in the incremental module. For each pseudo-labeled sample input to the incremental module, the decision leaf nodes are found along the decision paths of each decision tree in the current training batch, their indexes are stored in the corresponding index pool, and the pseudo-label counter is updated. If the index pool is full, a preset replacement mechanism is used to replace an existing entry in the index pool with a newly arrived index. Based on the updated pseudo-label count, preset splitting criteria (e.g., Gini coefficient, information entropy) are calculated for each decision leaf node. For each decision leaf node with a Gini coefficient greater than 0.18 (i.e., the preset splitting threshold), a mini-training set is formed by retrieving the corresponding pseudo-label sample from the sample cache module according to the index stored in its index pool. Then, a preset decision tree training algorithm is invoked to incrementally split the decision leaf node on the mini-training set, i.e., recursively growing the descendant nodes of the decision leaf node. Retrieving pseudo-label samples from the sample cache module does not change the existing entries in the sample cache module; incremental splitting of the decision leaf node means recursively growing its descendant nodes as the root node while maintaining the connection relationship between the node and its parent node.
[0060] Optionally, in some embodiments, after incrementally splitting any decision leaf node on the mini training set, the method further includes: determining whether a pause command has been received; if a pause command is received, the incremental training phase of the incremental module is terminated; otherwise, it is re-determined whether a new unlabeled sample has arrived.
[0061] Understandably, if the system issues a pause command, the incremental training phase of the incremental module will be exited; otherwise, a new assessment will be conducted to determine if any new unlabeled samples have arrived.
[0062] In step S103, the first probability vector and the second probability vector are fused to obtain the target probability vector, and the category with the highest probability is selected as the label of the dynamic pose sample to be predicted based on the target probability vector.
[0063] The reasoning method of the above classifier is as follows: Given a dynamic gesture sample x with a label to be predicted, firstly, the reference module and the incremental module respectively provide the first probability vector and the second probability vector of x belonging to each gesture category:
[0064]
[0065]
[0066] in, Let x be the probability that the i-th binary random forest classifier in the reference / incremental module belongs to the i-th type of gesture. and , respectively, represent the number of decision trees that predict positive and negative in the i-th binary random forest classifier. and These are the voting weights of the decision trees that predict positive and negative predictions in the i-th binary random forest classifier in the reference module.
[0067] Next, the target probability vector is obtained by linearly weighting the first and second probability vectors given by the reference module and the incremental module:
[0068]
[0069] Finally, the gesture category with the highest weighted probability is selected as the label for the dynamic pose sample to be predicted:
[0070]
[0071] The classifiers trained using the above method were tested in each fold, and the results are shown in Table 1 below:
[0072] Table 1
[0073]
[0074] As can be seen from the table above, the test performance of the classifier within each fold was significantly improved after online training, proving the effectiveness of the classifier and its training and inference methods in improving user-oriented personalized recognition performance by utilizing online-collected unlabeled user samples in the field of radar-based dynamic gesture recognition.
[0075] Regarding storage overhead, the classifier described above has a model size of only 0.5MB after completing offline and incremental training. In terms of computational overhead, on a laptop equipped with an Intel i7-11800H CPU and 16GB DDR4 memory, the average time for a single inference operation is approximately 12ms, and the average time for incremental training is approximately 15.2s. Considering that 400 unlabeled samples are sequentially input during incremental training, the average processing time per sample is only about 38ms. Therefore, the classifier and its accompanying training and inference methods in this embodiment have low storage and computational overhead, making them suitable for deployment on lightweight computing platforms.
[0076] The embodiments of this application have the following improvements compared to previous similar solutions:
[0077] In terms of classifier structure:
[0078] (1) Configurable voting weights were introduced for the decision tree in the reference module;
[0079] (2) Divide the incremental modules into several batches that are distinct from each other in terms of training order;
[0080] Regarding the classifier training process:
[0081] (1) The screening mechanism for pseudo-labeled samples has been removed;
[0082] (2) A self-adjusting mechanism for voting weights in the reference module has been added;
[0083] (3) The prediction mechanism of pseudo-labels has been changed: it is stipulated that the pseudo-labels of newly arrived unlabeled samples are given by the reference module as a whole to indicate that the sample belongs to a specific category in the predefined dynamic pose categories;
[0084] (4) The flow mechanism of pseudo-label samples has been changed: it is stipulated that after pseudo-label samples are assigned pseudo-labels, they are directly stored in the sample cache module, and the index information is output to the incremental module through a preset sampling mechanism at a time specified by the system.
[0085] (5) An incremental module batch cyclic step-by-step training method has been added: the incremental module is divided into several batches that are different from each other in training order. The pseudo-label samples and their index information sampled from the sample cache module are only output to the training batch currently specified by the system. When the system switches training batches, the batch to which it is switched is initialized first.
[0086] The present invention has the following advantages over previous similar solutions:
[0087] a) Improved the utilization efficiency of unlabeled sample streams;
[0088] b) Further improved the performance of personalized classification for users;
[0089] c) Decouple the timing of incremental splits in the decision tree within the incremental module from the timing of the user's demonstration of dynamic poses, allowing the system to select the timing of incremental splits based on the availability of computing resources.
[0090] d) By introducing a batch-based, iterative training method for the incremental module, the contradiction between the irreversible growth of the decision tree and changes in user posture characteristics in the incremental module is resolved, while further reducing the growth rate.
[0091] The computational complexity of the training phase.
[0092] In summary, the beneficial effects of the embodiments of this application are as follows:
[0093] (1) It can use unlabeled dynamic pose samples collected online during system operation to improve the personalized recognition performance for users, and solves the problem of performance degradation of traditional offline supervised algorithms when facing new users;
[0094] (2) It expands the size of the sample set that can be used for training and reduces the size requirement for the pre-collected radar-based dynamic pose dataset, thereby saving manpower costs.
[0095] (3) The algorithm has low storage overhead and computational complexity, and is more friendly to lightweight computing platforms.
[0096] The classification method based on a lightweight classifier proposed in this application involves inputting the dynamic pose sample to be predicted into a lightweight classifier to obtain a first probability vector and a second probability vector indicating which of the dynamic pose sample belongs to each preset dynamic pose category. These are then fused to obtain a target probability vector. The category with the highest probability from the target probability vector is selected as the label of the dynamic pose sample to be predicted. This solves the problems of high cost of offline training sample acquisition and low generalization performance of offline supervised machine learning algorithms on users who have not provided training samples. Furthermore, this algorithm has low complexity and can be deployed on lightweight platforms.
[0097] Next, a classification device based on a lightweight classifier according to an embodiment of this application is described with reference to the accompanying drawings.
[0098] Figure 6 This is a block diagram of a classification device based on a lightweight classifier according to an embodiment of this application.
[0099] like Figure 6 As shown, the classification device 10 based on a lightweight classifier includes: a first acquisition module 100, a second acquisition module 200, and a classification module 300.
[0100] The system includes a first acquisition module 100 for acquiring dynamic pose samples to be predicted; a second acquisition module 200 for inputting the dynamic pose samples to be predicted into a lightweight classifier to obtain a first probability vector and a second probability vector of the dynamic pose samples belonging to each preset dynamic pose category, wherein the lightweight classifier is trained from an offline sample set and / or unlabeled samples input online; and a classification module 300 for fusing the first probability vector and the second probability vector to obtain a target probability vector, and selecting the category with the highest probability as the label of the dynamic pose sample to be predicted based on the target probability vector.
[0101] Optionally, in some embodiments, before inputting the dynamic pose sample to be predicted into the lightweight classifier, the second acquisition module 200 is further configured to: determine the lightweight classifier to be trained, wherein the lightweight classifier to be trained includes a reference module based on a decision tree ensemble model, an incremental module based on a decision tree ensemble model, and a sample cache module with a preset sampling mechanism; and pre-train each binary classification decision tree ensemble model in the reference module using a radar-based human dynamic pose sample set based on a preset training algorithm to obtain an initial lightweight classifier.
[0102] Optionally, in some embodiments, the classification device 10 based on the lightweight classifier described above further includes: an online training module, used to train the incremental module, the reference module and the sample cache module online using online input unlabeled samples to obtain a lightweight classifier.
[0103] Optionally, in some embodiments, the online training module is further configured to: determine whether there are any newly arrived unlabeled samples; if there are, assign pseudo-labels to the newly arrived unlabeled samples through the reference module to obtain new pseudo-labeled samples, and obtain pseudo-label prediction results based on the new pseudo-labeled samples and all historical pseudo-labeled samples; based on the pseudo-label prediction results, update the voting weights of the decision tree in the reference module, and store the new pseudo-labeled samples and their index information in the sample cache module.
[0104] Optionally, in some embodiments, after determining whether a new unlabeled sample has arrived, the online training module is further configured to: if no new unlabeled sample has arrived, determine whether the sample caching module has received a sampling command, and when the sampling command is received, designate any batch in the incremental module as the current training batch, and sample multiple pseudo-labeled samples and the index information of each pseudo-labeled sample from the sample caching module according to a preset sampling mechanism and output them to the incremental module; for each pseudo-labeled sample input to the incremental module, find each decision leaf node along the decision path of each decision tree in the current training batch, store the index information of each pseudo-labeled sample input to the incremental module in the corresponding index pool and update the pseudo-label counter, and calculate the preset splitting criterion for each decision leaf node according to the updated pseudo-label count result; for any decision leaf node whose preset splitting criterion value is greater than the preset splitting threshold, according to the index information stored in the index pool of any decision leaf node, retrieve the corresponding pseudo-labeled sample from the sample caching module to form a mini training set, and perform incremental splitting on any decision leaf node on the mini training set based on the preset decision tree training algorithm.
[0105] Optionally, in some embodiments, after incrementally splitting any decision leaf node on the mini training set, the online training module is further configured to: determine whether a pause command has been received; if a pause command is received, the incremental training phase of the incremental module is terminated; otherwise, the system re-determines whether any new unlabeled samples have arrived.
[0106] It should be noted that the foregoing explanation of the classification method embodiment based on lightweight classifier also applies to the classification device based on lightweight classifier in this embodiment, and will not be repeated here.
[0107] The classification device based on a lightweight classifier proposed in this application involves inputting a dynamic pose sample to be predicted into a lightweight classifier to obtain a first probability vector and a second probability vector indicating which of each preset dynamic pose category the dynamic pose sample belongs to. These are then fused to obtain a target probability vector. The category with the highest probability is selected as the label for the dynamic pose sample to be predicted based on the target probability vector. This solves the problems of high cost of offline training sample acquisition and low generalization performance of offline supervised machine learning algorithms on users who have not provided training samples. Furthermore, the algorithm has low complexity and can be deployed on lightweight platforms.
[0108] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:
[0109] The memory 701, the processor 702, and the computer program stored on the memory 701 and executable on the processor 702.
[0110] When the processor 702 executes the program, it implements the classification method based on a lightweight classifier provided in the above embodiments.
[0111] Furthermore, electronic devices also include:
[0112] Communication interface 703 is used for communication between memory 701 and processor 702.
[0113] The memory 701 is used to store computer programs that can run on the processor 702.
[0114] The memory 701 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0115] If the memory 701, processor 702, and communication interface 703 are implemented independently, then the communication interface 703, memory 701, and processor 702 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0116] Optionally, in a specific implementation, if the memory 701, processor 702, and communication interface 703 are integrated on a single chip, then the memory 701, processor 702, and communication interface 703 can communicate with each other through an internal interface.
[0117] The processor 702 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0118] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described classification method based on a lightweight classifier.
[0119] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0120] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0121] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0122] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0123] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0124] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0125] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0126] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A classification method based on a lightweight classifier, characterized in that, Includes the following steps: Obtain dynamic pose samples to be predicted; An offline sample set is acquired, including a radar-based human dynamic pose sample set; a lightweight classifier to be trained is determined, comprising a reference module based on a decision tree ensemble model, an incremental module based on a decision tree ensemble model, and a sample cache module with a preset sampling mechanism; based on a preset training algorithm, each binary classification decision tree ensemble model in the reference module is pre-trained using the radar-based human dynamic pose sample set to obtain an initial lightweight classifier; wherein the incremental module, the reference module, and the sample cache module are trained online using online input unlabeled samples to obtain the lightweight classifier; The binary random forest classifiers in the reference module provide the following: The probability of belonging to a category, among which The probability of belonging to the i-th type of gesture The calculation formula is as follows: in, and Let be the number of decision trees that predict positive and negative, respectively, in the i-th binary random forest classifier. and These are the voting weights of the decision trees that predict positive and negative in the i-th binary random forest classifier in the reference module, respectively. Both are initialized to 1 after offline training is completed. make Equals the gesture category with the highest probability: Based on historical pseudo-label prediction results, the voting weights of the decision tree in the reference module are updated using the following method: and , respectively, represent the number of times the i-th binary random forest has historically predicted negative and positive, and 0.125 represents the prior probability of dynamic gestures appearing in each category; The process involves determining whether a new unlabeled sample has arrived. If such a sample exists, a pseudo-label is assigned to it via the reference module, resulting in a new pseudo-labeled sample. A pseudo-label prediction result is then obtained based on this new pseudo-labeled sample and all historical pseudo-labeled samples. Based on the pseudo-label prediction result, the voting weights of the decision tree in the reference module are updated, and the new pseudo-labeled sample and its index information are stored in the sample cache module. Individual cache modules; If no new unlabeled sample arrives, it is determined whether the sample caching module has received a sampling command. If the sampling command is received, any batch in the incremental module is designated as the current training batch, and multiple pseudo-labeled samples and the index information of each pseudo-labeled sample are sampled from the sample caching module according to the preset sampling mechanism and output to the incremental module. For each pseudo-labeled sample input to the incremental module, each decision leaf node is found along the decision path of each decision tree in the current training batch. The index information of each pseudo-labeled sample input to the incremental module is stored in the corresponding index pool and the pseudo-label counter is updated. The preset splitting criterion of each decision leaf node is calculated based on the updated pseudo-label counter result. For any decision leaf node whose preset splitting criterion value is greater than the preset splitting threshold, the corresponding pseudo-labeled sample is taken from the sample caching module to form a mini training set based on the index information stored in the index pool of the decision leaf node. Based on the preset decision tree training algorithm, the decision leaf node is incrementally split on the mini training set. The dynamic pose sample to be predicted is input into a lightweight classifier. The reference module and the incremental module respectively provide the first probability vector and the second probability vector of the dynamic pose sample to be predicted belonging to each preset dynamic pose category. The lightweight classifier is trained from an offline sample set and / or online input unlabeled samples. Wherein, the dynamic pose sample to be predicted The first probability vector belonging to each preset dynamic pose category is given by each of the binary random forest classifiers in the reference module. The probability composition belonging to each category, among which The probability of belonging to the i-th type of gesture The calculation formula is as follows: in, and Let be the number of decision trees that predict positive and negative, respectively, in the i-th binary random forest classifier. and These are the voting weights of the decision trees that predict positive and negative predictions in the i-th binary random forest classifier in the reference module, respectively. Wherein, the dynamic pose sample to be predicted The second probability vector belonging to each preset dynamic pose category is given by each of the binary random forest classifiers in the incremental module. The probability composition belonging to each category, among which The probability of belonging to the i-th type of gesture The calculation formula is as follows: Furthermore, the first probability vector and the second probability vector are fused to obtain a target probability vector, and the category with the highest probability is selected as the label of the dynamic pose sample to be predicted based on the target probability vector.
2. The method according to claim 1, characterized in that, After incrementally splitting any of the decision leaf nodes on the mini training set, the method further includes: Determine if a pause command has been received; If the pause command is received, the incremental training phase of the incremental module ends; otherwise, it is re-evaluated whether a new unlabeled sample has arrived.
3. A classification device based on a lightweight classifier, characterized in that, A method for implementing the classification method based on a lightweight classifier as described in any one of claims 1-2 includes: The first acquisition module is used to acquire dynamic pose samples to be predicted; The second acquisition module is used to input the dynamic pose sample to be predicted into a lightweight classifier to obtain a first probability vector and a second probability vector of the dynamic pose sample belonging to each preset dynamic pose category. The lightweight classifier is trained from an offline sample set and / or online input unlabeled samples. The classification module is used to fuse the first probability vector and the second probability vector to obtain a target probability vector, and select the category with the highest probability as the label of the dynamic pose sample to be predicted based on the target probability vector. Before inputting the dynamic pose sample to be predicted into the lightweight classifier, the second acquisition module is further configured to: A lightweight classifier to be trained is determined, wherein the lightweight classifier to be trained includes a reference module based on a decision tree ensemble model, an incremental module based on a decision tree ensemble model, and a sample cache module with a preset sampling mechanism. Based on a preset training algorithm, the binary classification decision tree ensemble model in the reference module is pre-trained using a radar-based human dynamic posture sample set to obtain an initial lightweight classifier.
4. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the classification method based on a lightweight classifier as described in any one of claims 1-2.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the classification method based on a lightweight classifier as described in any one of claims 1-2.
Citation Information
Patent Citations
Target identification method, device and system
CN103034866A
Online semi-supervised learning classifier for radar posture recognition, and classification method of classifier
CN113989560A
