A crowd density anomaly early warning and safety emergency response method

By generating crowd density maps using computer vision and deep learning technologies, the problem of low detection efficiency and poor accuracy in densely populated areas has been solved, enabling automated analysis of crowd behavior and emergency response, and improving the safety of public places.

CN116844108BActive Publication Date: 2026-02-24BEIJING INST OF TECH +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310733658.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-20
Publication Date
2026-02-24
Estimated Expiration
2043-06-20

AI Technical Summary

Technical Problem

Existing technologies have low detection efficiency and poor accuracy in densely populated areas, and traditional emergency response methods are inefficient and easily affected by human factors, lacking the ability to analyze and predict crowd behavior.

Method used

Using computer vision and deep learning technologies, real-time images are captured by a camera to generate crowd density maps. These maps are then downsampled, dilated, eroded, and smoothed to mark densely populated areas and trigger alarms and emergency responses based on preset thresholds.

Benefits of technology

It improves the efficiency and accuracy of detection in densely populated areas, enabling timely identification and marking of densely populated areas, reducing casualties, and ensuring the safety of public places.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116844108B_ABST
    Figure CN116844108B_ABST
Patent Text Reader

Abstract

The application relates to a crowd density anomaly early warning and safety emergency response method, belonging to the field of public safety. The application can obtain the number of people in a target region of a crowd density map by integrating and summing the target region of the crowd density map, can reduce the complexity of calculation, and can improve the efficiency and accuracy of calculation. The marked dense sub-regions are subjected to expansion operation, corrosion and connection processing, the continuous regions are combined into one whole, the marked dense sub-regions are more compact and continuous, the possibility of misjudgment is reduced, and the accuracy of subsequent processing is improved. The application is suitable for the field of public transportation and the like, can quickly and automatically identify and mark a crowd dense region, greatly improves the efficiency and accuracy of a monitoring system, helps monitoring personnel to timely master the situation of the crowd dense region, and timely takes measures to guarantee public safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for early warning and emergency response to crowd density based on image analysis and artificial intelligence technology, and more particularly to a method for early warning and emergency response to abnormal crowd density, belonging to the field of public safety. Background Technology

[0002] In crowded places such as large events, public venues, and transportation hubs, the sheer number of people increases the risk of stampedes, crushing, and other loss of control in the event of an emergency, leading to serious injuries, fatalities, and property damage. Therefore, a safety emergency system capable of real-time monitoring of crowd density, risk warnings, and rapid response is needed.

[0003] Currently, existing early warning methods for densely populated areas generally employ manual monitoring and sensor monitoring technologies. Manual monitoring is inefficient and carries the risk of subjective misjudgment; sensors can determine density through headcount, but they face challenges in installation and maintenance, and are subject to stringent environmental requirements. Furthermore, the installation locations of sensors may be limited, leading to inaccurate and incomplete data. Moreover, these sensors only provide basic data and lack the ability to analyze and predict crowd behavior. Therefore, achieving accurate crowd behavior analysis and prediction is a pressing technical challenge. In addition, emergency response to sudden events also requires specialized technical means. Traditional emergency response methods are mostly based on manual command, which is inefficient and susceptible to human interference. Therefore, a technology capable of automating, efficiently, and accurately responding to sudden events is needed. Summary of the Invention

[0004] To address the issues of low efficiency and poor accuracy in detecting densely populated areas in public places using existing technologies, the main objective of this invention is to provide a method for early warning and emergency response to abnormal crowd density. By utilizing computer vision, image processing, and deep learning technologies, this method enables real-time analysis and early warning of crowd density within a monitored area, thereby improving the detection efficiency and accuracy in densely populated areas, reducing casualties, and ensuring the safety and stability of public places.

[0005] The objective of this invention is achieved through the following technical solution:

[0006] This invention discloses a method for early warning and emergency response to abnormal crowd density. It captures real-time images using a camera or other visual sensors and calculates and predicts crowd density using deep learning algorithms and image analysis techniques. Based on a preset density threshold, it can promptly issue an alarm when the crowd density reaches a warning threshold and provide targeted emergency response measures, improving the detection efficiency and accuracy in densely populated areas to reduce casualties and ensure the safety and stability of public places.

[0007] This invention discloses a method for early warning and emergency response to abnormal crowd density, comprising the following steps:

[0008] Step 1: Analyze the crowd image to generate a crowd density map;

[0009] First, a crowd density safety threshold, Threshold, is defined. Second, the crowd image and resolution [H, W] of the current moment in the surveillance video stream are obtained. Then, the trained crowd counting network model is used to parse the crowd image, outputting a crowd density map (Map) corresponding to the current crowd image. The total number of people N within the monitored area is estimated by integrating and summing the density map. If N is less than or equal to 1, the current crowd image is directly output; otherwise, the process proceeds to the next stage. The crowd density map is an image representation used to characterize the spatial distribution information of the crowd. The density map is generated by mapping the head regions in the original image to their corresponding positions in the density map using a Gaussian kernel of appropriate size. The pixel value of each region in the crowd density map corresponds to the crowd density of that region in the original image, and the number of people in that region can be obtained by integrating and summing the target region of the crowd density map.

[0010] Step 2: Downsample the population density map obtained in Step 1;

[0011] The crowd density map is divided into L×L sub-regions. Then, the downsampling scale is set to (H / L, W / L). By downsampling the crowd density map, a ReducedImage is obtained. In the ReducedImage, the pixel value of each point is equal to the sum of the pixel values ​​of the corresponding sub-region in the original crowd density map. This operation is equivalent to dividing the original image into an L×L grid and then summing the pixel values ​​within each grid.

[0012] Step 3: Process the downsampled density map obtained in Step 2 and mark the dense sub-regions that exceed the predetermined density threshold.

[0013] First, based on the pixel values ​​of each point in the ReducedImage obtained in step 2 and the area of ​​the corresponding region in the crowd density map, the crowd density of that region is calculated, and it is determined whether it exceeds the predetermined density threshold. Second, a single-channel all-zero image with a resolution of [H, W] is created, i.e., the dense sub-region labeling map Mask is initialized. Finally, for all regions in the crowd density map that exceed the density threshold, a fixed pixel value (FixedPixelValue) is used to label these regions on the Mask for subsequent processing and analysis. This labeling process is equivalent to marking dense crowd regions on the image with specific colors or markers, allowing users to intuitively see which regions have high crowd density.

[0014] Step 4: Process the dense sub-regions marked in Step 3 and remove the smaller regions;

[0015] First, calculate the area occupied by each marked independent region in the dense sub-region labeling map Mask. Then, remove regions with an area smaller than the preset value MinArea from the labeling map Mask. The size of MinArea needs to be comprehensively set based on the crowd density, scene size, and monitoring range in the actual application scenario. This process eliminates unnecessary region markings caused by noise or other factors, improving the accuracy of subsequent processing.

[0016] Step 5: Perform connectivity processing on the dense sub-regions marked in Step 3 to form a dense sub-region connected graph;

[0017] First, a dilation operation is performed on the dense sub-region labeling map Mask, expanding the regions with a pixel value of FixedPixelValue to fill gaps and connect discontinuous areas. Then, an erosion operation is performed on the dilated dense sub-region labeling map Mask, shrinking the regions with a pixel value of FixedPixelValue to make the labeled regions more compact. Finally, a connectivity processing operation is performed on the processed dense sub-region labeling map Mask, merging continuous regions into a single entity. This results in more compact and continuous labeled dense sub-regions, reducing false positives and improving the accuracy of subsequent processing.

[0018] Step 6: Use a Gaussian filter to smooth the dense sub-region connected graph obtained in Step 5, making the edges of the image smoother and reducing noise in the image.

[0019] Step 7: Convert the single-channel dense sub-region connected graph Mask into a three-channel RGB image, and overlay it with the original crowd image to obtain a dense crowd region marker map;

[0020] First, the areas with pixel values ​​greater than zero in the Mask are converted into red areas with a certain degree of transparency. Then, it is overlaid with the original crowd image using the overlay algorithm shown in formula (1). The final output is a crowd image displaying dense red areas, i.e., a dense crowd area marker image.

[0021] WarningImage(I) = saturate(Image(I) * α + Mask(I) * β + γ) (1)

[0022] Where WarningImage(I) is the pixel value of the dense region marker image after overlay, Image(I) and Mask(I) are the values ​​of the corresponding pixels in the crowd image and the dense region marker image, respectively, α and β are the weights of the two images, and γ is the offset. The saturate function restricts the pixel values ​​to the range [0, 255].

[0023] Step 8: Based on the densely populated areas captured in the surveillance footage, assess the risk level and activate the corresponding safety emergency response plan. Improve the detection efficiency and accuracy of densely populated areas to reduce casualties and ensure the safety and stability of public places.

[0024] Beneficial effects:

[0025] 1. The present invention discloses a method for early warning and emergency response to abnormal crowd density. By using a Gaussian kernel of appropriate size, the crowd density map is generated by mapping the head region in the original image to the corresponding position in the density map. The number of people in the target area can be obtained by integrating and summing the crowd density map, which reduces the complexity of calculation and improves the efficiency and accuracy of calculation.

[0026] 2. The present invention discloses a method for early warning and emergency response to abnormal crowd density, which performs expansion, erosion and connectivity processing on marked dense sub-regions to merge continuous regions into a whole, making the marked dense sub-regions more compact and continuous, reducing the possibility of misjudgment and improving the accuracy of subsequent processing.

[0027] 3. The present invention discloses a method for early warning and emergency response to abnormal crowd density. It employs a series of processing methods, including crowd image analysis, dividing the crowd density map into sub-regions, downsampling, calculating crowd density, marking regions exceeding the density threshold, filtering, dilation, erosion, smoothing, and conversion to RGB images and overlay. This method can quickly and automatically identify and mark densely populated areas, greatly improving the efficiency and accuracy of the monitoring system. It helps monitoring personnel to grasp the situation in densely populated areas in a timely manner and take timely measures to ensure public safety. Attached Figure Description

[0028] Figure 1 This is a flowchart of a method for early warning and emergency response to abnormal crowd density disclosed in this invention;

[0029] Figure 2 This is a schematic diagram of the system structure in a method for early warning and emergency response to abnormal crowd density disclosed in this embodiment;

[0030] Figure 3 This is a schematic diagram of the crowd density analysis process in a crowd density anomaly early warning and safety emergency response method disclosed in this embodiment.

[0031] Figure (a) is a crowd image, Figure (b) is a crowd density map, Figure (c) is a dense crowd area marker map, Figure (d) is a dense crowd area marker map after dense area filtering and connectivity processing, Figure (e) is a dense crowd area marker map after smoothing processing, and Figure (f) is a dense crowd density abnormal area marker map.

[0032] Figure 4 This embodiment illustrates the early warning effect of densely populated areas in a method for early warning and emergency response to abnormal crowd density. Detailed Implementation

[0033] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. The technical problems solved by the present invention and its beneficial effects are also described. It should be noted that the described embodiments are only intended to facilitate understanding of the present invention and do not constitute any limitation thereof.

[0034] This embodiment discloses a system and method for early warning and emergency response to densely populated areas in railway passenger transport, specifically addressing early warning and emergency response to abnormal crowd density in railway passenger transport systems. It is applied to a subway station in Beijing. Figure 2 As shown, the system consists of a monitoring device, a server, and a management system.

[0035] The monitoring equipment is primarily responsible for acquiring video data from the monitored area and transmitting the video stream to the server. Upon receiving the video stream from the monitoring equipment, the server first preprocesses it, extracting image data at a specific frame rate. Then, the server's crowd density analysis and judgment system performs crowd density analysis on the image data, and prepares anomaly detection and early warning data based on the analysis results. The densely populated area marking module on the server is the core of the entire system. The densely populated area marking method flow is as follows: Figure 1 As shown, it is specifically divided into two modules: a crowd image analysis module and a densely populated area marking module. The algorithm flow of the crowd image analysis module is as follows: Figure 1 The algorithm for marking densely populated areas (green dashed lines) is as follows: Figure 1 The area marked by the red dashed line.

[0036] The management terminal includes functions such as adding monitoring devices, setting parameters related to crowd density thresholds, and receiving and displaying monitoring information from the server. The management terminal allows setting crowd density threshold parameters for the system and automatically triggering an alert when the preset threshold is reached. Alert information can be sent to railway platform management personnel in real time via the management terminal, enabling them to take timely measures to address potential safety risks. The functions of the management terminal include adding monitoring devices, setting parameters related to crowd density thresholds, and receiving and displaying alert information from the server. The following are the specific implementation methods for emergency response from the management terminal:

[0037] 1. Set the crowd density threshold parameter. In the management terminal, set the crowd density threshold parameter to trigger an alarm when more than 2 people per square meter are present.

[0038] 2. Real-time Crowd Density Monitoring: After setting the crowd density threshold parameters, the management system monitors the crowd density within the monitored area in real time and automatically triggers an alert when the preset threshold is reached. For example, if the crowd density in a certain area of ​​the subway station reaches the set threshold within a certain time period, the system will automatically trigger a yellow alert and send warning information to relevant personnel, such as railway platform managers and security personnel.

[0039] 3. Sending Early Warning Information: Early warning information should include detailed information, specifically the location, warning level, estimated number of people, and potential hazards. For example, "Please note that the crowd density near Exit B of the subway station exceeds the threshold of 20 people per square meter, triggering a yellow warning. There may be a safety risk. Please take timely measures."

[0040] 4. Contacting On-Site Personnel: After sending the warning information, the management system maintains close contact with relevant on-site personnel, providing technical support and guidance to assist them in developing emergency response measures, such as evacuating personnel and increasing security forces. For example, you can instruct platform management personnel to increase police presence and remind passengers to pay attention to safety.

[0041] 5. Adjustment and Coordination: During the emergency response, management closely monitors changes in the situation and makes timely adjustments and coordination to ensure the effectiveness and safety of the response measures. If the crowd density further increases, management can trigger a red alert, notifying the police and ambulances to provide support.

[0042] 6. The above are the specific implementation methods for emergency response measures in subway stations. By setting crowd density threshold parameters, monitoring crowd density in real time, sending early warning information, contacting on-site personnel, and making adjustments and coordination, the safety of subway stations can be effectively guaranteed.

[0043] This embodiment discloses a method for early warning and emergency response to abnormal crowd density in a railway passenger transport system. Specifically, it is applied to a subway station in Beijing. The main steps of this method are as follows:

[0044] Step 1: Analyze the crowd image to generate a crowd density map;

[0045] 1.1 Set the threshold for crowd density in the image: Threshold.

[0046] 1.2. Obtain the current moment's image of the crowd in the surveillance video stream, and the resolution [H, W] of the crowd image;

[0047] 1.3. By using a trained crowd counting network model to parse the crowd image, output the crowd density map Map corresponding to the current crowd image, and estimate the total number of people N in the monitoring area by integrating and summing the density map Map.

[0048] 1.4 If the total number of people N is less than or equal to 1, then directly output the current crowd image, stop the current parsing process, and prepare to load the next crowd image;

[0049] 1.5 Finally, if the total number of people N is greater than 1, then the densely populated area marking stage begins.

[0050] Step 2: Downsample the population density map obtained in Step 1;

[0051] For population density maps, such as Figure 3 (b) Downsampling is performed with a downsampling scale of (H / L, W / L), dividing the crowd density map into L×L sub-regions, where L is set to 32. The pixel value of each point in the downsampled image (ReducedImage) is equal to the sum of the pixel values ​​of the corresponding sub-region in the original crowd density map.

[0052] 2.1 First, based on the pixel values ​​of each point in the ReducedImage and the area of ​​the corresponding population density map, the population density of the region is obtained, and it is determined whether it exceeds the predetermined density threshold.

[0053] 2.2 Next, create a single-channel all-zero image with a resolution of [H, W], i.e., initialize the dense region labeling map Mask;

[0054] 2.3. For all areas in the crowd density map that exceed the density threshold, mark them on the mask with a fixed pixel value of FixedPixelValue = 150, such as... Figure 3 (c)

[0055] 2.4 Dense Region Filtering: Calculate the area occupied by each independent sub-block in the dense region marker map Mask, and remove regions with an area smaller than MinArea. MinArea is set to 100 pixels.

[0056] 2.5 Connectivity Processing: A dilation operation is performed on the dense region marker map (Mask) to expand the area with a fixed pixel value. Then, an erosion operation is performed on the dilated dense region marker map (Mask) to shrink the area with a fixed pixel value. The dense region marker map (Mask) after connectivity processing is shown below. Figure 3 (d)

[0057] 2.6 Smoothing Processing: Due to the downsampling effect during the initial density map region segmentation, the dense region marker map Mask after connectivity processing contains a large number of jagged edges. This paper uses a Gaussian filter to smooth the dense region marker map Mask. The smoothed output dense region marker map Mask is shown below. Figure 3 (e).

[0058] 2.7 Dense Region Marker Image Overlay: The single-channel dense region marker image Mask is converted into a three-channel RGB image, where areas with pixel values ​​greater than zero are converted into red areas with an opacity of 0.5. This image is then overlaid with the original crowd image using the overlay algorithm shown in Formula 1. The final output is a crowd image displaying the red warning area, as shown below. Figure 3 (f) refers to the dense area identification image.

[0059] WarningImage(I) = saturate(Image(I) * α + Mask(I) * β + γ) (1)

[0060] Where WarningImage(I) is the pixel value of the dense region marker image after overlay, Image(I) and Mask(I) are the values ​​of the corresponding pixels in the crowd image and the dense region marker image, respectively, α and β are the weights of the two images, and γ is the offset. The saturate function restricts the pixel values ​​to the range [0, 255].

[0061] This paper presents a crowd density early warning and safety emergency response system for railway passenger transport, applied to a real-world scenario at a Beijing subway station. Monitoring equipment captures video data from the platform, and the crowd density anomaly alarm system assesses and statistically analyzes crowd density. Based on the assessment results, risk warnings are issued. In scenarios with high crowd density, the system marks densely populated areas. Finally, an early warning map is generated to demonstrate the effectiveness of the warning in densely populated areas, such as... Figure 4 The first row of images shows a series of images collected by cameras in the subway platform area in chronological order, displaying changes in the number of people on the platform at different times. The second row of images is an early warning effect diagram, with red areas marking densely populated areas and no markings on non-densely populated areas. The spatial location of densely populated groups can be clearly observed in the images, allowing for timely intervention and control.

[0062] With the support of this system, security personnel can promptly and accurately understand the crowd density in the current monitoring area, so as to intervene and control emergencies in a timely manner and avoid large-scale group incidents caused by the lack of real-time monitoring of crowd density.

[0063] The above detailed description further illustrates the purpose, technical solution, and beneficial effects of the invention. It should be understood that the above description is merely a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for early warning and emergency response to abnormal crowd density, characterized in that: Includes the following steps, Step 1: Analyze the crowd image to generate a crowd density map; Step 2: Downsample the population density map obtained in Step 1; Step 3: Process the downsampled density map obtained in Step 2 and mark the dense sub-regions that exceed the predetermined density threshold. Step 4: Process the dense sub-regions marked in Step 3 and remove the smaller regions; Step 5: Perform connectivity processing on the dense sub-regions marked in Step 3 to form a dense sub-region connectivity graph; The implementation method for step 5 is as follows: First, a dilation operation is performed on the dense sub-region label map Mask to expand the region with a pixel value of FixedPixelValue in order to fill gaps and connect discontinuous regions; Then, an erosion operation is performed on the expanded dense sub-region label map Mask to shrink the region with a pixel value of FixedPixelValue, making the labeled region more compact; finally, a connectivity operation is performed on the processed dense sub-region label map Mask to merge continuous regions into a whole. Step 6: Use a Gaussian filter to smooth the dense sub-region connected graph obtained in Step 5, making the edges of the image smoother and reducing noise in the image. Step 7: Convert the single-channel dense sub-region connected graph Mask into a three-channel RGB image, and overlay it with the original crowd image to obtain a dense crowd region marker map; The implementation method for step 7 is as follows: First, the areas with pixel values ​​greater than zero in the Mask are converted into red areas with transparency; then, they are superimposed on the original crowd image, and the superposition algorithm is as shown in formula (1). The final output is a crowd image showing dense red areas, i.e., a dense crowd area marker image. WarningImage(I) = saturate(Image(I) ∗ α + Mask(I) ∗ β + γ) (1) Where WarningImage(I) is the pixel value of the dense region marker image after overlay, Image(I) and Mask(I) are the values ​​of the corresponding pixels in the crowd image and the dense region marker image, respectively, α and β are the weights of the two images, γ is the offset; the saturate function means to restrict the pixel value to the range [0,255]. Step 8: Based on the densely populated areas captured in the monitoring footage, assess the risk level, activate the corresponding safety emergency response plan, improve the detection efficiency and accuracy of densely populated areas, reduce casualties, and ensure the safety and stability of public places.

2. The method for early warning and emergency response to abnormal crowd density as described in claim 1, characterized in that: The implementation method for step 1 is as follows: First, define a crowd density safety threshold Threshold; second, obtain the crowd image and resolution [H,W] at the current moment in the surveillance video stream. Then, the trained crowd counting network model is used to parse the crowd image, output the crowd density map Map corresponding to the current crowd image, and estimate the total number of people N in the monitoring area by integrating and summing the density map Map. If N is less than or equal to 1, the current crowd image is directly output; otherwise, proceed to the next stage. The crowd density map is an image representation used to characterize the spatial distribution information of the crowd. The crowd density map is generated by mapping the head region in the original image to the corresponding position in the density map using a Gaussian kernel of appropriate size. The pixel value of each region in the crowd density map corresponds to the crowd density of the original image of that region, and the number of people in that region can be obtained by integrating and summing the target region of the crowd density map.

3. The method for early warning and emergency response to abnormal crowd density as described in claim 2, characterized in that: The implementation method for step 2 is as follows: The crowd density map is divided into L×L sub-regions; then, the downsampling scale is set to (H / L, W / L); by downsampling the crowd density map, a ReducedImage is obtained; in the ReducedImage, the pixel value of each point is equal to the sum of the pixel values ​​of the corresponding sub-region in the original crowd density map.

4. The method for early warning and emergency response to abnormal crowd density as described in claim 3, characterized in that: The implementation method for step 3 is as follows: First, based on the pixel values ​​of each point in the ReducedImage obtained in step 2 and the area of ​​the corresponding region in the crowd density map, calculate the crowd density of the region and determine whether it exceeds the predetermined density threshold. Second, create a single-channel all-zero image with a resolution of [H, W], i.e., initialize the dense sub-region labeling map Mask. Finally, for all regions in the crowd density map that exceed the density threshold, use a fixed pixel value (FixedPixelValue) to label these regions on the Mask for subsequent processing and analysis.

5. The method for early warning and emergency response to abnormal crowd density as described in claim 4, characterized in that: The implementation method for step 4 is as follows: First, calculate the area occupied by the marked independent regions in the dense sub-region marking map Mask; then, remove regions with an area smaller than the preset value MinArea from the marking map Mask; the size of MinArea needs to be comprehensively set according to the population density, scene size and monitoring range in the actual application scenario.

Citation Information

Patent Citations

  • Crowd density estimation method and device, computer equipment and storage medium

    CN112101195A

  • Residual multi-graph convolution crowd distribution prediction method and system based on space-time relationship

    CN112766240A