Fitness action and quantity cross-domain joint identification method based on WiFi

By combining the spatial and channel attention mechanism with the parallel structure prototype network of the ResNet34 network, it solves the problem of low recognition accuracy of WiFi wireless sensing technology in cross-domain scenarios, achieves high-precision fitness action and quantity recognition, and is suitable for multi-sample environments. Provide convenient fitness monitoring solutions.

CN118626951AActive Publication Date: 2024-09-10LIAONING NORMAL UNIVERSITY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410643198.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-10
Estimated Expiration
2044-05-23

AI Technical Summary

Technical Problem

Existing WiFi-based wireless sensing technology cannot achieve ideal fitness action and quantity recognition accuracy in cross-domain scenarios, and has problems such as high cost and high lighting and environmental requirements.

Method used

The spatial attention mechanism, channel attention mechanism and the serial structure of the ResNet34 network are used to extract phase information from CSI data to construct images. Combined with the prototype network of the parallel structure, the Euclidean distance and Softmax function are used to identify fitness actions and quantities.

Benefits of technology

It achieves high-precision fitness action and quantity recognition in a cross-domain environment, can achieve ideal recognition results with a small number of samples, and provides more intelligent, accurate and convenient fitness solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626951A
    Figure CN118626951A
Patent Text Reader

Abstract

The invention discloses a WiFi-based fitness action and quantity cross-domain joint recognition method, which constructs a space attention mechanism, a channel attention mechanism and a serial structure of a ResNet34 network connecting the space attention mechanism and the channel attention mechanism, and distributes larger weights to key features of fitness actions and quantity contained in CSI data by using the double attention mechanism. And then respectively identifying the actions and the quantity of the fitness through the constructed prototype network of the parallel structure. Experiments prove that the method not only has high recognition precision of the body-building actions and the number, but also can obtain an ideal cross-domain recognition effect without using or only using a small number of samples in a cross-domain environment, and can provide a more intelligent, accurate and convenient body-building solution for a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of wireless sensing technology, in particular to a cross-domain joint identification method of fitness movements and quantities based on WiFi. Background Art

[0002] In the context of the ever-increasing health awareness, exercise and fitness have become one of the ways for people to improve their physical condition and ensure a healthy life. Standard fitness movements and the number of movements per unit time directly affect the fitness effect. At present, most people choose to do fitness activities on their own. Due to the lack of effective supervision and guidance from professionals, the exercise effect is often poor and there is even a risk of injury. To this end, artificial intelligence technology has been introduced into the field of fitness monitoring for intelligent recognition and counting of human fitness movements, providing a practical technical solution for intelligent fitness. However, existing computer vision technology has the disadvantages of high cost, leakage of personal privacy, and high requirements for lighting and environment; wearable devices also have the problem of high cost, and are also restricted by charging and wearing devices. Some scholars have adopted wireless sensing technology based on WiFi to identify fitness movements, which has the following advantages: it does not require users to wear additional sensors or devices, and will not limit the user's freedom of movement; it can capture tiny movement details and changes, and provide more accurate recognition of movements and quantities; it is not affected by environmental factors such as light, smoke, and obstacles, and has low requirements for the application environment. However, good performance can only be obtained in their respective experimental scenarios, while ideal recognition accuracy cannot be obtained in other cross-domain scenarios that are different from the experimental scenarios. Summary of the invention

[0003] The present invention aims to solve the above-mentioned technical problems existing in the prior art and provides a method for cross-domain joint identification of fitness movements and quantities based on WiFi.

[0004] The technical solution of the present invention is: a method for cross-domain joint identification of fitness movements and quantities based on WiFi, which is characterized by being performed in the following manner:

[0005] Step 1: Collect and extract CSI data from the receiving end as follows:

[0006]

[0007] Where: H s (f k ,t) represents the CSI static component of the kth subcarrier, A d (f k ,t)、 and d d (t) represent the amplitude, phase and path length of the CSI dynamic component of the kth subcarrier, represents a time-varying random phase shift;

[0008] Step 2. Calculate the CSI data ratio of two different antennas on the same WiFi network interface card. The formula is as follows:

[0009]

[0010] Where: H1(f k ,t) and H2(f k , t) are the CSI data of the kth subcarrier of the two receiving antennas respectively, Δd represents the length difference of the partial reflection path of the dynamic component of the CSI data of the two receiving antennas;

[0011] Extraction of H q (f k ,t) phase information Q: Q = angle (H q (f k ,t));

[0012] Where: angle() represents the extraction of H q (f k ,t) function of phase information;

[0013] The phase information Q is constructed as an image P: P = imagesc(Q);

[0014] Where: imagesc() represents the function of mapping phase information into a 3-channel RGB image;

[0015] Step 3: Input the image P to the following spatial attention mechanism weight function:

[0016] Map1(P)=σ(f 7×7 (BN(P)));

[0017] Where: σ() represents the Sigmoid function, f 7×7 () represents a convolution operation with a convolution kernel of 7×7, BN() represents a batch normalization operation, and Map1(P) is a matrix of the same dimension as P, where each element corresponds to the weight of a pixel in P;

[0018] Then multiply Map1(P) by RGB image P element-wise to obtain the reconstructed image;

[0019] Step 4: For the reconstructed image, the ResNet34 network is used to extract features to obtain the feature map F, and then the channel attention mechanism is used to assign different weights to different channels. The function is as follows:

[0020] Map2(F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))),

[0021] Where: AvgPool() and MaxPool() are average pooling and maximum pooling functions respectively, MLP() is a multi-layer perceptron function, and Map2() is element-wise multiplied with the feature map F to obtain the reconstructed feature map Z test ;

[0022] Step 5: Construct two sets of prototype networks with parallel structures to reconstruct the feature map Z test Input to the prototype network to identify fitness actions and the number of actions respectively;

[0023] The two sets of prototype networks constructed in parallel are: when training the network, N training samples are reconstructed according to steps 1-4 to obtain feature maps. And the category label a corresponding to each sample, a=1,2,",A, a total of A categories, calculate all training samples of each category a The arithmetic mean of the prototype network category a is obtained by a ;

[0024] The reconstructed feature map Z test Input to the prototype network, respectively identify the fitness action and the number of actions is to calculate the reconstructed feature map Z test With each prototype vector μ a The Euclidean distance is then used to calculate the predicted probability of the test sample using the Softmax function. The formula is as follows:

[0025]

[0026] Where: d(Z test ,μ a ) represents Z test and μ a The Euclidean distance of

[0027] Compare all the predicted probabilities obtained, Z test Belongs to the category with the highest predicted probability.

[0028] The present invention constructs a serial structure of a spatial attention mechanism, a channel attention mechanism, and a ResNet34 network connecting the two, and uses the dual attention mechanism to assign greater weights to the key features of fitness actions and quantities contained in CSI data, and then recognizes fitness actions and quantities respectively through the constructed parallel structure prototype network. Experiments have shown that the present invention not only has a high recognition accuracy of fitness actions and quantities, but also can obtain an ideal cross-domain recognition effect without using or using only a small number of samples in a cross-domain environment, and can provide users with a more intelligent, accurate and convenient fitness solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a network structure block diagram of an embodiment of the present invention.

[0030] Figure 2 It is a flowchart of an embodiment of the present invention.

[0031] Figure 3 It is a histogram of average intra-domain recognition accuracy of an embodiment of the present invention.

[0032] Figure 4 It is a bar chart of average cross-domain recognition accuracy of an embodiment of the present invention.

[0033] Figure 5 It is a bar chart of the average cross-domain recognition accuracy rate assisted by small samples according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The embodiment of the present invention uses two computers equipped with Intel 5300 network cards and Ubuntu 12.04 operating system. One computer is connected to one antenna as a transmitter, and the other computer is connected to three antennas as a receiver. The antennas are 0.5 meters above the ground, and the distance between the transceiver devices is 3 meters. The WiFi operating frequency is set to 2.4 GHz, the subcarrier bandwidth is 20 MHz, and the packet sending frequency of the device is 1000 Hz. The experimental system transmits data through three channels, each with 30 subcarriers.

[0035] The embodiment of the present invention selected three indoor experimental environments. In each experimental environment, three volunteers performed six fitness movements. Each movement was repeated 1-3 times. Each sample collected 4 seconds of CSI data. 50 samples were collected from each person for each movement as a sample set, including training samples and test samples.

[0036] The present invention is a method for cross-domain joint identification of fitness movements and quantities based on WiFi, and its network structure block diagram is as follows: Figure 1 As shown in the figure, the feature extraction module has a spatial attention mechanism, a channel attention mechanism, and a serial structure of a ResNet34 network connecting the two; the prototype network module is two sets of prototype networks with a parallel structure, namely, a quantity prototype and an action prototype, and the quantity prototype and the action prototype are followed by a distance metric and a Softmax function respectively.

[0037] Process such as Figure 2 As shown: First, the training samples and test samples are processed by steps 1-4 to obtain the reconstructed feature map, as follows:

[0038] Step 1: Collect and extract CSI data from the receiving end as follows:

[0039]

[0040] Where: Hs (f k ,t) represents the CSI static component of the kth subcarrier, A d (f k ,t)、 and d d (t) represent the amplitude, phase and path length of the CSI dynamic component of the kth subcarrier, represents a time-varying random phase shift;

[0041] Step 2. Calculate the CSI data ratio of two different antennas on the same WiFi network interface card to eliminate random offsets. The formula is as follows:

[0042]

[0043] Where: H1(f k ,t) and H2(f k , t) are the CSI data of the kth subcarrier of the two receiving antennas respectively, Δd represents the length difference of the partial reflection path of the dynamic component of the CSI data of the two receiving antennas;

[0044] Extraction of H q (f k ,t) phase information Q: Q = angle (H q (f k ,t));

[0045] Where: angle() represents the extraction of H q (f k ,t) function of phase information;

[0046] The phase information Q is constructed as a 3×224×224 3-channel RGB image P: P=imagesc(Q);

[0047] Where: imagesc() represents the function of mapping phase information into a 3-channel RGB image;

[0048] Step 3: Input the image P to the following spatial attention mechanism weight function:

[0049] Map1(P)=σ(f 7×7 (BN(P)));

[0050] Where: σ() represents the Sigmoid function, f 7×7 () represents a convolution operation with a convolution kernel of 7×7, BN() represents a batch normalization operation, and Map1(P) is a matrix of the same dimension as P, where each element corresponds to the weight of a pixel in P;

[0051] Then multiply Map1(P) by RGB image P element-wise to obtain the reconstructed image;

[0052] Step 4: For the reconstructed image, the ResNet34 network is used to extract features to obtain a feature map F of size 512×7×7. The feature map F contains 512 channels, each channel is a 7×7 matrix, and then the channel attention mechanism is used to assign different weights to different channels. The function is as follows:

[0053] Map2(F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))),

[0054] Where: AvgPool() and MaxPool() are average pooling and maximum pooling functions respectively, MLP() is a multi-layer perceptron function, and Map2() is element-wise multiplied with the feature map F to obtain the reconstructed feature map;

[0055] The reconstructed feature map of the training sample is expressed as And the category label a (a=1,2,",A) corresponding to each sample, the fitness action category is 6, and the fitness quantity category is 3;

[0056] The reconstructed feature map of the test sample is expressed as

[0057] Step 5: Construct two sets of prototype networks with parallel structures, where the number of all training samples of each category a is calculated when the network is trained. The arithmetic mean of the prototype vector μ of the prototype network category a is obtained. a ;

[0058] Reconstruct the feature map of the test sample Input to the prototype network to identify fitness actions and the number of actions, respectively. Specifically, the number of each test sample is calculated. With each prototype vector μ a The Euclidean distance is then used to calculate the predicted probability of the test sample using the Softmax function. The formula is as follows:

[0059]

[0060] Where: express and μ a The Euclidean distance of After the predicted probabilities belonging to each category, all the obtained predicted probabilities are compared, It belongs to the category with the highest predicted probability.

[0061] The embodiment of the present invention selects the first 80% of each experimental scene data as training samples and the last 20% as test samples, calculates the average of the recognition accuracy of the three scenes, and obtains the average intra-domain recognition accuracy histogram as shown in the figure. Figure 3 As shown in the figure. The "action", "number" and "BOTH" on the horizontal axis of the figure represent the average recognition accuracy of the domain using the dataset to identify only the action, only the number and both. Figure 3 It can be seen that the average recognition accuracy rates of “action” and “quantity” in the domain are higher than that of “BOTH”, but the average recognition accuracy rates in all domains are above 94%, indicating that the present invention has a higher average recognition accuracy rate in the domain.

[0062] The embodiment of the present invention selects all the data of two experimental scenes as training samples and the data of the third experimental scene as test samples. The average cross-domain recognition accuracy bar graph is as follows: Figure 4 As shown. Figure 4 It can be seen that the cross-domain average recognition accuracy of "action" and "BOTH" are 83.21% and 82.22% respectively, which are 13.66% and 12.22% lower than the intra-domain average recognition accuracy. In addition, the cross-domain average recognition accuracy of "quantity" is 97.14%, which is a very ideal performance.

[0063] The embodiment of the present invention selects all the data of the two experimental scenes and samples 0, 5, 10 and 15 of the third scene as training samples, and the remaining samples of the third experimental scene as test samples. The experimental results are as follows: Figure 5 As shown. Figure 5 It can be seen that the cross-domain average recognition accuracy of "action" and "BOTH" with the assistance of small samples increases with the increase of the number of auxiliary samples. When 5, 10 and 15 samples are assisted, the cross-domain average recognition accuracy of "action" increases by 7.17%, 13.33% and 14.12% respectively; the cross-domain average recognition accuracy of "BOTH" increases by 3.71%, 11.52% and 12.39% respectively. The experimental results show that the performance of the present invention has been significantly improved by the assistance of small samples.

Claims

1. A cross-domain joint identification method of fitness movements and quantities based on WiFi, characterized in that Proceed as follows: Step 1: Collect and extract CSI data from the receiving end as follows: Where: H s (f k ,t) represents the CSI static component of the kth subcarrier, A d (f k ,t)、 and d d (t) represent the amplitude, phase and path length of the CSI dynamic component of the kth subcarrier, represents a time-varying random phase shift; Step 2. Calculate the CSI data ratio of two different antennas on the same WiFi network interface card. The formula is as follows: Where: H1(f k ,t) and H2(f k , t) are the CSI data of the kth subcarrier of the two receiving antennas respectively, Δd represents the length difference of the partial reflection path of the dynamic component of the CSI data of the two receiving antennas; Extraction of H q (f k ,t) phase information Q: Q = angle (H q (f k ,t)); Where: angle() represents the extraction of H q (f k ,t) function of phase information; The phase information Q is constructed as an image P: P = imagesc(Q); Where: imagesc() represents the function of mapping phase information into a 3-channel RGB image; Step 3: Input the image P to the following spatial attention mechanism weight function: Map1(P)1σ(f 7×7 (BN(P))) Where: σ() represents the Sigmoid function, f 7×7 () represents a convolution operation with a convolution kernel of 7×7, BN() represents a batch normalization operation, and Map1(P) is a matrix of the same dimension as P, where each element corresponds to the weight of a pixel in P; Then multiply Map1(P) by RGB image P element-wise to obtain the reconstructed image; Step 4: For the reconstructed image, the ResNet34 network is used to extract features to obtain the feature map F, and then the channel attention mechanism is used to assign different weights to different channels. The function is as follows: Map2(F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))), Where: AvgPool() and MaxPool() are average pooling and maximum pooling functions respectively, MLP() is a multi-layer perceptron function, and Map2() is element-wise multiplied with the feature map F to obtain the reconstructed feature map Z test ; Step 5: Construct two sets of prototype networks with parallel structures to reconstruct the feature map Z test Input to the prototype network to identify fitness actions and the number of actions respectively; The two sets of prototype networks constructed in parallel are: when training the network, N training samples are reconstructed according to steps 1-4 to obtain feature maps. n=1,2,",N, and the category label a corresponding to each sample, a=1,2,",A, a total of A categories, calculate the The arithmetic mean of the prototype network category a is obtained by a ; The reconstructed feature map Z test Input to the prototype network, respectively identify the fitness action and the number of actions is to calculate the reconstructed feature map Z test With each prototype vector μ a The Euclidean distance is then used to calculate the predicted probability of the test sample using the Softmax function. The formula is as follows: Where: d(Z test ,μ a ) represents Z test and μ a The Euclidean distance of Compare all the predicted probabilities obtained, Z test Belongs to the category with the highest predicted probability.

Citation Information

Patent Citations

  • Behavior identification method and system based on transfer learning and WiFi

    CN114048773A

  • Position-independent human body action recognition method based on CSI (Channel State Information) and dual-thread convolutional network

    CN115034259A

  • CSI (Channel State Information) action identification method based on multi-channel fusion

    CN115242327A

  • Multi-modal cooperative behavior identification method based on Wi-Fi signal and skeleton sequence

    CN117115902A

  • WiFi-based gesture recognition method, electronic equipment, wireless sensing system and medium

    CN117130481A