Fine-grained region classification method and system based on convolutional neural network

Through the CSI active window segmentation and feedback mechanism based on the convolutional neural network, the problem of fine-grained area classification in multi-floor and multi-building environments is solved, high-precision fine-grained area classification is achieved, and the accuracy and complexity of area classification are improved. It solves the problems of high equipment cost and sensitivity to light in the existing technology.

CN114462505BActive Publication Date: 2024-09-17GUANGDONG POLYTECHNIC NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210016223.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-07
Publication Date
2024-09-17
Estimated Expiration
2042-01-07

AI Technical Summary

Technical Problem

It is difficult to achieve high-precision indoor fine-grained area classification with existing technology, especially in multi-floor and multi-building environments. Traditional machine learning algorithms are easily affected by the environment and are not suitable for multi-floor and multi-building area classification, and the equipment cost is high, It is sensitive to light and has a single classification scene, and cannot subdivide small areas.

Method used

Using a fine-grained region classification method based on convolutional neural networks, the state segmentation algorithm is dynamically adjusted through CSI active window segmentation, CNN model training classification status labels, and reference feedback mechanisms to replace the optimal status segmentation threshold determined by human subjective observation and experience, improving sample confidence, and increase the number of convolutional layers to avoid vanishing and exploding gradient problems.

Benefits of technology

It achieves fine-grained regional classification in a multi-floor and multi-building environment, improves the accuracy and complexity of regional classification, has higher sample confidence, avoids gradient disappearance and explosion problems, and dynamically adjusts the algorithm to improve the adaptability of classification. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114462505B
    Figure CN114462505B
Patent Text Reader

Abstract

The present invention relates to a fine-grained area classification method and system based on a convolutional neural network, and the method includes the following steps: S1, inputting a UJIIndoorLoc data set into a SAE‑1D Resnet10 convolutional neural network to obtain building classification and stratification results; S2, calculating the error between the classification result and the true value using a quadratic cost function; S3, dividing a CSI-based data set into bins of size w; S4, training a CNN state inference model and outputting a state label; S5, inputting the CSI amplitude of the state label into a CNN state inference model for training, and outputting a probability distribution of fine-grained area classification; S6, calculating the concentration using maximum probability and probability entropy to obtain sample confidence; S7, dynamically adjusting an activity segmentation algorithm. The present invention replaces the optimal state segmentation threshold determined by subjective observation and experience by using CSI activity window segmentation, CNN model training classification state labels, and a reference feedback mechanism to dynamically adjust the state segmentation algorithm, and the sample confidence is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-building and multi-floor area classification, and in particular to a fine-grained area classification method and system based on a convolutional neural network. Background Art

[0002] In recent years, with the continuous advancement of communication technology, the demand for high-precision classification based on fine-grained areas of building floors has been increasing in emergency rescue, object search, path planning, etc. However, the Global Positioning System (GPS) and the BeiDou Navigation Satellite System (BDS) have become increasingly unable to meet the needs of indoor fine-grained area classification. Therefore, how to improve the accuracy of indoor fine-grained area classification has become a research topic that needs to be solved urgently.

[0003] Technical means for regional classification usually include computer vision, inertial sensors, UWB and wearable devices. Although its classification accuracy has reached the commercial stage, it still faces various limitations, such as: tailored for specific scenarios, sensitivity to light, privacy infringement, high equipment cost, single classification scenario and restricted movement trajectory. Classification methods usually include traditional machine learning algorithms and deep learning algorithms. Commonly used traditional machine learning algorithms include: Bayesian model, k-nearest neighbor model (KNN), support vector machine, decision tree, ensemble learning, etc.; commonly used deep learning algorithms include: convolutional neural network (CNN), recurrent neural network (DNN), etc. Traditional machine learning algorithms are easily affected by the environment, have large classification errors under non-line-of-sight conditions, and are not suitable for regional classification of multiple floors and multiple buildings. Neural networks can perform coarse-grained regional classification of multiple floors, multiple buildings and multiple rooms by training offline CSI fingerprint libraries and RSS fingerprint libraries, but cannot be subdivided into small areas. Summary of the invention

[0004] In order to solve the technical problems existing in the prior art, the present invention provides a fine-grained region classification method and system based on convolutional neural network, which replaces the optimal state segmentation threshold determined by subjective observation and experience by utilizing CSI active window segmentation, CNN model training classification state labels, and citing feedback mechanism to dynamically adjust the state segmentation algorithm, and the sample confidence is higher.

[0005] The method of the present invention is implemented by the following technical scheme: a fine-grained region classification method based on a convolutional neural network, comprising the following steps:

[0006] S1. Input the labeled UJIIndoorLoc dataset composed of RSS into the SAE-1D Resnet10 convolutional neural network to obtain the building classification and stratification results;

[0007] S2, using the quadratic cost function to calculate the error between the classification result and the true value;

[0008] S3, split the CSI-based dataset into bins of size w;

[0009] S4, the segmented bins are used as data to input the CNN state inference model for training and output the state label;

[0010] S5, inputting the CSI amplitude of the segmented output state label into the pre-trained CNN state inference model for training, and outputting the probability distribution of fine-grained region classification;

[0011] S6. Calculate the concentration using the maximum probability and probability entropy as feedback for the activity segmentation algorithm to obtain the sample confidence;

[0012] S7. Use the confidence level and feedback results to dynamically adjust the activity segmentation algorithm.

[0013] The system of the present invention adopts the following technical solutions to achieve: a fine-grained region classification system based on a convolutional neural network, comprising:

[0014] Classification and stratification result acquisition module: used to input the UJIIndoorLoc dataset into the SAE-1D Resnet10 convolutional neural network to obtain building classification and stratification results;

[0015] Error calculation module: calculates the error between the classification result and the true value by using the quadratic cost function;

[0016] Dataset segmentation module: used to segment the CSI-based dataset into bins of size w;

[0017] Model training module: used to input the segmented bins as data into the CNN state inference model for training and output state labels;

[0018] Probability distribution acquisition module: used to input the CSI amplitude of the segmented output state label into the pre-trained CNN state inference model for training, and output the probability distribution of fine-grained region classification;

[0019] Sample confidence acquisition module: By using the maximum probability and probability entropy to calculate the concentration, it is used as feedback for the activity segmentation algorithm to obtain the sample confidence;

[0020] Dynamic adjustment module: Dynamically adjust the activity segmentation algorithm by utilizing the confidence level and feedback results.

[0021] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0022] 1. The present invention replaces the optimal state segmentation threshold determined by subjective observation and experience by using CSI active window segmentation, CNN model training classification state labels, and reference feedback mechanism to dynamically adjust the state segmentation algorithm, so that the sample confidence is higher.

[0023] 2. The number of convolutional layers in the present invention has increased to 10, which effectively avoids the problems of gradient disappearance and gradient explosion.

[0024] 3. The present invention proposes fine-grained area classification based on the previous coarse-grained room classification of multiple buildings, multiple floors and multiple rooms. The classified area is smaller and the classified area complexity is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a flow chart of the method of the present invention;

[0026] Figure 2 This is a schematic diagram of the SAE-1D Resnet10 structure. DETAILED DESCRIPTION

[0027] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0028] Example

[0029] like Figure 1 As shown, the fine-grained region classification method based on the convolutional neural network in this embodiment includes the following steps:

[0030] S1. Input the labeled UJIIndoorLoc dataset consisting of 520 RSS into the SAE-1D Resnet10 convolutional neural network to obtain the building classification and stratification results;

[0031] S2, using the quadratic cost function to calculate the error between the classification result and the true value;

[0032] S3, split the CSI-based dataset into bins of size w;

[0033] S4, the segmented bins are used as data to input the CNN state inference model for training and output the state label;

[0034] S5, inputting the CSI amplitude of the segmented output state label into the pre-trained CNN state inference model for training, and outputting the probability distribution of fine-grained region classification;

[0035] S6. Calculate the concentration using the maximum probability and probability entropy as feedback for the activity segmentation algorithm to obtain the sample confidence;

[0036] S7. Use the confidence level and feedback results to dynamically adjust the activity segmentation algorithm.

[0037] like Figure 2 As shown, in this embodiment, the SAE-1D Resnet10 convolutional neural network in step S1 is composed of stacked autoencoder SAE and 1D Resnet10; the stacked autoencoder SAE is composed of an input layer, a hidden layer, and an output layer. It performs feature compression by inputting a labeled UJIIndoorLoc dataset consisting of 520 RSSs, outputs a 64-dimensional feature layer, and then inputs the 64-dimensional feature layer as input data into the 1D Resnet10 model to complete the building and floor classification.

[0038] This embodiment refers to the method of using the three color channels of RGB images as the three image channels, and randomly selects 50 samples of the same label as the Conv1 operation channel of the CSI fingerprint; 1D Resnet10 includes 9 convolutional layers (Conv1, Conv2, ..., Conv4) and a fully connected layer (FC), and its residual layer is [2, 2, 2, 2], and the effective function of the residual block is as follows:

[0039] y=f(x)+x

[0040] Among them, y represents the output result of the residual block; x is the CSI output of the stacked autoencoder SAE feature layer, whose dimension is 64 and the number of channels is 64; f(x) is the calculation result of the main branch.

[0041] Specifically, the kernel size of the first convolution layer conv1 of the residual block is 7*1, the output channel is 128, and the stride is 2; the first convolution operation is followed by a 3*1 maximum pooling operation, and the last convolution kernel is followed by an average pooling operation; the kernel size of the second convolution layer conv2 is 3*1, and the output channel is 128; the kernel size of the third convolution layer conv3 is 3*1, and the output channel is 256; the kernel size of the fourth convolution layer conv4 is 3*1, and the output channel is 512. Finally, the classification result is output after the average pooling downsampling operation and the fully connected layer.

[0042] In this embodiment, the quadratic cost function in step S2 is used to calculate the error between the predicted value and the actual value output by the neural network, so that the values ​​of various parameters can be adjusted during the back propagation training process to achieve training convergence. The specific formula is defined as follows:

[0043]

[0044] Where n is the total number of training samples, y(x) is the corresponding expected output, L is the number of layers in the network, and α L(x) is the output of the activation vector network, x k is the RSS value in the UJIIndoorLoc test set.

[0045] In this embodiment, the CSI data set segmentation process in step S3 is as follows:

[0046] S31, using the first-order difference of the CSI amplitude to perform state segmentation to generate two bins, specifically, using the first-order difference algorithm to make a difference between the value of the next time point of the one-dimensional time series CSI and the value of the previous time point, to obtain the corresponding difference and draw a CSI amplitude graph, and then use the segmentation method to segment the CSI amplitude graph into two bins;

[0047] S32, extract detailed information of bins, as shown in Table 1:

[0048] Table 1

[0049]

[0050] In this embodiment, the one-dimensional time series CSI data obtained in the previous step is first divided into two bins of equal size, where t start and t end They represent the actual starting point and end point of the target activity, respectively. w represents the length of the CSI time window. The starting point and end point of the two states are the third and fourth columns in Table 1. According to the change of CSI amplitude, the CSI data is converted from t start to end Represented as a motion state, from t start –w to t start Indicates a stationary state.

[0051] In this embodiment, the specific formula for training the CNN state inference model in step S4 is as follows:

[0052] L out =CNN(X)

[0053] Specifically, the CNN framework consists of a convolutional layer, a dropout layer, and a maximum pooling layer, where X is the CSI input data of CNN, L out is the output of the fully connected layer.

[0054] In this embodiment, the specific implementation process of step S5 is as follows:

[0055] S51. Get the parameter W of the CNN fully connected layer f 、b f and Φ={W f ,b f ,W r ,b r}, given a training set {X};

[0056] S52, calculate the probability P(r|x; Φ) of regional classification and the objective function J(Φ) of the regional classification model based on cross entropy, and the specific formulas are as follows:

[0057] P(r|x;Φ)=softmax(W r *L+b r )

[0058]

[0059] In this embodiment, step S6 uses the maximum probability and probability entropy to calculate the confidence as feedback for the activity segmentation algorithm. For activity samples, the flatter the probability distribution and the higher the probability entropy, the lower the confidence and the lower the activity distinction. A high confidence indicates that the predicted category is the same as the true category, and the segmented sample is the expected sample for activity recognition. Specifically, let P(c|x i ) for each data x i The probability output of the sample activity classification model is obtained by inputting, where c∈[1,C], C is the number of activity categories; the maximum probability is calculated as follows:

[0060]

[0061] The probability entropy is calculated as follows:

[0062]

[0063] The confidence is calculated as follows:

[0064]

[0065] Among them, α is the maximum probability of adjustment M i The weight parameter y * The actual label for UJIIndoorLoc.

[0066] Based on the same inventive concept, the present invention proposes a fine-grained region classification system based on a convolutional neural network, comprising:

[0067] Classification and stratification result acquisition module: used to input the UJIIndoorLoc dataset into the SAE-1D Resnet10 convolutional neural network to obtain building classification and stratification results;

[0068] Error calculation module: calculates the error between the classification result and the true value by using the quadratic cost function;

[0069] Dataset segmentation module: used to segment the CSI-based dataset into bins of size w;

[0070] Model training module: used to input the segmented bins as data into the CNN state inference model for training and output state labels;

[0071] Probability distribution acquisition module: used to input the CSI amplitude of the segmented output state label into the pre-trained CNN state inference model for training, and output the probability distribution of fine-grained region classification;

[0072] Sample confidence acquisition module: By using the maximum probability and probability entropy to calculate the concentration, it is used as feedback for the activity segmentation algorithm to obtain the sample confidence;

[0073] Dynamic adjustment module: Dynamically adjust the activity segmentation algorithm by utilizing the confidence level and feedback results.

[0074] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A fine-grained region classification method based on convolutional neural network, characterized in that: The following steps are involved: S1. Input the labeled UJIIndoorLoc dataset composed of RSS into the SAE-1D Resnet10 convolutional neural network to obtain the building classification and stratification results; S2, using the quadratic cost function to calculate the error between the classification result and the true value; S3, split the CSI-based dataset into bins of size w; S4, the segmented bins are used as data to input the CNN state inference model for training and output the state label; S5, inputting the CSI amplitude of the segmented output state label into the pre-trained CNN state inference model for training, and outputting the probability distribution of fine-grained region classification; S6. Calculate the concentration using the maximum probability and probability entropy as feedback for the activity segmentation algorithm to obtain the sample confidence; S7. Use the confidence level and feedback results to dynamically adjust the activity segmentation algorithm.

2. The fine-grained region classification method based on convolutional neural network according to claim 1 is characterized in that: In step S1, the SAE-1D Resnet10 convolutional neural network consists of a stacked autoencoder SAE and a 1D Resnet10; the stacked autoencoder SAE consists of an input layer, a hidden layer, and an output layer. The labeled UJIIndoorLoc dataset composed of input RSS is input for feature compression, and a 64-dimensional feature layer is output. The 64-dimensional feature layer is then input as input data into the 1D Resnet10 model to complete the building and floor classification.

3. The fine-grained region classification method based on convolutional neural network according to claim 2 is characterized in that: 1DResnet10 consists of 9 convolutional layers and one fully connected layer. Its residual layer is [2, 2, 2, 2]. The effective function of the residual block is as follows: y=f(x)+x Among them, y represents the output result of the residual block; x is the CSI output of the stacked autoencoder SAE feature layer, whose dimension is 64 and the number of channels is 64; f(x) is the calculation result of the main branch.

4. The fine-grained region classification method based on convolutional neural network according to claim 3 is characterized in that: The kernel size of the first convolution layer conv1 of the residual block is 7*1, the output channel is 128, and the stride is 2; the first convolution operation is followed by a 3*1 maximum pooling operation, and the last convolution kernel is followed by an average pooling operation; the kernel size of the second convolution layer conv2 is 3*1, and the output channel is 128; the kernel size of the third convolution layer conv3 is 3*1, and the output channel is 256; the kernel size of the fourth convolution layer conv4 is 3*1, and the output channel is 512. Finally, the classification result is output after the average pooling downsampling operation and the fully connected layer.

5. The fine-grained region classification method based on convolutional neural network according to claim 1, characterized in that: The specific formula for calculating the error between the classification result and the true value by the quadratic cost function in step S2 is defined as follows: Among them, n is the total number of training samples, x k is the RSS value in the UJIIndoorLoc test set, y(x k ) is the corresponding expected output, L is the number of layers in the network, α L (x k ) is the output of the activation vector network.

6. The fine-grained region classification method based on convolutional neural network according to claim 1, characterized in that: The CSI data set segmentation process in step S3 is as follows: S31, using the first-order difference of the CSI amplitude to perform state segmentation to generate two bins; S32, extract detailed information of bins, including the starting point t of the target activity start and the end point t end , the length of the CSI time window w, motion state, stationary state.

7. The fine-grained region classification method based on convolutional neural network according to claim 1, characterized in that: The specific formula for training the CNN state inference model in step S4 is as follows: L out =CNN(X) The CNN framework consists of a convolutional layer, a dropout layer, and a maximum pooling layer. X is the CSI input data of CNN, and L is out is the output of the fully connected layer.

8. The fine-grained region classification method based on convolutional neural network according to claim 1, characterized in that: The specific implementation process of step S5 is as follows: S51. Get the parameter W of the CNN fully connected layer f 、b f and Φ={W f , b f , W r , b r }, given a training set {X}; S52, calculate the probability P(r|x; Φ) of regional classification and the objective function J(Φ) of the regional classification model based on cross entropy, and the specific formulas are as follows: P(r|x;Φ)=softmax(W r *L+b r ) 9. The fine-grained region classification method based on convolutional neural network according to claim 1, characterized in that: The maximum probability in step S6 is calculated as follows: Among them, P(c|x i ) for each data x i Input the probability output of the sample activity classification model, c∈[1,C], where C is the number of activity categories; The probability entropy is calculated as follows: The confidence is calculated as follows: Among them, α is the maximum probability of adjustment M i The weight parameter y * The actual label for UJIIndoorLoc.

10. A fine-grained region classification system based on convolutional neural network, characterized in that: include: Classification and stratification result acquisition module: used to input the UJIIndoorLoc dataset into the SAE-1D Resnet10 convolutional neural network to obtain building classification and stratification results; Error calculation module: calculates the error between the classification result and the true value by using the quadratic cost function; Dataset segmentation module: used to segment the CSI-based dataset into bins of size w; Model training module: used to input the segmented bins as data into the CNN state inference model for training and output state labels; Probability distribution acquisition module: used to input the CSI amplitude of the segmented output state label into the pre-trained CNN state inference model for training, and output the probability distribution of fine-grained region classification; Sample confidence acquisition module: By using the maximum probability and probability entropy to calculate the concentration, it is used as feedback for the activity segmentation algorithm to obtain the sample confidence; Dynamic adjustment module: Dynamically adjust the activity segmentation algorithm by utilizing the confidence level and feedback results.