A multimodal activity recognition method based on inertial and acoustic signals

Through the multi-modal activity recognition method based on the Transformer network, the synchronous collection of inertial and acoustic signals and the self-attention mechanism are used to solve the problems of insufficient coverage of daily activity types and insufficient multi-modal data fusion in the existing technology, and improve human performance. The accuracy of activity recognition enables effective capture of long-term correlations.

CN118334760BActive Publication Date: 2024-09-17ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410616581.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-09-17
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

Existing human activity recognition technology has insufficient coverage of daily activity types, insufficient multi-modal data fusion, and traditional temporal attention mechanisms are difficult to capture long-term correlations, resulting in low recognition accuracy.

Method used

A multi-modal activity recognition method based on the Transformer network is adopted. Through synchronous collection and pre-processing of inertial and acoustic signals, the multi-modal Transformer encoder is used to extract coding features, and feature splicing and weighting are performed through the self-attention mechanism in the fusion module. Adjust, generate multi-modal fusion features, and finally output the prediction results through the classification module.

Benefits of technology

It improves the accuracy of human activity recognition, is superior to single-modal recognition methods, enhances the understanding and feature extraction capabilities of multi-modal data, and effectively captures long-term dependencies and contextual relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118334760B
    Figure CN118334760B
Patent Text Reader

Abstract

The present invention discloses a multimodal activity recognition method based on inertial signals and acoustic signals. The inertial and acoustic signals generated by the user's real activities are synchronously collected by inertial and acoustic sensor devices, and the coding features of the input inertial and acoustic signals are respectively extracted in a multimodal Transformer encoder to understand the contextual relationship. Then in the fusion module, the coding features of the inertial and acoustic signals are spliced, and a self-attention operation is performed to obtain multimodal fusion features, focusing on the importance of different modal data, and finally the activity category is identified through a classification module. The present invention adopts a fusion method to achieve a better effect on identifying activities than a single modality, and has a higher accuracy rate in identifying activities than other fusion methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of human activity recognition, and in particular, relates to a multimodal activity recognition method based on inertial signals and acoustic signals, which is suitable for daily activity recognition based on inertial sensors of wearable devices and audio data collection. Background Art

[0002] With the development of sensor technology and Internet of Things technology, Human Activity Recognition (HAR) technology has gradually penetrated into all aspects of people's lives, such as health care, human-computer interaction, personal assistance, smart home and sports tracking. Especially for the elderly who are in remote areas and need continuous monitoring, HAR technology can greatly improve their safety.

[0003] According to the different signal sources, human activity recognition is mainly divided into vision-based methods and wearable sensor-based methods. Vision-based methods mainly use cameras as data acquisition devices to extract human contours, skeletons and various temporal and spatial features of interest from captured videos and images containing behavioral information, and then identify and analyze human activities. Although vision-based methods have achieved relatively high recognition accuracy, such methods still face many difficult-to-solve objective problems in practical applications, such as privacy protection, scene restrictions, light effects, object occlusion and equipment costs. Sensor-based methods focus on motion data from smart sensors (such as accelerometers, gyroscopes, Bluetooth, sound sensors, etc.), while also protecting privacy well. Since acoustic-based methods have the advantage of rich contextual information about human activities and complement inertial data, which is very useful in distinguishing complex activities, sound has been proven to be a useful signal. The sounds produced by physical activities such as washing hands or brushing teeth are usually unique and can achieve accurate activity recognition.

[0004] The main research directions of human activity recognition are divided into two categories: machine learning and deep learning. The former requires manual extraction of features related to activity recognition and then classification using machine learning models, while the latter can greatly reduce the workload of designing features and can learn more advanced and meaningful features by training end-to-end neural networks. Although the existing deep learning models have improved in performance, there are still two major challenges to be solved.

[0005] First, existing methods lack sufficient consideration of the role of different sensors in activity recognition and their correlation, resulting in insufficient multi-sensor modal fusion. Second, the temporal attention mechanism commonly used in activity recognition cannot effectively solve the "forgetting" defect of RNN and has difficulty capturing long-term correlation. Second, a single timestamp in a sensor signal sequence has limited semantic information, and it is difficult to directly build correlations on isolated timestamps. Summary of the invention

[0006] The purpose of this application is to provide a multimodal activity recognition method based on inertial signals and acoustic signals to solve the problem of insufficient coverage of daily activity types and insufficient multimodal data fusion in the existing technology. The Transformer network is mainly used to understand contextual relationships, extract significant features, and the self-attention mechanism adaptively focuses on the importance of different modal data, so as to improve the accuracy of human activity recognition.

[0007] In order to achieve the above purpose, the technical solution of this application is as follows:

[0008] A multimodal activity recognition method based on inertial signals and acoustic signals, comprising:

[0009] Construct a recognition network model including a multimodal Transformer encoder, a fusion module, and a classification module;

[0010] Inertial and acoustic sensors are used to synchronously collect inertial and acoustic signals generated by real user activities, and preprocess them to build a training set, train the recognition network model, and then use the trained recognition network model to recognize user activities.

[0011] In the multimodal Transformer encoder, the encoding features of the input inertial and acoustic signals are extracted separately;

[0012] In the fusion module, the encoded features of the inertial and acoustic signals are concatenated and then self-attention is performed to obtain multimodal fusion features.

[0013] The multimodal fusion features pass through the classification module and output the prediction results.

[0014] Furthermore, the preprocessing includes:

[0015] Detect and remove values ​​outside the normal range and zero values ​​in the collected inertial and acoustic signals;

[0016] A sliding time window of fixed length is used to divide the inertial and acoustic signals, and each window data after division is used as a sample;

[0017] Each sample and the corresponding activity category label is taken as a training sample, and the training samples are normalized to obtain a training set.

[0018] Furthermore, the multimodal Transformer encoder includes two branches, each of which first uses position coding to add position information to the input signal, and then passes through the multi-head attention layer and the forward network propagation layer in sequence to obtain the encoded features; a normalization operation is performed before entering each layer, and a random inactivation operation is performed after passing each layer.

[0019] Furthermore, in the fusion module, after the encoding features of the inertial and acoustic signals are spliced, a self-attention operation is performed to obtain multimodal fusion features, including:

[0020] Connect the coded features of the inertial and acoustic signals to obtain the first feature;

[0021] Perform a transposition operation on the first feature to obtain the second feature;

[0022] Matrix multiply the initial weight by the second feature and add the initial bias to get the attention score.

[0023] Normalize the attention scores to get the attention weights;

[0024] Multiply the attention weight by the second feature matrix, and then sum along the feature dimension to get the fourth feature;

[0025] The fourth feature is added to the first feature to obtain a multimodal fusion feature.

[0026] This application proposes a multimodal activity recognition method based on inertial signals and acoustic signals. Since Transformer can obtain long-term dependencies through the self-attention mechanism, it is used to process multi-source multimodal data to understand contextual relationships and extract significant features. First, the inertial and sound signals are fed into the encoder block as inputs respectively, and information that determines the feature position in the signal time series is added. Then all modal results are connected, and the self-attention mechanism is used to adaptively focus on the importance of different modal data, and finally the category of each time series feature is obtained and predicted. The fusion method used in this application is better than a single modality in identifying activities, and has a higher accuracy rate in identifying activities than other fusion methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a flow chart of the multimodal activity recognition method based on inertial signals and acoustic signals in this application.

[0028] Figure 2 This is the framework diagram of the recognition network model.

[0029] Figure 3 This is a structural diagram of a multimodal Transformer encoder according to an embodiment of the present application.

[0030] Figure 4 This is a structural diagram of the fusion module of an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0032] An embodiment of the present application, such as Figure 1 As shown, a multimodal activity recognition method based on inertial signals and acoustic signals is proposed, including:

[0033] Step S1, constructing a recognition network model including a multimodal Transformer encoder, a fusion module and a classification module.

[0034] Reference Figure 2 ,The recognition network model constructed in this embodiment includes a multimodal Transformer encoder, a fusion module and a classification module.

[0035] Among them, the multimodal Transformer encoder, refer to Figure 3 , including two branches, which encode the input inertial signal and acoustic signal respectively to obtain inertial encoding features and acoustic encoding features. Each branch first uses position encoding to add position information to the input signal, and then passes through the multi-head attention layer and the forward network propagation layer in sequence to obtain the encoding features. Normalization is performed before entering each layer, and random inactivation is performed after passing each layer.

[0036] Fusion module reference Figure 4 , the inertial coding features and acoustic coding features are concatenated, and then the multimodal fusion features are obtained through the self-attention module.

[0037] The classification module uses the softmax classification function to classify the multimodal fusion features and obtain the activity prediction results.

[0038] Step S2: synchronously collect the inertial and acoustic signals generated by the user's real activities through inertial and acoustic sensor devices, preprocess them, build a training set, train the recognition network model, and then use the trained recognition network model to recognize the user's activities.

[0039] In order to accurately identify the user's activities, it is necessary to use the user's real activity data to train the recognition network model. This application uses inertial and acoustic sensor devices to synchronously collect inertial and acoustic signals generated by the user's real activities, and uses the signals of the two modes to train the recognition network model. After the recognition network model is trained, activity recognition is also performed based on the signals of the two modes.

[0040] For example, inertial and acoustic sensor devices are used to synchronously collect inertial and acoustic signals, such as using MPU6050 sensors to collect inertial signals such as acceleration and angular velocity information; ordinary musical instrument recording microphones are used to collect acoustic signals with a frequency of up to 192kHz. During the collection, M subjects perform N daily activities according to their own habits, each activity is repeated n times, and each activity is performed for at least t seconds.

[0041] In this embodiment, the collected inertial and acoustic signals are preprocessed, including:

[0042] Step 1.1: Detect and remove values ​​outside the normal range and zero values ​​in the collected inertial and acoustic signals.

[0043] In this embodiment, the inertial data collected by the inertial sensor device is a kind of modal data, and the acoustic data collected by the acoustic sensor device is another kind of modal data. Detect values ​​and zero values ​​outside the normal range in the real activity data, and remove the values ​​and zero values ​​outside the normal range.

[0044] Step 1.2: Use a sliding time window of fixed length to divide the inertial and acoustic signals, and take each window data after division as a sample.

[0045] Regarding the inertial data window division, each inertial sensor device collects inertial signals, extracts k2 statistical features for k1 IMU values ​​of each motion instance, and obtains k1×k2 feature vectors. The inertial signal is divided into durations of seconds, with a step size of The window data is in seconds, and the step size indicates the time interval between two windows. Hz, the window data of a motion data instance is (About seconds of IMU data).

[0046] Regarding the acoustic signal window partitioning, features are first extracted from the acoustic signal, such as applying the short-time Fourier transform (STFT) to obtain an estimate of the short-term, time-local frequency content of the preprocessed acoustic signal, called the "original frequency feature". Specifically, the sampling frequency of the original acoustic signal is kHz, there are k3 raw frequency features in 1 second, and each feature has k4 dimensions. The acoustic signal is divided into durations of seconds, with a step size of The window data of an acoustic signal instance is (About seconds of acoustic data).

[0047] Step 1.3: Each sample and the corresponding activity category label is taken as a training sample. The training samples are normalized to obtain a training set.

[0048] Each training sample can be represented as (X, Y, label), where X represents the inertial data X = [x0, x1, ... x L ], Y represents acoustic data Y = [y0, y1, ...y L ], label represents the set of activity category labels.

[0049] Before inputting into the recognition network model, the training samples are subjected to Z-score normalization to convert the data into a normal distribution with a mean of 0 and a standard deviation of 1. The conversion formula is shown in formula (1):

[0050]

[0051] Where X and Y represent the original values, μ represents the mean, σ represents the standard deviation, and X norm , Y norm Represents the normalized input sequence. After normalizing the training samples, a training set consisting of training samples is obtained.

[0052] The sizes of the normalized input sequences X and Y are L×C respectively. x , L×C y , where L represents the data length, C x , C y Represent the characteristic dimensions of inertial and acoustic signals respectively.

[0053] After obtaining the training set, the recognition network model can be trained. The training of the neural network is a relatively mature technology in this field and will not be described in detail here.

[0054] After the recognition network model is trained, the inertial and acoustic signals generated by the user's real activities can be collected synchronously through inertial and acoustic sensor devices, and input into the recognition network model after preprocessing to identify the user's activity type. Whether in training or in actual application, each module in the recognition network model performs the same operation, which is explained in detail below.

[0055] Step 3: In the multimodal Transformer encoder, the encoding features of the input inertial and acoustic signals are extracted respectively.

[0056] The multimodal Transformer encoder of this embodiment utilizes the Transformer encoder to extract coding features of two different modal input signals in parallel, generating richer information and more robust input data representation.

[0057] Each branch contains a multi-head self-attention (MHSA) layer and a feed-forward network (FFN) layer.

[0058] Unlike CNN or RNN, the Transformer encoder cannot obtain the sequential information of the input signal, so the sinusoidal position encoding is added to the input features as shown in Equation (2).

[0059]

[0060] Input sequence X norm , Y norm After position encoding, the input sequence H is obtained x , H y As shown in formula (3), They represent the positional encoding of two different modal data respectively, and the operation ⊕ represents element-by-element tensor addition.

[0061]

[0062] Use the Transformer network to process the two modal input signals H in parallel x , H y , extract the coding features of inertia and sound signals, and understand the contextual relationship. The output coding feature F can be obtained x 、F y , as shown in formula (4) and (5):

[0063]

[0064]

[0065]

[0066] Among them, FFN refers to the forward propagation network layer, and MHSA refers to the multi-head attention layer.

[0067] Step 4: In the fusion module, the encoded features of the inertial and acoustic signals are concatenated, and then a self-attention operation is performed to obtain multimodal fusion features.

[0068] This embodiment builds a fusion module based on the self-attention mechanism to balance and summarize the different features from inertial and sound data, solve the shortcomings of multimodal fusion, and achieve mutual support, complementarity and calibration between multimodal data.

[0069] In the fusion module, the encoded features of the inertial and acoustic signals are first connected to obtain F concat , then transpose the sequence length and feature dimension of the connected feature vector to obtain the transposed result Finally, the self-attention mechanism is used to process the transposed results, adaptively adjust the importance of each input feature, and enhance the overall expression ability of the network.

[0070] F concat and The calculation is shown in formula (6), where concat represents the concatenation operation along the specified channel dimension, and transpose represents the transposition operation along the specified dimension:

[0071]

[0072] Reference Figure 4 , after the transposition operation, the attention score is obtained by matrix multiplication. In the forward propagation, the attention score representing the importance of each sequence is calculated as shown in formula (7), where weight init 、bias init Respectively represent the initialization values ​​of weight and bias:

[0073]

[0074] Then, softmax is applied to normalize the attention scores to obtain the attention weights, ensuring that the elements of the feature dimension of the feature vector are in the range [0, 1] and the sum is 1. The calculation method is shown in formula (8):

[0075]

[0076] Then weight soft and Multiply them together, and then sum them along the feature dimension to get the final self-attention vector. The calculation method of the weighted summed self-attention vector is shown in formula (9):

[0077]

[0078] Finally, the self-attention weighted result is combined with the original feature vector to output the multimodal fusion feature F output , the calculation method is shown in formula (10)

[0079] Foutput =F concat +weight(10);

[0080] The fusion module is implemented based on the self-attention mechanism, which fuses two different types of input features, enabling the network to utilize different types of feature information more effectively.

[0081] Step 5: The multimodal fusion features pass through the classification module and output the prediction results.

[0082] The classification module of this embodiment uses a softmax classification function to obtain the prediction result. During training, after the prediction result is obtained, the loss is calculated for the activity category label corresponding to the input sample, and the network parameters are updated through back propagation to complete the network training.

[0083] In order to verify the technical solution of this application, there are 17 daily activities in the data set collected in the experiment, including: 1 brushing teeth, 2 playing chess, 3 drinking water, 4 jumping, 5 knocking on the door, 6 lying down, 7 reading, 8 running, 9 sitting, 10 going upstairs, 11 going downstairs, 12 standing, 13 opening and closing doors, 14 typing, 15 walking, 16 washing hands, and 17 writing.

[0084] In order to simulate the actual application scenario, the iterative Leave One Subject Out (LOSO) method is adopted for cross-validation and testing. First, all samples of user i are taken from M users as the test set, and the remaining M-1 users are taken as the training set. LOSO cross-validation is used on the training set to perform a grid search for candidate hyperparameters. After determining the optimal hyperparameters, the model is retrained with the entire training set data, and the classification effect is tested on the test set consisting of user i. The above process is iterated M times, and the average classification effect of M users as the test set is taken as the model's cross-user classification performance evaluation indicator.

[0085] This application uses self-attention to fuse inertial and sound data, and adopts iterative LOSO for cross-validation and testing to obtain the accuracy of M average classifications. Table 1 shows the comparison of the accuracy of activity recognition of this application and other fusion methods, and it can be seen that the activity recognition accuracy of the present invention is the best.

[0086] Table 1

[0087] Acc(%) Early concat fusion 78.25 Cross-attention fusion 69.48 This application 88.48

[0088] The present application integrates inertial and sound data. Table 2 shows the comparison between the method of using inertial and sound alone and the method of integrating the two modal data in the present application. It can be seen that the fusion method adopted in the present application is better than a single modality in identifying activities.

[0089] Table 2

[0090] Modal Acc(%) inertia 79.03 sound 61.45 Inertia + Sound 88.48

[0091] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A multimodal activity recognition method based on inertial signals and acoustic signals, characterized in that: The multimodal activity recognition method based on inertial signals and acoustic signals comprises: Build including multimodal Transformer Recognition network model of encoder, fusion module and classification module; Inertial and acoustic sensors are used to synchronously collect inertial and acoustic signals generated by real user activities, and preprocess them to build a training set, train the recognition network model, and then use the trained recognition network model to recognize user activities. In multimodal Transformer In the encoder, the encoding features of the input inertial and acoustic signals are extracted respectively; In the fusion module, the encoded features of the inertial and acoustic signals are concatenated and then self-attention is performed to obtain multimodal fusion features. The multimodal fusion features pass through the classification module and output the prediction results; Wherein, the multimodal Transformer The encoder consists of two branches. Each branch first uses position encoding to add position information to the input signal, and then passes through the multi-head attention layer and the forward network propagation layer in sequence to obtain the encoded features; normalization operation is performed before entering each layer, and random inactivation operation is performed after passing each layer.

2. The multimodal activity recognition method based on inertial signals and acoustic signals according to claim 1, characterized in that: The preprocessing comprises: Detect and remove values ​​outside the normal range and zero values ​​in the collected inertial and acoustic signals; A sliding time window of fixed length is used to divide the inertial and acoustic signals, and each window data after division is used as a sample; Each sample and the corresponding activity category label is taken as a training sample, and the training samples are normalized to obtain a training set.

3. The multimodal activity recognition method based on inertial signals and acoustic signals according to claim 1, characterized in that: In the fusion module, after the encoding features of the inertial and acoustic signals are spliced, a self-attention operation is performed to obtain multimodal fusion features, including: Connect the coded features of the inertial and acoustic signals to obtain the first feature; Perform a transposition operation on the first feature to obtain the second feature; Matrix multiply the initial weight by the second feature and add the initial bias to get the attention score. Normalize the attention scores to get the attention weights; Multiply the attention weight by the second feature matrix, and then sum along the feature dimension to get the fourth feature; The fourth feature is added to the first feature to obtain a multimodal fusion feature.