Crowd behavior analysis system and method in dense scene
Through deep learning technology, the YOLOv8 target detector and ReID model are improved, and motion and appearance information are combined to analyze crowd behavior in dense scenes. This solves the problems of robustness of optical flow method and accuracy of feature point extraction, and realizes crowd flow statistics and scene analysis. Quantitative analysis improves the stability and accuracy of analysis.
Patent Information
- Application Number
- CN202311631655.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2024-09-06
AI Technical Summary
Existing crowd behavior analysis methods in dense scenes have problems such as weak robustness of the optical flow method, poor feature point extraction accuracy, difficulty in focusing on individual individual trajectories, insufficient appearance information interaction, and difficulty in conducting traffic statistics and quantitative scene analysis.
Adopt a crowd behavior analysis system in dense scenes based on deep learning, use the improved YOLOv8 target detector combined with ReID technology for multi-target tracking, realize trajectory analysis and clustering through association of motion information and appearance information, and conduct crowd behavior analysis, including The target rapid search module, multi-target tracking module and motion behavior analysis module analyze flow speed and flow direction and output abnormal behavior warnings.
It improves the robustness and stability of crowd behavior analysis, realizes cross-view information interaction, accurately performs crowd flow calculation and flow direction analysis, and can monitor individual behavior and provide early warning of abnormal behavior.
Smart Images

Figure CN118609038A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a system and method for analyzing crowd behavior in dense scenes. Background Art
[0002] In today's public video surveillance environment, manual monitoring methods are more often used, with human eyes judging the behavior of people or vehicles in the video, issuing warnings for abnormal behavior, and then handling them. The method of using manual monitoring of public scenes obviously has many disadvantages, including high labor costs, a single person can only monitor a few scenes, it is difficult for people to complete the crowd statistics in public scenes in real time, individual differences between people lead to deviations in the judgment of abnormal behavior, and people misjudge and miss judgments due to emotions such as fatigue. In general, using manual video to monitor the behavior of people and vehicles will lead to problems such as increased monitoring costs and low monitoring efficiency.
[0003] In order to overcome the shortcomings of manual video surveillance, a system that can automatically monitor crowds is urgently needed. Driven by demand, various crowd monitoring systems based on different technologies are constantly being developed. Among them, automated crowd monitoring technology based on digital image processing and machine vision has been widely used due to its fast detection speed, low labor cost, and stable and reliable detection results.
[0004] In many crowd behavior analysis technologies, most of them use traditional computer vision technology to extract feature points of the target, track the feature points through the optical flow method, and then obtain the moving trajectory of the feature points on the target. Then, by analyzing the trajectory, the crowd monitoring analysis is completed. Convolutional Neural Network (CNN) is a deep learning model that was originally designed for image recognition tasks, but has since been widely used in many other fields, such as natural language processing and speech recognition. The core idea of CNN is to extract the features of input data through convolutional layers and pooling layers, and then perform tasks such as classification or regression through fully connected layers. Compared with traditional computer vision, convolutional neural networks can automatically learn features in images without manually designing feature extractors, which reduces the workload of engineers. And convolutional neural networks are translation invariant, that is, the model is insensitive to the position of the object in the image. By replacing traditional computer vision algorithms with convolutional neural networks as the image processing algorithm of the monitoring system, the target detection capability of the system will be greatly improved. In this field, the most widely used is the target detection network model YOLO (You Look Only Once) series that uses convolutional neural networks to extract image features. This series of detection models can identify targets in images and give the location and size of the target box. At the same time, the convolutional neural network can also compare the appearance similarities of different targets, thereby realizing the ReID (re-identification) re-identification function. For a target to be found, a feature vector can be generated by a pre-trained convolutional neural network, and by comparing the similarities between different feature vectors, it can be determined whether it is the same person, so that we can find the target we need in the monitoring scene, which is of great significance for quickly searching for specific targets in public scenes.
[0005] The existing crowd behavior analysis methods in dense scenes still have the following problems: 1. Currently, most methods for detecting moving objects in video streams are based on extracting feature points based on traditional vision, and then tracking them through the optical flow method to obtain the trajectory of the moving object. However, the optical flow method has weak robustness to changes in illumination, large displacement estimation problems, and accuracy problems in extracting local feature points. 2. Since a large number of feature points are extracted, multiple feature points may be extracted from a single person, and it is difficult to focus on the trajectory of a single individual during crowd behavior analysis. Although individuals can be obtained through local consistency of trajectories, multiple individuals in dense scenes may move in the same direction and at the same speed, and the local consistency obtained comes from multiple pedestrian targets; 3. Current crowd behavior analysis methods rarely focus on the appearance information of a single individual, and do not compare the appearance similarities between multiple different individuals. They basically focus on individuals in a single video stream, which makes it difficult to form information interaction between multiple monitors. 4. Since it is difficult to obtain the number of individuals in a dense crowd based on the trajectory acquisition of the optical flow method, it is difficult to perform flow statistics on the entire scene. At the same time, it is difficult to conduct quantitative analysis on the density of the scene and the degree of local aggregation and diffusion.
[0006] Therefore, technicians in this field are committed to developing a crowd behavior analysis system and method in dense scenes. Summary of the invention
[0007] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is how to conduct flow statistics on densely populated people and quantitatively analyze the density and the degree of local aggregation and diffusion.
[0008] After research, the inventor proposed a crowd behavior analysis system and method in dense scenes based on deep learning. Crowd target detection in dense scenes is realized based on the improved YOLOv8 (YOLO, You Look Only Once) target detector, and then multi-target tracking is performed on the detection results; in the process of multi-target tracking, the data association between the previous frame and the next frame should be combined with motion information and appearance information, and the feature extraction of appearance information is realized through convolutional neural network, that is, ReID (re-identification) technology. Through multi-target tracking, the trajectory of each individual can be obtained, and then crowd behavior analysis can be performed. First, clustering is performed through the local consistency of the trajectory of a single individual to obtain a group with the same local position information and speed vector. The speed information and historical trajectory of each group individual can be analyzed to analyze the aggregation and divergence behavior; finally, the local results of multiple clustering groups can be used to obtain the global results, and the crowd flow, flow information and behavior information of multiple crowds in the entire scene can be analyzed.
[0009] In one embodiment of the present invention, a crowd behavior analysis system in a dense scene is provided, comprising: The target fast search module resides in the improved YOLOv8 target detection model. In response to the input of video surveillance, it detects pedestrian targets in dense scenes and obtains the target frame. The multi-target tracking module tracks the target frame and obtains the trajectory of the pedestrian target; The motion behavior analysis module detects pedestrians with abnormal behavior and issues early warnings based on their trajectories and target frames, and analyzes the flow rate and direction of different local crowds, and outputs the flow rate and direction. The target rapid search module is connected to the multi-target tracking module in communication, and the target rapid search module and the multi-target tracking module are connected to the motion behavior analysis module in communication; In response to the input of video surveillance, the target rapid search module detects pedestrian targets, tracks pedestrian targets through the multi-target tracking module, obtains pedestrian target trajectories, analyzes pedestrian target trajectories using the motion behavior analysis module, detects pedestrian targets with abnormal behaviors, and analyzes the flow rate and flow direction of different local crowds, and outputs the flow rate and flow direction.
[0010] Optionally, in the crowd behavior analysis system in a dense scene in the above embodiment, the abnormal behavior includes excessive speed and abnormal trajectory.
[0011] Optionally, in the crowd behavior analysis system in a dense scene in any of the above embodiments, the flow rate and flow direction analysis includes performing local clustering to form pedestrian clusters according to the positions of pedestrian targets, and calculating the flow rate and flow direction of different local pedestrian clusters according to the trajectories of multi-target tracking.
[0012] Optionally, in the crowd behavior analysis system in a dense scene in the above embodiment, the motion behavior analysis module includes: Local consistency analysis, based on the clustering results, for each pedestrian cluster, analyze the flow direction, flow speed and trajectory differences; Global consistency analysis, analyzes the consistency between different pedestrian clusters in the entire video surveillance, and analyzes the differences in flow direction, flow speed and trajectory between different pedestrian clusters.
[0013] Based on the above embodiments, the present invention provides a method for analyzing crowd behavior in a dense scene, including: S100, target detection model construction, in response to the input of video surveillance, obtain the crowd data set in the dense scene, establish the improved YOLOv8 target detection model, and generate the target frame for multi-target tracking; S200, ReID model construction, training the re-identification model on the pedestrian re-identification training data set to obtain the ReID model; S300, constructing a multi-target tracking model, inputting the target detection frame into the ReID model to obtain the appearance information of the pedestrian target, performing data association based on the motion information of the target frame and the appearance information, and completing the tracking of multiple pedestrian targets; S400, trajectory anomaly detection, the trajectory is detected by information entropy. The greater the information entropy, the more chaotic the trajectory is. The threshold is set and the KNN algorithm is used to determine whether the trajectory is abnormal; S500, pedestrian behavior analysis, detects the density, flow, and direction of pedestrian targets in dense scenes, pays attention to the local pedestrian clusters and the overall flow of pedestrians, and gives early warnings for aggregation, diffusion, and abnormal trajectory behaviors.
[0014] Optionally, in the crowd behavior analysis method in a dense scene in the above embodiment, step S100 includes: S110, format conversion, converting the crowd dataset into YOLO format for training the target detection model; S120, YOLOv8 improvement, improves YOLOv8, focuses on small targets and occluded pedestrian targets in dense scenes, and reduces the missed detection process of pedestrian targets. Further, in the crowd behavior analysis method in a dense scene in the above embodiment, step S120 includes: S121, adding a small target detection layer, for small targets in dense scenes, adding a small target detection layer; S122, add output branch, add output branch to the feature map of larger dimension, and focus on small targets; S123, changing the convolution output branch, changing the original three convolution output branches into four output branches; S124. Add shuffle-attention mechanism. Add shuffle-attention (channel cleaning attention) mechanism to YOLOv8, so that the network pays attention to occluded pedestrian targets.
[0015] Optionally, in the crowd behavior analysis method in a densely populated scene in any of the above embodiments, the crowd data set of step S100 is a Coco data set and a MOT data set.
[0016] Furthermore, in the crowd behavior analysis method in a dense scene in the above embodiment, the MOT dataset includes but is not limited to the MOT17 dataset and the MOT20 dataset.
[0017] Optionally, in the crowd behavior analysis method in a densely populated scene in any of the above embodiments, the re-identification model in step S200 uses the Fast-ReID model, which is an open source re-identification model of JD Artificial Intelligence Laboratory.
[0018] Optionally, in the crowd behavior analysis method in a densely populated scene in any of the above embodiments, the data set for pedestrian re-identification training in step S200 is the Market1501 data set.
[0019] Optionally, in the crowd behavior analysis method in a dense scene in any of the above embodiments, step S200 includes: S210, model training, using the Fast-ReID model to train on the Market1501 dataset under the BOT (Bag Of Tricks) technique to improve the mAP (Mean Average Precision) of the Fast-ReID model; S220, feature vector output, for the ReID model input image, the output is a feature vector containing 1024 values; S230, similarity judgment, judging the similarity between the detection frames of the previous frame and the next frame by comparing the cosine distance between the feature vectors.
[0020] Optionally, in the crowd behavior analysis method in a dense scene in any of the above embodiments, step S300 includes: S310, capturing motion information, capturing the position information of the previous frame and the next frame of the pedestrian target through the Kalman filter algorithm, making the best estimate of the state at the current moment based on the data and estimate of the state at the previous moment, and obtaining the prediction frame of the target; S320, the prediction frame of the target is matched. When the next frame arrives, the target frame and the prediction frame of the target are associated with each other through the Hungarian algorithm. For the appearance information, the image of the detection frame is input into the ReID model, and a 1024-dimensional feature vector is output. By comparing the cosine distance between the feature vector of the detection frame and the feature vector of the appearance information of the target, it is determined whether they are the same target. When the cosine distance is greater than 0.9, data association is performed to obtain the result of multi-target tracking; S330: The motion information and the appearance information are fused by the following weighted method: in, For sports information, For appearance information, is the fused information, is the weight, ranging between 0 and 1, preferably =0.5; S340, obtaining a trajectory, linking the temporal position information of the targets in the result of multi-target tracking to obtain a trajectory.
[0021] Optionally, in the crowd behavior analysis method in a dense scene in any of the above embodiments, step S400 includes: S410, trajectory modeling, the trajectory is modeled by information entropy. The information entropy is expressed by the following formula, which represents the degree of disorder of the state: Where x is a random variable, which represents the position and velocity information of the current state in the trajectory; S420, abnormal trajectory detection, detecting and judging abnormal trajectories through the KNN algorithm.
[0022] Optionally, in the crowd behavior analysis method in a dense scene in any of the above embodiments, step S500 includes: S510, clustering the target detection frames, clustering the target detection frames in each frame to obtain a group with local consistency; S520, abnormal behavior warning, judging whether there is abnormal behavior in the trajectory according to the trajectory and movement direction information of multiple pedestrian clusters, and issuing a warning if there is abnormal behavior; S530, pedestrian target search, based on the image of the pedestrian target, generate a feature vector through the ReID model, and compare it with the feature vector generated by the pedestrian target in the video surveillance to determine whether it is the same pedestrian target; S540, establishing global consistency, establishing global consistency from local consistency, and analyzing the overall pedestrian target flow, local flow direction and overall flow direction.
[0023] Furthermore, in the crowd behavior analysis method in a dense scene in the above embodiment, the abnormal behaviors in step S520 include aggregation, diffusion, and excessive speed.
[0024] The present invention adopts a method based on deep learning in the process of monitoring crowd targets. Compared with the optical flow method based on traditional visual feature point extraction for tracking, the present invention has better robustness and stability for lighting changes and camera jitter transformations; the present invention focuses on the trajectory of a single target in the monitoring scene. Compared with the prior art that extracts feature points from a person and then tracks, it can distinguish multiple targets in the scene. The prior art obtains the same motion characteristics through local consistency, but it is difficult to obtain the specific number of targets in a dense scene and it is difficult to focus on a single individual; the present invention provides a monitoring system with a fast search for target personnel through the ReID model, which is used across views and is not limited to the monitoring of a single video stream, realizing information interaction between multiple views; the present invention is based on crowd behavior analysis based on deep learning, and stores relevant information for each monitored target in the scene, including speed and position, making it easier to calculate traffic and analyze crowd flow direction globally.
[0025] The present invention solves the problems of weak robustness and stability of crowd behavior analysis methods in dense scenes, realizes cross-view personnel information interaction, accurately performs crowd flow calculation and flow direction analysis, and can not only monitor the behavior of the group, but also focus on individuals in the monitoring scene. By comparing and analyzing with local consistency, it can warn of abnormal behavior of a single individual.
[0026] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a structural schematic diagram illustrating a crowd behavior analysis system in a dense scene according to an exemplary embodiment; Figure 2 is a flow chart illustrating a crowd behavior analysis method in a dense scene according to an exemplary embodiment. DETAILED DESCRIPTION
[0028] The following describes several preferred embodiments of the present invention with reference to the drawings in the specification, so that the technical content is clearer and easier to understand. The present invention can be embodied in many different forms of embodiments, and the protection scope of the present invention is not limited to the embodiments mentioned in the text.
[0029] In the drawings, components with the same structure are indicated by the same numerical reference numerals, and components with similar structures or functions are indicated by similar numerical reference numerals. The size and thickness of each component shown in the drawings are arbitrarily shown, and the present invention does not limit the size and thickness of each component. In order to make the illustration clearer, the thickness of the components is schematically exaggerated in some places in the drawings.
[0030] The inventors have designed a crowd behavior analysis system in dense scenes, such as Figure 1 As shown, including: The target fast search module resides in the improved YOLOv8 target detection model. In response to the input of video surveillance, it detects pedestrian targets in dense scenes and obtains the target frame. The multi-target tracking module tracks the target frame and obtains the trajectory of the pedestrian target; The motion behavior analysis module detects pedestrian targets with abnormal behavior and issues early warnings based on the trajectory and target frame of pedestrian targets, and performs flow rate and flow direction analysis on different local crowds, and outputs flow rate and flow direction; abnormal behavior includes excessive speed and abnormal trajectory, and flow rate and flow direction analysis includes local clustering to form pedestrian clusters based on the positions of pedestrian targets, and calculating the flow rate and flow direction of different local pedestrian clusters based on the trajectories of multi-target tracking; the motion behavior analysis module includes: Local consistency analysis, based on the clustering results, for each pedestrian cluster, analyze the flow direction, flow speed and trajectory differences; Global consistency analysis, analyzes the consistency between different pedestrian clusters in the entire video surveillance, and analyzes the differences in flow direction, flow speed and trajectory between different pedestrian clusters.
[0031] The target rapid search module is connected to the multi-target tracking module in communication, and the target rapid search module and the multi-target tracking module are connected to the motion behavior analysis module in communication; In response to the input of video surveillance, the target rapid search module detects pedestrian targets, tracks pedestrian targets through the multi-target tracking module, obtains pedestrian target trajectories, analyzes pedestrian target trajectories using the motion behavior analysis module, detects pedestrian targets with abnormal behaviors, and analyzes the flow rate and flow direction of different local crowds, and outputs the flow rate and flow direction.
[0032] Based on the above embodiments, the inventor provides a method for analyzing crowd behavior in a dense scene, such as Figure 2 As shown, the following steps are included: S100, target detection model construction, in response to the input of video surveillance, obtain a crowd data set in a dense scene, establish an improved YOLOv8 target detection model, and generate a target frame for multi-target tracking, wherein the crowd data set is a Coco data set and a MOT data set, and the MOT data set includes but is not limited to the MOT17 data set and the MOT20 data set; specifically including: S110, format conversion, converting the crowd dataset into YOLO format for training the target detection model; S120, YOLOv8 improvement, improves YOLOv8, focuses on small targets and occluded pedestrian targets in dense scenes, and reduces the process of missed detection of pedestrian targets; specifically includes: S121, adding a small target detection layer, for small targets in dense scenes, adding a small target detection layer; S122, add output branch, add output branch to the feature map of larger dimension, and focus on small targets; S123, changing the convolution output branch, changing the original three convolution output branches into four output branches; S124. Add shuffle-attention mechanism. Add shuffle-attention (channel cleaning attention) mechanism to YOLOv8, so that the network pays attention to occluded pedestrian targets.
[0033] S200, ReID model construction, based on the re-identification model training on the pedestrian re-identification training data set, to obtain the ReID model, where the re-identification model uses the Fast-ReID model, that is, the open source re-identification model of JD Artificial Intelligence Laboratory, and the pedestrian re-identification training data set is the Market1501 data set; specifically including: S210, model training, using the Fast-ReID model to train on the Market1501 dataset under the BOT (Bag Of Tricks) technique to improve the mAP (Mean Average Precision) of the Fast-ReID model; S220, feature vector output, for the ReID model input image, the output is a feature vector containing 1024 values; S230, similarity judgment, judging the similarity between the detection frames of the previous frame and the next frame by comparing the cosine distance between the feature vectors.
[0034] S300: construct a multi-target tracking model, input the target detection frame into the ReID model to obtain the appearance information of the pedestrian target, perform data association based on the motion information of the target frame and the appearance information, and complete the tracking of multiple pedestrian targets; specifically, it includes: S310, capturing motion information, capturing the position information of the previous frame and the next frame of the pedestrian target through the Kalman filter algorithm, making the best estimate of the state at the current moment based on the data and estimate of the state at the previous moment, and obtaining the prediction frame of the target; S320, the prediction frame of the target is matched. When the next frame arrives, the target frame and the prediction frame of the target are associated with each other through the Hungarian algorithm. For the appearance information, the image of the detection frame is input into the ReID model, and a 1024-dimensional feature vector is output. By comparing the cosine distance between the feature vector of the detection frame and the feature vector of the appearance information of the target, it is determined whether they are the same target. When the cosine distance is greater than 0.9, data association is performed to obtain the result of multi-target tracking; S330: The motion information and the appearance information are fused by the following weighted method: in, For sports information, For appearance information, is the fused information, is the weight, ranging between 0 and 1, preferably =0.5; S340, obtaining a trajectory, linking the temporal position information of the targets in the result of multi-target tracking to obtain a trajectory.
[0035] S400, trajectory anomaly detection, detects the trajectory through information entropy. The greater the information entropy, the more chaotic the trajectory. The threshold is set and the KNN algorithm is used to determine whether the trajectory is abnormal. Specifically, it includes: S410, trajectory modeling, the trajectory is modeled by information entropy. The information entropy is expressed by the following formula, which represents the degree of disorder of the state: Where x is a random variable, which represents the position and velocity information of the current state in the trajectory; S420, abnormal trajectory detection, detecting and judging abnormal trajectories through the KNN algorithm.
[0036] S500, pedestrian behavior analysis, detects the density, flow, and direction of pedestrian targets in dense scenes, pays attention to the local pedestrian clusters and the overall flow of pedestrians, and gives early warnings for aggregation, diffusion, and abnormal trajectory behaviors; specifically includes: S510, clustering the target detection frames in each frame to obtain a group with local consistency; S520, judging whether there is abnormal behavior in the trajectory according to the trajectory and movement direction information of the plurality of pedestrian clusters, and issuing an early warning if there is abnormal behavior, wherein the abnormal behavior includes aggregation, diffusion, and excessive speed; S530, pedestrian target search, based on the image of the pedestrian target, generate a feature vector through the ReID model, and compare it with the feature vector generated by the pedestrian target in the video surveillance to determine whether it is the same pedestrian target; S540, establishing global consistency, establishing global consistency from local consistency, and analyzing pedestrian target flow, local flow direction and overall flow direction.
[0037] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A crowd behavior analysis system in a dense scene, characterized in that: include: The target fast search module resides in the improved YOLOv8 target detection model. In response to the input of video surveillance, it detects pedestrian targets in dense scenes and obtains the target frame. A multi-target tracking module tracks the target frame to obtain the trajectory of the pedestrian target; The motion behavior analysis module detects pedestrian targets with abnormal behavior and issues early warnings based on the trajectory of the pedestrian target and the target frame, and analyzes the flow rate and flow direction of different local crowds, and outputs the flow rate and flow direction; The target rapid search module is communicatively connected to the multi-target tracking module, and the target rapid search module and the multi-target tracking module are communicatively connected to the motion behavior analysis module respectively.
2. The crowd behavior analysis system in a dense scene as claimed in claim 1, characterized in that: The abnormal behaviors include excessive speed and abnormal trajectory.
3. The crowd behavior analysis system in a dense scene as claimed in claim 2, characterized in that: The flow rate and flow direction analysis includes performing local clustering according to the positions of pedestrian targets to form pedestrian clusters, and calculating the flow rates and flow directions of different local pedestrian clusters according to the trajectories of multi-target tracking.
4. The crowd behavior analysis system in a dense scene as claimed in claim 3, characterized in that: The movement behavior analysis module includes: Local consistency analysis, based on the clustering results, for each pedestrian cluster, analyze the flow direction, flow speed and trajectory differences; Global consistency analysis, analyzes the consistency between different pedestrian clusters in the entire video surveillance, and analyzes the differences in flow direction, flow speed and trajectory between different pedestrian clusters.
5. A method for analyzing crowd behavior in a dense scene, using the crowd behavior analysis system in a dense scene as described in any one of claims 1 to 4, characterized in that: The steps include: S100, target detection model construction, in response to the input of video surveillance, obtain the crowd data set in the dense scene, establish the improved YOLOv8 target detection model, and generate the target frame for multi-target tracking; S200, ReID model construction, training the re-identification model on the pedestrian re-identification training data set to obtain the ReID model; S300, constructing a multi-target tracking model, inputting a target detection frame into the ReID model to obtain appearance information of a pedestrian target, performing data association based on motion information of the target frame and combining the appearance information to complete tracking of multiple pedestrian targets; S400, trajectory anomaly detection, detecting the trajectory by information entropy, the greater the information entropy, the more chaotic the trajectory, and determining whether the trajectory is abnormal by setting a threshold and using a KNN algorithm; S500, pedestrian behavior analysis, detects the density, flow, and direction of pedestrian targets in dense scenes, pays attention to the local pedestrian clusters and the overall flow of pedestrians, and gives early warnings for aggregation, diffusion, and abnormal trajectory behaviors.
6. The crowd behavior analysis method in a dense scene as claimed in claim 5, characterized in that: The step S100 includes: S110, format conversion, converting the crowd data set into a YOLO format for training the target detection model; S120, YOLOv8 improvement, improves YOLOv8, focuses on small targets and occluded pedestrian targets in dense scenes, and reduces the missed detection process of the pedestrian targets.
7. The crowd behavior analysis method in a dense scene as claimed in claim 6, characterized in that: The S200 includes: S210, model training, using the Fast-ReID model to train based on the Market1501 dataset under the BOT technique to improve the mAP of the Fast-ReID model; S220, feature vector output, for the ReID model input image, the output is a feature vector containing 1024 values; S230, similarity judgment, judging the similarity between the detection frames of the previous frame and the next frame by comparing the cosine distance between the feature vectors.
8. The crowd behavior analysis method in a dense scene as claimed in claim 5, characterized in that: The step S300 includes: S310, capturing motion information, capturing the position information of the previous frame and the next frame of the pedestrian target through the Kalman filter algorithm, making the best estimate of the state at the current moment based on the data and estimate of the state at the previous moment, and obtaining the predicted frame of the pedestrian target; S320, the prediction frame of the target is matched. When the next frame arrives, the target frame and the prediction frame of the pedestrian target are associated with each other through the Hungarian algorithm. For the appearance information, the image of the detection frame is input into the ReID model, and a 1024-dimensional feature vector is output. By comparing the cosine distance between the feature vector of the detection frame and the feature vector of the appearance information of the target, it is determined whether they are the same target. When the cosine distance is greater than 0.9, data association is performed to obtain the result of multi-target tracking; S330: The motion information and the appearance information are fused by the following weighted method: ; S340: Obtaining a trajectory, linking the temporal position information of the targets in the result of the multi-target tracking to obtain a trajectory.
9. The crowd behavior analysis method in a dense scene as claimed in claim 5, characterized in that: The step S400 includes: S410, trajectory modeling, modeling the trajectory through information entropy, the information entropy is expressed by the following formula, which represents the degree of disorder of the state: S420, abnormal trajectory detection, detecting and judging abnormal trajectories through the KNN algorithm.
10. The crowd behavior analysis method in a dense scene as claimed in claim 5, characterized in that: The step S500 includes: S510, clustering the target detection frames, clustering the target detection frames in each frame to obtain a group with local consistency; S520, abnormal behavior warning, judging whether there is abnormal behavior in the trajectory according to the trajectory and movement direction information of multiple pedestrian clusters, and issuing a warning if there is abnormal behavior; S530, searching for pedestrian targets, generating a feature vector through the ReID model according to the image of the pedestrian target, and comparing it with the feature vector generated by the pedestrian target in the video surveillance to determine whether they are the same pedestrian target; S540, establishing global consistency, establishing global consistency from local consistency, and analyzing pedestrian target flow, local flow direction and overall flow direction.
Citation Information
Patent Citations
Pedestrian's abnormal behavior detection method
CN106156706A
Multi-target tracking method for space-based monitoring
CN110163890A
Multi-scale human body tracking method and device based on Soft-NMS
CN112288773A
Pedestrian trajectory estimation method and device based on crowd thermodynamic diagram, equipment and medium
CN114495000A
