A passive WiFi sensing based fine-grained crowd analysis method

By combining a deep convolutional autoencoder and a bidirectional convolutional long short-term neural network model with density clustering, and utilizing passive WiFi sensing data for fine-grained crowd analysis, the error problems in crowd distribution and speed estimation in existing technologies are solved, and high-precision fine-grained crowd status monitoring is achieved.

CN116563793BActive Publication Date: 2025-10-24INNER MONGOLIA UNIVERSITY

Patent Information

Application Number
CN202310548152.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2025-10-24
Estimated Expiration
2043-05-16

AI Technical Summary

Technical Problem

Existing computer vision-based crowd analysis methods are costly to deploy, computationally complex, and have low estimation accuracy, while passive WiFi sensing-based crowd analysis methods have large errors in estimating crowd distribution and speed, making it difficult to achieve accurate, fine-grained crowd analysis.

Method used

By employing a deep convolutional autoencoder model and a bidirectional convolutional long short-term neural network model, combined with density clustering, fine-grained analysis of crowd density maps is performed using passive WiFi sensing data to identify the center pixels of local high-density crowds and estimate their velocity vectors.

Benefits of technology

The accuracy of crowd distribution estimation is improved, and accurate estimation of the speed of local high-density crowds is achieved, which is suitable for real-time monitoring and prediction of large-scale scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116563793B_ABST
    Figure CN116563793B_ABST
Patent Text Reader

Abstract

The application discloses a fine-grained crowd analysis method based on passive WiFi sensing, which comprises the following steps: obtaining a coarse-grained crowd density map in a target monitoring area obtained by WiFi sensing at a continuous time; inputting the coarse-grained crowd density map into a trained deep convolutional autoencoder model to output a fine-grained global crowd density map at the continuous time; identifying the center pixel point coordinates of each local high-density crowd in the global crowd density map by using a density clustering method; cropping a local block from the corresponding position in the global crowd density map for each center pixel point coordinate, and combining the local blocks at the same position at several previous times to form a crowd density block sequence; inputting the crowd density block sequence into a trained bidirectional convolutional long short-term neural network model to output the velocity vector of each local high-density crowd. The method can improve the accuracy of crowd distribution estimation in a scene, and simultaneously realize the estimation of the velocity of local high-density crowds.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of fine-grained crowd analysis, and more particularly to a fine-grained crowd analysis method based on passive WiFi sensing. BACKGROUND

[0002] With the rapid development of cities, the monitoring of crowds in large-scale scenes has become an important research field. However, how to accurately analyze the fine-grained crowd, that is, to understand how the crowd is distributed in the public space and how it moves over time, is still an open topic. Obtaining these important crowd state information is crucial for many applications, including traffic control, urban planning, business decision-making, crowd safety management, and even the construction of smart cities.

[0003] According to the different use of data modalities, the existing technologies can be mainly divided into two categories: 1) crowd analysis method based on computer vision. This kind of method uses detection or regression models based on deep learning to extract the state information of the crowd from images or videos. 2) crowd analysis method based on passive WiFi sensing. This kind of method uses WiFi sniffers (a kind of customized WiFi access point) to capture probe request frames sent by mobile devices carried by surrounding pedestrians, extracts information such as unique MAC address and received signal strength (RSS) from the frames, and infers the distribution and movement of the crowd.

[0004] Among them, the existing crowd analysis method based on computer vision has the disadvantages of high deployment cost, high computational complexity, existence of blind area and occlusion, limitation by light conditions, etc.; when estimating the crowd distribution (crowd density map), it cannot obtain the global information of the large-area scene, and the perspective distortion makes the estimated density map not intuitive; when estimating the crowd speed, it is limited by occlusion and has the difficulty of cross-camera cooperative processing.

[0005] And the existing crowd analysis method based on passive WiFi sensing has the advantages of low cost, large coverage, strong scalability, and device-free, etc., but the randomness and sparsity of WiFi measurement values lead to generally low estimation accuracy. In terms of estimating the crowd distribution, the existing crowd analysis method based on passive WiFi sensing fails to effectively overcome the limitations of the number of people estimation and crowd position estimation, resulting in large estimation errors; in terms of crowd speed estimation, it is limited by MAC address randomization and limited application scenarios (one-way or two-way channel type areas).

[0006] Therefore, how to improve the accuracy of crowd distribution estimation in the scene and at the same time realize the estimation of the speed of local high-density crowds is a problem that needs to be solved by those skilled in the art. SUMMARY

[0007] Therefore, the application provides a fine-grained crowd analysis method based on passive WiFi sensing.

[0008] To achieve the above object, the application adopts the following technical scheme:

[0009] A fine-grained crowd analysis method based on passive WiFi sensing comprises the following steps:

[0010] S1, obtaining a coarse-grained crowd density map in a target monitoring area at continuous time points by WiFi sensing;

[0011] S2, inputting the coarse-grained crowd density map into a trained deep convolutional autoencoder model to output a fine-grained global crowd density map at continuous time points;

[0012] S3, identifying the center pixel coordinates of each local high-density crowd in the global crowd density map by using a density clustering method;

[0013] S4, cropping a local block from the corresponding position in the global crowd density map for each center pixel coordinate, and combining the local blocks at the same position at previous time points to form a crowd density block sequence;

[0014] S5, inputting the crowd density block sequence into a trained bidirectional convolutional long short-term neural network model to output the velocity vector of each local high-density crowd.

[0015] Further, the step S1 specifically comprises:

[0016] S11, constructing a WiFi positioning fingerprint library for the target monitoring area offline;

[0017] S12, based on the WiFi positioning fingerprint library, using a KNN positioning method combined with a sliding window mechanism to perform WiFi fingerprint positioning on the fingerprints of all WiFi sensing devices in the target monitoring area at continuous time points to obtain a positioning set of WiFi sensing devices;

[0018] S13, converting the positioning set into a coarse-grained crowd density map.

[0019] Further, the step S11 specifically comprises:

[0020] A two-dimensional rectangular coordinate system is established for the target monitoring area, and a plurality of reference points are set in the target monitoring area; a plurality of WiFi sniffers are uniformly deployed in the target monitoring area; the WiFi sniffers are used to collect WiFi sensing data of reference devices at each reference point position;

[0021] The RSS mean value fingerprint vector of the preset dimension is collected for the reference point by using a plurality of reference devices in the target monitoring area, and a WiFi positioning fingerprint library is constructed offline according to the RSS mean value fingerprint vector and the position of the reference point.

[0022] Further, the number of WiFi sniffers is greater than or equal to 3.

[0023] Further, the step S12 specifically comprises:

[0024] The WiFi sensing data of each device MAC address at continuous time points is filtered by using a time window, and a fingerprint vector of each device MAC address is constructed;

[0025] Each fingerprint vector is positioned by using a KNN positioning method combined with the WiFi positioning fingerprint library, and a positioning set of WiFi sensing devices is obtained.

[0026] Further, the step S13 specifically comprises:

[0027] Each physical space coordinate in the positioning set is converted into a corresponding pixel coordinate to form a pixel coordinate set;

[0028] The pixel coordinate set is converted into a discrete intermediate image;

[0029] A WiFi sensing coarse-grained crowd density map is generated by performing convolution and smoothing operations on the intermediate image by using a fixed Gaussian kernel function.

[0030] Further, the deep convolution autoencoder model is trained by the following steps:

[0031] The monitoring scene is divided into a plurality of sub-regions; a plurality of WiFi sniffers are uniformly deployed in the monitoring scene; each of the sub-regions can be covered by a single fixed or temporary camera;

[0032] Based on the WiFi sniffers and the cameras, WiFi sensing data and video data of the target monitoring area at continuous time points are obtained correspondingly;

[0033] Based on the WiFi sensing data and the video data, a first coarse-grained crowd density map and a global crowd density map label corresponding to the first coarse-grained crowd density map are obtained respectively;

[0034] The first coarse-grained crowd density map is taken as input, and the global crowd density map label is taken as output, and a deep convolution autoencoder model is trained by using an Adam optimizer and a fusion loss function.

[0035] Further, the deep convolutional autoencoder model is composed of an encoder and a decoder, and includes 10 base modules and 3 convolutional attention modules in total.

[0036] The base module combines a 3*3 convolutional layer, an activation function and a batch normalization layer.

[0037] The convolutional attention module extracts attention in the channel domain and the spatial domain at the same time.

[0038] Further, the bidirectional convolutional long short-term neural network model is trained by the following steps:

[0039] Based on the pedestrian tracking dataset, a first global crowd density map is obtained.

[0040] Based on the first global crowd density map, a corresponding first crowd density map block sequence is obtained, and the average speed vector of pedestrians in the position area corresponding to each first local high-density crowd in the first global crowd density map is obtained; the average speed vector is taken as the speed vector label of each first local high-density crowd.

[0041] The first crowd density map block sequence is taken as the input, and the speed vector label of each first local high-density crowd is taken as the output, and the bidirectional convolutional long short-term neural network model is trained by using the Adam optimizer and the MES loss function.

[0042] Further, the bidirectional convolutional long short-term neural network model includes two ConvLSTM layers and one fully connected layer; each ConvLSTM layer includes 16 3*3 convolutional kernels.

[0043] According to the above technical solution, compared with the prior art, the present application provides a fine-grained crowd analysis method based on passive WiFi perception, which has the following beneficial effects:

[0044] 1、The present application uses a deep convolutional autoencoder model to learn the deep potential features contained in passive WiFi perception data, which alleviates the randomness and sparsity of WiFi measurement caused by random scanning of mobile devices and randomization of MAC addresses, and uses image reconstruction to regress an accurate global crowd density map CDM from the coarse-grained crowd density map WDM, thereby helping to improve the accuracy of crowd distribution estimation.

[0045] 2、The application designs a density clustering algorithm DM-DBSCAN for a density map, so as to identify more important local high-density crowds from the CDM, and uses a bidirectional convolution long short-term neural network model to infer the speed vector (the size and direction of the speed can be obtained after decomposition) of the local high-density crowd from the crowd density map block sequence SCDMP, which is beneficial to judge the emergency of the crowd and predict the flow direction of the crowd. The method avoids the WiFi measurement anonymization problem caused by MAC address randomization in passive WiFi perception, and innovatively uses the change of local density value to estimate the speed of the group rather than the individual, so as to realize the speed estimation of the local high-density crowd. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only a part of the embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.

[0047] Figure 1 The accompanying drawings are provided for the flowchart of the fine-grained crowd analysis method based on passive WiFi perception provided by the present application.

[0048] Figure 2 The accompanying drawings are provided for the framework diagram of the fine-grained crowd analysis method based on passive WiFi perception provided by the present application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0050] Referring to Figure 1 The embodiments of the present application disclose a fine-grained crowd analysis method based on passive WiFi perception, which comprises the following steps:

[0051] S1, obtaining a coarse-grained crowd density map in a target monitoring area obtained by WiFi perception at continuous time;

[0052] S2, inputting the coarse-grained crowd density map into a trained deep convolution autoencoder model, and outputting a fine-grained global crowd density map at continuous time;

[0053] S3, the density clustering method is used to identify the center pixel point coordinates of each local high-density crowd in the global crowd density map.

[0054] S4, for each center pixel point coordinate, a local block is cut out from the corresponding position in the global crowd density map, and the local blocks at the same position at previous moments are combined to form a crowd density block sequence.

[0055] S5, the crowd density block sequence is input into the trained bidirectional convolution long short-term neural network model, and the speed vector of each local high-density crowd is output.

[0056] The use scenario of the fine-grained crowd analysis method based on passive WiFi sensing provided by the embodiment of the application is relatively wide, and the method has no limitation on the shape of the monitoring area, so most areas of large and medium-sized cities, as well as individual crowd gathering areas in small cities and towns can be used. Specifically, the method can be applied to the following scenarios: passenger flow analysis in the field of urban public transportation, such as train stations, bus stations, subway stations and airports; real-time monitoring in the scenario of urban crowd gathering, such as large squares; planning, management and control of urban traffic, such as road planning, roadblock setting and gate deployment; customer preference and crowd statistical analysis in urban commercial complexes; rapid monitoring deployment and anomaly detection in temporary large-scale activity sites (such as elections, sports events, large performances, etc.).

[0057] Next, the above steps are described in detail.

[0058] In the above step S1, the following contents are specifically included

[0059] S11, for the target monitoring area, an offline WiFi positioning fingerprint library is constructed; specifically including:

[0060] A two-dimensional rectangular coordinate system is established for the target monitoring area, and a plurality of reference points are set in the target monitoring area; a plurality of WiFi sniffers are uniformly deployed in the target monitoring area; the WiFi sniffers are used to collect WiFi sensing data of reference devices at each reference point position in the target monitoring area; a plurality of reference devices in the target monitoring area are used to collect RSS mean value fingerprint vectors of a preset dimension at the reference points, and the WiFi positioning fingerprint library is constructed offline according to the RSS mean value fingerprint vectors and the positions of the reference points; wherein the value of the preset dimension is consistent with the number of WiFi sniffers;

[0061] Specifically, if the target monitoring area is a regular area, a plurality of WiFi sniffers are uniformly deployed; if the target monitoring area is an irregular area, approximate uniform deployment can be used. The deployment amount is usually about 500m 2 area per WiFi sniffer, and in the extreme case, at least 3 WiFi sniffers are deployed in the entire area;

[0062] In other embodiments, a series of preprocessing can be performed on the WiFi sensing data before using it, such as data cleaning, removal of fixed devices and passing-by devices, standardization of positioning fingerprints, etc., which can reduce the noise influence in passive WiFi sensing process, make WDM closer to CDM, and thus improve the estimation accuracy of the method of the application.

[0063] S12, based on the WiFi positioning fingerprint library, using KNN positioning method combined with sliding window mechanism to perform WiFi fingerprint positioning on all WiFi sensing device fingerprints in the target monitoring area at continuous time, to obtain a fingerprint positioning set; specifically including:

[0064] The WiFi sensing data of each device MAC address at continuous time is filtered and processed using a time window, and a fingerprint vector of each device MAC address is constructed; KNN (K-Nearest Neighbor) positioning method is used in combination with the WiFi positioning fingerprint library to position each fingerprint vector, to obtain a positioning set of WiFi sensing devices;

[0065] In other embodiments, a positioning algorithm based on deep learning can also be used to further improve the accuracy of fingerprint positioning.

[0066] S13, converting the positioning set into a coarse-grained crowd density map; specifically including:

[0067] Each continuous physical space coordinate in the positioning set is converted into a corresponding pixel coordinate to form a pixel coordinate set; the pixel coordinate set is converted into a discrete intermediate image; a fixed Gaussian kernel function is used to perform convolution and smoothing operation on the intermediate image to generate a WiFi-sensed coarse-grained crowd density map WDM.

[0068] In the above step S2, the deep convolutional autoencoder model (ADCA model) is composed of an encoder and a decoder, and includes 10 basic modules and 3 convolutional attention modules; the combination of a 3x3 convolution layer, an activation function and a batch normalization layer is realized through the basic module; the attention in the channel domain and the spatial domain is simultaneously extracted through the convolutional attention module;

[0069] The deep convolutional autoencoder model (ADCA model) is trained by the following steps:

[0070] The monitoring scene is divided into multiple sub-regions; multiple WiFi sniffers are uniformly deployed in the monitoring scene; each sub-region can be covered by a single fixed or temporary camera;

[0071] Based on the WiFi sniffer and the camera, WiFi sensing data and video data of the target monitoring area at continuous time are obtained;

[0072] Based on the WiFi sensing data and the video data, a first coarse-grained crowd density map and a global crowd density map label corresponding to the first coarse-grained crowd density map are obtained respectively; specifically, based on the WiFi sensing data, the first coarse-grained crowd density map is obtained by the method of step S1; based on the video data, a plurality of global pedestrian position labels of a scene are obtained by manual labeling, and the global crowd density map label is generated by step S13.

[0073] The first coarse-grained crowd density map is taken as input, and the global crowd density map label is taken as output, and the Adam optimizer and the fusion loss function are used to train the deep convolutional autoencoder model (ADCA model);

[0074] The trained deep convolutional autoencoder model can be used to reconstruct the real-time sensed coarse-grained crowd density map WDM to obtain the real global crowd density map CDM.

[0075] In other embodiments, the ADCA model can be replaced by other deep learning models with similar functions, including but not limited to image reconstruction function, image denoising function, image completion function, etc., such as an autoregressive neural network model based on compressed sensing. After replacement, more accurate CDM estimation is expected.

[0076] In other embodiments, in the case that certain specific scenes are difficult to obtain scene global labels, synthetic data can be generated by combining scene size, obstacle distribution and other information to train the ADCA model, and then transferred to the target scene for use.

[0077] In steps S3-S4, the density clustering method DM-DBSCAN for density map is used to identify the center pixel coordinates of each local high-density crowd LHDC in the global crowd density map CDM; for the center pixel coordinates of each local high-density crowd LHDC, a local block (i.e. CDM block) is cropped from the corresponding position in the global crowd density map CDM, and combined with the local blocks at the same position in the previous time, to form a crowd density map block sequence SCDMP.

[0078] In step S5, the bidirectional convolutional long short-term neural network model (BiConvLSTM model) includes two ConvLSTM layers and one fully connected layer; each ConvLSTM layer includes 16 3x3 convolution kernels; the bidirectional convolutional long short-term neural network model (BiConvLSTM model) is trained by the following steps:

[0079] Based on the pedestrian tracking dataset, the first global crowd density map is obtained by the method of step S2.

[0080] Based on the first global crowd density map, the method of steps S3 and S4 is used to obtain the corresponding first crowd density map block sequence, and the speed vector mean of the pedestrians in the position area corresponding to each first local high-density crowd in the first global crowd density map is obtained; the speed vector mean is used as the speed vector label of each first local high-density crowd;

[0081] The first crowd density map block sequence is used as the input, and the speed vector label of each first local high-density crowd is used as the output. The bidirectional convolutional long short-term neural network model is trained using the Adam optimizer and the MES loss function;

[0082] The real-time crowd density map block sequence SCDMP is input into the bidirectional convolutional long short-term neural network model BiConvLSTM, and the speed vector of each local high-density crowd LHDC can be obtained.

[0083] In other embodiments, the BiConvLSTM model can be replaced by other deep learning models for time series data, such as Gated Recurrent Unit (GRU), Recurrent Neural Network (RNN), Long Short-Term Memory Neural Network (LSTM), and their variants.

[0084] In other embodiments, the way to obtain the global label of the scene can be designed according to the implementation conditions and the management strategy of the target scene, for example, using a drone to take a bird's-eye view, using a 3D range finder to measure, etc., so as to improve the comprehensiveness of the data.

[0085] Next, the above method steps will be described through a specific embodiment.

[0086] First step: the following steps are used to obtain the positioning result of each MAC in the WiFi perception data, and the positioning result is converted into a coarse-grained crowd density map WDM;

[0087] 1. Deploy m≥3 WiFi sniffers (approximately) uniformly in the monitoring area, and connect the sniffers to the server using wired or wireless methods;

[0088] 2. Establish a two-dimensional rectangular coordinate system for the scene, and use several devices to collect the RSS mean fingerprint vector of a certain number of reference points, where m is the number of deployed sniffers; construct a WiFi positioning fingerprint library from all reference point fingerprints;

[0089] 3. In the online phase, use a time window of length Δt to filter the perception data of each unique MAC address in the WiFi perception data, construct an m-dimensional fingerprint vector, and use a KNN positioning algorithm with parameter k to locate each MAC address fingerprint vector in combination with the WiFi positioning fingerprint library to obtain a positioning set L={l1, l2, …l nw} where nw the number of devices with unique MAC addresses representing WiFi awareness;

[0090] 4. Convert each physical location in the positioning set L to the corresponding pixel coordinate and form the pixel coordinate set P = {p1, p2, … p nw}, where each 1m x 1m square real area corresponds to a single pixel in the coarse-grained crowd density map WDM;

[0091] 5. Convert the pixel coordinate set P to the discrete intermediate image I using the following formula:

[0092]

[0093] where δ represents the impulse function, δ(p-p i ) = 1 when p = p i , otherwise 0; p i represents the i-th element in the pixel coordinate set P.

[0094] 6. Convolve and smooth the intermediate image I using a Gaussian kernel function of fixed size ks to generate the coarse-grained crowd density map WDM of size H x W, the specific formula is as follows:

[0095] WDM(p) = I(p) * G σ (p),

[0096]

[0097] where G σ (p) represents the fixed Gaussian kernel function; σ represents the standard deviation of G σ (p).

[0098] Second step: reconstruct the fine-grained global crowd density map CDM from the coarse-grained crowd density map WDM using the following steps:

[0099] 1. Construct a deep convolutional autoencoder model (i.e. ADCA model) as shown in Figure 2 Fig. 1, which is composed of an encoder and a decoder, and contains a total of 10 basic modules at different levels and 3 convolutional attention modules (CBAM) embedded therein, where the basic block combines a 3x3 convolution layer, an activation function and a batch normalization (BN) layer; CBAM is used to extract attention in both channel and spatial domains. Therefore, the hidden layer representation h k of the k-th feature map is derived from the following formula:

[0100] h k = ReLU(x * W k + b k ),

[0101] where x is the input single-channel feature map; W k is the shared weight of the kth feature map; b k represents the bias of the kth feature map; ReLU activation function is used to prevent gradient vanishing; * represents 2D convolution operation;

[0102] 2. Divide the scene into several sub-regions that can be covered by a single fixed or temporary camera, collect continuous video and WiFi sensing data at the same time, obtain several global crowd physical position labels of the scene through video data by artificial labeling, generate real global crowd density map CDM labels corresponding to coarse-grained crowd density map WDM in the same way as the first step, and construct a training data set;

[0103] 3. Train the deep convolutional autoencoder model (ADCA model) through the training data set with Adam optimizer and fusion loss function L fusion combines the pixel-level mean square error (MSE) loss L mse used by traditional image regression methods and the structural similarity index (SSIM) loss L ssim used to measure local pattern consistency, and the formula is as follows:

[0104] L fusion = L mse + αL ssim ,

[0105]

[0106]

[0107]

[0108] where F(X; Θ) represents the global crowd density map CDM estimated according to the current parameters Θ of the model; X and Y represent WDM and the corresponding real global crowd density map CDM label respectively; N represents the number of pixels in the density map, μ F and respectively represent the local mean and variance of F; σ FY represents the local covariance estimate, C1 and C2 are two small constants to avoid division by 0; p represents each position of the density map; and α represents the weight balancing the importance of the two losses;

[0109] 4. In the online stage, process the real-time collected WiFi sensing data into a set of positioning results according to the first step, convert the positioning results into a coarse-grained crowd density map WDM at the current time, and finally use the trained ADCA model to reconstruct and output the global crowd density map CDM from the coarse-grained crowd density map WDM.

[0110] Third step: Estimate the velocity vector of each local high-density crowd LHDC in the global crowd density map CDM using the following steps:

[0111] 1. Use the DM-DBSCAN clustering algorithm with parameters ∈ p and MinDes to identify the center pixel coordinates of all local high-density crowds LHDC in the CDM. The DM-DBSCAN algorithm is modified based on the original DBSCAN algorithm to cluster high-density regions in the CDM. The main modifications include: 1) The input data is changed from a point set (a set of two-tuples consisting of horizontal and vertical coordinates) to a pixel point set with density values (a set of three-tuples consisting of horizontal and vertical pixel coordinates and the crowd density value of the pixel point); 2) Similarly, DM-DBSCAN uses the Euclidean distance between pixel coordinates to find the neighborhood of a pixel point; 3) When determining whether the density meets the conditions, DM-DBSCAN calculates the sum of the density values of the pixels in the neighborhood instead of the number of points in the neighborhood as in the original DBSCAN. Therefore, the field distance threshold ∈ p and the neighborhood point number threshold MinPts of the original DBSCAN algorithm are replaced by the neighborhood pixel distance threshold ∈ p and the neighborhood density threshold MinDes of the DM-DBSCAN algorithm, and the number of parameters remains unchanged but the physical meaning changes; based on this, the problem of the original DBSCAN algorithm being difficult to directly cluster the crowd density map CDM and identify local high-density crowds LHDC is solved;

[0112] 2. For each center pixel of a LHDC, crop a CDM block of size ps=N p ×N p from the corresponding pixel position of the CDM. Set the sequence length to sl, and crop the CDM at the same position for the first sl-1 time steps. Combine all the cropped CDM blocks into a crowd density map block sequence SCDMP with dimensions sl×N p ×N x . For cases where the boundary exceeds, fill in 0 to ensure consistency of dimensions;

[0113] 3. Construct a lightweight BiConvLSTM model to estimate the velocity vector of the LHDC. The model uses two ConvLSTM layers to extract the spatio-temporal features of SCDMP, each layer consisting of 16 3×3 convolution kernels followed by a fully connected layer to output the estimated velocity vector v=(v y , v T ) composed of the X and Y axis velocity components;

[0114] 4. Construct the training dataset of BiConvLSTM model based on the public pedestrian tracking dataset. The public pedestrian tracking dataset contains the position and speed attributes of each pedestrian at each time, generate the CDM of all pedestrians at different time according to the method of the second step, then generate the SCDMP and get the speed label of each LHDC by the average of the speed vector of pedestrians in the corresponding position center area;

[0115] 5. Train the BiConvLSTM model with Adam optimizer and MSE loss function on the training dataset;

[0116] 6. In the online stage, for each CDM generated in the third step, identify each LHDC and construct the corresponding SCDMP, input it into the trained BiConvLSTM model and output the speed vector of each LHDC.

[0117] In summary, the embodiment of the present application provides a fine-grained crowd analysis method based on passive WiFi sensing, which uses deep learning technology and passive WiFi sensing to perform fine-grained crowd analysis, and outputs information including the global crowd density map (CDM) and the speed vector of the local high-density crowd (LHDC). The state information of the fine-grained crowd in the monitoring area can be displayed in real time, accurately and visually.

[0118] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0119] The above description of disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A passive WiFi-aware based fine-grained crowd analysis method, characterized in that, Comprising the following steps: S1, obtaining a coarse-grained crowd density map in the target monitoring area obtained by WiFi sensing at continuous time; comprising: S11, for the target monitoring area, offline building a WiFi positioning fingerprint library; S12, based on the WiFi positioning fingerprint library, using KNN positioning method combined with sliding window mechanism to perform WiFi fingerprint positioning on the fingerprints of all WiFi sensing devices in the target monitoring area at continuous time, to obtain a positioning set of WiFi sensing devices; S13, converting each physical space coordinate in the positioning set into a corresponding pixel coordinate to form a pixel coordinate set; converting the pixel coordinate set into a discrete intermediate image; using a fixed Gaussian kernel function to perform convolution and smoothing operation on the intermediate image to generate a WiFi-sensed coarse-grained crowd density map; S2, inputting the coarse-grained crowd density map into the trained deep convolutional autoencoder model to output a fine-grained global crowd density map at continuous time; the deep convolutional autoencoder model is trained by the following steps: Divide the monitoring scene into multiple sub-regions; uniformly deploy multiple WiFi sniffers in the monitoring scene; each sub-region can be covered by a single fixed or temporary camera; Based on the WiFi sniffer and camera, the WiFi sensing data and video data of the target monitoring area at continuous time are obtained correspondingly; Based on the WiFi sensing data and video data, a first coarse-grained crowd density map and a global crowd density map label corresponding to the first coarse-grained crowd density map are obtained respectively; Using the first coarse-grained crowd density map as input and the global crowd density map label as output, the deep convolutional autoencoder model is trained using the Adam optimizer and the fusion loss function; S3, using density clustering method to identify the center pixel coordinates of each local high-density crowd in the global crowd density map; S4, for each center pixel coordinate, a local block is cropped from the corresponding position in the global crowd density map, and combined with the local blocks at the same position at previous time, to form a crowd density map block sequence; S5, inputting the crowd density map block sequence into the trained bidirectional convolutional long short-term neural network model to output the velocity vector of each local high-density crowd; the bidirectional convolutional long short-term neural network model is trained by the following steps: Based on the pedestrian tracking data set, a first global crowd density map is obtained; Based on the first global crowd density map, a corresponding first crowd density map block sequence is obtained, and the average speed vector of pedestrians in the corresponding position region of each first local high-density crowd in the first global crowd density map is obtained; the average speed vector is taken as the speed vector label of each first local high-density crowd; Using the first crowd density map block sequence as input and the speed vector label of each first local high-density crowd as output, the bidirectional convolutional long short-term neural network model is trained using the Adam optimizer and the MSE loss function.

2. The method of claim 1, wherein, The step S11 specifically comprises: A two-dimensional rectangular coordinate system is established for a target monitoring area, and a plurality of reference points are set in the target monitoring area; a plurality of WiFi sniffers are uniformly arranged in the target monitoring area; the WiFi sniffers are used to collect WiFi sensing data of reference devices at each reference point position; A plurality of reference devices in the target monitoring area are used to collect RSS mean value fingerprint vectors of the reference points in a preset dimension, and a WiFi positioning fingerprint library is constructed offline according to the RSS mean value fingerprint vectors and reference point positions.

3. The method of claim 2, wherein, The number of WiFi sniffers is greater than or equal to 3.

4. The method of claim 2, wherein, The step S12 specifically includes: The WiFi sensing data of each device MAC address at continuous time points is filtered by using a time window, and a fingerprint vector of each device MAC address is constructed; Each fingerprint vector is positioned by using a KNN positioning method combined with the WiFi positioning fingerprint library, and a positioning set of WiFi sensing devices is obtained.

5. The method of claim 1, wherein, The deep convolutional autoencoder model is composed of an encoder and a decoder, and includes 10 basic modules and 3 convolutional attention modules. The basic module is used to combine a 3×3 convolutional layer, an activation function and a batch normalization layer. The convolutional attention module is used to extract attention in the channel domain and the spatial domain at the same time.

6. The method of claim 1, wherein, The bidirectional convolutional long short-term neural network model includes two ConvLSTM layers and one fully connected layer; each ConvLSTM layer includes 16 3×3 convolutional kernels.

Citation Information

Patent Citations

  • Scenic spot crowd behavior analysis method based on convolutional neural network

    CN110705394A

  • Large-scale crowd counting method based on passive WiFi sensing

    CN115442744A

Cited By

  • A crowd density detection method and system based on WiFi probe

    CN122346773A