A fall detection model training method, fall detection method, device and equipment
By preprocessing and parameter quantizing CSI signals, a deep learning model training method solves the problems of high training cost and limited resources in existing technologies, and achieves efficient fall detection model deployment and performance improvement.
Patent Information
- Application Number
- CN202310912680.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2043-07-24
AI Technical Summary
Existing technologies have difficulty deploying fall detection models in environments with limited training costs and memory resources, and rely heavily on manually segmented features for classification, resulting in poor performance.
By acquiring CSI signals and performing data preprocessing, the training feature matrix and spectrum are extracted. The deep learning model is trained using the cross-entropy loss function. The parameter types of the convolutional layer and the fully connected layer are changed from floating-point to integer to optimize the model training process.
This improves the training efficiency and performance of the fall detection model, reduces computing resource usage, makes the model easier to deploy on hardware, and improves detection accuracy and robustness.
Smart Images

Figure CN117034007B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of model training and motion detection, and in particular to a fall detection model training method, a fall detection method, a device and equipment. Background Art
[0002] Existing technologies use CSI (Channel State Information) signals to obtain fall motion features and perform perception detection. However, existing technologies use direct manual division of signal features and classification through traditional machine learning, such as support vector machines (SVMs) and random forests. Some also use complex deep learning models to automatically learn data features for classification.
[0003] Existing machine learning methods rely heavily on manually divided features to achieve their classification performance, while using complex deep learning models to automatically learn data features may cause difficulties when deploying classification models in real-world environments with limited training costs and memory resources. Summary of the Invention
[0004] In view of this, the present invention provides a fall detection model training method, a fall detection method, an apparatus and a device to improve the training efficiency of the fall detection model, improve the performance of fall detection and reduce computing resources.
[0005] One aspect of the present invention provides a fall detection model training method, comprising:
[0006] Acquire a training CSI signal including a fall action, and perform data preprocessing on the training CSI signal;
[0007] Acquire multiple training feature matrices and multiple training spectrograms according to the training CSI signal that has undergone data preprocessing;
[0008] Using the plurality of training feature matrices marked with training labels as first training data, using the plurality of training spectrograms marked with training labels as second training data, and training a preset deep learning model with the first training data, the second training data, and a cross-entropy loss function to obtain an initial deep learning model;
[0009] Changing the parameter types of the convolutional layer and the fully connected layer in the initial deep learning model from floating point type to integer type, and then training the initial deep learning model with the first training data, the second training data and the cross entropy loss function to obtain a target deep learning model.
[0010] Optionally, the performing data preprocessing on the training CSI signal includes:
[0011] Filtering the training CSI signal to filter out abnormal values that do not meet preset conditions;
[0012] Normalization processing is performed on the filtered training CSI signal to accelerate gradient descent, thereby obtaining the data-preprocessed training CSI signal.
[0013] Optionally, the acquiring a plurality of training feature matrices and a plurality of training spectrograms according to the training CSI signal that has undergone data preprocessing includes:
[0014] taking the average amplitude of all subcarriers in the training CSI signal after data preprocessing as a feature, and obtaining a plurality of initial feature matrices corresponding to the feature from the training CSI signal after data preprocessing;
[0015] Performing Fourier transform on the training CSI signal after data preprocessing to obtain multiple initial spectrograms;
[0016] A plurality of the training feature matrices are obtained according to the plurality of the initial feature matrices, and a plurality of the training spectrograms are obtained according to the plurality of the initial spectrograms.
[0017] Optionally, the acquiring a plurality of the training feature matrices according to the plurality of the initial feature matrices, and the acquiring a plurality of the training spectrograms according to the plurality of the initial spectrograms, comprises:
[0018] Obtaining a first eigenvalue corresponding to each of the initial feature matrices according to a principal component analysis method, calculating a first variance contribution rate according to each of the first eigenvalues, and using each of the initial feature matrices corresponding to each of which the first variance contribution rate reaches a preset threshold as the training feature matrix;
[0019] According to the principal component analysis method, the second eigenvalue and eigenvector of each of the initial spectrograms are obtained, and the second variance contribution rate is calculated based on each of the second eigenvalues. The eigenvectors corresponding to the second variance contribution rate reaching the preset threshold are weighted averaged, and the training spectrogram is obtained based on the eigenvectors after weighted average.
[0020] Optionally, the training method further includes:
[0021] Integrating the convolutional block attention module into the preset deep learning model;
[0022] The method of training a preset deep learning model using the first training data, the second training data, and a cross entropy loss function includes:
[0023] The preset deep learning model integrated with the convolutional block attention module is trained using the first training data, the second training data and the cross-entropy loss function.
[0024] Optionally, the number of fall labels in the first training data and the second training data is greater than the number of non-fall labels;
[0025] The preset deep learning model adopts one of LeNet, AlexNet, ResNet34 or LSTM-CNN; or, the preset deep learning model adopts ResNet18;
[0026] The ResNet18 includes four target residual blocks, each of which consists of two convolutional layers.
[0027] Another aspect of the present invention further provides a fall detection method, comprising:
[0028] Acquire target CSI signal;
[0029] The target CSI signal is input into a target deep learning model to perform fall detection based on the target CSI signal, and the target deep learning model is trained using the above-mentioned fall detection model training method to obtain a target deep learning model.
[0030] Another aspect of the present invention further provides a fall detection model training device, comprising:
[0031] The first unit is configured to obtain a training CSI signal including a fall action and perform data preprocessing on the training CSI signal;
[0032] The second unit is configured to obtain a plurality of training feature matrices and a plurality of training spectrograms according to the training CSI signal that has undergone data preprocessing;
[0033] A third unit is configured to use the plurality of training feature matrices marked with training labels as first training data, and the plurality of training spectrograms marked with training labels as second training data, and to train a preset deep learning model using the first training data, the second training data, and a cross-entropy loss function to obtain an initial deep learning model;
[0034] The fourth unit is used to change the parameter types of the convolutional layer and the fully connected layer in the initial deep learning model from floating point type to integer type, and then train the initial deep learning model with the first training data, the second training data and the cross entropy loss function to obtain a target deep learning model.
[0035] Another aspect of the present invention further provides an electronic device, comprising a processor and a memory;
[0036] The memory is used to store programs;
[0037] The processor executes the program to implement the method.
[0038] Another aspect of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method.
[0039] The present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the electronic device to perform the above-described method.
[0040] The present invention can obtain the training feature matrix and training spectrum corresponding to the CSI signal, and train a preset deep learning model in combination with the cross-entropy loss function, thereby saving computing resources and simplifying the training process; then the present invention changes the parameter types of the convolutional layer and the fully connected layer in the trained initial deep learning model from floating-point type to integer model parameter type, and trains the initial deep learning model again to obtain the target deep learning model, thereby optimizing memory utilization. Therefore, the target deep learning model of the present invention can be more easily deployed on hardware, and further, using the target deep learning model for fall detection can occupy fewer computing resources and improve detection performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 A flowchart of a fall detection model training method provided by an embodiment of the present invention;
[0043] Figure 2 An example diagram of a scenario for collecting and training CSI signals provided by an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of obtaining a feature matrix and a spectrum diagram using principal component analysis provided by an embodiment of the present invention;
[0045] Figure 4 A flow chart of a training model provided by an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of model performance comparison provided by an embodiment of the present invention;
[0047] Figure 6A performance comparison chart of two ResNet models provided by an embodiment of the present invention when using two input data types as input;
[0048] Figure 7 A performance comparison chart of different experimental scenarios provided by an embodiment of the present invention;
[0049] Figure 8 A schematic diagram of a flow chart of a fall detection method provided by an embodiment of the present invention;
[0050] Figure 9 This is a structural block diagram of a fall detection model training device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0052] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flowchart.
[0053] The terms "first," "second," and the like in the specification, claims, and drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. Furthermore, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not expressly listed or inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention pertains. The terms used herein are for the purpose of describing embodiments of the present invention only and are not intended to limit the present invention.
[0055] Reference Figure 1 , an embodiment of the present invention provides a fall detection model training method, including steps S100 to S130, specifically as follows:
[0056] S100: Acquire a training CSI signal including a fall action, and perform data preprocessing on the training CSI signal.
[0057] In embodiments of the present invention, a CSI signal transmitting terminal can transmit CSI signals, and a CSI signal receiving terminal can receive CSI signals. Optionally, both the transmitting terminal and the receiving terminal can include an ExpressIF ESP32 chip and an antenna. The chip can be used to transmit and receive CSI signals, and each antenna of the receiving terminal can receive CSI signals for 52 subcarriers.
[0058] Optionally, the training CSI signals acquired by an embodiment of the present invention may include multiple motion features. For example, the motion features may include: falling motions and various daily motions, such as jumping, walking, running, or standing. In the case of standing, the embodiment of the present invention can acquire upper body movements, such as stretching, playing with a mobile phone, or swinging the hands. In an optional embodiment, the training CSI signals including the above motion features can be collected within 5 seconds.
[0059] Specifically, refer to Figure 2 , an embodiment of the present invention provides an example diagram of a scenario for collecting training CSI signals. Figure 2 The arrow in the figure indicates the direction in which the person falls, that is, the arrow indicates the direction of movement. The same representation method can also be applied to other actions, which will not be described in detail here. Optionally, in the process of obtaining training CSI signals, the present invention can collect CSI signals generated by 6 testers of different heights and body shapes, and each action can be collected 40 times. In addition, the embodiment of the present invention can also collect CSI signals of other action scenes, such as conference rooms and offices, and use the CSI signals of different action scenes to test the robustness of the target deep learning model trained by the embodiment of the present invention in different environments.
[0060] As a further optional implementation manner, the performing data preprocessing on the training CSI signal includes:
[0061] Filtering the training CSI signal to filter out abnormal values that do not meet preset conditions;
[0062] Normalization processing is performed on the filtered training CSI signal to accelerate gradient descent, thereby obtaining the data-preprocessed training CSI signal.
[0063] Specifically, due to inherent hardware limitations, the original training CSI signals collected may contain outliers and noise that do not meet preset requirements. These outliers and noise can adversely affect the final recognition results. Therefore, embodiments of the present invention filter the training CSI signals, optionally using a Hampel filter to eliminate outliers and noise. After removing outliers and noise, the data is normalized to accelerate gradient descent and find the optimal solution during model training.
[0064] S110: Acquire multiple training feature matrices and multiple training spectrograms according to the training CSI signal that has undergone data preprocessing.
[0065] Specifically, the embodiment of the present invention can obtain two types of data from the training CSI signal that has undergone data preprocessing. The first type of data is a plurality of feature matrices extracted from the training CSI signal, and the second type is a spectrum diagram.
[0066] As a further optional implementation, S110 may include:
[0067] taking the average amplitude of all subcarriers in the training CSI signal after data preprocessing as a feature, and obtaining a plurality of initial feature matrices corresponding to the feature from the training CSI signal after data preprocessing;
[0068] Performing Fourier transform on the training CSI signal after data preprocessing to obtain multiple initial spectrograms;
[0069] A plurality of the training feature matrices are obtained according to the plurality of the initial feature matrices, and a plurality of the training spectrograms are obtained according to the plurality of the initial spectrograms.
[0070] Specifically, the basic idea of principal component analysis (PCA) is to map high-dimensional data into a low-dimensional space so that the mapped data retains the main features of the original data. Principal component analysis can reduce the dimensionality of data, thereby reducing computational complexity, eliminating noise and redundant information, and improving the efficiency and accuracy of data processing. Using principal component analysis, you can sort components according to their eigenvalues. The larger the eigenvalue, the more significant the contribution of the component to the data characteristics. Based on the variance contribution rate of each PC (i.e., component), select the principal component score to be retained. Figure 3 The embodiment of the present invention provides a schematic diagram of obtaining a feature matrix and a spectrum diagram using a principal component analysis method. Figure 3 Two data types are described. Optionally, the PC retention amount can be different for the two different input data types.
[0071] Furthermore, the step of obtaining a plurality of the training feature matrices based on the plurality of the initial feature matrices and obtaining a plurality of the training spectrograms based on the plurality of the initial spectrograms may include:
[0072] The first eigenvalue corresponding to each of the initial feature matrices is obtained according to the principal component analysis method, and a first variance contribution rate is calculated according to each of the first eigenvalues, and each of the initial feature matrices corresponding to the first variance contribution rate reaching a preset threshold is used as the training feature matrix.
[0073] Specifically, the first type of data (i.e., the feature matrix) is processed: The first type of input data uses amplitude as a recognition feature. The size of the collected feature matrix can be 104×N, and the feature matrix is transformed into a 52×N complex matrix. To achieve equal dimensions for rows and columns, embodiments of the present invention can process the feature matrix into a 52×52 matrix format.
[0074] According to the principal component analysis method, the second eigenvalue and eigenvector of each of the initial spectrograms are obtained, and the second variance contribution rate is calculated based on each of the second eigenvalues. The eigenvectors corresponding to the second variance contribution rate reaching the preset threshold are weighted averaged, and the training spectrogram is obtained based on the eigenvectors after weighted average.
[0075] Specifically, the processing of the second type of data (i.e., the spectrum graph): the second type of data is identified using its spectrum image as input. After principal component analysis (PCA) processing, PCA is a commonly used data dimensionality reduction and feature extraction method. The coordinates are mapped to a new coordinate system through linear transformation, so that the mapped data has the largest variance in the new coordinate system, and the eigenvalues and eigenvectors of the standardized covariance matrix can be calculated. The eigenvalue is the variance of the data in the direction of the eigenvector, and the eigenvector is the principal component (PC). The variance contribution rate is an indicator to measure the degree of contribution of each principal component to the total variance. Optionally, the embodiment of the present invention can select a PC with a variance contribution rate of more than 95%. The obtained vector is weighted averaged to obtain a 52×1 vector, thereby obtaining a spectrum graph.
[0076] S120: Using the multiple training feature matrices marked with training labels as first training data, and the multiple training spectrograms marked with training labels as second training data, training a preset deep learning model with the first training data, the second training data and the cross entropy loss function to obtain an initial deep learning model.
[0077] Specifically, there are significant differences between falls and other actions. Using a deep learning model as a classifier in the embodiments of the present invention provides sufficient learning power to distinguish the unique characteristics between falls and non-falls. Furthermore, due to the limited datasets in the embodiments of the present invention, the complexity of the deep learning model needs to be considered.
[0078] As a further optional embodiment, the first training data and the second training data both have more fall labels than non-fall labels;
[0079] The preset deep learning model adopts one of LeNet, AlexNet, ResNet34 or LSTM-CNN; or, the preset deep learning model adopts ResNet18;
[0080] The ResNet18 includes four target residual blocks, each of which consists of two convolutional layers.
[0081] Reference Figure 4 , an embodiment of the present invention provides a flow chart of a training model.
[0082] Specifically, as the complexity of deep learning models increases, the required dataset size also increases. Embodiments of the present invention can use deep learning models of different depths (i.e., CNN models), including LeNet, AlexNet, ResNet18, or ResNet34, to conduct experiments to test classifiers.
[0083] Optionally, when training a deep learning model, the embodiment of the present invention may further include:
[0084] Integrating the convolutional block attention module into the preset deep learning model;
[0085] The method of training a preset deep learning model using the first training data, the second training data, and a cross entropy loss function includes:
[0086] The preset deep learning model integrated with the convolutional block attention module is trained using the first training data, the second training data and the cross-entropy loss function.
[0087] Specifically, the embodiment of the present invention can integrate the convolutional block attention module, i.e., CBAM, into a deep learning model, such as into ResNet18, and then extract corresponding information from the spatial attention module and the channel attention module in the convolutional block attention module. Considering that CBAM is a lightweight module that can be easily integrated into any CNN model, the training method of the embodiment of the present invention is consistent with the starting point of the embodiment of the present invention to extract more information from the convolutional block attention module. Finally, the embodiment of the present invention also compares the results with LSTM-CNN. After comparison, since ResNet18 is most suitable for limited real-world conditions and also exhibits the best classification performance, the embodiment of the present invention can select ResNet18 as the above-mentioned preset deep learning model, and then train ResNet18 to obtain an initial deep learning model.
[0088] In the fall detection model training method proposed in an embodiment of the present invention, the ResNet architecture can adopt a target residual block consisting of two convolutional layers, each convolutional layer using a 3×3 kernel. The output of the convolutional layer can then be batch normalized. The deep learning model of the embodiment of the present invention can be composed of four target residual blocks, and the first target residual block can contain an additional convolutional layer with a kernel size of 1×1. In the input stage, the data passes through a convolutional layer with a kernel size of 7×7, followed by batch normalization and maxpooling. After passing through the four remaining target residual blocks, the deep learning model of the embodiment of the present invention can generate a one-dimensional vector of size 512, which is then connected to two fully connected layers with 128 and 2 neurons, respectively. Optionally, ReLU can be used as the activation function between convolutional layers, and LeakyReLU as the activation function between fully connected layers. Finally, the last layer of the deep learning model is a fully connected layer that uses a softmax function to produce a binary classification result.
[0089] The embodiment of the present invention may use the cross entropy loss function to calculate the loss between the prediction result and the actual label. Optionally, in order to minimize the loss, the embodiment of the present invention may use the Adam optimization algorithm to optimize the network parameters in the back-propagation stage, and set the learning rate of the deep learning model to 0.0001. The embodiment of the present invention saves the parameters after each training, and ensures that the saved deep learning model parameters maintain convergence for 50 epochs before and after loading to ensure that the deep learning model has classification performance. In order to prevent the deep learning model from overfitting and learning too many feature details that may be useless for the final test performance, the embodiment of the present invention may use the Dropout and weight decay methods, adding a Dropout layer between two fully connected layers, with a Dropout rate of 0.5 and a weight decay coefficient set to 0.00001.
[0090] S130: Changing the parameter types of the convolutional layer and the fully connected layer in the initial deep learning model from floating point type to integer type, and then training the initial deep learning model with the first training data, the second training data and the cross entropy loss function to obtain a target deep learning model.
[0091] Specifically, after completing the initial training in step S120, the embodiment of the present invention can obtain an initial deep learning model (ResNet18), all parameters of which can be represented in float32 format. In order to optimize memory utilization, the embodiment of the present invention can quantize the parameters of the convolutional layer and the fully connected layer into int8 format, and then further train the initial deep learning model to update the int8 parameters while following the same training process as before the quantization process, that is, the process of step S120. Then, the embodiment of the present invention can obtain the optimal model parameters of the lightweight ResNet18 (target deep learning model) and the trained ResNet18 as a trained fall detection model.
[0092] To demonstrate the effectiveness of the training method provided by the embodiment of the present invention, the embodiment of the present invention can evaluate the ResNet18 trained according to the training method from four aspects, including: the performance of the target deep learning model, the input data type, the training cost and memory usage, and the robustness in other experimental scenarios.
[0093] Comparison of target deep learning model performance: During training, if the number of sample labels for fall actions is significantly lower than the number of sample labels for non-fall actions, or if the ratio is close to 1:1, the target deep learning model will tend to learn the detailed features of non-fall actions rather than the salient features between fall and non-fall actions. This may lead to the misinterpretation of fall motions as other actions.
[0094] To address this issue, the embodiment of the present invention can set the number of falling actions in the training set (including the first training data and the second training data) to 160, and the number of non-falling actions to 140, so that the target deep learning model can focus more on learning the unique features of falling motion and reduce the exploration of non-falling motion features. However, due to the limited dataset and potential overfitting, the use of complex deep learning models may lead to poor classification performance.
[0095] Reference Figure 5 , an embodiment of the present invention provides a schematic diagram of model performance comparison. Figure 5 The CNN model in is a deep learning model.
[0096] This embodiment of the present invention uses two types of input data: one processes the training CSI signal into a 52×52 matrix, and the other converts the training CSI signal into a spectrogram. The 52×52 matrix is used for training and testing. This embodiment first compares the classification capabilities of several CNN models, including LeNet, AlexNet, ResNet18, ResNet34, and LSTM-CNN. However, this embodiment found that LeNet, with its simple network structure, was insufficiently capable of learning the required features, resulting in a test accuracy of only 60%. This embodiment used AlexNet to deepen the network, but its test accuracy was only 63%. Therefore, simply increasing the depth of a deep learning model does not improve feature learning; instead, it results in higher training costs. Therefore, this embodiment utilizes an LSTM-CNN model that incorporates the temporal correlation of motion to extract more temporally relevant features. However, this model's accuracy was only 67%, showing no significant improvement. Finally, the test accuracy of ResNet18 and ResNet34 reached 93.2% and 93%, respectively. The embodiment of the present invention further enhances ResNet18 by adding the CBAM module, resulting in an accuracy improvement of 0.1%, with an overall accuracy value of 93.3%.
[0097] Reference Figure 6 , an embodiment of the present invention provides a performance comparison diagram of two ResNet models when two input data types are used as input.
[0098] Comparison of Input Data Types: In the performance comparison of different deep learning models, the present embodiment used the first input type, directly converting the training CSI signal into a 52×52 matrix. Subsequently, the deep learning model was trained using the second input type, spectrograms. The present embodiment used the ResNet18 and ResNet34 models for training and testing, as they performed best in the previous comparison. Before training, the spectrogram pixels were resized to 227×227. After training, the accuracy of ResNet18 was 88.4%, and that of ResNet34 was 90.2%. Notably, ResNet34 performed slightly better than ResNet18 in spectrogram recognition, but its recognition performance was inferior to the first input type. Optionally, all training was performed on the CPU. When training with the second type of data, the neural network required longer forward propagation. This is due to the increased data dimensionality, which increases training time and ultimately the training cost when adjusting hyperparameters.
[0099] Comparison of training cost and memory usage: After multiple experiments, the embodiments of the present invention found that ResNet18 and ResNet34 performed best when using the first type of data as input. When using the second type of data (i.e., spectrograms) as input, ResNet34 also performed well, with an accuracy rate exceeding 90%. However, since the image size of the second type of data is larger (227×227) and training is only performed on the CPU, its training cost is significantly higher than that of the first type of data. Training ResNet34 using the second input type takes a long time, typically requiring several days to adjust the hyperparameters, and there is no significant improvement in accuracy. Therefore, training using the first type of data is relatively simple, but still achieves excellent classification performance. Finally, the parameters of ResNet18 are quantized, changing its data type from float32 to int8, reducing memory usage by approximately 75%, while also slightly improving the accuracy to 94.6%, making it more suitable for deployment on hardware.
[0100] Reference Figure 7 , an embodiment of the present invention provides a performance comparison chart of different experimental scenarios.
[0101] Robustness in Other Experimental Scenarios: This embodiment of the present invention not only evaluates the performance of a trained deep learning model in the laboratory where the data was collected, but also in other experimental scenarios to assess the model's robustness and ability to handle diverse environments. These scenarios can include conference rooms and offices. Results show that the model achieved an accuracy of 85% in the conference room experiment and 87.2% in the office experiment.
[0102] The embodiments of the present invention have the following beneficial effects:
[0103] The embodiments of this invention consider practical constraints, including training cost, memory usage, and model classification performance. Experimental results show that using the amplitude of CSI signals as input data for model training achieves comparable performance to that achieved using spectrograms, while also saving computing resources and simplifying the training process. Furthermore, compared to deep learning models trained using existing techniques, the models trained using the embodiments of this invention are more easily deployable on hardware.
[0104] Reference Figure 8 , an embodiment of the present invention provides a fall detection method, comprising:
[0105] S800: Acquire a target CSI signal.
[0106] S810: Input the target CSI signal into a target deep learning model to perform fall detection based on the target CSI signal, wherein the target deep learning model is trained using the above-mentioned fall detection model training method.
[0107] Reference Figure 9 , an embodiment of the present invention provides a fall detection model training device, comprising:
[0108] The first unit is configured to obtain a training CSI signal including a fall action and perform data preprocessing on the training CSI signal;
[0109] The second unit is configured to obtain a plurality of training feature matrices and a plurality of training spectrograms according to the training CSI signal that has undergone data preprocessing;
[0110] A third unit is configured to use the plurality of training feature matrices marked with training labels as first training data, and the plurality of training spectrograms marked with training labels as second training data, and to train a preset deep learning model using the first training data, the second training data, and a cross-entropy loss function to obtain an initial deep learning model;
[0111] The fourth unit is used to change the parameter types of the convolutional layer and the fully connected layer in the initial deep learning model from floating point type to integer type, and then train the initial deep learning model with the first training data, the second training data and the cross entropy loss function to obtain a target deep learning model.
[0112] The specific implementation of the training device is basically the same as the specific embodiment of the above-mentioned training method, and will not be repeated here.
[0113] An embodiment of the present invention further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-described training method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, an in-vehicle computer, or the like.
[0114] Specifically, the electronic device may be a user terminal or a server.
[0115] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned training method is implemented.
[0116] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0117] The embodiment of the present invention further discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs Figure 1 and Figure 8 The method shown.
[0118] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.
[0119] Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise indicated, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It will also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the ordinary skill of an engineer. Therefore, a person skilled in the art using ordinary skill will be able to implement the present invention set forth in the claims without undue experimentation. It will also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0120] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0121] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the 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 (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0122] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0123] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0124] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations 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 any one or more embodiments or examples.
[0125] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
[0126] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A fall detection model training method, characterized in that: include: Acquire a training CSI signal including a fall action, and perform data preprocessing on the training CSI signal; Acquire multiple training feature matrices and multiple training spectrograms according to the training CSI signal that has undergone data preprocessing; Using the plurality of training feature matrices marked with training labels as first training data, using the plurality of training spectrograms marked with training labels as second training data, and training a preset deep learning model with the first training data, the second training data, and a cross-entropy loss function to obtain an initial deep learning model; Changing the parameter types of the convolutional layer and the fully connected layer in the initial deep learning model from floating point to integer, and then training the initial deep learning model with the first training data, the second training data, and the cross entropy loss function to obtain a target deep learning model; The obtaining of a plurality of training feature matrices and a plurality of training spectrograms according to the training CSI signal that has undergone data preprocessing includes: taking the average amplitude of all subcarriers in the training CSI signal after data preprocessing as a feature, and obtaining a plurality of initial feature matrices corresponding to the feature from the training CSI signal after data preprocessing; Performing Fourier transform on the training CSI signal after data preprocessing to obtain multiple initial spectrograms; Acquire a plurality of the training feature matrices according to the plurality of the initial feature matrices, and acquire a plurality of the training spectrograms according to the plurality of the initial spectrograms; The training method further comprises: Integrating the convolutional block attention module into the preset deep learning model; The method of training a preset deep learning model using the first training data, the second training data, and a cross entropy loss function includes: The preset deep learning model integrated with the convolutional block attention module is trained using the first training data, the second training data and the cross-entropy loss function.
2. A fall detection model training method according to claim 1, characterized in that: The performing data preprocessing on the training CSI signal includes: Filtering the training CSI signal to filter out abnormal values that do not meet preset conditions; Normalization processing is performed on the filtered training CSI signal to accelerate gradient descent, thereby obtaining the data-preprocessed training CSI signal.
3. A fall detection model training method according to claim 1, characterized in that: The step of obtaining a plurality of the training feature matrices based on the plurality of the initial feature matrices and obtaining a plurality of the training spectrograms based on the plurality of the initial spectrograms comprises: Obtaining a first eigenvalue corresponding to each of the initial feature matrices according to a principal component analysis method, calculating a first variance contribution rate according to each of the first eigenvalues, and using each of the initial feature matrices corresponding to each of which the first variance contribution rate reaches a preset threshold as the training feature matrix; According to the principal component analysis method, the second eigenvalue and eigenvector of each of the initial spectrograms are obtained, and the second variance contribution rate is calculated based on each of the second eigenvalues. The eigenvectors corresponding to the second variance contribution rate reaching the preset threshold are weighted averaged, and the training spectrogram is obtained based on the eigenvectors after weighted average.
4. A fall detection model training method according to any one of claims 1 to 3, characterized in that: There are more fall labels than non-fall labels in both the first training data and the second training data; The preset deep learning model adopts one of LeNet, AlexNet, ResNet34 or LSTM-CNN; or, the preset deep learning model adopts ResNet18; The ResNet18 includes four target residual blocks, each of which consists of two convolutional layers.
5. A fall detection method, characterized in that: include: Acquire target CSI signal; The target CSI signal is input into a target deep learning model to perform fall detection based on the target CSI signal, wherein the target deep learning model is a target deep learning model trained by a fall detection model training method according to any one of claims 1 to 4.
6. A fall detection model training device, characterized in that: include: The first unit is configured to obtain a training CSI signal including a fall action and perform data preprocessing on the training CSI signal; The second unit is configured to obtain a plurality of training feature matrices and a plurality of training spectrograms according to the training CSI signal that has undergone data preprocessing; A third unit is configured to use the plurality of training feature matrices marked with training labels as first training data, and the plurality of training spectrograms marked with training labels as second training data, and to train a preset deep learning model using the first training data, the second training data, and a cross-entropy loss function to obtain an initial deep learning model; a fourth unit, configured to change the parameter types of the convolutional layer and the fully connected layer in the initial deep learning model from floating point types to integer types, and then train the initial deep learning model using the first training data, the second training data, and a cross entropy loss function to obtain a target deep learning model; The obtaining of a plurality of training feature matrices and a plurality of training spectrograms according to the training CSI signal that has undergone data preprocessing includes: taking the average amplitude of all subcarriers in the training CSI signal after data preprocessing as a feature, and obtaining a plurality of initial feature matrices corresponding to the feature from the training CSI signal after data preprocessing; Performing Fourier transform on the training CSI signal after data preprocessing to obtain multiple initial spectrograms; Acquire a plurality of the training feature matrices according to the plurality of the initial feature matrices, and acquire a plurality of the training spectrograms according to the plurality of the initial spectrograms; in: Integrating the convolutional block attention module into the preset deep learning model; The method of training a preset deep learning model using the first training data, the second training data, and a cross entropy loss function includes: The preset deep learning model integrated with the convolutional block attention module is trained using the first training data, the second training data and the cross-entropy loss function.
7. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Fall detection method and device based on CSI (Channel State Information) and storage medium
CN114692683A
Method, apparatus, and system for human recognition based on gait features
US20220026530A1