Subway passenger flow dynamic statistics and real-time management and control method based on computer vision
By using computer vision technology in rail transit stations combined with YOLOv11 and SORT algorithms and queuing theory models, real-time dynamic monitoring and control of passenger flow is achieved, solving the problems of monitoring blind spots and response lag in traditional technologies, and improving monitoring accuracy and control efficiency.
Patent Information
- Application Number
- CN202510192770.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-06-10
AI Technical Summary
The existing passenger flow control technology in rail transit stations has shortcomings in real-time monitoring and refined management, especially during peak hours and emergencies. It is difficult to monitor the passenger flow distribution in key areas in real time, resulting in monitoring blind spots and data lag, and the traditional manual control method is lagging in response and inefficient.
The dynamic statistics and real-time management and control methods of subway passenger flow based on computer vision are adopted, and the YOLOv11 target detection algorithm and SORT target tracking algorithm are integrated to accurately obtain real-time dynamic data of passenger flow in the site, and quantitative analysis is carried out in combination with the queuing theory model to build a refined passenger flow control strategy.
It improves the real-time and accuracy of passenger flow monitoring, effectively alleviates passenger flow congestion during peak hours, optimizes the passenger flow distribution and resource utilization in the station, reduces manual intervention, and provides a scalable smart transportation solution.
Smart Images

Figure CN120126077A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of target detection, target tracking, and intelligent passenger flow control, and particularly relates to a method for dynamic statistics and real-time control of subway passenger flow based on computer vision. Background Art
[0002] Rail transit has been widely adopted globally due to its advantages such as large transportation capacity, high punctuality rate, and environmental friendliness. The efficient operation of the rail transit system not only supports the daily traffic needs of the city but also plays an important role in alleviating ground traffic pressure and promoting urban economic development.
[0003] At the same time, the densification of the rail transit network and the growth of passenger flow have also made in-station passenger flow management a key issue. During peak hours and special events, such as holidays and sudden public events, the passenger flow density in subway stations rises significantly, and areas such as transfer channels, turnstiles, and platforms are particularly crowded. This high-density passenger flow environment poses higher requirements for operation safety, passenger comfort, and dispatching efficiency.
[0004] In recent years, significant breakthroughs have been made in computer vision and deep learning technologies, especially the application of target detection and target tracking algorithms, providing new solutions for crowd monitoring in dynamic environments. Video detection technology can accurately perceive the spatio-temporal distribution characteristics of in-station passenger flow by real-time monitoring and analyzing the movement trajectories of passengers, providing accurate and dynamic data support for rail transit management. In addition, the queuing theory model in modern operations research performs well in the analysis and optimization of service systems, providing an important tool for the quantitative analysis of passenger flow patterns and the design of management strategies. These theories and technologies provide strong support for the intelligent development of rail transit.
[0005] The intelligent management of rail transit is becoming one of the important directions for future urban development. By integrating modern information technology, artificial intelligence, and operations research theory to construct a passenger flow control system centered on data-driven, not only can the operation efficiency be improved, but also the in-station safety and service level can be enhanced, laying a solid foundation for the efficient and intelligent operation of the rail transit system.
[0006] At present, the passenger flow control technology in rail transit stations has significant deficiencies in real-time monitoring and refined management. Existing monitoring methods mainly rely on the automatic ticket vending and checking system (AFC) to count the entry and exit data. Although this method can provide overall passenger flow trend information, it is difficult to monitor the passenger flow distribution in key areas such as transfer channels, gates and platforms in real time, resulting in monitoring blind spots and data lags. In addition, when dealing with sudden large passenger flows, traditional manual control methods, such as temporarily placing water barriers or deploying personnel to guide, rely on human judgment and operation, with delayed response and low efficiency, and it is difficult to quickly adapt to complex and dynamic passenger flow changes. The current technology lacks the ability to adjust passenger flow lines in specific areas and intelligent diversion, making congestion and even safety accidents prone to occur in high-density passenger flow areas.
[0007] Although some rail transit systems have introduced video surveillance equipment, most of them remain at the level of static image acquisition and monitoring, and fail to fully utilize modern deep learning technology for dynamic analysis and real-time decision-making. The intelligence level of existing technologies is limited, and there is still significant room for improvement in the refined management and automated control of passenger flow. Traditional methods cannot effectively adjust passenger flow lines dynamically, and lack quantitative analysis of queuing characteristics at service nodes (such as gates and security checkpoints), and fail to achieve data-driven real-time optimization.
[0008] Therefore, there is an urgent need for a method for dynamic statistics and real-time control of subway passenger flow based on computer vision. Summary of the invention
[0009] In order to solve the above technical problems, the present invention proposes a method for dynamic statistics and real-time control of subway passenger flow based on computer vision. By integrating the YOLO target detection algorithm and the SORT target tracking algorithm, the present invention can accurately obtain the real-time dynamic data of passenger flow in the station, fill the blind spots of key area monitoring, and dynamically count passenger flow. Combined with the key parameters of the queue length, waiting time, etc. of the queuing theory model, quantitative analysis is performed to build a refined passenger flow control strategy.
[0010] To achieve the above objectives, the present invention provides a method for dynamic statistics and real-time control of subway passenger flow based on computer vision, comprising:
[0011] Obtain passenger flow data to be detected;
[0012] Input the passenger flow data to be detected into a passenger flow dynamic detection model to obtain passenger flow statistics results, wherein the passenger flow dynamic detection model is constructed by a YOLO v11 target detection model and a SORT target tracking model, the YOLO v11 target detection model is used to detect passenger flow targets, and the SORT target tracking model is used to track and count passenger flow targets according to the target detection results;
[0013] Inputting the passenger flow statistics result into an automatic control model to obtain a passenger flow control result, wherein the automatic control model is constructed by a queuing theory model;
[0014] Based on the passenger flow control results, real-time management and control are carried out.
[0015] Optionally, the YOLO v11 target detection model is used to detect passenger flow targets including:
[0016] The passenger flow data to be detected is input into a YOLO v11 target detection model to obtain a target detection result, wherein the YOLO v11 target detection model is obtained by training a training set, and the training set consists of passenger flow video data.
[0017] Optionally, obtaining the training set includes:
[0018] Collect video data at different time periods;
[0019] intercepting the video data to obtain image data;
[0020] Annotating the image data to obtain the annotated image data;
[0021] Data enhancement is performed on the labeled image data to obtain the training set.
[0022] Optionally, the SORT target tracking model is used to track and count the passenger flow target according to the target detection result, including:
[0023] Inputting the target detection result into the SORT target tracking model to obtain the passenger's running trajectory;
[0024] According to the running trajectory, the passenger flow statistics result is obtained.
[0025] Optionally, obtaining passenger flow statistics results according to the running trajectory includes:
[0026] Calculating positions of different objects according to the running trajectory, wherein the positions of different objects are distinguished by assigning unique identifiers to different objects;
[0027] Based on the positions of the different objects, obtaining the center point position of the object;
[0028] Determine whether the object crosses the collision detection line according to the position of the center point, and obtain a determination result;
[0029] According to the judgment result, the passenger flow statistics result is obtained.
[0030] Optionally, according to the judgment result, obtaining the passenger flow statistics result includes:
[0031] Determine whether the ordinate of the center point is within a ordinate boundary range, and obtain a first determination result;
[0032] Determine whether the horizontal coordinate of the center point position is within the horizontal coordinate boundary range, and obtain a second determination result;
[0033] The center point of the object must meet the correct first judgment condition and the second judgment condition at the same time to be judged as crossing the collision detection line and then perform passenger flow statistics.
[0034] Optionally, inputting the passenger flow statistics result into an automatic control model to obtain the passenger flow control result includes:
[0035] Obtain control indicators;
[0036] According to the control indicator, a passenger flow threshold is obtained;
[0037] The passenger flow statistics result is controlled according to the passenger flow threshold to obtain the passenger flow control result.
[0038] Optionally, the control indicators include: system utilization, queue length in the system, average number of waiting people and average waiting time.
[0039] Optionally, according to the control indicator, obtaining the passenger flow threshold includes:
[0040] Based on the system utilization, obtaining a maximum passenger flow;
[0041] Based on the maximum passenger flow and the average number of waiting people, a maximum queue length is obtained;
[0042] Based on the maximum queue length, the queue space length is determined, and according to the queue space length and the average number of waiting people, the passenger flow threshold is obtained.
[0043] Compared with the prior art, the present invention has the following advantages and technical effects:
[0044] 1. Improve the real-time and accuracy of passenger flow monitoring:
[0045] By using the YOLOv11 target detection algorithm and the SORT target tracking algorithm, the present invention can detect and track the position and movement trajectory of each object in the station in real time, greatly improving the real-time and accuracy of passenger flow monitoring. Compared with the traditional passenger flow statistics method that relies on the AFC system, the present invention can provide dynamic and accurate passenger flow data in key areas of the station (such as transfer channels, gates, etc.), ensuring that each frame of data can reflect the changes in passenger flow in a timely manner.
[0046] 2. Effectively alleviate passenger congestion during peak hours:
[0047] Combined with the queuing theory model, the present invention can conduct real-time quantitative analysis of the queue length and waiting time of each service node of the station, and adjust the object flow line and channel width through the intelligent water barrier automatic control system to avoid excessive congestion in local areas. During peak hours, the system can intelligently adjust the position of the water barrier to ensure the orderly flow of passengers, thereby significantly reducing congestion in rail transit stations.
[0048] 3. Optimize passenger flow distribution and resource utilization within the station:
[0049] The present invention provides a data-driven refined passenger flow control strategy, which dynamically optimizes the passenger flow allocation plan by real-time monitoring and analyzing the passenger flow density of each area. This optimization not only improves the passenger flow balance within the station, but also improves the resource utilization efficiency, so that the load of each service node is kept within a reasonable range, avoiding resource waste and unnecessary waiting.
[0050] 4. Intelligent management and reduced manual intervention:
[0051] By combining deep learning, target tracking and automated control systems, the present invention significantly reduces the need for manual intervention. Traditional manual passenger flow control methods are not only inefficient, but also easily affected by human factors. However, the present invention can automatically respond to passenger flow changes in different scenarios through intelligent passenger flow monitoring and dynamic regulation, reducing the workload and error rate of manual scheduling, and improving control efficiency and accuracy.
[0052] 5. Provide scalable smart transportation solutions:
[0053] The present invention is not only applicable to the optimization of existing rail transit systems, but also has strong scalability and adaptability. Its solution based on video surveillance and target tracking can flexibly adapt to stations of different sizes and structures, and provide a customizable passenger flow control system. This provides technical support for the development of future smart city traffic management, and can be integrated with other intelligent transportation systems to promote the intelligent development of rail transit. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0055] Figure 1 This is a flow chart of a method for dynamic statistics and real-time control of subway passenger flow based on computer vision according to an embodiment of the present invention;
[0056] Figure 2 is a schematic diagram of a video data shooting scene according to an embodiment of the present invention;
[0057] Figure 3 is a schematic diagram of a marking operation interface according to an embodiment of the present invention;
[0058] Figure 4 is a schematic diagram of a labeling result according to an embodiment of the present invention;
[0059] Figure 5 is a schematic diagram of a data enhancement process according to an embodiment of the present invention;
[0060] Figure 6 is a schematic diagram of an example of passenger flow detection according to an embodiment of the present invention;
[0061] Figure 7 1 is a schematic diagram of the performance analysis of the YOLO v11 model according to an embodiment of the present invention, wherein (a) is a schematic diagram of a confusion matrix, (b) is a schematic diagram of a precision-recall curve, and (c) is a schematic diagram of an F1-confidence curve;
[0062] Figure 8 It is a dynamic change diagram of the training and verification loss of the YOLO v11 model according to an embodiment of the present invention;
[0063] Figure 9 The present invention is a schematic diagram of a dynamic simulation of the lifting of water barriers in an embodiment of the present invention, wherein (a) is a schematic diagram of only raising the first section of water barriers or not raising the water barriers when the passenger flow rate is low, (b) is a schematic diagram of raising the second section of water barriers as the passenger flow rate continues to increase, and (c) is a schematic diagram of raising all water barriers when the passenger flow rate reaches the maximum. DETAILED DESCRIPTION
[0064] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0065] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0066] This embodiment proposes a method for dynamic statistics and real-time control of subway passenger flow based on computer vision. Figure 1 As shown, the specific steps include:
[0067] Obtain passenger flow data to be detected;
[0068] The passenger flow data to be detected is input into the passenger flow dynamic detection model to obtain the passenger flow statistical results. The passenger flow dynamic detection model is constructed by the YOLO v11 target detection model and the SORT target tracking model. The YOLO v11 target detection model is used to detect the passenger flow target, and the SORT target tracking model is used to track and count the passenger flow target according to the target detection results.
[0069] Inputting the passenger flow statistics result into the automatic control model to obtain the passenger flow control result, wherein the automatic control model is constructed by a queuing theory model, and the queuing theory model is used to control the passenger flow by dynamically adjusting the lifting length of the water dragon;
[0070] Carry out real-time management and control based on passenger flow control results.
[0071] This embodiment combines the YOLOv11 target detection algorithm with the SORT target tracking algorithm to accurately identify the distribution and dynamic trajectory of passengers in the subway station, and realize real-time statistics and dynamic monitoring of passenger flow; based on the above data, combined with the M / M / N FCFS queuing theory model, quantitatively analyze key parameters such as queue length and waiting time of station service nodes. By integrating computer vision real-time statistical methods and queuing theory models, an intelligent passenger flow control method is constructed. The present invention can dynamically adjust the placement timing, location and length of the water horse device according to the real-time passenger flow, reduce congestion and safety hazards in the station, while reducing manual intervention and saving human resources, and improving the level of intelligence of rail transit operation management.
[0072] Furthermore, the YOLO v11 target detection model is used to detect passenger flow targets including:
[0073] The passenger flow data to be detected is input into the YOLO v11 target detection model to obtain the target detection result, wherein the YOLOv11 target detection model is obtained by training the training set, and the training set consists of passenger flow video data.
[0074] Furthermore, obtaining a training set includes:
[0075] Collect video data at different time periods;
[0076] Intercept the video data to obtain image data;
[0077] Annotate the image data to obtain the annotated image data;
[0078] Perform data augmentation on the labeled image data to obtain a training set.
[0079] Specifically, ① Data collection:
[0080] The images in the dataset are all taken from video data of gates, escalators, transfer passages, platforms, etc. in a certain provincial capital city subway station from 7 monitoring angles at different time periods in the morning, noon and evening. Figure 2 As shown in the figure, the duration of a single camera video is 2 minutes.
[0081] Based on the captured video data and the FFmpeg open source tool, we captured a screenshot of the video every second with original quality and original size, and manually screened the key frames with more passengers in all the screenshots, and screened out a total of 513 images. The angles of passengers in the shooting screen vary greatly, and some passengers under monitoring have their backs to the camera, which makes the learned feature angles more diverse; some passengers in the transfer channel are scattered and have no obvious distribution pattern, which makes the learned features more concentrated on the detection target itself; most passengers on the platform are in side postures, which makes the features learned by the algorithm more comprehensive.
[0082] ②Data annotation:
[0083] Based on the collected image data and T-Rex Label annotation tool, all the passenger heads in a total of 513 images were annotated with rectangular frames instead of the passenger's entire body to reduce the impact of passengers' body occlusion on the detection accuracy. Figure 3 Based on the cross positioning of the annotation tool, the passenger's head is placed in the largest bounding rectangle until all the objects in the picture are annotated, and the label of the annotated object is set to "person".
[0084] The annotation results of each image in the dataset are stored in a separate txt file. Figure 4 As shown, the stored content is the pixel coordinates of the four vertices of all rectangular boxes.
[0085] A total of 4009 detection targets were annotated in 513 images as the passenger head dataset in the rail transit station scene, which is used to train the YOLOv11 target detection algorithm for monitoring passenger heads in the rail transit station scene. Each detection object in the dataset is accurately marked. Figure 3 The boxes in the figure are the annotation results. Training the target detection algorithm based on the passenger head dataset can improve its accuracy in detecting passenger heads at different angles and scales.
[0086] ③Data enhancement:
[0087] In the data enhancement part, this paper introduces the strategy proposed by YOLOX to turn off Mosaic in the last 10 epochs. Assuming that the total number of training epochs is 500, given that different models have different requirements for data enhancement intensity, some hyperparameters will be adjusted for models of different scales. For example, large-scale models usually enable technologies such as MixUp and CopyPaste.
[0088] like Figure 5 As shown in the figure, YOLOv11 enhances the images during training. In each training cycle, the model observes slightly different changes in the image. Among them, one of the more important enhancement methods is mosaic enhancement. This method stitches four images together to force the model to learn the characteristics of the target in new positions, partial occlusions, and different background pixels. However, practical experience shows that if this enhancement method is used continuously throughout the training process, it may lead to performance degradation. Therefore, disabling mosaic enhancement in the last ten training cycles helps improve the performance of the model.
[0089] Furthermore, the SORT target tracking model is used to track and count passenger flow targets based on target detection results, including:
[0090] Input the target detection results into the SORT target tracking model to obtain the passenger's running trajectory;
[0091] Obtain passenger flow statistics results based on the running trajectory.
[0092] Specifically, in the scenario of rail transit stations, in order to count the number of short-term passenger flows in the monitoring screen, it is necessary to process the real-time monitoring video data of single transfer channels, gates, escalators, platforms and other scenarios in the station in real time, so as to obtain the passenger flow at the corresponding time granularity and input it into the subsequent model to calculate the passenger flow in the corresponding scenario.
[0093] The model constructed in this embodiment consists of two parts: an in-station passenger flow detection algorithm and a refined passenger flow control algorithm. Among them, the in-station passenger flow detection algorithm is constructed by target detection and target tracking algorithms. The factors affecting the passenger flow detection results mainly include the number of frames, angles, resolutions, density and overlap of passengers in the picture, and the accuracy of passenger detection taken by the surveillance camera. Among them, the angle of shooting scenes in rail transit stations is fixed, and the resolution of the output picture can be set, so the impact of both on the passenger flow detection results can be ignored. The difficulty of the passenger flow detection part lies in how to process the number of frames of the input video to balance the real-time and accuracy of the detection. The factors that affect the accuracy of passenger flow control are the accuracy of passenger flow detection and the accuracy of the control algorithm. To simplify the expression, the trained YOLOv11 target detection algorithm is subsequently represented as f 1 (x), simplify the SORT target tracking algorithm expression to f2 (x).
[0094] In order to detect passenger flow in the station and fine-tune short-term passenger flow control, it is first necessary to detect and track the passengers in the video to obtain the number of passengers and the passenger flow time series. The Detect model can be expressed as:
[0095] Y=f 2 (f 1 (X)
[0096] Where:
[0097] X——surveillance video data;
[0098] Y——Refined short-term passenger flow control results under normal scenarios;
[0099] f 1 (x)——The trained YOLOv11 object detection algorithm;
[0100] f 2 (x)——SORT target tracking algorithm;
[0101] Object detection algorithm 1 The training set of (x) consists of each collected image and its annotation, which can be expressed as:
[0102]
[0103] Where:
[0104] i——the serial number of the input image, the maximum number of images taken is n=2428;
[0105] m i ——The number of detected targets marked on the i-th image;
[0106] ——The i-th image, the m-th image i The center point coordinates of the labeled objects;
[0107] ——The i-th image, the m-th image i The width and height of the annotated object detection box;
[0108] based on The YOLOv11 target detection algorithm is trained to obtain a YOLOv11 algorithm suitable for scenes in rail transit stations and detecting passengers as the target. The YOLOv11 algorithm before and after training can be expressed as:
[0109]
[0110] Where:
[0111] f' 1 ——YOLOv11 algorithm before training;
[0112] f 1 ——The trained YOLOv11 algorithm.
[0113] Based on the trained YOLOv11 algorithm f 1 , get the detected target coordinates f in each frame of the input video 1 (X j ), and input it into the SORT target tracking algorithm f 2 In the process, the detection target is tracked frame by frame to obtain the passenger's running trajectory, and then the number of passengers in the video is counted to obtain the statistical result Y j Therefore, with the surveillance video data X as input, the target detection algorithm f 1 And the target tracking algorithm f 2 , the passenger flow time series recognition result can be obtained:
[0114] y j =f 2 (f 1 (X j )
[0115] Where:
[0116] X j ——Surveillance video data of the jth time period;
[0117] Y j ——The passenger flow detection result in the jth time period. This embodiment performs passenger flow time series statistics with a time granularity of 15 minutes.
[0118] Furthermore, according to the running trajectory, obtaining passenger flow statistics results includes:
[0119] Calculate the positions of different objects according to the running trajectories, wherein the positions of different objects are distinguished by assigning unique identifiers to different objects;
[0120] Based on the positions of different objects, obtain the center point position of the object;
[0121] Determine whether the object crosses the collision detection line based on the center point position and obtain the judgment result;
[0122] According to the judgment result, the passenger flow statistics result is obtained.
[0123] Specifically, in each frame, the collision detection process begins with updating the position and state of each tracked object. Specifically, the system calculates and updates the position of each object using the object's velocity, acceleration, and time step. The position of each object is represented by a bounding box, which contains the coordinates of the upper left corner (x 1 ,y 1 ) and the lower right corner coordinate (x 2 ,y 2 ), these coordinates define the spatial range of the object in the image. At the same time, each object is also assigned a unique identifier (obj_id) to distinguish different objects.
[0124] After the bounding box of the object is determined, the coordinates of the center point of the object are calculated. x ,center y ),in:
[0125]
[0126] These center point coordinates are used for subsequent collision detection.
[0127] The core of collision detection is to determine whether an object crosses a preset detection line. In this model, we define two collision detection lines: the left detection line and the right detection line. The position of each detection line is determined by the left y and right y Indicates that these variables represent the vertical coordinates of the detection line, and left x1 ,left x2 and right x1 ,right x2 It represents the horizontal coordinate range of the detection line.
[0128] Furthermore, according to the judgment result, obtaining the passenger flow statistics result includes:
[0129] Determine whether the ordinate of the center point is within the ordinate boundary range, and obtain a first determination result;
[0130] Determine whether the horizontal coordinate of the center point is within the horizontal coordinate boundary range, and obtain a second determination result;
[0131] The center point of the object must meet the correct first judgment condition and the second judgment condition at the same time to be judged as crossing the collision detection line and then perform passenger flow statistics.
[0132] Specifically, every time the center point position of an object is updated, the system checks whether the object crosses the collision detection line. The specific judgment method is: if the vertical coordinate (center y) is within the upper and lower boundaries of the collision line (for example, the ordinate of the left collision line is left y Fluctuates up and down by 10 pixels), and the horizontal coordinate of the object (center x ) is within the horizontal coordinate range of the collision line (such as left x1 <center x <left x2 ), the object is considered to have crossed the left collision detection line. The judgment process for the right collision line is similar.
[0133] Once an object crosses the collision detection line, the system will respond to the collision. Specifically, the system checks whether the object's obj_id has been recorded in the object count list on the left or right (i.e., man_id_count). If the object's obj_id has not been recorded, it means that the object has crossed the detection line for the first time, so the object's obj_id is added to the corresponding count list to record the object's passage.
[0134] Whenever an object passes through the collision detection line, the system will draw a green line segment in the image to mark the location of the collision detection line, and display the number of objects currently passing through the line through a text box. The number of objects passing through the left collision detection line is counted by the length of the man_id_count list. These statistics are updated in real time and displayed on the image through the cvzone.putTextRect function, helping to monitor the number of objects passing through the detection line in the station in real time.
[0135] Furthermore, the passenger flow statistics result is input into the automatic control model, and the passenger flow control result is obtained including:
[0136] Obtain control indicators;
[0137] According to the control index, obtain the passenger flow threshold;
[0138] The passenger flow statistics result is controlled according to the passenger flow threshold to obtain the passenger flow control result.
[0139] Furthermore, the control indicators include: system utilization, queue length in the system, average number of people waiting, and average waiting time.
[0140] Furthermore, according to the control index, obtaining the passenger flow threshold includes:
[0141] Get the maximum passenger flow based on system utilization;
[0142] Based on the maximum passenger flow and the average number of people waiting, the maximum queue length is obtained;
[0143] Based on the maximum queue length, the queue space length is determined, and the passenger flow threshold is obtained according to the queue space length and the average number of waiting people.
[0144] Specifically, water barriers are brightly colored plastic shell barriers used to divide the road surface or form a barrier, usually used in traffic management, security, emergency evacuation and other scenarios. They can effectively block or guide the flow of people. The main purpose of water barriers in subways is to improve safety, separate different areas, guide passenger flow, and prevent conflicts and accidents. The specific functions are as follows:
[0145] (1) Guiding passenger flow: In high-traffic areas such as subway station entrances and exits and transfer passages, water barriers can be used to divide the flow of people and guide passengers to walk along the prescribed routes to avoid congestion or stampede accidents caused by crowds. Especially during peak hours, the use of water barriers can effectively disperse the flow of people and reduce channel blockage.
[0146] (2) Avoid cross flow: Water barriers can effectively separate the flow of passengers entering and leaving the station, avoid cross flow of passengers entering and leaving the station, and reduce congestion and unsafe factors caused by different flow directions.
[0147] (3) Emergency exit protection: In some subway stations and carriages, water barriers can also be used to protect emergency exit areas to ensure that passengers can pass through the emergency passage smoothly in the event of an emergency.
[0148] (4) Separation of temporary demand areas: During special events in the subway (such as exhibitions, concerts, events, etc.), water barriers are used to demarcate temporary passages or queuing areas, allowing people to participate in the event in a more orderly manner and avoiding overcrowding of the venue.
[0149] According to the actual situation of rail transit, we choose the M / M / N FCFS model to describe the passenger arrival situation. M / M / 1 is used to describe the situation where both the arrival process and the service process follow an exponential distribution and there is only one service window in the system. In the security inspection scenario of rail transit, the M / M / N FCFS model is suitable for describing the service process of multiple security inspection channels:
[0150] (1) Arrival process: The arrival of passengers is random and conforms to the Poisson distribution, with an average arrival rate of λ.
[0151] (2) Service process: The service time at the security checkpoint is also random and conforms to the exponential distribution, and its average service rate is μ.
[0152] (3) Number of service desks: Each security checkpoint can be regarded as a service desk, which conforms to the description of the M / M / N FCFS model.
[0153] Through this model, we can quantify the key performance indicators of the system, including system utilization, queue length, average number of waiting people and average waiting time, thereby providing a scientific basis for the raising and regulation of water barriers.
[0154] In the M / M / N queuing model, the following are the main parameters related to the security checkpoint water barrier control and their calculation methods:
[0155] (1) System utilization
[0156]
[0157] The system utilization rate indicates how busy the security checkpoint is. When the ρ value is less than 1, the water barrier will not be raised. When the ρ value is greater than 1, the water barrier will be raised according to the intensity of passenger arrival.
[0158] (2) Average number of people in the system
[0159]
[0160] Represents the average number of people in the system, including passengers going through security screening and waiting passengers.
[0161] (3) Average number of people waiting in the queue
[0162]
[0163] Represents the average number of passengers queuing at the security checkpoint.
[0164] (4) Average waiting time
[0165]
[0166] It indicates the average waiting time of passengers from the time they arrive at the security checkpoint to the time they start receiving service.
[0167] Based on the analysis results of queuing theory, we can dynamically adjust the height of the water barrier to ensure the smooth flow of the security inspection channel and the safety of passengers. The specific control strategy is as follows:
[0168] (1) Determine the maximum passenger flow
[0169] By analyzing historical data and real-time monitoring, the maximum passenger arrival rate λ during peak hours is determined max .
[0170] (2) Calculate the maximum queue length
[0171] Use L qmax Calculate the maximum possible number of people in the queue and determine the length of the queue area that needs to be reserved based on the number of people in the queue.
[0172] (3) Design of water barrier length
[0173] According to L qmax , determine the length of the queue space that needs to be reserved. Assume that each passenger occupies space per_person (including the distance between people), the total length of the water barrier is:
[0174] L wm =L q ×space per_person
[0175] This ensures that there is no overflow in the queuing area during peak periods.
[0176] (4) Real-time adjustment strategy:
[0177] When the system detects that the passenger flow is close to or exceeds the set threshold, it automatically controls the length of the water barrier to increase the queuing area, ensuring that passengers do not overflow into the main channel when queuing, avoiding congestion. At the same time, when the passenger flow decreases, the water barrier will automatically retract and restore the normal passage width to maintain the efficiency and flexibility of the channel.
[0178] The present embodiment is described in detail below with reference to the accompanying drawings:
[0179] 1. Construction of real-time passenger flow dynamic detection model based on YOLO v11 target detection algorithm and SORT target tracking algorithm
[0180] The goal of the passenger flow detection algorithm within the station is to count the number of passengers in the scene and extract its passenger flow time series. Before performing refined short-term passenger flow control in scenes such as gates in rail transit stations, it is first necessary to detect and count the number of passengers in each scene. This embodiment is based on the existing video surveillance equipment in the rail transit station, with the help of target detection algorithms and target tracking algorithms in the field of computer vision, and counts the number of passengers according to the passage of each passenger in the picture. It should be noted that there is a problem of mutual occlusion between passengers in the video. Since the viewing angle of video surveillance in rail transit stations is usually high and the head occlusion is relatively light, the detection target is set to the passenger's head to reduce the impact of mutual occlusion on the detection accuracy when the passengers are dense in the picture.
[0181] The target detection algorithm and the target tracking algorithm need to be determined according to the specific scenario of the research. The research of the implementation example needs to process each frame of image data of the video surveillance in the rail transit station in real time. Under this condition, to achieve real-time target detection of video frames, the algorithm needs to process a huge amount of calculations per second, and it is necessary to sacrifice appropriate accuracy requirements to improve the detection speed of the model. Therefore, considering the single-stage target detection method to construct the in-station passenger flow detection algorithm, combined with the lightweight requirements of the subsequent deployment of the model, the YOLOv11 target detection algorithm is selected to construct the in-station passenger flow detection algorithm. The target tracking algorithm selects the SORT target tracking algorithm with high tracking accuracy and low algorithm complexity.
[0182] The present invention adopts the YOLOv11 target detection algorithm, which is a lightweight improvement of the series of algorithms and further optimizes the detection speed. It is more suitable for detecting rail transit scenarios that need to meet real-time requirements and need to be deployed and applied. The Backbone structure in the YOLOv11 algorithm is responsible for extracting information from the image, and the extracted information increases with the deepening of the number of convolution layers. From shallow physical information, such as contour features, to deep semantic information, such as passenger characteristics. The C3 layer in Backbone constructs a residual structure to solve the gradient divergence problem caused by the increase in the number of network layers. The SPP layer is added between the last convolution layer and the fully connected layer of Backbone for pooling, so that the fully connected layer can also adapt to input images of different scales. Neck generates a feature pyramid with the extracted information to detect targets of different scales, and the detection results of different scales are output from different convolution layers at the Head end.
[0183] The SORT target tracking algorithm re-identifies the passengers in each input frame image based on the detection algorithm with the passenger head as the target, so as to obtain the passenger's running trajectory. Among them, the core algorithms of SORT are the Kalman filter algorithm and the Hungarian algorithm, which are used to control and cascade match the target detection frame of the next frame and IOU matching respectively. Through continuous control and matching process, the passenger's running trajectory is obtained. The SORT weights used in this embodiment are the weights obtained after training on a large pedestrian re-identification dataset.
[0184] The midpoint on the left side of the passenger detection frame is defined as the collision point. Figure 6 Set two horizontal center detection lines in the monitoring screen, such as Figure 6The red detection line in the image. The direction and number of passengers in the image are determined according to the order in which the red calibration points of the passenger's running trajectory pass through the horizontal detection lines in the image. Specifically, if the calibration points pass through two detection lines in sequence, the number of passengers in the corresponding passing direction will increase by one unit. For example, if the passenger with ID number 64 passes through the red line, the number of passengers will increase by one. Finally, the time series data of the number of passengers passing at a time granularity of 15 minutes is output and input into the subsequent short-term passenger flow control algorithm in real time.
[0185] In order to clearly demonstrate the excellent performance of the model in the "person" category detection task, we introduced the following key processes and related data charts to comprehensively analyze the model's classification accuracy, detection accuracy, confidence adaptability, and training convergence.
[0186] like Figure 7 As shown in (a), the confusion matrix clearly shows the good performance of the model in detecting the "person" category. The model correctly identified 2668 "person" categories, which shows a high detection accuracy. This shows that the YOLOv11 model can effectively extract human features in complex backgrounds, and the classification module is particularly accurate for the "person" category, especially in capturing target details.
[0187] In addition, the number of backgrounds that were mistakenly identified as "person" was 768, and the misidentification ratio was relatively low, indicating that the model has a certain ability to suppress non-targets, and can reduce interference and improve detection reliability when the background is complex. The number of missed detections was 573, showing a high detection sensitivity (recall rate). In practical applications, this performance is particularly important. For example, in crowded monitoring scenarios, it can effectively reduce the risk of missed detection and false alarms.
[0188] like Figure 7 As shown in (b), the precision-recall curve shows the detection stability of the model under different recall conditions. It can be observed that when the recall rate reaches about 0.8, the model still maintains a high precision, which reflects the model's ability to effectively control false positives under high coverage.
[0189] The curve remains close to 1 in the range of recall rate 0 to 0.7, showing a high degree of robustness, indicating that the model can maintain stable detection performance at different confidence levels. This stability is particularly suitable for tasks that require comprehensive capture of targets, such as security and crowd monitoring, to ensure that most target instances are detected while reducing unnecessary alarms caused by false positives. The average precision (mAP@0.5) of the model is 0.836, which further verifies the excellent performance of the model under various target scales and complex background conditions, showing strong generalization ability and detection accuracy.
[0190] In order to reveal the performance of the model under different confidence conditions, this example analyzes the F1-confidence curve. The F1 score is a weighted harmonic mean of precision and recall, which is used to comprehensively evaluate classification performance. The value of the F1 score is between 0 and 1. The higher the value, the better the balance between precision and recall of the model.
[0191]
[0192] like Figure 7 As shown in (c), the F1-confidence curve reflects the comprehensive balance between the model's precision and recall under different confidence thresholds. The highest point of the model's F1 value is close to 0.80, and the corresponding confidence threshold is 0.472, which shows that the model can achieve a good balance between detection accuracy and coverage.
[0193] The curve maintains a high F1 value in the confidence range of 0.2 to 0.8, indicating that the model performance remains stable in a wide confidence interval. This performance is particularly important for practical applications, because the confidence threshold may need to be flexibly adjusted in different scenarios, while the model can still maintain reliable performance. For example, in rigorous security detection tasks, a higher confidence level can be selected to reduce false positives; while in monitoring dense crowds, a lower confidence level can be selected to reduce missed detections.
[0194] This curve also shows that the detection stability of the model is not only reflected in the peak value, but also in its ability to adapt to different detection needs, enabling it to achieve better performance in various complex scenarios.
[0195] like Figure 8 As shown in the figure, the loss functions (including box_loss, cls_loss and dfl_loss) all show a significant downward trend during the training process, indicating that the model is continuously optimized and has good convergence. In particular, the downward trend of the validation set loss is consistent with that of the training set loss, indicating that the model does not have obvious overfitting during the learning process. This consistency further verifies the model's ability to generalize unseen data and is suitable for practical applications in diverse scenarios.
[0196] The precision and recall indicators gradually increase with the increase of training rounds, and finally stabilize, reaching about 0.8 respectively. This shows that the model can detect most target instances with relatively few false positives. In particular, mAP@0.5 reaches above 0.8, reflecting that the model can achieve high-quality target detection results at various confidence thresholds.
[0197] The downward trend of the loss function also shows that the model's ability to extract target features gradually increases during training, and both classification (cls_loss) and positioning (box_loss) performance are optimized. Finally, the stability of the loss is verified, ensuring the robustness and reliability of the model in actual use.
[0198] 2. Real-time water-horse automatic control model based on queuing theory algorithm:
[0199] like Figure 9 As shown in (a)-(c), by constructing a virtual model of the subway station in 3D Max, the spatial layout, facility configuration and dynamic elements in the subway station, such as platforms, stairs, elevators, entrances and exits, escalators, etc., are accurately restored. The detailed modeling of these structures and elements lays the foundation for the subsequent passenger behavior simulation. The layout of each facility and the division of functional areas in the model take into account the spatial limitations and personnel flow rules in the actual scene, thus providing a highly realistic environment for simulation.
[0200] The present invention combines particle systems with path animation technology to model the flow of a large number of passengers. The behavior of each passenger can be simulated by defined rules, which is expressed as a path from the subway entrance to the platform or exit. During peak hours, the flow pattern of passengers shows certain randomness and collective behavior characteristics, which are achieved by adjusting path planning and simulating the interaction between passengers. In addition, the speed, path selection and behavioral response of passengers (such as route changes when encountering congestion) are reflected in the simulation, further enhancing the authenticity of the model.
[0201] 3. Real-time control measures for dynamic passenger flow:
[0202] (1) As the passenger flow in the subway station gradually increases, the system detects the congestion in a certain area in real time through monitoring data, and automatically activates the lifting mechanism of the water barrier (mobile isolation fence) to effectively guide the flow of people and prevent excessive congestion. When the passenger flow reaches the preset threshold, the video surveillance system will first capture the abnormal increase in the density of people at the security checkpoint in the station. The system analyzes real-time data to identify risk points where potential crowds gather. This process usually involves real-time assessment of the number of people in the camera image, their movement speed, and the degree of congestion.
[0203] (2) Once it is confirmed that diversion is necessary, the control system will automatically trigger the water barrier to rise. The water barrier is operated by an electric control device. When the system sends a signal to rise, the water barrier hidden under the ground will rise quickly to form a physical barrier to guide the flow of people from high-density areas to more unobstructed areas. The raising process of the water barrier is usually very fast to ensure that the channel adjustment is completed in a short time and to minimize congestion and personnel retention.
[0204] (3) When the water barriers are raised, the system will combine other management measures, such as adjusting the degree of openness of entrances and exits, or instructing passengers to evacuate through different paths, to further alleviate congestion pressure. The raising and automatic adjustment of the water barriers are based on real-time monitoring data and feedback from system algorithms to ensure that passenger flow in subway stations is managed in a timely and effective manner.
[0205] This process not only improves the passenger travel efficiency, but also provides a flexible and intelligent control method for subway station management. Through the combination of automated facilities and real-time data, it effectively improves the emergency response capability and the accuracy of passenger flow control.
[0206] (4) In terms of dynamic data generation and analysis, 3D Max can generate rich passenger flow data based on simulation results of different time periods and emergencies. These data include but are not limited to the number of passengers, distribution within the station, regional congestion level, etc., and can reflect the impact of different control measures on passenger flow. During peak hours or emergencies, the system can adjust simulation parameters in a timely manner to verify the real-time effects of train scheduling, entrance and exit management, and other control measures. Through this process, the research can not only optimize the existing passenger flow management strategy, but also provide quantitative decision support for the design and operation of future subway stations.
[0207] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for dynamic statistics and real-time control of subway passenger flow based on computer vision, characterized in that: include: Obtain passenger flow data to be detected; Input the passenger flow data to be detected into a passenger flow dynamic detection model to obtain passenger flow statistics results, wherein the passenger flow dynamic detection model is constructed by a YOLO v11 target detection model and a SORT target tracking model, the YOLO v11 target detection model is used to detect passenger flow targets, and the SORT target tracking model is used to track and count passenger flow targets according to the target detection results; Inputting the passenger flow statistics result into an automatic control model to obtain a passenger flow control result, wherein the automatic control model is constructed by a queuing theory model; Based on the passenger flow control results, real-time management and control are carried out.
2. According to the computer vision-based subway passenger flow dynamic statistics and real-time control method of claim 1, it is characterized in that: The YOLO v11 target detection model is used to detect passenger flow targets including: The passenger flow data to be detected is input into a YOLO v11 target detection model to obtain a target detection result, wherein the YOLO v11 target detection model is obtained by training a training set, and the training set consists of passenger flow video data.
3. According to claim 2, a method for dynamic statistics and real-time control of subway passenger flow based on computer vision is characterized in that: Acquiring the training set includes: Collect video data at different time periods; intercepting the video data to obtain image data; Annotating the image data to obtain the annotated image data; Data enhancement is performed on the labeled image data to obtain the training set.
4. According to claim 2, a method for dynamic statistics and real-time control of subway passenger flow based on computer vision is characterized in that: The SORT target tracking model is used to track and count passenger flow targets according to target detection results, including: Inputting the target detection result into the SORT target tracking model to obtain the passenger's running trajectory; According to the running trajectory, the passenger flow statistics result is obtained.
5. According to claim 4, a method for dynamic statistics and real-time control of subway passenger flow based on computer vision is characterized in that: According to the running track, obtaining passenger flow statistics results includes: Calculating positions of different objects according to the running trajectory, wherein the positions of different objects are distinguished by assigning unique identifiers to different objects; Based on the positions of the different objects, obtaining the center point position of the object; Determine whether the object crosses the collision detection line according to the position of the center point, and obtain a determination result; According to the judgment result, the passenger flow statistics result is obtained.
6. The method for dynamic statistics and real-time control of subway passenger flow based on computer vision according to claim 5, characterized in that: According to the judgment result, obtaining the passenger flow statistics result includes: Determine whether the ordinate of the center point is within a ordinate boundary range, and obtain a first determination result; Determine whether the horizontal coordinate of the center point position is within the horizontal coordinate boundary range, and obtain a second determination result; The center point of the object must meet the correct first judgment condition and the second judgment condition at the same time to be judged as crossing the collision detection line and then perform passenger flow statistics.
7. The method for dynamic statistics and real-time control of subway passenger flow based on computer vision according to claim 1, characterized in that: Inputting the passenger flow statistics result into the automatic control model to obtain the passenger flow control result includes: Obtain control indicators; According to the control indicator, a passenger flow threshold is obtained; The passenger flow statistics result is controlled according to the passenger flow threshold to obtain the passenger flow control result.
8. The method for dynamic statistics and real-time control of subway passenger flow based on computer vision according to claim 7, characterized in that: The control indicators include: system utilization, queue length in the system, average number of waiting people and average waiting time.
9. The method for dynamic statistics and real-time control of subway passenger flow based on computer vision according to claim 8, characterized in that: According to the control indicator, obtaining the passenger flow threshold includes: Based on the system utilization, obtaining a maximum passenger flow; Based on the maximum passenger flow and the average number of waiting people, a maximum queue length is obtained; Based on the maximum queue length, the queue space length is determined, and according to the queue space length and the average number of waiting people, the passenger flow threshold is obtained.
Citation Information
Patent Citations
Road network cooperative passenger-flow-limiting modeling and evaluating method fusing entry and transfer control
CN108537408A
Passenger flow statistics method, electronic equipment and storage medium
CN112669349A
Urban rail transit passenger flow control optimization method based on fluid queuing network
CN112906179A
Method for estimating and early warning passenger flow retained in real time in subway station
CN113343960A
Method for identifying and predicting passenger flow in rail transit station based on computer vision
CN114612860A
Cited By
Subway passenger information sensing method, device and system
CN120494443A
Subway station area passenger flow detection and analysis method based on multi-mode perception capability
CN121884287A
Path grooming method and device, electronic equipment and program product
CN122473868A