Public transport passenger flow identification method, device and equipment
By installing image acquisition equipment on buses to obtain videos from the front door, rear door, and inside the vehicle, and using a target tracking model to identify passenger movement trajectories, the problem of low accuracy and efficiency in bus passenger flow information statistics has been solved, and accurate passenger boarding and alighting identification has been achieved.
Patent Information
- Application Number
- CN202510901185.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-11-11
AI Technical Summary
The accuracy and efficiency of public transport passenger flow statistics in existing technologies are low. Traditional methods are labor-intensive and resource-intensive and have limited sample sizes. Methods based on public transport card swiping data cannot accurately obtain passenger boarding and alighting locations.
By installing image acquisition devices on buses, video footage from the front door, rear door, and inside the vehicle is obtained. A target tracking model is used to determine the passenger's movement trajectory, and combined with preset boarding/alighting areas and bus arrival information, passenger boarding and alighting information is identified.
It improves the accuracy and efficiency of public transport passenger flow statistics, accurately identifies passenger boarding and alighting behavior, and meets the requirements of real-time performance and accuracy.
Smart Images

Figure CN120932170A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent public transport management technology, and in particular to a method, device and equipment for identifying public transport passenger flow. Background Technology
[0002] In urban transportation systems, buses serve as a core public transportation tool, and origin-destination (OD) information for bus passenger flows is crucial for transportation planning and operation management. In recent years, with the acceleration of urbanization, the continuous expansion of urban areas, and sustained population growth, public transportation demand has become increasingly diversified and complex. Against this backdrop, accurately grasping bus passenger flow OD information has become a key link in improving the quality of public transportation services and optimizing the allocation of public transportation resources.
[0003] Traditional methods for obtaining public transport passenger flow origin-destination (OD) information have many limitations. Early methods relied on manual surveys, such as home visits and roadside inquiries. These methods are not only costly in terms of manpower, resources, and time, but also have limited sample sizes, making it difficult to comprehensively and accurately reflect the true state of public transport passenger flow across the entire city. For example, home visits require investigators to ask residents about their travel plans door-to-door, which is not only inefficient but can also lead to data bias due to residents' lack of cooperation. Furthermore, statistical methods based on bus card swipe data cannot accurately obtain passenger boarding and alighting locations because most bus routes use single-swipe swipes, making effective analysis of passenger flow origin-destination difficult.
[0004] Therefore, how to accurately collect public transport passenger flow information has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a method, apparatus, and device for identifying bus passenger flow, which addresses the problem of low accuracy and efficiency in statistical analysis of bus passenger flow information in the prior art.
[0006] Firstly, this application provides a method for identifying bus passenger flow, the method comprising:
[0007] Acquire videos of the front door, rear door, and interior of a bus from different image acquisition devices;
[0008] Based on the target tracking model, the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video is determined respectively;
[0009] Based on the movement trajectory of each passenger in different videos, all movement trajectories belonging to the same passenger are stitched together to obtain the target movement trajectory corresponding to each passenger.
[0010] Based on each passenger's target movement trajectory, preset boarding / disembarking areas, and bus arrival information, the boarding and disembarking information for each passenger is determined. The boarding / disembarking areas are the areas that passengers need to pass through when boarding / disembarking, and the arrival information includes the time when the bus arrives at each station.
[0011] Secondly, this application provides a public transport passenger flow identification device, the device comprising:
[0012] The acquisition module is used to acquire videos of the front door, rear door, and interior of the bus from different image acquisition devices.
[0013] The statistics module is used to determine the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video respectively based on the target tracking model; according to the motion trajectory of each passenger in different videos, all motion trajectories belonging to the same passenger are stitched together to obtain the target motion trajectory corresponding to each passenger; according to the target motion trajectory of each passenger, the preset boarding / alighting area, and the bus arrival information, the boarding and alighting information of each passenger is determined, wherein the boarding / alighting area is the area that the passenger needs to pass through when boarding / alighting, and the arrival information includes the time when the bus arrives at each station.
[0014] Thirdly, embodiments of this application also provide an electronic device, the electronic device including a processor, the processor being configured to execute a computer program stored in a memory to implement the steps of any of the bus passenger flow identification methods described above.
[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the bus passenger flow identification methods described above.
[0016] In this embodiment, videos of the bus's front door, rear door, and interior are acquired from different image acquisition devices. Based on a target tracking model, the movement trajectory of each passenger in these videos is determined. Then, based on each passenger's movement trajectory in different videos, all movement trajectories belonging to the same passenger are stitched together to obtain the target movement trajectory for each passenger. Finally, based on each passenger's target movement trajectory, preset boarding / alighting areas, and bus arrival information, each passenger's boarding and alighting information is determined. In this embodiment, videos of different locations on the bus are acquired using different image acquisition devices. By analyzing the target trajectories in these videos, the complete trajectory of each passenger within the bus from boarding to alighting is determined. Analysis of this complete trajectory determines whether the corresponding passenger has moved to the preset boarding / alighting area, indicating whether the passenger has boarded or alighted. Combined with the bus arrival information, the boarding and alighting information for each passenger is determined, improving the accuracy and efficiency of bus passenger flow statistics. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating a public transport passenger flow identification process provided in this application embodiment;
[0019] Figure 2 This application provides an external schematic diagram of the installation location of an image acquisition device on a vehicle, as shown in an embodiment of the present application.
[0020] Figure 3 A schematic diagram of the vehicle interior where an image acquisition device is installed, provided as an embodiment of this application;
[0021] Figure 4 This is a schematic diagram of an in-vehicle image acquisition device provided in an embodiment of this application;
[0022] Figure 5 A schematic diagram of a passenger boarding at the front door is provided as an embodiment of this application;
[0023] Figure 6 This application provides a reasonable explanation of a public transport passenger flow identification process.
[0024] Figure 7 A schematic diagram of a bus passenger flow identification device provided in this application embodiment;
[0025] Figure 8 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art are within the scope of protection of this application.
[0027] With the rise of intelligent transportation concepts and the development of related technologies, how to utilize advanced technologies to solve the problem of bus passenger flow origin-destination (OD) statistics has become a research hotspot. In recent years, advancements in computer vision technology, such as camera-based image recognition, have provided new approaches to bus passenger flow monitoring. By installing cameras on buses, image information from inside the bus and at external stops can be collected in real time. However, in practical applications, due to the complex environment inside the bus (such as changes in lighting and passenger obstruction) and the diversity of pedestrian appearances (clothing, posture changes), accurately counting bus passenger flow origin-destination (OD) solely relying on visual recognition technology still faces challenges.
[0028] In the field of algorithms, machine learning and deep learning algorithms are constantly evolving. Machine learning algorithms can analyze large amounts of historical public transportation data to uncover potential passenger flow patterns, but they lack adaptability to complex and ever-changing real-time passenger flow scenarios. Deep learning algorithms, such as Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and their variants, have demonstrated powerful capabilities in image recognition and sequence data processing, providing superior algorithmic solutions for public transportation passenger flow origin-destination (OD) statistics. For example, CNNs can be used to process images from bus cameras to identify passenger boarding and alighting behaviors; RNNs can be used to analyze passenger travel sequences at different time points to predict public transportation passenger flow OD trends. However, applying these algorithms to real-world public transportation scenarios still requires addressing issues such as insufficient model training data and high computational resource requirements.
[0029] Furthermore, the development of IoT technology has enabled interconnectivity between public transport vehicles and infrastructure. By deploying sensors on buses and at stations, information such as vehicle location, operational status, and passenger flow at stations can be collected in real time. However, how to effectively integrate and analyze this scattered information to accurately correlate passengers' origins and destinations remains a problem to be solved. In practical applications, the differences in the format, frequency, and accuracy of data from different sensors increase the difficulty of data fusion and processing.
[0030] To address the aforementioned issues, this application provides a method, apparatus, and device for identifying bus passenger flow. The method involves acquiring front door video, rear door video, and interior video of a bus captured by different image acquisition devices; determining the motion trajectory of each passenger in the front door video, rear door video, and interior video based on a target tracking model; stitching together all motion trajectories belonging to the same passenger based on their respective motion trajectories in different videos to obtain the target motion trajectory for each passenger; and determining the boarding and alighting information for each passenger based on their target motion trajectory, preset boarding / alighting areas, and bus arrival information. The boarding / alighting area is the area the passenger must pass through when boarding / alighting, and the arrival information includes the time the bus arrives at each stop.
[0031] Figure 1 A flowchart illustrating a bus passenger flow identification process provided in this application embodiment is shown below. Figure 1 As shown, the process includes the following steps:
[0032] S101: Acquire videos of the front door, rear door, and interior of the bus from different image acquisition devices.
[0033] The public transport passenger flow identification method provided in this application is applied to vehicles or electronic devices, such as servers, PCs, and mobile terminals.
[0034] To enable comprehensive monitoring of the bus interior and accurately track the movement of each passenger, image acquisition devices, such as onboard cameras, can be installed at different locations on the bus in this embodiment. In this embodiment, the image acquisition devices can be selected from monocular cameras of different resolutions and shooting angles based on actual needs.
[0035] In one possible implementation, in order to improve the accuracy of bus passenger flow recognition, an image acquisition device with color image acquisition function can be selected when installing the image acquisition device.
[0036] In order to clearly monitor the boarding and alighting of passengers at the front and rear doors, in this embodiment of the application, a first image acquisition device can be installed near the front door of the bus. The first image acquisition device is used to collect information about passengers at the front door, and the video collected by the first image acquisition device is called the front door video.
[0037] In this embodiment of the application, a second image acquisition device can be installed near the rear door of the bus. The second image acquisition device is used to collect passenger information at the rear door, and the video collected by the second image acquisition device is called the rear door video.
[0038] Since passengers may walk inside the bus during their journey, their boarding and alighting information can be accurately determined by tracking their movement trajectories. Therefore, in this embodiment, an image acquisition device capable of capturing panoramic video of the bus interior is installed inside the vehicle. For example, a third image acquisition device can be installed at the front or rear of the bus interior. This third image acquisition device is used to capture the situation of all passengers inside the bus, and the video captured by this device is called the in-vehicle video. To facilitate the subsequent determination of each passenger's movement trajectory, in this embodiment, after installing each image acquisition device, the image acquisition range of all image acquisition devices can be adjusted to ensure that there is no overlap or minimal overlap between the areas covered by different videos captured by different image acquisition devices. Alternatively, the effective image range can be marked within the image acquisition area of each image acquisition device to ensure that there is no overlap or minimal overlap between the effective image ranges corresponding to all image acquisition devices.
[0039] To facilitate understanding, the following will be combined with... Figure 2-4 An example is provided to illustrate the installation location of the image acquisition device. Figure 2 This application provides an embodiment of an external vehicle diagram showing the installation location of an image acquisition device, as shown below. Figure 2 As shown, the bus has a front door and a rear door, each equipped with an onboard camera. Each camera captures images of its corresponding door area.
[0040] Figure 3 This application provides a schematic diagram of the vehicle interior where an image acquisition device is installed, as shown in the embodiment of the present application. Figure 3 As shown, the image acquisition device is installed on the upper part of the front door, and on the center line of the door. That is to say, the image acquisition device is installed as centrally as possible, with a lateral deviation of no more than 10cm. Furthermore, the image acquisition device is installed as high as possible to capture as much image area as possible, such as at an installation height of 2.2m-2.4m.
[0041] Figure 4This is a schematic diagram of an in-vehicle image acquisition device provided in an embodiment of this application. In this embodiment, in order to capture a panoramic view of the interior of the vehicle, the image acquisition device for acquiring in-vehicle video can be installed at the front of the vehicle. After the image acquisition device is installed, when adjusting the image acquisition area, it can be ensured that the image acquisition device can completely capture the people standing at the back of the vehicle and ensure that the rear standing area coincides with the central axis of the image, with an allowable error of ±50 pixels. That is, it ensures that the image acquisition device captures the image as centrally as possible, and it can also ensure that the lower edge of the image captured by the image acquisition device coincides with the lower edge of the step in the rear standing area, that is, to capture the passengers standing at the front of the vehicle as completely as possible.
[0042] In this embodiment, the image acquisition devices used to collect front door video, rear door video, and in-vehicle video can operate continuously, meaning that image acquisition continues throughout the vehicle's startup process. To conserve resources, the image acquisition devices used to collect in-vehicle video can also be kept running continuously, while the image acquisition devices used to collect front and rear door video can only collect images when the doors are open and stop collecting images when the doors are closed. In this embodiment, when the bus enters a stop, the driver issues a door opening signal, and the door opening / closing signal detector immediately detects the door status and transmits the door opening signal to the passenger flow analysis system. At this time, the cameras installed at the doors quickly activate and begin collecting video of the passenger flow passing through the doors.
[0043] When the bus passenger flow recognition method provided in this application embodiment is applied to an electronic device, when the video transmission conditions are met, each image acquisition device can transmit its own acquired video to the electronic device so that the electronic device can perform corresponding processing after acquiring the video.
[0044] In the embodiments of this application, various data can be transmitted based on wireless communication technology, such as using a 5G module to replace a 4G module to improve data transmission speed.
[0045] S102: Based on the target tracking model, determine the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video respectively.
[0046] After acquiring the front door video, rear door video, and in-vehicle video, the motion trajectory of each passenger in each video can be determined based on a target tracking model. This target tracking model can be the ByteTrack target tracking model, which continuously tracks the target to obtain its motion trajectory and unique identification ID. The ByteTrack target tracking model prioritizes computational efficiency, reducing computational overhead while maintaining tracking accuracy through optimized bounding box processing and data association strategies.
[0047] S103: Based on the motion trajectory of each passenger in different videos, stitch together all motion trajectories belonging to the same passenger to obtain the target motion trajectory corresponding to each passenger.
[0048] After obtaining the motion trajectory of each passenger in each video, the motion trajectories of all passengers belonging to the same passenger can be spliced together based on the motion trajectory of each passenger in different videos to obtain the target motion trajectory corresponding to each passenger.
[0049] Specifically, since each image acquisition device has its own coordinate system, to facilitate the stitching of each motion trajectory, a transformation relationship between the camera pixel coordinate system and the world coordinate system can be established in this embodiment. After obtaining the motion trajectory of each passenger in each video, the camera pixel coordinates in the motion trajectory can be transformed into the world coordinate system. Then, by matching the boundaries of the motion trajectories in each video, the pairwise motion trajectories of the front door and the interior of the vehicle, and the interior of the vehicle and the rear door, are merged into the target motion trajectory. That is, when there is no overlap between the areas covered by each video, the end point or start point of any motion trajectory belonging to the same passenger is the start point or end point of other motion trajectories. When there is partial overlap between the areas covered by each video, the similarity between the motion trajectories corresponding to all overlapping areas can be determined. Two motion trajectories with a similarity greater than a preset threshold are identified as motion trajectories that can be stitched together. Then, the stitching order of all motion trajectories belonging to the same target is determined by the similarity method.
[0050] Specifically, assume that passenger 1's trajectory consists of three segments: BC, AB, and CD. Here, A, B, C, and D represent different coordinates. Since the starting point B of trajectory BC is the ending point of trajectory AB, it can be determined that trajectory AB precedes trajectory BC. Similarly, since the starting point C of trajectory CD is the ending point of trajectory BC, it can be determined that trajectory BC precedes trajectory CD. Therefore, passenger 1's target trajectory can be determined as ABCD.
[0051] S104: Based on each passenger's target movement trajectory, preset boarding / disembarking areas, and bus arrival information, determine each passenger's boarding and disembarking information. The boarding / disembarking areas are the areas that passengers need to pass through when boarding / disembarking, and the arrival information includes the time when the bus arrives at each station.
[0052] After obtaining the target movement trajectory of each passenger, the boarding and alighting information of each passenger can be determined based on the target movement trajectory, the preset boarding / alighting areas, and the bus arrival information. The boarding / alighting areas can include boarding and alighting areas; the boarding area can be understood as the area a passenger must pass through when boarding, and the alighting area as the area a passenger must pass through when alighting. Those skilled in the art can define different areas for different buses based on local bus passenger boarding and alighting regulations. For example, if region A only allows passengers to board from the front door and alight from the rear door, then the area where the front door is located can be designated as the boarding area, and the area where the rear door is located as the alighting area. In this embodiment, for each target movement trajectory, it can be determined whether the starting point of the target movement trajectory is located within the preset boarding area. If so, it can be assumed that the user boarded at the time corresponding to that starting point. Based on this time and the bus arrival information, the current stop information can be determined, thereby obtaining the boarding information of the passenger corresponding to the target movement trajectory. If the endpoint of the target movement trajectory is located in a preset drop-off area, then the user has disembarked at the corresponding time. Based on this time and the bus's arrival information, the current stop information can be determined, thus obtaining the passenger's disembarkation information for the target movement trajectory. The bus arrival information includes the time the bus arrives at each stop; this arrival information can be pre-defined by the operating company or determined based on sensors installed on the bus.
[0053] In this embodiment of the application, the passenger boarding and alighting information obtained can be used for subsequent data analysis to optimize bus routes.
[0054] In this embodiment, videos of the bus's front door, rear door, and interior are acquired from different image acquisition devices. Based on a target tracking model, the movement trajectory of each passenger in these videos is determined. Then, based on each passenger's movement trajectory in different videos, all movement trajectories belonging to the same passenger are stitched together to obtain the target movement trajectory for each passenger. Finally, based on each passenger's target movement trajectory, preset boarding / alighting areas, and bus arrival information, each passenger's boarding and alighting information is determined. In this embodiment, videos of different locations on the bus are acquired using different image acquisition devices. By analyzing the target trajectories in these videos, the complete trajectory of each passenger within the bus from boarding to alighting is determined. Analysis of this complete trajectory determines whether the corresponding passenger has moved to the preset boarding / alighting area, indicating whether the passenger has boarded or alighted. Combined with the bus arrival information, the boarding and alighting information for each passenger is determined, improving the accuracy and efficiency of bus passenger flow statistics.
[0055] To further improve the accuracy of bus passenger flow OD statistics, based on the above embodiments, in this embodiment, the step of determining the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video based on the target tracking model includes:
[0056] Based on the first object detection model, the object detection box corresponding to each passenger in each video frame of the front door video, the rear door video and the in-vehicle video is determined respectively;
[0057] The front door video, rear door video, and in-vehicle video, each marked with a target detection box, are fed into the target tracking model to obtain each motion trajectory output by the target tracking model.
[0058] In this embodiment, when determining the motion trajectory of each passenger in each video, the target detection box corresponding to each passenger in each video frame of the front door video, rear door video, and in-vehicle video can be determined based on a first target detection model. The first target detection model can be any detection model with person recognition capabilities, such as the YOLO model. This model can accurately obtain the target's detection box and center point coordinates, providing basic data for subsequent analysis. Of course, those skilled in the art can choose other models as needed.
[0059] After obtaining the target detection box for each passenger, each target detection box can be labeled in the corresponding video frame. After obtaining the front door video, rear door video, and interior video with labeled target detection boxes, each video can be fed into the target tracking model to obtain each motion trajectory output by the target tracking model. How to determine the motion trajectory of a target in a video based on the target tracking model is existing technology, and this application will not elaborate on this process in its embodiments.
[0060] In one possible implementation, in order to distinguish each object detection box, the first object detection model may assign a unique identifier to each object detection box when determining each object detection box.
[0061] In this embodiment, the target detection model and the target tracking model are combined to achieve collaborative optimization in the data processing flow. For example, the motion trajectory output by the target tracking model can be used as preprocessed data for the target detection model, reducing unnecessary feature extraction and subsequent matching calculations. Simultaneously, the recognition results of the target detection model can be fed back to the target tracking model, helping it to more accurately perform data association and target tracking. This improves the overall execution efficiency of the algorithm, reduces system response time, and meets the needs of applications with high real-time requirements, such as real-time security monitoring and intelligent traffic flow analysis.
[0062] To further improve the accuracy of bus passenger flow OD statistics, based on the above embodiments, in this embodiment, the step of determining the target detection box corresponding to each passenger in each video frame of the front door video, the rear door video, and the in-vehicle video based on the first target detection model includes:
[0063] For each video frame in the front door video, the rear door video, and the in-vehicle video, a first detection box corresponding to each head in the video frame is determined based on a second object detection model, and a second detection box corresponding to each shoulder in the video frame is determined based on a third object detection model; the first and second detection boxes are matched based on the Hungarian matching algorithm to obtain a detection box pair corresponding to each passenger, and the detection box pair is determined as the target detection box of the corresponding passenger.
[0064] The smaller the pixel range of the target in each object detection, the better the detection effect. Therefore, in this embodiment, when determining the target detection box for each passenger, for each video frame in the front door video, rear door video, and in-vehicle video, a first detection box corresponding to each head in the video frame can be determined based on the second object detection model, and a second detection box corresponding to each shoulder in the video frame can be determined based on the third object detection model. That is, the heads and shoulders in each video are identified one by one and marked with detection boxes. The second object detection model can be any model with head recognition capability, and the third object detection model can be any model with shoulder recognition capability.
[0065] After obtaining the first detection box corresponding to each head and the second detection box corresponding to each shoulder in the video frame, the Hungarian matching algorithm can be used to match the detected first detection boxes corresponding to heads and the second detection boxes corresponding to heads and shoulders to obtain a detection box pair corresponding to each target. This detection box pair is then identified as the target detection box for the corresponding passenger. The head and shoulder matching process using the Hungarian matching algorithm can effectively associate head and shoulder features, improving the accuracy of target recognition.
[0066] To further improve the accuracy of bus passenger flow origin-destination (OD) statistics, based on the above embodiments, in this embodiment, determining each passenger's boarding and alighting information according to each passenger's target movement trajectory, preset boarding / alighting areas, and bus arrival information includes:
[0067] If the destination of any passenger's target movement trajectory is located in a preset drop-off area, the passenger's drop-off information is determined based on the bus's arrival information and the time corresponding to the destination.
[0068] Extract the first facial feature of the passenger and search the boarding database for a target facial feature that matches the first facial feature; if so, obtain the boarding information stored in the boarding database for the target facial feature; wherein, the correspondence between the facial features and the boarding information stored in the boarding database is determined when a passenger is detected boarding.
[0069] To further improve the accuracy of bus passenger flow origin-destination (OD) statistics, when determining the boarding and alighting information of each passenger, it can be determined whether the endpoint of each passenger's target movement trajectory is located within a preset alighting area. If it is determined that the endpoint of any passenger's target movement trajectory is located within the preset alighting area, then the passenger can be considered to have alighted. Based on the bus's arrival information and the time corresponding to the endpoint of the target movement trajectory, the bus stop information at that time can be determined, and this time and stop information can be identified as the passenger's alighting information and recorded.
[0070] In order to facilitate obtaining the boarding information of the corresponding passenger at the end of the passenger's ride, in this embodiment of the application, a boarding database can be configured. The boarding database stores the correspondence between different facial features and boarding information. The correspondence can be determined when a passenger is detected to have boarded.
[0071] When it is determined that any passenger has disembarked, the first facial feature of that passenger can be extracted based on the video frame captured by the image device at the corresponding door. Then, a target facial feature matching the first facial feature is searched in the boarding database. In other words, the passenger's boarding information is searched in the boarding database based on the first facial feature of the passenger at the time of disembarkation. In this embodiment, any algorithm with facial feature extraction capabilities can be used to extract the first facial feature. For example, the FastReID feature extraction algorithm can be used to extract the passenger's first facial feature. FastReID is based on a modular design and supports various efficient feature extraction networks and matching algorithms. Of course, those skilled in the art can also choose other models or algorithms for feature extraction. Finding a target facial feature matching the first facial feature can be understood as determining the similarity between the first facial feature and each facial feature stored in the boarding database, and identifying facial features with a similarity greater than a preset similarity threshold as target facial features. In this embodiment, by comparing features, similar passengers can be quickly located, thereby achieving accurate passenger identification and passenger flow OD statistics.
[0072] In this embodiment of the application, compared with the traditional bus passenger flow OD system, an in-vehicle camera is added to provide a target detection model to detect the movement trajectory of passengers inside the vehicle. The movement trajectory is combined with the head and shoulder features of the passengers to perform passenger matching, thereby improving the accuracy of passenger feature matching and thus enhancing the credibility of the passenger flow OD data collected by the algorithm.
[0073] In this embodiment, a trajectory tracking algorithm and a pedestrian re-identification algorithm are integrated to identify the same passenger under different cameras at the front and rear doors, thereby enabling the identification of passenger boarding and alighting points and improving the accuracy of passenger flow origin-destination (OD) rate.
[0074] To further improve the accuracy of bus passenger flow origin-destination (OD) statistics, based on the above embodiments, in this embodiment, if the endpoint of any passenger's target movement trajectory is located after a preset alighting area, before determining the passenger's alighting information based on the bus's arrival information and the time corresponding to the endpoint, the method further includes:
[0075] If, based on the target movement trajectory and the position information of the preset marker line, it is determined that the passenger has crossed the preset marker line, then the crossing direction of the passenger across the preset marker line is determined.
[0076] If the crossing direction is consistent with the pre-saved alighting crossing direction, then the subsequent steps of determining the passenger's alighting information based on the bus's arrival information and the time corresponding to the destination will continue.
[0077] Because passengers have a high degree of randomness when boarding buses, special circumstances may occur. For example, a passenger may stand in a designated drop-off area but not actually disembark. Therefore, to further improve the accuracy of bus passenger flow origin-destination (OD) statistics, after determining that the endpoint of any passenger's target movement trajectory is located in the designated drop-off area, but before determining the passenger's actual disembarkation information, a tripwire check can be performed. Based on the result of this check, it can be determined whether the passenger has actually disembarked, thus achieving effective identification of passenger disembarkation behavior.
[0078] Since the installation position and acquisition angle of each image acquisition device are fixed, in this embodiment, preset marker lines can be configured for the video image areas corresponding to the front door video and the rear door video, respectively. Subsequently, during tripwire detection, the direction of the passenger's movement trajectory can be used to determine whether the passenger has crossed the preset marker line, thereby determining whether the passenger has disembarked. After configuring the preset marker lines, the disembarking crossing direction can be configured. If the passenger's crossing direction when crossing the preset marker line is consistent with the disembarking crossing direction, it can be considered that the passenger has indeed disembarked. For example, the disembarking crossing direction can be from below the preset marker line in the video frame to above the preset marker line.
[0079] Specifically, if the location information of the preset marker line based on the passenger's target movement trajectory indicates that the passenger has crossed the preset marker line, then the direction in which the passenger crossed the preset marker line can be determined. That is, it can be determined whether the passenger moved from above the preset marker line to below it, or from below it to above it. If the determined crossing direction matches the pre-saved disembarkation crossing direction, then it can be confirmed that the passenger has indeed disembarked, and the subsequent steps of determining the passenger's disembarkation information based on the bus's arrival information and the time corresponding to the destination can continue.
[0080] To further improve the accuracy of bus passenger flow origin-destination (OD) statistics, based on the above embodiments, in this embodiment, the process of determining the boarding database includes:
[0081] If the starting point of any passenger's target movement trajectory is located in a preset boarding area, then the passenger's boarding information is determined based on the bus's arrival information and the time corresponding to the starting point, and the passenger's second facial features are extracted. The second facial features corresponding to the boarding information are then stored in the boarding database.
[0082] In this embodiment, a boarding database can be constructed based on the target movement trajectory of each passenger. In this embodiment, it can be determined whether the starting point of each passenger's target movement trajectory is located within a preset boarding area. If it is determined that the starting point of any passenger's target movement trajectory is located within the preset boarding area, it can be determined that a passenger has boarded. In this embodiment, the current bus stop information can be determined based on the bus's arrival information and the time corresponding to the starting point of the target movement trajectory, and this stop information and time can be used as the passenger's boarding information. To facilitate subsequent retrieval of boarding information in the boarding database, in this embodiment, the passenger's second facial features can be extracted, and the second facial features corresponding to the boarding information can be stored in the boarding database. That is, the boarding database stores the second facial feature-boarding information pair.
[0083] To further improve the accuracy of bus passenger flow origin-destination (OD) statistics, based on the above embodiments, in this embodiment, the process of determining the boarding database includes:
[0084] For the movement trajectory of each passenger in the front door video and the rear door video, if it is determined that the passenger in the movement trajectory crossed the preset marker line based on the movement trajectory and the position information of the preset marker line, then the crossing direction of the passenger crossing the preset marker line is determined.
[0085] If the crossing direction is consistent with the pre-saved boarding crossing direction, the passenger's boarding information is determined based on the time when the passenger crosses the preset marking line and the bus's arrival information. The passenger's second facial features are then extracted, and the second facial features corresponding to the boarding information are saved in the boarding database.
[0086] Since passengers can only board the bus through the front or rear door, in this embodiment of the application, when constructing the boarding database, the movement trajectory of each passenger in the front door video and the rear door video can be analyzed only.
[0087] In this embodiment, for each passenger's movement trajectory in the front door video and rear door video, it can be determined whether the passenger in that movement trajectory crossed the preset marker line based on the movement trajectory and the position information of the preset marker line. If so, the crossing direction of the passenger when crossing the preset marker line can be determined based on the movement trajectory.
[0088] If the crossing direction matches the pre-saved boarding crossing direction, it can be confirmed that the passenger did indeed board the bus. The passenger's boarding information can then be determined based on the time the passenger crossed the preset marking line and the bus's arrival information. The passenger's second facial features are then extracted and stored in the boarding database corresponding to these features.
[0089] In this embodiment of the application, the number of passengers can also be determined by counting the number of times passengers cross the preset marking lines.
[0090] Figure 5 This application provides a schematic diagram of a passenger boarding at the front door, as shown in the embodiment. Figure 5 As shown, Figure 5 The solid horizontal line in the center is the pre-configured marker line. Since passengers need to enter the vehicle from the outside, the boarding direction can be configured to move from above the marker line to below it. Figure 5The trajectory shown by the dashed line is the movement trajectory of passenger 1. It can be seen that passenger 1 moved from above the preset marker line to below the preset marker line. It can be confirmed that passenger 1's crossing direction is consistent with the pre-saved boarding crossing direction, and it can be confirmed that passenger 1 did indeed board the vehicle.
[0091] To further improve the efficiency of bus passenger flow origin-destination (OD) statistics, based on the above embodiments, in this embodiment, after obtaining the boarding information stored in the boarding database for the target facial features, the method further includes:
[0092] The correspondence between the recorded target human facial features and boarding information is deleted from the boarding database.
[0093] Because of the large number of people taking buses daily, continuously storing all passenger boarding information in a boarding database would result in a large amount of data in the database and a large amount of data for each feature matching operation, leading to slow bus passenger flow origin-destination (OD) statistics. Therefore, in this embodiment, after obtaining the boarding information stored in the boarding database for the target facial features, the correspondence between the recorded target facial features and the boarding information can be deleted from the boarding database to ensure the validity of the data stored in the boarding database.
[0094] In this embodiment, Bytetrack is used for passenger trajectory tracking, which can adapt to mutual occlusion, instantaneous disappearance, different lighting conditions and dynamic background conditions, and maintain a stable tracking effect. When the two are combined, in complex scenarios such as extreme lighting (such as dim lighting at night or direct strong light), it can ensure that the passenger target is not lost and can accurately identify the same target. Compared with using a pedestrian re-identification model alone to match passenger features under different cameras, the processing capability in complex environments is significantly enhanced, and the application scenarios are more extensive.
[0095] In this embodiment, multiple algorithm models are used in the bus passenger flow identification process. An object detection model is used to detect passengers, and an object tracking model is used to track passenger trajectories, thereby identifying passenger boarding, alighting, and in-vehicle estimation. A pedestrian re-identification algorithm is used to identify the same passenger in the front and rear door videos corresponding to the front and rear doors, thus determining the passenger's boarding and alighting information. The YOLO object detection and classification algorithm, Hungarian matching algorithm, Bytetrack object tracking algorithm, and FastReID feature extraction algorithm are comprehensively used to accurately achieve bus passenger flow OD statistics.
[0096] The bus passenger flow identification process will be explained below with reference to a specific embodiment. Figure 6This application provides a reasonable explanation of a public transport passenger flow identification process, such as... Figure 6 As shown. To facilitate bus passenger flow identification, a boarding database can be pre-initialized. This database stores passenger IDs, boarding station IDs, boarding times, facial features, and boarding door information (front or rear door). After initializing the boarding database, video streams can be continuously loaded. Upon receiving a door opening signal from the bus, the system checks if any video frames in the loaded video contain the target. If not, the bus passenger flow identification ends, indicating a potential equipment malfunction. If so, target detection is performed on all acquired videos, obtaining a first detection box corresponding to the head and a second detection box corresponding to the shoulder in each video frame. The Hungarian algorithm is then used to match the first and second detection boxes to obtain the target detection box for each passenger. Based on the target detection boxes and target tracking model for each passenger, the target motion trajectory for each passenger is obtained. The starting and ending points of each passenger's target motion trajectory are checked against preset boarding and alighting areas. If so, a tripwire check is performed to determine if the corresponding passenger is currently boarding or alighting. When a passenger is confirmed to have boarded, their second facial features and boarding information are extracted and stored in the boarding database. When a passenger is confirmed to have alighted, their first facial features and alighting information are extracted, and a match is found in the boarding database. If a door closing notification is received from the bus after the passenger's destination time, the passenger's boarding and alighting information are output, and their second facial features and boarding information are deleted from the boarding database. Passenger flow statistics are continuously performed. Otherwise, passenger flow statistics are also continuously performed.
[0097] Based on the same inventive concept, this application provides a public transport passenger flow identification device. Figure 7 Please refer to the schematic diagram of a bus passenger flow identification device provided in this application embodiment. Figure 7 The device includes:
[0098] The acquisition module 701 is used to acquire the front door video, rear door video, and interior video of the bus captured by different image acquisition devices;
[0099] The statistics module 702 is used to determine the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video respectively based on the target tracking model; according to the motion trajectory of each passenger in different videos, all motion trajectories belonging to the same passenger are spliced together to obtain the target motion trajectory corresponding to each passenger; according to the target motion trajectory of each passenger, the preset boarding / alighting area, and the bus arrival information, the boarding and alighting information of each passenger is determined, wherein the boarding / alighting area is the area that the passenger needs to pass through when boarding / alighting, and the arrival information includes the time when the bus arrives at each station.
[0100] In one possible implementation, the statistics module 702 is specifically used to determine the target detection box corresponding to each passenger in each video frame of the front door video, the rear door video, and the in-vehicle video based on the first target detection model; and input the front door video, the rear door video, and the in-vehicle video with the target detection box into the target tracking model to obtain each motion trajectory output by the target tracking model.
[0101] In one possible implementation, the statistics module 702 is specifically used to, for each video frame in the front door video, the rear door video, and the in-vehicle video, determine a first detection box corresponding to each head in the video frame based on a second target detection model, and determine a second detection box corresponding to each shoulder in the video frame based on a third target detection model; match the first and second detection boxes based on the Hungarian matching algorithm to obtain a detection box pair corresponding to each passenger, and determine the detection box pair as the target detection box of the corresponding passenger.
[0102] In one possible implementation, the statistics module 702 is specifically used to determine the passenger's alighting information based on the bus's arrival information and the time corresponding to the destination if the endpoint of any passenger's target movement trajectory is located in a preset alighting area; extract the passenger's first facial feature and search the boarding database for a target facial feature that matches the first facial feature; if so, obtain the boarding information stored in the boarding database for the target facial feature; wherein the correspondence between the facial features and boarding information stored in the boarding database is determined when a passenger is detected boarding.
[0103] In one possible implementation, the statistics module 702 is further configured to determine the crossing direction of the passenger across the preset marker line if it is determined that the passenger has crossed the preset marker line based on the target movement trajectory and the position information of the preset marker line; if the crossing direction is consistent with the pre-saved disembarkation crossing direction, then continue to execute the subsequent step of determining the passenger's disembarkation information based on the bus arrival information and the time corresponding to the destination.
[0104] In one possible implementation, the device further includes:
[0105] The determination module 703 is used to determine the passenger's boarding information based on the bus's arrival information and the time corresponding to the starting point if the starting point of any passenger's target movement trajectory is located in a preset boarding area, and to extract the passenger's second facial features and save the boarding information corresponding to the second facial features in the boarding database.
[0106] In one possible implementation, the determining module 703 is further configured to, for the movement trajectory of each passenger in the front door video and the rear door video, if it is determined that the passenger in the movement trajectory crossed the preset marker line based on the movement trajectory and the position information of the preset marker line, then determine the crossing direction of the passenger crossing the preset marker line; if the crossing direction is consistent with the pre-saved boarding crossing direction, then determine the passenger's boarding information based on the time when the passenger crossed the preset marker line and the bus's arrival information, and extract the passenger's second facial features, and save the second facial features corresponding to the boarding information in the boarding database.
[0107] In one possible implementation, the device further includes:
[0108] The deletion module 704 is used to delete the correspondence between the target human image features and the boarding information recorded in the boarding database.
[0109] Based on the same inventive concept, embodiments of this application provide an electronic device that can implement the steps of the public transport passenger flow identification method described above. Figure 8 This application provides a schematic diagram of an electronic device structure, such as... Figure 8 As shown, it includes: processor 801, communication interface 802, memory 803 and communication bus 804, wherein processor 801, communication interface 802 and memory 803 communicate with each other through communication bus 804.
[0110] The memory 803 stores a computer program. When the program is executed by the processor 801, the processor 801 performs the following steps:
[0111] Acquire videos of the front door, rear door, and interior of a bus from different image acquisition devices;
[0112] Based on the target tracking model, the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video is determined respectively;
[0113] Based on the movement trajectory of each passenger in different videos, all movement trajectories belonging to the same passenger are stitched together to obtain the target movement trajectory corresponding to each passenger.
[0114] Based on each passenger's target movement trajectory, preset boarding / disembarking areas, and bus arrival information, the boarding and disembarking information for each passenger is determined. The boarding / disembarking areas are the areas that passengers need to pass through when boarding / disembarking, and the arrival information includes the time when the bus arrives at each station.
[0115] In one possible implementation, determining the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video based on the target tracking model includes:
[0116] Based on the first object detection model, the object detection box corresponding to each passenger in each video frame of the front door video, the rear door video and the in-vehicle video is determined respectively;
[0117] The front door video, rear door video, and in-vehicle video, each marked with a target detection box, are fed into the target tracking model to obtain each motion trajectory output by the target tracking model.
[0118] In one possible implementation, determining the target detection box corresponding to each passenger in each video frame of the front door video, the rear door video, and the in-vehicle video based on the first target detection model includes:
[0119] For each video frame in the front door video, the rear door video, and the in-vehicle video, a first detection box corresponding to each head in the video frame is determined based on a second object detection model, and a second detection box corresponding to each shoulder in the video frame is determined based on a third object detection model; the first and second detection boxes are matched based on the Hungarian matching algorithm to obtain a detection box pair corresponding to each passenger, and the detection box pair is determined as the target detection box of the corresponding passenger.
[0120] In one possible implementation, determining each passenger's boarding and alighting information based on each passenger's target movement trajectory, preset boarding / alighting areas, and bus arrival information includes:
[0121] If the destination of any passenger's target movement trajectory is located in a preset drop-off area, the passenger's drop-off information is determined based on the bus's arrival information and the time corresponding to the destination.
[0122] Extract the first facial feature of the passenger and search the boarding database for a target facial feature that matches the first facial feature; if so, obtain the boarding information stored in the boarding database for the target facial feature; wherein, the correspondence between the facial features and the boarding information stored in the boarding database is determined when a passenger is detected boarding.
[0123] In one possible implementation, if the endpoint of any passenger's target movement trajectory is located after a preset drop-off area, before determining the passenger's drop-off information based on the bus's arrival information and the time corresponding to the endpoint, the method further includes:
[0124] If, based on the target movement trajectory and the position information of the preset marker line, it is determined that the passenger has crossed the preset marker line, then the crossing direction of the passenger across the preset marker line is determined.
[0125] If the crossing direction is consistent with the pre-saved alighting crossing direction, then the subsequent steps of determining the passenger's alighting information based on the bus's arrival information and the time corresponding to the destination will continue.
[0126] In one possible implementation, the process of determining the boarding database includes:
[0127] If the starting point of any passenger's target movement trajectory is located in a preset boarding area, then the passenger's boarding information is determined based on the bus's arrival information and the time corresponding to the starting point, and the passenger's second facial features are extracted. The second facial features corresponding to the boarding information are then stored in the boarding database.
[0128] In one possible implementation, the process of determining the boarding database includes:
[0129] For the movement trajectory of each passenger in the front door video and the rear door video, if it is determined that the passenger in the movement trajectory crossed the preset marker line based on the movement trajectory and the position information of the preset marker line, then the crossing direction of the passenger crossing the preset marker line is determined.
[0130] If the crossing direction is consistent with the pre-saved boarding crossing direction, the passenger's boarding information is determined based on the time when the passenger crosses the preset marking line and the bus's arrival information. The passenger's second facial features are then extracted, and the second facial features corresponding to the boarding information are saved in the boarding database.
[0131] In one possible implementation, after obtaining the boarding information stored in the boarding database for the target facial features, the method further includes:
[0132] The correspondence between the recorded target human facial features and boarding information is deleted from the boarding database.
[0133] Since the principle of the above-mentioned electronic device in solving the problem is similar to that of the public transportation passenger flow identification method, the implementation of the above-mentioned electronic device can be found in the embodiments of the method, and the repeated parts will not be described again.
[0134] The communication bus mentioned in the aforementioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface 802 is used for communication between the aforementioned electronic device and other devices. The memory can include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.
[0135] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0136] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a processor. When the program runs on the processor, it causes the processor to perform the following steps:
[0137] Acquire videos of the front door, rear door, and interior of a bus from different image acquisition devices;
[0138] Based on the target tracking model, the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video is determined respectively;
[0139] Based on the movement trajectory of each passenger in different videos, all movement trajectories belonging to the same passenger are stitched together to obtain the target movement trajectory corresponding to each passenger.
[0140] Based on each passenger's target movement trajectory, preset boarding / disembarking areas, and bus arrival information, the boarding and disembarking information for each passenger is determined. The boarding / disembarking areas are the areas that passengers need to pass through when boarding / disembarking, and the arrival information includes the time when the bus arrives at each station.
[0141] In one possible implementation, determining the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video based on the target tracking model includes:
[0142] Based on the first object detection model, the object detection box corresponding to each passenger in each video frame of the front door video, the rear door video and the in-vehicle video is determined respectively;
[0143] The front door video, rear door video, and in-vehicle video, each marked with a target detection box, are fed into the target tracking model to obtain each motion trajectory output by the target tracking model.
[0144] In one possible implementation, determining the target detection box corresponding to each passenger in each video frame of the front door video, the rear door video, and the in-vehicle video based on the first target detection model includes:
[0145] For each video frame in the front door video, the rear door video, and the in-vehicle video, a first detection box corresponding to each head in the video frame is determined based on a second object detection model, and a second detection box corresponding to each shoulder in the video frame is determined based on a third object detection model; the first and second detection boxes are matched based on the Hungarian matching algorithm to obtain a detection box pair corresponding to each passenger, and the detection box pair is determined as the target detection box of the corresponding passenger.
[0146] In one possible implementation, determining each passenger's boarding and alighting information based on each passenger's target movement trajectory, preset boarding / alighting areas, and bus arrival information includes:
[0147] If the destination of any passenger's target movement trajectory is located in a preset drop-off area, the passenger's drop-off information is determined based on the bus's arrival information and the time corresponding to the destination.
[0148] Extract the first facial feature of the passenger and search the boarding database for a target facial feature that matches the first facial feature; if so, obtain the boarding information stored in the boarding database for the target facial feature; wherein, the correspondence between the facial features and the boarding information stored in the boarding database is determined when a passenger is detected boarding.
[0149] In one possible implementation, if the endpoint of any passenger's target movement trajectory is located after a preset drop-off area, before determining the passenger's drop-off information based on the bus's arrival information and the time corresponding to the endpoint, the method further includes:
[0150] If, based on the target movement trajectory and the position information of the preset marker line, it is determined that the passenger has crossed the preset marker line, then the crossing direction of the passenger across the preset marker line is determined.
[0151] If the crossing direction is consistent with the pre-saved alighting crossing direction, then the subsequent steps of determining the passenger's alighting information based on the bus's arrival information and the time corresponding to the destination will continue.
[0152] In one possible implementation, the process of determining the boarding database includes:
[0153] If the starting point of any passenger's target movement trajectory is located in a preset boarding area, then the passenger's boarding information is determined based on the bus's arrival information and the time corresponding to the starting point, and the passenger's second facial features are extracted. The second facial features corresponding to the boarding information are then stored in the boarding database.
[0154] In one possible implementation, the process of determining the boarding database includes:
[0155] For the movement trajectory of each passenger in the front door video and the rear door video, if it is determined that the passenger in the movement trajectory crossed the preset marker line based on the movement trajectory and the position information of the preset marker line, then the crossing direction of the passenger crossing the preset marker line is determined.
[0156] If the crossing direction is consistent with the pre-saved boarding crossing direction, the passenger's boarding information is determined based on the time when the passenger crosses the preset marking line and the bus's arrival information. The passenger's second facial features are then extracted, and the second facial features corresponding to the boarding information are saved in the boarding database.
[0157] In one possible implementation, after obtaining the boarding information stored in the boarding database for the target facial features, the method further includes:
[0158] The correspondence between the recorded target human facial features and boarding information is deleted from the boarding database.
[0159] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0161] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0162] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0163] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for identifying passenger flow on public transport, characterized in that, The method includes: Acquire videos of the front door, rear door, and interior of a bus from different image acquisition devices; Based on the target tracking model, the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video is determined respectively; Based on the movement trajectory of each passenger in different videos, all movement trajectories belonging to the same passenger are stitched together to obtain the target movement trajectory corresponding to each passenger. Based on each passenger's target movement trajectory, preset boarding / disembarking areas, and bus arrival information, the boarding and disembarking information for each passenger is determined. The boarding / disembarking areas are the areas that passengers need to pass through when boarding / disembarking, and the arrival information includes the time when the bus arrives at each station.
2. The method according to claim 1, characterized in that, The step of determining the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video based on the target tracking model includes: Based on the first object detection model, the object detection box corresponding to each passenger in each video frame of the front door video, the rear door video and the in-vehicle video is determined respectively; The front door video, rear door video, and in-vehicle video, each marked with a target detection box, are fed into the target tracking model to obtain each motion trajectory output by the target tracking model.
3. The method according to claim 2, characterized in that, The step of determining the target detection box corresponding to each passenger in each video frame of the front door video, the rear door video, and the in-vehicle video based on the first target detection model includes: For each video frame in the front door video, the rear door video, and the in-vehicle video, a first detection box corresponding to each head in the video frame is determined based on a second object detection model, and a second detection box corresponding to each shoulder in the video frame is determined based on a third object detection model; the first and second detection boxes are matched based on the Hungarian matching algorithm to obtain a detection box pair corresponding to each passenger, and the detection box pair is determined as the target detection box of the corresponding passenger.
4. The method according to claim 1, characterized in that, The process of determining each passenger's boarding and alighting information based on their target movement trajectory, preset boarding / alighting areas, and bus arrival information includes: If the destination of any passenger's target movement trajectory is located in a preset drop-off area, the passenger's drop-off information is determined based on the bus's arrival information and the time corresponding to the destination. Extract the first facial feature of the passenger and search the boarding database for a target facial feature that matches the first facial feature; if so, obtain the boarding information stored in the boarding database for the target facial feature; wherein, the correspondence between the facial features and the boarding information stored in the boarding database is determined when a passenger is detected boarding.
5. The method according to claim 4, characterized in that, If the endpoint of any passenger's target movement trajectory is located after a preset drop-off area, before determining the passenger's drop-off information based on the bus's arrival information and the time corresponding to the endpoint, the method further includes: If, based on the target movement trajectory and the position information of the preset marker line, it is determined that the passenger has crossed the preset marker line, then the crossing direction of the passenger across the preset marker line is determined. If the crossing direction is consistent with the pre-saved alighting crossing direction, then the subsequent steps of determining the passenger's alighting information based on the bus's arrival information and the time corresponding to the destination will continue.
6. The method according to claim 4, characterized in that, The process of determining the boarding database includes: If the starting point of any passenger's target movement trajectory is located in a preset boarding area, then the passenger's boarding information is determined based on the bus's arrival information and the time corresponding to the starting point, and the passenger's second facial features are extracted. The second facial features corresponding to the boarding information are then stored in the boarding database.
7. The method according to claim 4, characterized in that, The process of determining the boarding database includes: For the movement trajectory of each passenger in the front door video and the rear door video, if it is determined that the passenger in the movement trajectory crossed the preset marker line based on the movement trajectory and the position information of the preset marker line, then the crossing direction of the passenger crossing the preset marker line is determined. If the crossing direction is consistent with the pre-saved boarding crossing direction, the passenger's boarding information is determined based on the time when the passenger crosses the preset marking line and the bus's arrival information. The passenger's second facial features are then extracted, and the second facial features corresponding to the boarding information are saved in the boarding database.
8. The method according to claim 4, characterized in that, After obtaining the boarding information stored in the boarding database for the target human facial features, the method further includes: The correspondence between the recorded target human facial features and boarding information is deleted from the boarding database.
9. A bus passenger flow identification device, characterized in that, The device includes: The acquisition module is used to acquire videos of the front door, rear door, and interior of the bus from different image acquisition devices. The statistics module is used to determine the motion trajectory of each passenger in the front door video, the rear door video, and the in-vehicle video respectively based on the target tracking model; according to the motion trajectory of each passenger in different videos, all motion trajectories belonging to the same passenger are stitched together to obtain the target motion trajectory corresponding to each passenger; according to the target motion trajectory of each passenger, the preset boarding / alighting area, and the bus arrival information, the boarding and alighting information of each passenger is determined, wherein the boarding / alighting area is the area that the passenger needs to pass through when boarding / alighting, and the arrival information includes the time when the bus arrives at each station.
10. An electronic device, characterized in that, The electronic device includes a processor that executes a computer program stored in a memory to implement the steps of the public transport passenger flow identification method as described in any one of claims 1-8.