Digital twin campus emergency evacuation simulation and real-time scheduling early warning system

CN122596475APending Publication Date: 2026-08-18ZHONGRONG YILETIAN CONSTR CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610649915.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-12
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0008]为此,本发明提供一种数字孪生校园应急疏散模拟与实时调度预警系统,用以克服现有技术中无法改进原生YOLOv8s模型并改进人员密度估计算法,无法实现校园人员的密度和拥挤程度的准确估计,进行无法实现应用于数字孪生校园的应急疏散模拟与实时疏散路径调度预警的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122596475A_ABST
    Figure CN122596475A_ABST
Patent Text Reader

Abstract

The application relates to the field of digital twinning, in particular to a digital twinning campus emergency evacuation simulation and real-time scheduling early warning system, which comprises a personnel identification module, which is used for collecting images through an improved YOLOv8s model to generate a campus pedestrian identification map; a regional pedestrian density analysis module, which is used for generating regional personnel density through an adaptive Gaussian kernel density estimation algorithm; a regional traffic index calculation module, which is used for calculating regional personnel traffic index; a campus emergency evacuation simulation module, which is used for generating simulated predicted personnel traffic index through an evacuation prediction model; and a campus evacuation scheduling early warning decision module, which is used for real-time evacuation path scheduling early warning. The application realizes accurate estimation of the density and congestion degree of campus personnel, and further realizes real-time evacuation path scheduling early warning applied to a digital twinning campus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital twins, and more particularly to a digital twin campus emergency evacuation simulation and real-time dispatch and early warning system. Background Technology

[0002] As a public place with a high density of people, the campus is a key control scenario for public safety management. It has significant characteristics such as complex spatial layout, strong fluctuations in the flow of people during different periods, a high proportion of minors, and large differences in the emergency response capabilities of teachers and students.

[0003] Furthermore, the traditional campus emergency evacuation management model mainly relies on fixed emergency plans, and its evacuation routes are general and standardized fixed routes. These cannot adapt to the different distribution of people on campus at different times such as during class, breaks, and meals, nor can they be adjusted in real time to the dynamic evolution of emergencies. The plan lacks executability and scenario adaptability, making it difficult to cope with real and complex emergency scenarios.

[0004] With the popularization of computer vision technology and campus security systems, campuses have generally achieved full coverage of video surveillance in public areas. Existing solutions have attempted to achieve personnel counting and density monitoring through target detection algorithms. For example, patent document CN112668451A discloses a real-time crowd density monitoring method based on YOLOv5, which uses the YOLOv5 visual recognition model to identify the number and density of stationary crowds. However, it does not disclose improvements to the visual recognition model for dynamic crowd flow during evacuation.

[0005] Furthermore, mainstream YOLO target detection models suffer from issues such as missed detection of small targets, false detection of dense crowds, and poor cross-scene generalization ability in complex environments with high population density, severe mutual occlusion, and frequent personnel movement, such as during school breaks and peak dining hours. The native YOLOv8s model lacks feature adaptability for campus scenarios, and its personnel recognition accuracy cannot meet the practical requirements of emergency evacuation management, making it difficult to provide reliable basic data for subsequent analysis.

[0006] On the other hand, existing population density estimation algorithms use Gaussian kernel density estimation with fixed bandwidth, which cannot adapt to the real-time trend differences in spatial form, boundary constraints, and carrying capacity of different areas in corridors and stairwells on campus. This easily leads to a large deviation between the density calculation results and the real-time congestion trend, and fails to accurately reflect the true spatial distribution of people and the level of congestion risk.

[0007] In summary, how to improve the native YOLOv8s model and the personnel density estimation algorithm to achieve accurate estimation of campus personnel density and congestion, and then realize emergency evacuation simulation and real-time evacuation route scheduling and early warning applied to digital twin campuses, is a technical problem that needs to be solved. Summary of the Invention

[0008] To address this, the present invention provides a digital twin campus emergency evacuation simulation and real-time dispatch and early warning system, which overcomes the problems in the prior art where the native YOLOv8s model cannot be improved and the personnel density estimation algorithm cannot be improved, thus failing to accurately estimate the density and congestion of campus personnel and making it impossible to implement emergency evacuation simulation and real-time evacuation route dispatch and early warning in digital twin campuses.

[0009] To achieve the above objectives, this invention proposes a digital twin campus emergency evacuation simulation and real-time dispatch and early warning system, comprising: The personnel recognition module is used to acquire images from cameras in public areas of the campus and generate a pedestrian recognition map of the campus by passing the acquired images through an improved YOLOv8s model. The improved YOLOv8s model includes a coordinate attention mechanism and a dynamic detection head. The regional pedestrian density analysis module is used to generate regional pedestrian density by applying an adaptive Gaussian kernel density estimation algorithm to the campus pedestrian identification map. The regional access index calculation module is used to calculate the regional personnel access index based on the regional personnel density and digital twin campus data; The campus emergency evacuation simulation module is used to generate a simulated predicted personnel passage index based on the personnel passage index of multiple areas in multiple areas of a digital twin campus through an evacuation prediction model, wherein the evacuation prediction model is an LSTM network architecture. The campus evacuation scheduling and early warning decision module is used to conduct real-time evacuation route scheduling and early warning based on the simulated predicted personnel passage index.

[0010] Furthermore, the personnel identification module includes: A multi-scale feature extraction submodule is used to embed the acquired images into the backbone network through coordinate attention to generate multi-scale pedestrian feature maps; The feature enhancement submodule is used to pass the multi-scale pedestrian feature map through the native neck network to generate a multi-scale enhanced pedestrian feature map; The dynamic detection head enhancement submodule is used to pass the multi-scale pedestrian enhancement feature map through the dynamic detection head to generate a multi-scale pedestrian perception enhancement feature map. The output submodule is used to generate the campus pedestrian recognition map by passing the multi-scale pedestrian perception enhancement feature map through the decoupling head; The improved YOLOv8s model sequentially sets up a coordinate attention embedding backbone network, a native neck network, a dynamic detection head, and a decoupling head. The coordinate attention embedding backbone network includes a coordinate attention mechanism.

[0011] Furthermore, the multi-scale feature extraction submodule includes: An initial feature extraction unit is used to pass the acquired image through an initial convolutional layer to generate an initial pedestrian feature map; The long-distance pedestrian feature extraction unit is used to sequentially pass the initial pedestrian feature map through the first C2f sub-network and the first coordinate attention mechanism to generate a long-distance pedestrian feature map; The mid-range pedestrian feature extraction unit is used to sequentially pass the long-range pedestrian feature map through the second C2f sub-network and the second coordinate attention mechanism to generate a mid-range pedestrian feature map; The close-range dense pedestrian feature extraction unit is used to sequentially pass the mid-range pedestrian feature map through the third C2f sub-network, the third coordinate attention mechanism, and the SPPF sub-network to generate a close-range dense pedestrian feature map. The coordinate attention embedding backbone network further includes a first C2f subnetwork, a second C2f subnetwork, a third C2f subnetwork, and an SPPF subnetwork. The coordinate attention mechanism includes a first coordinate attention mechanism, a second coordinate attention mechanism, and a third coordinate attention mechanism. The multi-scale pedestrian feature map includes a long-distance pedestrian feature map, a medium-distance pedestrian feature map, and a close-distance dense pedestrian feature map.

[0012] Furthermore, the coordinate attention mechanism includes an x-direction average pooling layer, a y-direction average pooling layer, a feature concatenation operation, and a convolutional coding layer.

[0013] Furthermore, the dynamic detection head enhancement submodule includes: A scale-aware attention enhancement unit is used to pass scale-aware attention to the hierarchical dimensions of the multi-scale pedestrian enhanced feature map to generate a hierarchical enhanced pedestrian feature map. The spatial perception attention enhancement unit is used to pass spatial perception attention to the spatial dimensions of the hierarchical perception enhancement pedestrian feature map to generate the multi-scale pedestrian perception enhancement feature map. The dynamic detection head includes scale-aware attention and spatial-aware attention.

[0014] Furthermore, the scale-aware attention enhancement unit includes: A hierarchical attention mapping unit is used to pass the multi-scale pedestrian enhancement feature map through a fully connected network to generate hierarchical perception weights; The scale-aware attention weighting unit is used to broadcast the hierarchical perception weights to the spatial and channel dimensions, and then multiply them element-wise with the multi-scale pedestrian enhancement feature map to generate the hierarchical perception enhancement pedestrian feature map. The scale-aware attention includes a fully connected network.

[0015] Furthermore, the regional pedestrian density analysis module includes: The neighbor distance calculation submodule is used to calculate the average distance between the current person and the set number of neighboring people based on the campus pedestrian recognition map; A perspective-weighted calculation submodule is used to generate a perspective-weighted Gaussian kernel based on the average distance and the average perspective factor of the entire image of the campus pedestrian recognition map; The regional personnel density calculation submodule is used to generate the regional personnel density by applying the perspective weighted Gaussian kernel of all personnel in the campus pedestrian recognition map to an adaptive Gaussian kernel density estimation algorithm.

[0016] Furthermore, the regional traffic index calculation module includes: The passage speed calculation submodule is used to generate the ideal passage speed for pedestrians in the area by using the population density of the area and the digital twin campus data through a pedestrian flow model; The model area traffic index calculation submodule is used to calculate the area pedestrian traffic index based on the ratio of the ideal pedestrian speed to the free pedestrian speed in the area.

[0017] Furthermore, the campus emergency evacuation simulation module includes: The input projection submodule is used to pass multiple population access indices of the area through the input layer to generate population access distribution features; The LSTM trend prediction submodule is used to pass the distribution features of the pedestrian traffic situation through the LSTM layer to generate trend features of the pedestrian traffic situation. The fully connected regression calculation submodule is used to pass the trend characteristics of the personnel passage through the fully connected regression layer to generate a simulated and predicted personnel passage index; The evacuation prediction model includes an input layer, an LSTM layer, and a fully connected regression layer.

[0018] Furthermore, the campus evacuation scheduling and early warning decision module is used to determine whether the simulated predicted personnel passage index exceeds a threshold. If so, it uses a path planning algorithm to provide real-time evacuation path scheduling and early warning for recommended evacuation paths.

[0019] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention improves the YOLOv8s model by incorporating a coordinate attention mechanism and a dynamic detection head. The coordinate attention mechanism, through the synergistic effect of average pooling layers in the x and y directions, feature concatenation operations, and convolutional coding layers, accurately captures the feature information of pedestrians at different distances and densities, effectively solving the problems of mutual occlusion, large scale differences, and missed detection of small targets at long distances in scenarios such as school breaks and peak dining hours. The dynamic detection head, through the dual enhancement of scale perception and spatial perception, further improves the perception capability of multi-scale pedestrian features, realizing accurate pedestrian image recognition in high-density scenarios of emergency evacuation. The pedestrian recognition accuracy is significantly improved, and the missed detection rate and false detection rate are greatly reduced. It is suitable for various complex scenarios in school buildings and realizes accurate assessment of campus evacuation risks.

[0020] In particular, this invention achieves accurate simulation and trend prediction of emergency evacuation through an evacuation prediction model based on an LSTM network architecture, which greatly improves the efficiency of emergency response, guides teachers and students to evacuate in an orderly manner, effectively avoids secondary disasters such as crowd collisions and stampedes, and realizes intelligent, precise and rapid emergency dispatch. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the structure of the digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the improved YOLOv8s model of the digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to an embodiment of the present invention. Figure 4 This is a flowchart illustrating the evacuation prediction model of the digital twin campus emergency evacuation simulation and real-time dispatch and early warning system, as described in an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0023] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0024] It should be noted that in the description of this invention, the terms "upper", "lower", "left", "right", "inner", "outer", etc., which indicate directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of this invention.

[0025] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0026] like Figures 1 to 4 As shown, this invention provides a digital twin campus emergency evacuation simulation and real-time dispatch and early warning system to overcome the problems in the prior art, which cannot improve the native YOLOv8s model and improve the personnel density estimation algorithm, thus failing to accurately estimate the density and congestion of campus personnel and thus failing to realize emergency evacuation simulation and real-time evacuation path dispatch and early warning applied to digital twin campuses.

[0027] like Figure 1 and 2 As shown in the figure, this embodiment proposes a digital twin campus emergency evacuation simulation and real-time dispatch and early warning system, including: The pedestrian recognition module is used to acquire images from cameras in public areas of the campus and generate a pedestrian recognition map of the campus by passing the acquired images through an improved YOLOv8s model. The improved YOLOv8s model includes a coordinate attention mechanism and a dynamic detection head. The regional pedestrian density analysis module is used to generate regional pedestrian density by applying an adaptive Gaussian kernel density estimation algorithm to the campus pedestrian identification map. The regional access index calculation module is used to calculate the regional personnel access index based on the regional personnel density and digital twin campus data; The campus emergency evacuation simulation module is used to generate a simulated predicted personnel passage index based on the personnel passage index of multiple areas in multiple areas of a digital twin campus through an evacuation prediction model, wherein the evacuation prediction model is an LSTM network architecture. The campus evacuation scheduling and early warning decision module is used to conduct real-time evacuation route scheduling and early warning based on the simulated predicted personnel passage index.

[0028] like Figure 3As shown, the personnel identification module further includes: A multi-scale feature extraction submodule is used to embed the acquired images into the backbone network through coordinate attention to generate multi-scale pedestrian feature maps; The feature enhancement submodule is used to pass the multi-scale pedestrian feature map through the native neck network to generate a multi-scale enhanced pedestrian feature map; The dynamic detection head enhancement submodule is used to pass the multi-scale pedestrian enhancement feature map through the dynamic detection head to generate a multi-scale pedestrian perception enhancement feature map. The output submodule is used to generate the campus pedestrian recognition map by passing the multi-scale pedestrian perception enhancement feature map through the decoupling head; The improved YOLOv8s model sequentially sets up a coordinate attention embedding backbone network, a native neck network, a dynamic detection head, and a decoupling head. The coordinate attention embedding backbone network includes a coordinate attention mechanism.

[0029] Furthermore, the multi-scale feature extraction submodule includes: An initial feature extraction unit is used to pass the acquired image through an initial convolutional layer to generate an initial pedestrian feature map; The long-distance pedestrian feature extraction unit is used to sequentially pass the initial pedestrian feature map through the first C2f sub-network and the first coordinate attention mechanism to generate a long-distance pedestrian feature map; The mid-range pedestrian feature extraction unit is used to sequentially pass the long-range pedestrian feature map through the second C2f sub-network and the second coordinate attention mechanism to generate a mid-range pedestrian feature map; The close-range dense pedestrian feature extraction unit is used to sequentially pass the mid-range pedestrian feature map through the third C2f sub-network, the third coordinate attention mechanism, and the SPPF sub-network to generate a close-range dense pedestrian feature map. The coordinate attention embedding backbone network further includes a first C2f subnetwork, a second C2f subnetwork, a third C2f subnetwork, and an SPPF subnetwork. The coordinate attention mechanism includes a first coordinate attention mechanism, a second coordinate attention mechanism, and a third coordinate attention mechanism. The multi-scale pedestrian feature map includes a long-distance pedestrian feature map, a medium-distance pedestrian feature map, and a close-distance dense pedestrian feature map.

[0030] Specifically, the initial convolutional layer uses a 3x3 convolutional kernel with a stride of 2 and padding of 1, and sets BatchNorm2d normalization and SiLU activation function.

[0031] Specifically, the first, second, and third C2f sub-networks all include downsampling convolutional layers, standard Conv2d, Bottleneck units, and channel concatenation operations. The downsampling convolutional layers use 3x3 convolutional kernels with a stride of 2 and padding of 1, and are normalized using BatchNorm2d and activated by SiLU. Therefore, the convolution of the initial and downsampling convolutional layers compresses the feature map resolution layer by layer, forcing the network to discard redundant pixel details while retaining structural information useful for detection, such as human edges and contours. As the resolution decreases, the number of channels gradually increases, and each layer learns features at different levels of abstraction.

[0032] The standard Conv2d consists of a 1×1 convolutional kernel, batch normalization layers, and SiLU activation functions. The Bottleneck unit contains two cascaded 3×3 convolutional layers, both with batch normalization and SiLU activation functions. After the feature map of the standard Conv2d is processed with twice the number of channels, it is divided into an internal hidden channel feature map and a residual connection feature map, both with the same number of channels, i.e., equal to the number of channels in the input feature map of the C2f sub-network. The first convolutional layer does not change the number of channels and directly performs spatial transformation on the features. The second convolutional layer also does not change the number of channels and further deepens the nonlinear representation. The internal hidden channel feature map is concatenated with the residual connection feature map after passing through the Bottleneck unit to obtain the feature map output by the C2f sub-network. Therefore, the C2f sub-network enhances feature learning ability through cross-stage partial connections. This structure can extract diverse pedestrian pose features. For non-standard human shapes such as bending over to tie shoelaces, carrying a backpack, or multiple people crossing, the multiple convolutional paths within the C2f sub-network can capture different local patterns in parallel.

[0033] Specifically, the SPPF subnetwork is a faster improvement on the traditional SPP in YOLOv8s. The SPPF subnetwork uses three consecutive 5×5 max-pooling layers stacked sequentially: the first 5×5 pooling layer has a receptive field of 5, the second stacked layer has an equivalent receptive field of 9, and the third stacked layer has an equivalent receptive field of 13. Since consecutive small pooling kernels are computationally much faster than parallel large pooling kernels, the SPPF subnetwork reduces computation by approximately 30% compared to SPP while maintaining equivalent performance. After pooling, the original input features are concatenated with the outputs of the three pooling layers along the channel dimension, and then fused through a 1×1 convolution to output a dense, near-field pedestrian feature map rich in multi-scale contextual information.

[0034] Therefore, the coordinate attention embedding backbone network (Backbone) refines and recalibrates the rich features extracted by the C2f subnetwork through the coordinate attention mechanism (CA). For people with very small size in the distance, the horizontal encoding of the coordinate attention mechanism can capture weak edge responses and suppress the interference of background walls or ground.

[0035] Therefore, the long-distance pedestrian feature map output by the coordinate attention embedding backbone network has the highest spatial resolution and undergoes the fewest downsampling iterations, preserving rich details such as edges, textures, and local contours, but its semantic abstraction level is relatively low. It is suitable for detecting small, distant targets such as people at the end of long corridors. The mid-distance pedestrian feature map achieves a preliminary balance between semantics and detail, and can represent the overall morphological features of people at medium distances, such as the general outline of the human torso and limbs. The close-distance dense pedestrian feature map has the lowest spatial resolution, but undergoes the most convolutional abstractions and incorporates multi-scale receptive field information through SPPF, possessing the strongest semantic discriminative ability and clearly distinguishing between humans and non-humans, but its perception of spatial details is relatively coarse. The three outputs of the coordinate attention embedding backbone network constitute a standard feature pyramid. Each of them independently contains gradient information from detail to semantics.

[0036] Specifically, the native neck network adopts the native PAN-FPN (Path Aggregation Network-Feature Pyramid Network) structure of YOLOv8s. Through a bidirectional feature fusion mechanism of top-down and bottom-up, it performs semantic detail fusion on the multi-scale pedestrian feature maps of different levels extracted by the backbone network.

[0037] More specifically, the top-down feature fusion process of the native neck network is as follows: The near-dense pedestrian feature map is upsampled using nearest-neighbor interpolation to double its spatial size, and then concatenated with the mid-range pedestrian feature map along the channel dimension. The concatenated features are processed by the first fusion C2f to generate a mid-level enhanced pedestrian feature map. This mid-level enhanced pedestrian feature map is then upsampled again using nearest-neighbor interpolation to double its spatial size. The enlarged feature map is then concatenated with the far-range pedestrian feature map along the channel dimension. The resulting complex feature map is then fed into the second fusion C2f for integration and dimensionality reduction to generate an enhanced far-range pedestrian feature map. Therefore, the top-down path broadcasts strong semantics from the near-dense pedestrian feature map, ensuring that small, distant pedestrian targets have sufficient class confidence and reducing missed detections.

[0038] More specifically, the bottom-up feature fusion process of the native neck network is as follows: The enhanced long-distance pedestrian feature map is passed through a first downsampling convolutional layer with a stride of 2, padding of 1, and a 3x3 kernel, compressing the spatial resolution of the feature map by half. The downsampled feature map is then concatenated with the mid-layer enhanced pedestrian feature map along the channel dimension. The concatenated features are then processed again through a second fusion C2f to obtain an enhanced mid-distance pedestrian feature map. This enhanced mid-distance pedestrian feature map is then passed through a second downsampling convolutional layer with a stride of 2, padding of 1, and a 3x3 kernel, compressing the spatial resolution of the feature map by half. The downsampled feature map is then concatenated with the mid-layer enhanced pedestrian feature map along the channel dimension. The concatenated features are then processed again through the first fusion C2f to obtain an enhanced near-distance dense pedestrian feature map. Therefore, the bottom-up path strengthens the boundary differentiation of individuals in near-distance dense crowds, reducing bounding box redundancy and adhesion.

[0039] Both the first fusion C2f (Cross-Stage Partial with Two Convolutions) and the second fusion C2f include an input 1×1 convolutional layer, a Bottleneck, and an output 1×1 convolutional layer. The Bottleneck consists of two 3×3 convolutional layers. Therefore, fusion C2f significantly reduces computational redundancy while maintaining feature representation capabilities.

[0040] Specifically, the enhanced long-distance pedestrian feature map and the enhanced mid-distance pedestrian feature map are upsampled to the same size as the enhanced near-distance dense pedestrian feature map through bilinear interpolation, and then stacked along a new dimension to obtain the multi-scale pedestrian enhanced feature map.

[0041] Therefore, the multi-scale pedestrian enhancement feature maps output by the native neck network include enhanced long-distance pedestrian feature maps, enhanced mid-distance pedestrian feature maps, and enhanced close-range dense pedestrian feature maps. The enhanced long-distance pedestrian feature map maintains high resolution while possessing stronger class discrimination capabilities, effectively suppressing background interference from small target areas in the distance and distinguishing blurred human figures from ground shadows. The enhanced mid-distance pedestrian feature map achieves an optimal balance between semantics and detail, serving as the core feature layer for detecting normal-scale pedestrians on campus. The enhanced long-distance pedestrian feature map outputs bounding boxes that better fit the human body contour, effectively reducing redundancy and adhesion of bounding boxes in dense crowds.

[0042] Furthermore, the coordinate attention mechanism includes an x-direction average pooling layer, a y-direction average pooling layer, a feature concatenation operation, and a convolutional coding layer.

[0043] Specifically, the computational processes of the first, second, and third coordinate attention mechanisms are as follows: Global average pooling is performed on the input feature map along both the x and y directions to obtain two one-dimensional feature vectors. These two vectors are concatenated and fed into a shared 1x1 scale Conv convolutional layer for cross-channel interaction. After activation, the vectors are split into two independent feature vectors, which are then passed through their respective Conv convolutional layers to restore the original number of channels. Finally, the x-direction attention weights and y-direction attention weights are obtained through a Sigmoid activation function. The input feature map is then multiplied element-wise with the x-direction attention weights and y-direction attention weights to obtain the feature map output by the coordinate attention mechanism.

[0044] Understandably, the coordinate attention mechanism can accurately capture the aspect ratio and position information of the human body in the image without increasing the computational burden. In densely populated areas, the coordinate attention mechanism can retain the vertical feature continuity from the head to the shoulders through vertical pooling. Even if the horizontal direction is partially occluded, it can still accurately lock the center of the individual.

[0045] Furthermore, the dynamic detection head enhancement submodule includes: A scale-aware attention enhancement unit is used to pass scale-aware attention to the hierarchical dimensions of the multi-scale pedestrian enhanced feature map to generate a hierarchical enhanced pedestrian feature map. The spatial perception attention enhancement unit is used to pass spatial perception attention to the spatial dimensions of the hierarchical perception enhancement pedestrian feature map to generate the multi-scale pedestrian perception enhancement feature map. The dynamic detection head includes scale-aware attention and spatial-aware attention.

[0046] Specifically, the spatial awareness attention operation process is as follows: a deformable convolution (DCN) is applied to the hierarchical perception-enhanced pedestrian feature map, and the sampled feature map is then weighted by spatial attention and focused on the target region to obtain a multi-scale pedestrian perception-enhanced feature map. Therefore, spatial awareness attention and multi-scale pedestrian perception-enhanced feature maps can adaptively adjust the sampling grid according to the target shape, thereby improving robustness to occlusion and deformation.

[0047] Furthermore, the scale-aware attention enhancement unit includes: A hierarchical attention mapping unit is used to pass the multi-scale pedestrian enhancement feature map through a fully connected network to generate hierarchical perception weights; The scale-aware attention weighting unit is used to broadcast the hierarchical perception weights to the spatial and channel dimensions, and then multiply them element-wise with the multi-scale pedestrian enhancement feature map to generate the hierarchical perception enhancement pedestrian feature map. The scale-aware attention includes a fully connected network.

[0048] Specifically, the scale-aware attention operation within the dynamic detection head (DyHead) is as follows: The enhanced long-distance pedestrian feature map and the enhanced mid-distance pedestrian feature map are upsampled to the same size as the enhanced near-distance dense pedestrian feature map using bilinear interpolation. These are then stacked along a new dimension to obtain the multi-scale pedestrian enhanced feature map. This new dimension is the hierarchical dimension. The scale-aware attention applies the following to the hierarchical dimension: Global average pooling is simultaneously performed on both the spatial and channel dimensions of the multi-scale pedestrian enhanced feature map, outputting a one-dimensional vector of length 3. Each scalar value in this one-dimensional vector represents a corresponding... The global activation intensity across the hierarchical dimensions is determined by passing the compressed one-dimensional vector through a miniature fully connected network to learn the relative importance relationships between the three hierarchical dimensions. This includes dimensionality reduction and dimensionality increase layers. The output dimension of the dimensionality reduction layer is 4, employing the ReLU activation function, which introduces a hidden layer of width 4, giving the fully connected network non-linear interaction capabilities at a minimal parameter cost. The output dimension of the dimensionality increase layer is 3, employing the Sigmoid activation function to restore the same dimension as the number of multi-scale pedestrian augmentation feature maps, so as to generate a dedicated attention weight for each feature level, resulting in hierarchical perceptual weights. These hierarchical perceptual weights are broadcast and copied to all locations and all channels in both the spatial and channel dimensions, enabling element-wise multiplication with the multi-scale pedestrian augmentation feature maps to obtain hierarchical perceptual augmented pedestrian feature maps.

[0049] Furthermore, the regional pedestrian density analysis module includes: The neighbor distance calculation submodule is used to calculate the average distance between the current person and the set number of neighboring people based on the campus pedestrian recognition map; A perspective-weighted calculation submodule is used to generate a perspective-weighted Gaussian kernel based on the average distance and the average perspective factor of the entire image of the campus pedestrian recognition map; The regional personnel density calculation submodule is used to generate the regional personnel density by applying the perspective weighted Gaussian kernel of all personnel in the campus pedestrian recognition map to an adaptive Gaussian kernel density estimation algorithm.

[0050] Specifically, the process of calculating the average distance is as follows: for each person's location, calculate the average Euclidean distance to its three nearest neighbors to obtain the average distance, and then calculate the coordinates of the bottom center of the detection box.

[0051] Specifically, the process of calculating the perspective-weighted Gaussian kernel is as follows: the horizontal x-axis represents the ground plane, and the detection box depth h is set as a quadratic function with the y-coordinate as the independent variable: Where h is the depth of the detection box, The fitting coefficients are determined using the least squares method from the collected sample points (y, h) during the offline scene calibration process. This represents the vertical coordinate of the bottom center of the pedestrian detection box in the campus pedestrian recognition image. Substituting this vertical coordinate into a fitted quadratic function yields the fitted detection box depth value. The minimum vertical coordinate of the bottom center of the pedestrian detection box is used as the reference height. The ratio of the fitted detection box depth value to the reference height is used as the perspective factor. The perspective factor is defined as the ratio of the pedestrian's expected detection box height to a certain reference height, reflecting the relative distance of that location from the camera. The perspective factor of the pedestrian is divided by the total number of people detected in the current campus pedestrian recognition image to obtain the depth-weighted average of the detected persons. Dividing the perspective factor by the depth-weighted average of the detected persons yields the average perspective factor of the entire image. The average distance is multiplied by a scaling factor of 0.3 and then multiplied by the average perspective factor of the entire image to generate a perspective-weighted Gaussian kernel. Therefore, the average perspective factor of the entire image is greater than 1, the initial Gaussian kernel (average distance multiplied by a scaling factor of 0.3) is magnified, and the diffusion range of the Gaussian kernel increases to cover the larger pixel area occupied by the person in the image. Conversely, when the average perspective factor of the entire image is less than 1, the initial Gaussian kernel is reduced, and the Gaussian kernel becomes more concentrated, avoiding blurring and sticking together multiple people in the distance due to an excessively large kernel. Because of the existence of the depth-weighted average of the normalized denominator for detecting people, the sum of the Gaussian kernels of all people in the entire image still equals the total number of people, ensuring strict consistency between the density map and the actual number of people.

[0052] Furthermore, the regional traffic index calculation module includes: The passage speed calculation submodule is used to generate the ideal passage speed for pedestrians in the area by using the population density of the area and the digital twin campus data through a pedestrian flow model; The model area traffic index calculation submodule is used to calculate the area pedestrian traffic index based on the ratio of the ideal pedestrian speed to the free pedestrian speed in the area.

[0053] Specifically, the pedestrian flow model is the Weidmann pedestrian flow model, a classic macro-empirical model in the field of pedestrian traffic. It can map the pedestrian density of multiple areas from the campus pedestrian identification map to the digital twin campus BIM model, thereby calculating the regional pedestrian access index based on the accessibility of the digital twin campus BIM model. The digital twin campus data in the digital twin campus BIM model includes the free-passage speed and congestion density of the public area. The free-passage speed is determined according to the type of public area; for example, if the public area is a staircase, the free-passage speed is 0.8. The congestion density is determined according to the narrowness of the public area; for example, if the passage width is less than 1.5 meters, the congestion density is 4.5. The regional pedestrian density, free-passage speed, and congestion density are then processed using the standard form of the Weidmann pedestrian flow model to obtain the ideal pedestrian speed for the area. The ratio of the ideal pedestrian speed to the free-passage speed is used as the regional pedestrian access index.

[0054] like Figure 4 As shown, the campus emergency evacuation simulation module further includes: The input projection submodule is used to pass multiple population access indices of the area through the input layer to generate population access distribution features; The LSTM trend prediction submodule is used to pass the distribution features of the pedestrian traffic situation through the LSTM layer to generate trend features of the pedestrian traffic situation. The fully connected regression calculation submodule is used to pass the trend characteristics of the personnel passage through the fully connected regression layer to generate a simulated and predicted personnel passage index; The evacuation prediction model includes an input layer, an LSTM layer, and a fully connected regression layer.

[0055] Specifically, the input layer includes a normalization layer and a regularization layer with a dropout rate of 0.1. The normalization layer is used to normalize the calculation of the pedestrian access index for multiple regions, and the regularization layer is used to randomly deactivate neurons to prevent overfitting. The LSTM layer includes a forget gate, an input gate, and an output gate to capture the gradual evolution process of local density increase, velocity decrease, and TI decrease. The fully connected regression layer is a fully connected layer with a ReLU activation function, used to decouple and refine the simulated pedestrian access index output by the LSTM layer, extracting the most effective components for the regression task to output the simulated pedestrian access index.

[0056] Furthermore, the campus evacuation scheduling and early warning decision module is used to determine whether the simulated predicted personnel passage index exceeds a threshold. If so, it performs real-time evacuation path scheduling and early warning for recommended evacuation paths.

[0057] Specifically, the calculation process of the campus evacuation scheduling and early warning decision module is as follows: if the simulated predicted personnel passage index is greater than or equal to the threshold of 0.4, then a real-time evacuation path scheduling and early warning for the recommended evacuation path is issued; otherwise, in normal state, no early warning is issued.

[0058] Specifically, to verify the accuracy of the improved YOLOv8s model in pedestrian detection on campus, the following models were used: native YOLOv8s (small-scale version, balancing speed and accuracy) as the baseline model; native YOLOv8s and coordinate attention embedding backbone network as improved model 1; native YOLOv8s and dynamic detection head as improved model 2; and native YOLOv8s, coordinate attention embedding backbone network and dynamic detection head as the final improved model. The baseline model, improved model 1, improved model 2, and final improved model were all trained using the publicly available COCOPerson training set and the native YOLOv8 loss functions (CIoU localization loss, BCE classification loss, and DFL distribution focus loss). Their mAP@0.5 metrics were 89.2%, 90.5%, 91.1%, and 92.3%, respectively, and their AP-S for small targets were 62.3%, 65.1%, 66.7%, and 68.9%, respectively. This verifies the synergistic gain of coordinate attention and dynamic detection head. The improved YOLOv8 model significantly improves the detection performance of distant small pedestrians and pedestrians in occlusion in campus scenes.

[0059] In this embodiment, an improved YOLOv8s model incorporates a coordinate attention mechanism and a dynamic detection head. The coordinate attention mechanism, through the synergistic effect of x- and y-direction average pooling layers, feature concatenation operations, and convolutional coding layers, accurately captures the feature information of pedestrians at different distances and densities. This effectively solves the problems of pedestrian occlusion, large scale differences, and missed detection of small targets at long distances in scenarios such as school breaks and peak dining hours. The dynamic detection head, through dual enhancement of scale perception and spatial perception, further improves the perception capability of multi-scale pedestrian features, achieving accurate pedestrian image recognition in high-density scenarios of emergency evacuation. The pedestrian recognition accuracy is significantly improved, and the missed detection rate and false detection rate are greatly reduced, adapting to various complex indoor scenarios on campus and enabling accurate assessment of campus evacuation risks. Through an evacuation prediction model using an LSTM network architecture, accurate simulation and trend prediction of emergency evacuation are achieved, greatly improving emergency response efficiency, guiding teachers and students to evacuate in an orderly manner, effectively avoiding secondary disasters such as crowd collisions and stampedes, and realizing intelligent, precise, and rapid emergency dispatch.

[0060] Those skilled in the art will recognize that the modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0061] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

[0062] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. 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 digital twin campus emergency evacuation simulation and real-time dispatch and early warning system, characterized in that, include: The personnel recognition module is used to acquire images from cameras in public areas of the campus and generate a pedestrian recognition map of the campus by passing the acquired images through an improved YOLOv8s model. The improved YOLOv8s model includes a coordinate attention mechanism and a dynamic detection head. The regional pedestrian density analysis module is used to generate regional pedestrian density by applying an adaptive Gaussian kernel density estimation algorithm to the campus pedestrian identification map. The regional access index calculation module is used to calculate the regional personnel access index based on the regional personnel density and digital twin campus data; The campus emergency evacuation simulation module is used to generate a simulated predicted personnel passage index based on the personnel passage index of multiple areas in multiple areas of a digital twin campus through an evacuation prediction model, wherein the evacuation prediction model is an LSTM network architecture. The campus evacuation scheduling and early warning decision module is used to conduct real-time evacuation route scheduling and early warning based on the simulated predicted personnel passage index.

2. The digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to claim 1, characterized in that, The personnel identification module includes: A multi-scale feature extraction submodule is used to embed the acquired images into the backbone network through coordinate attention to generate multi-scale pedestrian feature maps; The feature enhancement submodule is used to pass the multi-scale pedestrian feature map through the native neck network to generate a multi-scale enhanced pedestrian feature map; The dynamic detection head enhancement submodule is used to pass the multi-scale pedestrian enhancement feature map through the dynamic detection head to generate a multi-scale pedestrian perception enhancement feature map. The output submodule is used to generate the campus pedestrian recognition map by passing the multi-scale pedestrian perception enhancement feature map through the decoupling head; The improved YOLOv8s model sequentially sets up a coordinate attention embedding backbone network, a native neck network, a dynamic detection head, and a decoupling head. The coordinate attention embedding backbone network includes a coordinate attention mechanism.

3. The digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to claim 2, characterized in that, The multi-scale feature extraction submodule includes: An initial feature extraction unit is used to pass the acquired image through an initial convolutional layer to generate an initial pedestrian feature map; The long-distance pedestrian feature extraction unit is used to sequentially pass the initial pedestrian feature map through the first C2f sub-network and the first coordinate attention mechanism to generate a long-distance pedestrian feature map; The mid-range pedestrian feature extraction unit is used to sequentially pass the long-range pedestrian feature map through the second C2f sub-network and the second coordinate attention mechanism to generate a mid-range pedestrian feature map; The close-range dense pedestrian feature extraction unit is used to sequentially pass the mid-range pedestrian feature map through the third C2f sub-network, the third coordinate attention mechanism, and the SPPF sub-network to generate a close-range dense pedestrian feature map. The coordinate attention embedding backbone network further includes a first C2f subnetwork, a second C2f subnetwork, a third C2f subnetwork, and an SPPF subnetwork. The coordinate attention mechanism includes a first coordinate attention mechanism, a second coordinate attention mechanism, and a third coordinate attention mechanism. The multi-scale pedestrian feature map includes a long-distance pedestrian feature map, a medium-distance pedestrian feature map, and a close-distance dense pedestrian feature map.

4. The digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to claim 2, characterized in that, The coordinate attention mechanism includes an x-axis average pooling layer, a y-axis average pooling layer, a feature concatenation operation, and a convolutional coding layer.

5. The digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to claim 2, characterized in that, The dynamic detection head enhancement submodule includes: A scale-aware attention enhancement unit is used to pass scale-aware attention to the hierarchical dimensions of the multi-scale pedestrian enhanced feature map to generate a hierarchical enhanced pedestrian feature map. The spatial perception attention enhancement unit is used to pass spatial perception attention to the spatial dimensions of the hierarchical perception enhancement pedestrian feature map to generate the multi-scale pedestrian perception enhancement feature map. The dynamic detection head includes scale-aware attention and spatial-aware attention.

6. The digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to claim 5, characterized in that, The scale-aware attention enhancement unit includes: A hierarchical attention mapping unit is used to pass the multi-scale pedestrian enhancement feature map through a fully connected network to generate hierarchical perception weights; The scale-aware attention weighting unit is used to broadcast the hierarchical perception weights to the spatial and channel dimensions, and then multiply them element-wise with the multi-scale pedestrian enhancement feature map to generate the hierarchical perception enhancement pedestrian feature map. The scale-aware attention includes a fully connected network.

7. The digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to claim 1, characterized in that, The regional pedestrian density analysis module includes: The neighbor distance calculation submodule is used to calculate the average distance between the current person and the set number of neighboring people based on the campus pedestrian recognition map; A perspective-weighted calculation submodule is used to generate a perspective-weighted Gaussian kernel based on the average distance and the average perspective factor of the entire image of the campus pedestrian recognition map; The regional personnel density calculation submodule is used to generate the regional personnel density by applying the perspective weighted Gaussian kernel of all personnel in the campus pedestrian recognition map to an adaptive Gaussian kernel density estimation algorithm.

8. The digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to claim 1, characterized in that, The regional access index calculation module includes: The passage speed calculation submodule is used to generate the ideal passage speed for pedestrians in the area by using the population density of the area and the digital twin campus data through a pedestrian flow model; The model area traffic index calculation submodule is used to calculate the area pedestrian traffic index based on the ratio of the ideal pedestrian speed to the free pedestrian speed in the area.

9. The digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to any one of claims 1 to 8, characterized in that, The campus emergency evacuation simulation module includes: The input projection submodule is used to pass multiple population access indices of the area through the input layer to generate population access distribution features; The LSTM trend prediction submodule is used to pass the distribution features of the pedestrian traffic situation through the LSTM layer to generate trend features of the pedestrian traffic situation. The fully connected regression calculation submodule is used to pass the trend characteristics of the personnel passage through the fully connected regression layer to generate a simulated and predicted personnel passage index; The evacuation prediction model includes an input layer, an LSTM layer, and a fully connected regression layer.

10. The digital twin campus emergency evacuation simulation and real-time dispatch and early warning system according to any one of claims 1 to 8, characterized in that, The campus evacuation scheduling and early warning decision module is used to determine whether the simulated predicted personnel passage index exceeds the threshold. If so, it uses a path planning algorithm to provide real-time evacuation path scheduling and early warning for recommended evacuation paths.

Citation Information

Patent Citations

  • Crowd density real-time monitoring method based on YOLOv5

    CN112668451A