Crowd detection method and related equipment
By receiving data from wireless network sensor APs and cameras, the visual supervision algorithm model is used to analyze the image data to obtain the crowd movement speed and total number, which solves the problem of high cost caused by the need for multiple cameras in the existing technology and realizes an efficient single camera Crowd detection.
Patent Information
- Application Number
- CN202410348530.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-03-26
AI Technical Summary
The prior art requires at least two or more cameras when conducting crowding detection on crowds, resulting in higher costs.
By receiving data from the wireless network sensor AP and camera, the visual supervision algorithm model is used to analyze the image data to obtain the crowd movement speed, and combined with the total number of people in the AP detection request frame, the crowd congestion situation is determined.
The movement speed and crowded of the crowd can be detected by using only one camera, reducing the cost of hardware.
Smart Images

Figure CN118230242B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technology, and in particular to a crowd congestion detection method and related equipment. Background Art
[0002] Crowd detection is an active research area at present, involving a variety of techniques and methods for real-time monitoring and estimation of crowd crowding in a space.
[0003] The common method of crowd crowding currently usually requires setting up two or more cameras and placing the cameras at different positions, and then calculating the moving speed of the crowd based on the image data obtained by the two or more cameras.
[0004] Therefore, the existing technology requires at least two cameras when performing crowd detection on a crowd, which has the problem of high cost. Summary of the invention
[0005] The embodiments of the present application provide a crowd congestion detection method and related equipment. The prior art requires at least two cameras when performing crowd congestion detection on a crowd, which has the problem of high cost.
[0006] In a first aspect, an embodiment of the present application provides a crowd crowd detection method, which is applied to a crowd crowd detection server, wherein the crowd crowd detection server is connected to a wireless network sensor AP and a camera for communication, wherein the AP is used to monitor detection request frames of wireless devices within a sensing area, and the camera is used to obtain image data within the sensing area, wherein the method includes:
[0007] Receiving a detection request frame and image data of the camera from the AP;
[0008] Inputting the image data into a visual supervision algorithm model to obtain a moving speed of a crowd in the perception area, wherein the visual supervision algorithm model is used for visual supervision;
[0009] The crowd congestion situation of the crowd in the sensing area is determined according to the total number of people and the moving speed of the people in the sensing area, and the total number of people is determined based on the detection request frame of the AP.
[0010] In a second aspect, an embodiment of the present application further provides a crowd crowd detection device, which is applied to a crowd crowd detection server, wherein the crowd crowd detection server is connected to a wireless network sensor AP and a camera for communication, wherein the AP is used to detect a detection request frame of a wireless device within a sensing area, and the camera is used to obtain image data within the sensing area, wherein the device comprises:
[0011] A receiving module, used for receiving a detection request frame from the AP and image data of the camera;
[0012] An acquisition module, used for inputting the image data into a visual supervision algorithm model to obtain the moving speed of the crowd in the perception area;
[0013] The determination module is used to determine the crowd congestion situation of the perception area according to the total number of people in the perception area and the moving speed of the people, and the total number of people is determined based on the detection request frame of the AP.
[0014] In a third aspect, an embodiment of the present application provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0016] In a fifth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In the embodiment of the present application, the detection request frame from the AP and the image data of the camera are received; the image data is input into the visual supervision algorithm model to obtain the moving speed of the crowd in the perception area, and the visual supervision algorithm model is used for visual supervision; the crowd crowding situation in the perception area is determined according to the total number of people in the perception area and the moving speed of the crowd, and the total number of people is determined based on the detection request frame of the AP. In this way, the moving speed of the crowd can be obtained by using only the image data obtained by one camera, and the crowd crowding situation in the perception area can be obtained according to the total number of people in the perception area. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a flow chart of a crowd congestion detection method provided in an embodiment of the present application;
[0020] Figure 2It is a structural schematic diagram of a crowd crowd detection system provided by the present application;
[0021] Figure 3 It is a schematic diagram of the reasoning structure of a fully connected neural network model provided in an embodiment of the present application;
[0022] Figure 4 It is a structural schematic diagram of a sample construction method provided in an embodiment of the present application;
[0023] Figure 5 It is a flowchart of pedestrian detection and tracking based on YOLO v5 and DeepSort provided in an embodiment of the present application;
[0024] Figure 6 It is a structural schematic diagram of a crowd crowding device provided in an embodiment of the present application;
[0025] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the structures used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] like Figure 1 As shown, an embodiment of the present application provides a crowd crowd detection method, which is applied to a crowd crowd detection server, wherein the crowd crowd detection server is connected to a wireless network sensor AP and a camera for communication, wherein the AP is used to monitor detection request frames of wireless devices within a sensing area, and the camera is used to obtain image data within the sensing area, and the method includes:
[0029] Step 101, receiving a detection request frame from the AP and image data from the camera;
[0030] In this step, the detection request frame received from the AP may be received in real time or periodically.
[0031] like Figure 2 As shown, Figure 2 It is a structural schematic diagram of a crowd congestion detection system provided in an embodiment of the present application.
[0032] by Figure 2 For example, six APs may be set in the sensing area, namely AP1, AP2, AP3, AP4, AP5 and AP6; a camera is also set in the sensing area;
[0033] Among them, AP1, AP2, AP3, AP4, AP5 and AP6 are all detection request frames for monitoring wireless devices in the sensing area; and the camera is used to obtain image data in the sensing area. Further, the camera is used to obtain coverage Figure 2 Image data of the area where the visual detection line is located.
[0034] In this step, a detection request frame from the AP and the image data of the camera are received. The detection request frame and the image data can be understood as being received at the same time.
[0035] Step 102, inputting the image data into a visual supervision algorithm model to obtain the moving speed of the crowd in the perception area, wherein the visual supervision algorithm model is used for visual supervision;
[0036] In this step, the visual supervision algorithm model can be understood as an algorithm model combining the YOLOv5 algorithm and the DeepSort algorithm.
[0037] Step 103: Determine crowd congestion in the sensing area according to the total number of people in the sensing area and the moving speed of the people, wherein the total number of people is determined based on the detection request frame of the AP.
[0038] It should be understood that the image data input into the visual supervision algorithm model and the detection request frame should be collected in the same time period.
[0039] In an embodiment of the present application, the detection request frame from the AP and the image data of the camera are received; the image data is input into the visual supervision algorithm model to obtain the moving speed of the crowd in the perception area, and the visual supervision algorithm model is used for visual supervision; the crowd congestion in the perception area is determined based on the total number of people in the perception area and the moving speed of the crowd, and the total number of people is determined based on the detection request frame of the AP. In this way, the moving speed of the crowd can be obtained by using only the image data obtained by one camera, and the crowd congestion in the perception area can be determined based on the total number of people in the perception area.
[0040] Optionally, in some embodiments, the visual supervision algorithm model includes a target detection sub-model and a target tracking sub-model; wherein,
[0041] The target detection sub-model is used to detect the image data to obtain the location information of the target population in the perception area;
[0042] The target tracking sub-model is used to track the target group based on the position information of the target group to obtain the moving speed of the group in the sensing area;
[0043] Among them, the target detection sub-model is obtained based on the first multi-target tracking data set and the target detection algorithm, and the target tracking sub-model is obtained based on the second multi-target tracking data set and the target tracking algorithm.
[0044] In the embodiment of the present application, the above-mentioned target detection algorithm can be understood as the YOLOv5 target detection algorithm; the above-mentioned target tracking submodel can be understood as the DeepSort tracking calculation algorithm.
[0045] It should be understood that the first multiple object tracking data set can be understood as multiple object tracking 17 (MOT17, Multiple Object Tracking 17);
[0046] The second multiple object tracking dataset may be understood as Multiple Object Tracking 20 (MOT20).
[0047] It should be understood that MOT17 is an open source dataset for multi-target tracking. It contains seven videos of indoor and outdoor public places with pedestrians. The video of each scene is divided into two clips, one for training and the other for testing. The evaluation indicators of the MOT17 dataset mainly include ID Switches (ID Sw.), Frames Per Second (FPS), and False Positives (FP). ID Switches indicates the number of times the target identity is incorrectly changed during the tracking process, FPS indicates the tracking speed of the multi-target tracker, and False Positives indicates the number of hypothetical bounding boxes that cannot match the bounding box of the real track in the video sequence. The training set and test set in the dataset contain annotation information and video data, respectively. The annotation information is provided in the form of a text file. Each line represents a detected object, including the frame number, track number, upper left corner coordinates of the object box, length and width, confidence, and other information. These data can be used to train and evaluate multi-target tracking algorithms and compare the performance of different algorithms.
[0048] It should be understood that MOT20 pays special attention to scenes with dense crowds, and its video content can reach up to 246 people in a single frame. The dataset contains a total of 8 video clips, 4 of which are used for training and 4 for testing. Each video clip is provided in the form of video frames, totaling 13,410 frames, of which 8,931 frames are for training videos and 4,479 frames are for testing videos. The video clips of these datasets come from three different scenes, including indoor and outdoor environments. The MOT20 dataset provides rectangular box annotations on each video frame to identify pedestrians and other types of objects, such as non-moving vehicles. The training data contains an average of 127.04 pedestrian rectangular box annotations per frame, and the test data contains an average of 115.52 pedestrian rectangular box annotations per frame. These data can be used to train and evaluate multi-target tracking algorithms.
[0049] In an embodiment of the present application, the visual supervision algorithm model includes a target detection submodel and a target tracking submodel; wherein the target detection submodel is used to detect the image data to obtain the position information of the target population in the perception area; the target tracking submodel is used to track the target population based on the position information of the target population to obtain the moving speed of the population in the perception area; wherein the target detection submodel is obtained based on the first multi-target tracking data set and the target detection algorithm, and the target tracking submodel is obtained based on the second multi-target tracking data set and the target tracking algorithm. In this way, the visual supervision algorithm model can be obtained, and the moving speed of the population in the perception area can be obtained using the visual supervision algorithm model.
[0050] Optionally, in some embodiments, the position information of the target group includes a first position and a second position, the first position and the second position are positions of the target group in two adjacent image frames respectively, and the tracking of the target group based on the position information of the target group to obtain the moving speed of the group in the sensing area includes:
[0051] Obtain the time difference between two adjacent image frames;
[0052] The moving speed of the crowd in the sensing area is obtained by using the pixel offset and the time difference between the first position and the second position.
[0053] In the embodiment of the present application, the first position and the second position may be understood to be located on both sides of the visual detection line, respectively.
[0054] It should be understood that the time difference between two adjacent image frames may refer to the time difference when the two image frames are respectively captured.
[0055] It should be understood that the pixel offset between the first position and the second position can be understood as the movement distance of the target population.
[0056] Furthermore, based on the proportional relationship between the image frame and the actual distance, the actual moving distance of the target group in the sensing area can be obtained, and further based on the moving distance and the time difference, the moving speed of the group can be obtained.
[0057] Exemplarily, in a specific embodiment, the method includes:
[0058] (1) Based on the six consecutive 30-second / 60-second time windows of the WiFi signal, we can obtain an inference sample of a fully connected neural network. Through the calculation of the neural network, we can obtain a 6×1 vector, which represents the inference result of the neural network, that is, the total number of people in the sensing area at six different times with an interval of 5 seconds.
[0059] (2) At the end of six consecutive 30-second / 60-second time windows, the corresponding five frames of images are taken out for detection and tracking, and the average moving speed of the crowd near the visual perception line is calculated; that is, the six average speeds.
[0060] (3) The 6-element vector calculated in step (1) represents the total number of people in the perception area at 6 different moments (5 seconds apart) and the 6-element vector calculated in step 2 represents the average moving speeds of people on the visual detection line at 6 moments. If the two corresponding elements meet the crowding condition relative to their respective thresholds, that is, the number of people exceeds the carrying capacity and the average moving speed of people is lower than the threshold speed, it means that the crowd is crowded. The corresponding moment, total number of people, and average moving speed of people are taken out to issue a crowding alarm.
[0061] In the embodiment, the time difference between two adjacent image frames is obtained; the pixel offset between the first position and the second position and the time difference are used to obtain the moving speed of the crowd in the sensing area. Compared with the prior art that requires at least two cameras, the moving speed of the crowd in the sensing area is obtained, which saves hardware costs.
[0062] Optionally, in some embodiments, determining the crowd congestion situation of the perception area according to the total number of people in the perception area and the moving speed of the people includes:
[0063] Determine whether the total number of people in the sensing area is greater than the carrying capacity of the sensing area and whether the moving speed of the people in the sensing area is lower than a preset speed;
[0064] When the total number of people in the perception area is greater than the carrying capacity of the perception area and the moving speed of the people in the perception area is lower than the preset speed, the crowd congestion situation is determined to be congested.
[0065] In the embodiment of the present application, by judging whether the total number of people in the sensing area is greater than the carrying capacity of the sensing area and whether the moving speed of the people in the sensing area is lower than the preset speed; if the total number of people in the sensing area is greater than the carrying capacity of the sensing area and the moving speed of the people in the sensing area is lower than the preset speed, the crowd congestion is determined to be congested. In this way, the crowd congestion of the sensing area can be obtained only based on the total number of people and the moving speed of the people.
[0066] Optionally, in some embodiments, the probe request frame of the AP includes a random hardware address, and the total number of crowd movements is determined based on the probe request frame of the AP, including:
[0067] For each time window, performing signal statistics processing on the detection request frame of the AP to obtain the total number of the random hardware addresses;
[0068] Based on the total number of random hardware addresses in each of the time windows, calculate the mean and standard deviation of the random hardware addresses;
[0069] The wireless feature vector is input into the fully connected neural network model to obtain the total number of crowd movements, wherein the wireless feature vector is determined based on the total number of random hardware addresses, the total number of random hardware addresses corresponding to each time window, the mean value and the standard deviation.
[0070] like Figure 3 As shown, Figure 3 It is a schematic diagram of the reasoning structure of a fully connected neural network model provided in an embodiment of the present application.
[0071] In the embodiment of the present application, according to the above statistical processing of the WiFi uplink signals of each AP, the preparation of the fully connected neural network training set is as follows:
[0072] (1) With 5 seconds as the interval and 30 seconds or 1 minute as the time window, according to the method in Section 2.1.1.1.4, count the total number of MACs on all APs in each time window for 6 consecutive 30-second or 1-minute time windows; then there are 6 total MACs in 6 consecutive time windows, and the mean μ and standard deviation σ are calculated based on these 6 total MACs. These 8 values constitute a feature vector
[0073] (2) Based on Figure 2 , using the above 8-element vector as a training sample; at the end of each time window, the total number of people in the sensing area is recorded by manual statistics; there are 6 time windows in total, so there are 6 true values in total, forming a 6-element true value vector By 8-element eigenvector and its corresponding 6-element truth vector A training sample pair (x, y) is constructed. If a sample pair is constructed in 6 consecutive 30-second time windows with a time interval of 5 seconds, a sample pair can be collected every 3 minutes.
[0074] (3) Collect data from the perception area for 100 days and construct training and validation sets.
[0075] Optionally, the fully connected neural network model includes an input layer, two hidden layers, and an output layer.
[0076] When the fully connected neural network model is trained, the following processing is performed:
[0077] (1) Normalize the MAC number in the training set samples, see Figure 3 .
[0078] (2) The hidden layers all use the sigmoid activation function, while the output layer uses the linear activation function.
[0079] (3) Use MSE as the loss function of the neural network.
[0080] (4) Use the Adam optimization algorithm to solve.
[0081] Optionally, in some embodiments, the fields in the AP's probe request frame include: a timestamp, a signal strength, a random hardware address, and an AP number, and for each time window, performing signal statistical processing on the AP's probe request frame to obtain the total number of the random hardware addresses includes:
[0082] For each time window, according to the timestamp corresponding to the probe request frame, placing a tuple corresponding to the probe request frame in a corresponding time group, the tuple including the signal strength, the random hardware address and the AP number;
[0083] In each of the time groups, a target tuple is saved, where the target tuple is a tuple with the largest signal strength in the first tuples, and the first tuples are tuples with the same AP number;
[0084] According to the target tuple, counting the number of the random hardware in each of the time groups;
[0085] The total number of the random hardware addresses is obtained according to the number of the random hardware in each of the time groups.
[0086] In a specific embodiment, Figure 4 For example, Figure 4 It is a structural diagram of a sample construction method provided in an embodiment of the present application.
[0087] According to the WiFi uplink signals detected on all APs, the characteristic fields of interest in the detection request frame, the timestamp ts (accurate to seconds), the signal strength rssi, the random hardware address mac, and the AP number ap# from which the signal comes are used as a signal unit (ts, rssi, mac, ap#). The first received signal unit is taken as the time starting point. All signal units whose timestamps fall within the unit time are statistically processed in units of 30 seconds or 1 minute. All signal units within 30 seconds or 60 seconds constitute a signal group.
[0088] (1) For each AP, a unified signal strength threshold rssi is set to sense the WiFi uplink signal in the area corresponding to the AP and obtain a detection request frame.
[0089] (2) Count all signal units that fall within the one-minute interval based on the timestamp.
[0090] (3) All signal units in the unit time signal group are sorted according to the timestamps.
[0091] (4) Using timestamps as buckets (e.g., hash tables), the signal units (ts, rssi, mac, ap#) are placed in different time buckets according to their timestamps.
[0092] (5) Traverse each time bucket, take mac as the bucket, and query the rssi of the current ap# for the tuple (rssi, mac, ap#) with the same mac. If it is greater than the rssi threshold in the initial threshold with the same ap#, then store (ap#) in the mac bucket, overwriting the ap# with the smaller rssi value. As a result, each ap detects the random and unique mac closest to the ap, that is, the one with the largest rssi.
[0093] (6) Taking ap# as a bucket, count the number of MACs in each ap bucket, that is, each ap has the WiFi uplink signal with the maximum signal strength in the current minute, and the MAC is unique.
[0094] In the embodiment of the present application, the total number of the random hardware addresses can be obtained in the above manner, so that the total number of people in the sensing area can be predicted based on the total number of the random hardware addresses.
[0095] Optionally, in some embodiments, after receiving the probe request frame from the AP, the method further includes:
[0096] (1) The data analysis module performs CRC check on the received probe request frame data and discards the data that fails the check.
[0097] (2) The data analysis module performs RSSI filtering on the received detection request frame data and discards the data with RSSI less than -100dBm.
[0098] (3) The data decoding module extracts the timestamp, random hardware address, serial number RSSI and other interesting field information in the wireless network detection request frame; Figure 4 According to the random hardware address judgment criteria, the random hardware addresses of all mobile devices are filtered out.
[0099] (4) Pepper encryption is performed on the random MAC address. In this article, the random MAC address that has been peppered is referred to as the random MAC address.
[0100] As shown in the figure, Figure 5 A flowchart of pedestrian detection and tracking based on YOLO v5 and DeepSort is provided in an embodiment of the present application.
[0101] Specifically, YOLOv5 and DeepSort are used for crowd detection and tracking reasoning. The key point is to use YOLOv5 to detect the BBoxes (Bounding boxes) of the crowd on the visual detection line at the end of the 30-second / 60-second time window of each WiFi signal, use the subsequent video images to match the identity based on the Hungarian algorithm, and then use the Kalman filter to calculate the correlation between the BBoxes of multiple frames, so as to complete the matching and tracking of multiple targets. No further details will be given here.
[0102] like Figure 6 As shown, the embodiment of the present application provides a crowd crowd detection device 600, which is applied to a crowd crowd detection server, wherein the crowd crowd detection server is connected to a wireless network sensor AP and a camera for communication, wherein the AP is used to monitor the detection request frame of the wireless device in the sensing area, and the camera is used to obtain the image data in the sensing area, and the device includes:
[0103] The receiving module 601 is used to receive the detection request frame from the AP and the image data of the camera;
[0104] An acquisition module 602 is used to input the image data into a visual supervision algorithm model to obtain the moving speed of the crowd in the perception area;
[0105] The determination module 603 is used to determine the crowd congestion situation of the perception area according to the total number of people in the perception area and the moving speed of the people, and the total number of people is determined based on the detection request frame of the AP.
[0106] Optionally, the position information of the target population includes a first position and a second position, the first position and the second position are positions of the target population in two adjacent image frames respectively, and the target population is tracked based on the position information of the target population to obtain a moving speed of the population in the sensing area, and the device includes:
[0107] An acquisition module, used for acquiring a time difference between two adjacent image frames;
[0108] The first obtaining module is used to obtain the moving speed of the crowd in the sensing area by using the pixel offset and the time difference between the first position and the second position.
[0109] Optionally, in some embodiments, the determining module includes:
[0110] A judgment submodule, used to judge whether the total number of people in the sensing area is greater than the carrying capacity of the sensing area and whether the moving speed of the people in the sensing area is lower than a preset speed;
[0111] The determination submodule is used to determine the crowd congestion situation as congestion when the total number of people in the perception area is greater than the carrying capacity of the perception area and the moving speed of the people in the perception area is lower than the preset speed.
[0112] Optionally, in some embodiments, the probe request frame of the AP includes a random hardware address, and the apparatus includes:
[0113] A second obtaining module is used to perform signal statistical processing on the detection request frame of the AP in each time window to obtain the total number of the random hardware addresses;
[0114] Based on the total number of random hardware addresses in each of the time windows, calculate the mean and standard deviation of the random hardware addresses;
[0115] The third obtaining module is used to input the wireless feature vector into the fully connected neural network model to obtain the total number of crowd movements, wherein the wireless feature vector is determined based on the total number of random hardware addresses, the total number of random hardware addresses corresponding to each time window, the mean value and the standard deviation.
[0116] Optionally, in some embodiments, the fields in the AP's probe request frame include: a timestamp, a signal strength, a random hardware address, and an AP number, and the second obtaining module includes:
[0117] a placement submodule, for placing, for each time window, a tuple corresponding to the probe request frame in a corresponding time group according to the timestamp corresponding to the probe request frame, the tuple including the signal strength, the random hardware address and the AP number;
[0118] A saving submodule, used for saving a target tuple in each of the time groups, wherein the target tuple is a tuple with the largest signal strength in the first tuples, and the first tuples are tuples with the same AP number;
[0119] A statistical submodule, used for counting the number of the random hardware in each of the time groups according to the target tuple;
[0120] The obtaining submodule is used to obtain the total number of the random hardware addresses according to the number of the random hardware in each of the time groups.
[0121] The crowd detection device 600 can realize the Figure 1 The various processes of the method embodiment and the same beneficial effects are achieved, and will not be described again here to avoid repetition.
[0122] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0123] The present application also provides an electronic device. Figure 7 , the electronic device may include a processor 701, a memory 702, and a program 7021 stored in the memory 702 and executable on the processor 701.
[0124] When the program 7021 is executed by the processor 701, it can achieve Figure 1 Any steps in the corresponding method embodiments and achieving the same beneficial effects will not be repeated here.
[0125] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned embodiment method can be completed by hardware associated with program instructions, and the program can be stored in a readable medium.
[0126] The present application also provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned Figure 1 Any steps in the corresponding method embodiments can achieve the same technical effect and will not be repeated here to avoid repetition.
[0127] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0128] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A crowd detection method, characterized in that: Applied to a crowd detection server, the crowd detection server is connected to a wireless network sensor AP and a camera for communication, the AP is used to monitor the detection request frames of wireless devices in the sensing area, and the camera is used to obtain image data in the sensing area. The method includes: Receiving a detection request frame and image data of the camera from the AP; Inputting the image data into a visual supervision algorithm model to obtain a moving speed of a crowd in the perception area, wherein the visual supervision algorithm model is used for visual supervision; Determine crowd congestion in the sensing area according to the total number of people in the sensing area and the moving speed of the people, wherein the total number of people is determined based on the detection request frame of the AP; The detection request frame of the AP includes a random hardware address, and the total number of crowd movements is determined based on the detection request frame of the AP, including: For each time window, performing signal statistics processing on the detection request frame of the AP to obtain the total number of the random hardware addresses; Based on the total number of random hardware addresses in each of the time windows, calculate the mean and standard deviation of the random hardware addresses; Inputting a wireless feature vector into a fully connected neural network model to obtain the total number of crowd movements, the wireless feature vector being determined based on the total number of random hardware addresses, the total number of random hardware addresses corresponding to each time window, the mean value, and the standard deviation; The signal statistical processing of the detection request frame of the AP for each time window to obtain the total number of the random hardware addresses includes: For each time window, according to the timestamp corresponding to the probe request frame, placing the tuple corresponding to the probe request frame in the corresponding time group, the tuple including the signal strength, the random hardware address and the AP number; In each of the time groups, a target tuple is saved, where the target tuple is a tuple with the largest signal strength in the first tuples, and the first tuples are tuples with the same AP number; According to the target tuple, counting the number of the random hardware in each of the time groups; The total number of the random hardware addresses is obtained according to the number of the random hardware in each of the time groups.
2. The method according to claim 1, characterized in that: The visual supervision algorithm model includes a target detection sub-model and a target tracking sub-model; The target detection sub-model is used to detect the image data to obtain the location information of the target population in the perception area; The target tracking sub-model is used to track the target group based on the position information of the target group to obtain the moving speed of the group in the sensing area; Among them, the target detection sub-model is obtained based on the first multi-target tracking data set and the target detection algorithm, and the target tracking sub-model is obtained based on the second multi-target tracking data set and the target tracking algorithm.
3. The method according to claim 2, characterized in that The position information of the target group includes a first position and a second position, where the first position and the second position are positions of the target group in two adjacent image frames respectively, and the target group is tracked based on the position information of the target group to obtain the moving speed of the group in the sensing area, including: Obtain the time difference between two adjacent image frames; The moving speed of the crowd in the sensing area is obtained by using the pixel offset and the time difference between the first position and the second position.
4. The method according to claim 1, characterized in that: The determining of crowd congestion in the sensing area according to the total number of people in the sensing area and the moving speed of the people includes: Determine whether the total number of people in the sensing area is greater than the carrying capacity of the sensing area and whether the moving speed of the people in the sensing area is lower than a preset speed; When the total number of people in the perception area is greater than the carrying capacity of the perception area and the moving speed of the people in the perception area is lower than the preset speed, the crowd congestion situation is determined to be congested.
5. The method according to claim 1, characterized in that The fields in the AP's probe request frame include: the timestamp, the signal strength, the random hardware address, and the AP number.
6. A crowd detection device, characterized in that: Applied to a crowd detection server, the crowd detection server is connected to a wireless network sensor AP and a camera for communication, the AP is used to monitor the detection request frame of the wireless device in the sensing area, the camera is used to obtain the image data in the sensing area, and the device includes: A receiving module, used for receiving a detection request frame from the AP and image data of the camera; An acquisition module, used for inputting the image data into a visual supervision algorithm model to obtain the moving speed of the crowd in the perception area; A determination module, configured to determine a crowd congestion condition of the sensing area according to a total number of people and a moving speed of the people in the sensing area, wherein the total number of people is determined based on a detection request frame of the AP; The detection request frame of the AP includes a random hardware address, and the device includes: A second obtaining module is used to perform signal statistical processing on the detection request frame of the AP in each time window to obtain the total number of the random hardware addresses; Based on the total number of random hardware addresses in each of the time windows, calculate the mean and standard deviation of the random hardware addresses; A third obtaining module is used to input the wireless feature vector into a fully connected neural network model to obtain the total number of crowd movements, wherein the wireless feature vector is determined based on the total number of random hardware addresses, the total number of random hardware addresses corresponding to each time window, the mean value and the standard deviation; The second obtaining module comprises: A placement submodule, for placing a tuple corresponding to the probe request frame in a corresponding time group according to a timestamp corresponding to the probe request frame for each time window, wherein the tuple includes a signal strength, the random hardware address and an AP number; A saving submodule, used for saving a target tuple in each of the time groups, wherein the target tuple is a tuple with the largest signal strength in the first tuples, and the first tuples are tuples with the same AP number; A statistical submodule, used for counting the number of the random hardware in each of the time groups according to the target tuple; The obtaining submodule is used to obtain the total number of the random hardware addresses according to the number of the random hardware in each of the time groups.
7. A computer program product, characterized in that The method comprises computer instructions, which, when processed and executed, implement the steps of the crowd congestion detection method as claimed in any one of claims 1 to 5.
8. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the crowd congestion detection method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the crowd congestion detection method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Pedestrian flow statistical method and device
CN114842393A
People number monitoring method and device, electronic equipment and readable storage medium
CN116012776A