Bus passenger getting-on and getting-off tracking method, system, device and equipment and storage medium
By acquiring the video streams of the front and back door cameras of the bus, identifying and tracking passengers, extracting and matching their features, it solves the problems of passenger differentiation and boarding and alighting time statistics in the existing technology, and achieves accurate tracking and time analysis of bus passengers. , improving robustness and supervisory intelligence.
Patent Information
- Application Number
- CN202410671737.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-08-30
AI Technical Summary
The existing technology is difficult to accurately distinguish different passengers in the passenger flow statistics and analysis of bus passengers getting on and off, especially during peak operating periods when there are many people in the image, resulting in false detections or missed detections, poor robustness, and difficulty in counting and analyzing where the passengers are. The time to board the train at which station and the time to get off at which station.
By acquiring the video streams from the front and back door cameras of the bus, we identify and track passengers, extract the features of multiple captured images, use the feature extraction model to fuse feature information, match the features of passengers getting on and off the bus, and determine whether they get on or off the bus. Bus stops and times.
It achieves accurate distinction of bus passengers and statistical analysis of boarding and alighting times, improves robustness, can accurately track passengers' entry and exit behavior during peak periods, and provides a more intelligent supervision solution.
Smart Images

Figure CN118570747A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of bus monitoring, and in particular relates to a method, system, device, equipment and storage medium for tracking bus passengers getting on and off the bus. Background Art
[0002] Passenger flow statistics and analysis of public transportation are an important part of intelligent monitoring of public transportation. The current common practice is to install cameras at the front and rear doors of the bus, fit the size of the head according to the camera installation height, use the circle detection algorithm to detect the head in the image and extract the head feature vector, and then use the tracking algorithm to track the movement trajectory of the head to determine whether to get on or off the bus, and finally count the number of passengers getting on and off the bus.
[0003] At present, the circle detection method is used to detect passenger heads in images. Due to the lack of head feature information, when there are many people in the image during peak hours, it is difficult to distinguish the features of different people and accurately describe different passengers, and it is difficult to count and analyze the stations where passengers get on and off the bus, as well as the time of getting on and off the bus. In addition, this method is easily affected by lighting, individual differences of passengers, etc., and has poor robustness, which can easily lead to false detection or missed detection. Summary of the invention
[0004] The embodiments of the present application provide a method, system, device, equipment and storage medium for tracking bus passengers getting on and off, so as to solve the problem in the prior art that it is difficult to accurately distinguish bus passengers, and further difficult to count and analyze at which station the passengers get on and off the bus, as well as the time of getting on and off the bus.
[0005] In a first aspect, an embodiment of the present application provides a method for tracking passengers getting on and off a bus, comprising:
[0006] Obtain a first video stream and a second video stream from the starting bus stop to the terminal bus stop, wherein the first video stream is a video stream obtained by a bus front door camera during the period when the front door is open at each bus stop, and the second video stream is a video stream obtained by a bus rear door camera during the period when the rear door is open at each bus stop;
[0007] According to the first video stream and the second video stream, each boarding passenger information package and each disembarking passenger information package are obtained; the boarding passenger information package includes: boarding passenger characteristics and boarding bus stop; the disembarking passenger information package includes: disembarking passenger characteristics and disembarking bus stop;
[0008] Matching the characteristics of the boarding passengers in the boarding passenger information package with the characteristics of the getting-off passengers in the getting-off passenger information package to obtain a matching result;
[0009] The boarding bus stop and the alighting bus stop for each passenger are determined according to the matching results.
[0010] In a second aspect, an embodiment of the present application provides a bus passenger boarding and alighting tracking system, comprising: a host and a cloud server; the host is integrated with a video acquisition module and an information extraction module, and the cloud server is provided with a pairing module;
[0011] The video acquisition module is used to acquire a first video stream and a second video stream from the starting bus stop to the terminal bus stop, wherein the first video stream is a video stream acquired by a bus front door camera during the period when the front door is open at each bus stop, and the second video stream is a video stream acquired by a bus rear door camera during the period when the rear door is open at each bus stop;
[0012] The information extraction module is used to obtain each boarding passenger information package and each disembarking passenger information package according to the first video stream and the second video stream; the boarding passenger information package includes: boarding passenger characteristics and boarding bus stop; the disembarking passenger information package includes: disembarking passenger characteristics and disembarking bus stop;
[0013] The pairing module is used to match the boarding passenger features in the boarding passenger information package with the alighting passenger features in the alighting passenger information package to obtain a matching result; and determine the boarding bus stop and alighting bus stop for each passenger based on the matching result.
[0014] In a third aspect, an embodiment of the present application provides a bus passenger boarding and alighting tracking device, comprising:
[0015] A video acquisition module, used to acquire a first video stream and a second video stream from a starting bus stop to a terminal bus stop, wherein the first video stream is a video stream acquired by a bus front door camera during the period when the front door is open at each bus stop, and the second video stream is a video stream acquired by a bus rear door camera during the period when the rear door is open at each bus stop;
[0016] An information extraction module, used to obtain each boarding passenger information package and each disembarking passenger information package according to the first video stream and the second video stream; the boarding passenger information package includes: boarding passenger characteristics and boarding bus stop; the disembarking passenger information package includes: disembarking passenger characteristics and disembarking bus stop;
[0017] The matching module is used to match the characteristics of the boarding passengers in the boarding passenger information package with the characteristics of the alighting passengers in the alighting passenger information package to obtain a matching result; and determine the boarding bus stop and alighting bus stop for each passenger based on the matching result.
[0018] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.
[0019] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0020] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect above.
[0021] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0022] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the method described in the embodiments of the present application can not only count the passenger flow information of getting on and off the bus, but also obtain the specific boarding bus station and time, and the alighting bus station and time of a certain passenger, so as to realize a more intelligent supervision scheme. By splicing multiple captured images and feeding them into the feature extraction model, the valuable features in multiple captured images at different angles can be adaptively fused, making the final features more robust. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 It is a flowchart of a method for tracking bus passengers getting on and off a bus provided in an embodiment of the present application;
[0025] Figure 2 It is a schematic diagram of a method for tracking bus passengers getting on and off a bus provided in an embodiment of the present application;
[0026] Figure 3 This is an example diagram of passengers getting on and off at different bus stops provided by an embodiment of the present application;
[0027] Figure 4 This is a rendering of a front door camera looking down, provided in an embodiment of the present application;
[0028] Figure 5 is a schematic diagram of the training principle of the feature extraction model provided in one embodiment of the present application;
[0029] Figure 6 This is a structural block diagram of a bus passenger boarding and alighting tracking system provided by an embodiment of the present application;
[0030] Figure 7 is a structural block diagram of a bus passenger boarding and alighting tracking system provided by another embodiment of the present application;
[0031] Figure 8 It is a structural schematic diagram of a bus passenger boarding and alighting tracking device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0033] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0034] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0035] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0036] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0037] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0038] Figure 1 A schematic diagram of a process for tracking bus passengers getting on and off a bus disclosed in an embodiment of the present application is shown. Figure 2 A schematic diagram of a method for tracking boarding and alighting of a public bus disclosed in an embodiment of the present application is shown, and the method comprises:
[0039] S1: Obtain the first video stream and the second video stream from the starting bus stop to the terminal bus stop, the first video stream is the video stream obtained by the bus front door camera during the period when the front door is open at each bus stop, and the second video stream is the video stream obtained by the bus rear door camera during the period when the rear door is open at each bus stop.
[0040] Specifically, the front door camera can be installed just above the front door of the bus. In some optional implementations, for the sake of protecting the privacy of passengers, the front door camera looks down and does not directly capture faces, but identifies information such as the hairstyle, clothing, height, posture, backpacks, and luggage of passengers getting on and off the bus. In some other optional implementations, the front door camera tilts toward the front door of the bus and does not capture facial features of passengers. Similarly, the installation position and installation angle of the rear door camera can be the same as the installation position and installation angle of the front door camera.
[0041] Specifically, a host is installed on the bus, and the host is connected to the front door camera and the rear door camera respectively. The host can obtain the first video stream and the second video stream captured by the front door camera and the rear door camera in real time. The first video stream and the second video stream captured by the front door camera and the rear door camera can also be stored or cached in the storage device of the host, and then the first video stream and the second video stream are obtained from the storage device of the host in sequence or together. This embodiment does not limit the method of obtaining the first video stream and the second video stream from the starting bus stop to the terminal bus stop.
[0042] Specifically, a front door opening and closing sensor is installed at the front door of the bus to detect the opening and closing signal of the front door of the bus; a rear door opening and closing sensor is installed at the rear door of the bus to detect the opening and closing signal of the rear door of the bus; the bus generally opens the front door and the rear door at the same time, and closes the front door and the rear door at the same time. The front door opening and closing sensor and the rear door opening and closing sensor are respectively connected to the host on the bus. When the host receives the door opening signal, the host starts to obtain the first video stream collected by the front door camera and the second video stream collected by the rear door camera. When the host receives the door closing signal, the host stops obtaining the first video stream collected by the front door camera and the second video stream collected by the rear door camera. Therefore, the first video stream and the second video stream are the video streams of the bus during the opening and closing of the door at the bus stop, recording the process of passengers getting on and off the bus.
[0043] S2: Obtain each boarding passenger information package and alighting passenger information package based on the first video stream and the second video stream; the boarding passenger information package includes: boarding passenger characteristics and boarding bus stop; the alighting passenger information package includes: alighting passenger characteristics and alighting bus stop.
[0044] Specifically, S2 can be implemented in the following ways:
[0045] For each bus stop from the originating bus stop to the terminal bus stop, execute steps S21-S23 respectively:
[0046] S21: Identify and track passengers in the first video stream and the second video stream of the first bus stop, and divide all identified and tracked passengers into boarding passengers and alighting passengers according to their behaviors of entering and exiting the bus; the first bus stop is any bus stop from the starting bus stop to the terminal bus stop.
[0047] Specifically, S21 includes:
[0048] S211: Identify passengers in a first video stream of a first bus stop, and obtain zero or more first detection frames, each first detection frame corresponding to a passenger.
[0049] Specifically, the video stream is composed of still images one by one. For example, 25 frames / s means that 25 still images are played continuously in one second. You can start from the first frame and identify the passenger in the current frame frame by frame, or you can use frame skipping. If you use frame skipping, the number of frames should not be too many, otherwise it will affect the subsequent matching results. For example, you can skip up to 5 frames.
[0050] Passengers can be identified from the video stream through the target detection model, which accurately identifies and locates the target object in a given image. The target detection model receives an image as input and outputs a number of detection frames, each of which represents a detected target object. In this embodiment, the target is the person in the image (i.e., the passenger). The detection frame selects not only the passenger's head, but also the shoulders, clothes, backpacks, luggage, etc., so the detection frame contains information such as the passenger's hair (including hair color, hairstyle, hairpin, etc.), clothes, backpacks, luggage, posture, etc.
[0051] Optionally, before using the object detection model to identify passengers, a training process of the object detection model is also included, specifically including:
[0052] 1. Prepare a training data set, which contains several complete images of camera screens, each of which contains several people;
[0053] 2. Mark the position boxes of the people in the picture in advance. Each box should be a rectangular box that just frames the whole person.
[0054] 3. The target detection model uses a neural network model.
[0055] 4. Train this target detection model. The training method is as follows:
[0056] (1) Send the image to the neural network model to predict the location box of the person in the image.
[0057] (2) The prediction loss is calculated by comparing the predicted box with the pre-marked position box. The method for calculating the prediction loss can be: the negative of the IoU (Intersection over Union, also known as overlap) value of the two boxes. Then, the chain rule is used to obtain the gradient value of each parameter of the neural network model.
[0058] (3) Use the original model parameters minus the scaled gradient value to obtain the new model parameters.
[0059] (4) Repeat (1) to (4) until the prediction loss approaches zero.
[0060] Since each bus stop has a first video stream and a second video stream, the first video stream and the second video stream of each bus stop are identified using a target detection model to obtain several detection frames corresponding to each bus stop.
[0061] Normally, the front door of a bus is the boarding entrance, and the rear door of the bus is the disembarkation entrance. However, in some special cases (such as when there are many passengers), some passengers may board and disembark from the front door. If the passengers at the front door are defined as boarding passengers and the passengers at the rear door are defined as disembarking passengers, it will result in the inability to identify passengers who get on and off the bus from the same door. Therefore, this embodiment does not directly define the passengers in the first video stream as boarding passengers and the passengers in the second video stream as disembarking passengers, but analyzes the behavior of each passenger in the first video stream and the second video stream in the subsequent method to determine whether they are boarding passengers or disembarking passengers.
[0062] Since there may be no passengers getting on or off the bus at the front door, zero first detection frames will be obtained in this case. If there are passengers getting on or off the bus, several first detection frames will be obtained.
[0063] For example, see Figure 3 There are three bus stops in total. The starting bus stop is Station A and the terminal bus stop is Station C. At Bus Stop A, two passengers (A and B) got on from the front door, and no passengers got off from the back door. The first video stream and the second video stream are both 10S, and the frame rate is 25 frames / S. Then the front door camera and the back door camera will acquire 250 images respectively. A appears in the first video stream captured by the front door camera from the second second, and B appears in the first video stream captured by the front door camera from the fifth second. Until the end of 10S, the images of A and B can be continuously acquired. Then in the first video stream, there are 9*25=225 first detection frames for A; there are 6*25=150 first detection frames for B. There is no second detection frame in the second video stream. Therefore, a total of 225+150=375 first detection frames are obtained, and these 375 first detection frames are the detection frames corresponding to Bus Stop A. At bus stop B, one passenger (C) got on and one passenger (B) got off. At bus stop C, two passengers (A and C) got off and no one got on. Several detection frames were obtained for bus stop B and several detection frames were obtained for bus stop C.
[0064] S212: If the first detection frame exists at the first bus stop, a matching relationship between the first detection frames is established to obtain a tracking sequence of passengers at the front door of the first bus stop.
[0065] Each tracking sequence represents a tracking target (i.e., passenger). Figure 3, 375 first detection frames are obtained in the above S211, but only by establishing a matching relationship between the detection frames can we know which first detection frames belong to A and which first detection frames belong to B. Since only A appears in the first video stream between the second and the fifth second, it can be determined that 75 first detection frames between the second and the fifth second belong to A. However, within the six seconds from the fifth second to the end of the tenth second, there are a total of 300 detection frames, which need to be allocated to A and B respectively. At this time, it is necessary to determine which 150 first detection frames are allocated to A and which 150 first detection frames are allocated to B.
[0066] Specifically, S212 includes:
[0067] S2121: Obtain positions of all first detection boxes in the first frame image from the first video stream of the first bus stop.
[0068] Exemplary, combined Figure 3 For example, for bus stop A, in the 76th frame to the 250th frame of the first video stream, two first detection frames appear in each frame image.
[0069] S2122: Predict the positions of all first detection boxes in the first frame image in the second frame image to obtain positions of several predicted boxes.
[0070] Specifically, the possible position of the first detection frame in the next frame can be predicted using methods such as Kalman filtering. For a new passenger appearing in the first video stream, the first detection frame that appears for the first time can copy a copy of the detection frame it carries as the position of the prediction frame, that is, assuming that it has not changed in position, the first detection frame in the second frame is in the same position and shape as the first detection frame in the first frame. This is because the motion trajectory of the first detection frame that appears for the first time is not clear, so it is impossible to determine the direction of its prediction frame, so it is assumed here that the prediction frame has no position change. For passengers who have been tracked in the video stream, for their first detection frame, since their past motion trajectory is already known, their position in the next frame can be predicted.
[0071] S2123: Obtain positions of all first detection frames in a second frame image from the first video stream of the first bus stop; the second frame is later than the first frame.
[0072] It should be noted that the first frame in this embodiment is only a reference to a certain frame, and does not mean the first frame image of the entire video stream. The same applies to the second frame.
[0073] S2124: Establishing a one-to-one correspondence between the prediction frames and the first detection frames in the second frame image according to the positions of the plurality of prediction frames and the positions of all the first detection frames acquired in the second frame image.
[0074] Specifically, S2124 includes:
[0075] S21241: calculating the overlap degree of the position of each prediction frame with the positions of all first detection frames obtained in the second frame image in turn, and obtaining a set of overlap degree values of each prediction frame and all first detection frames in the second frame image.
[0076] Specifically, the overlap here is IOU, which stands for Intersection over Union. It is mainly used to measure the overlap of two bounding boxes (usually the predicted bounding box and the real bounding box) in an image. The IOU calculation method is to evaluate the degree of overlap by calculating the ratio of the intersection and the union between the two boxes. In an ideal case, when the two boxes overlap completely, the IOU ratio is 1.
[0077] For example, if there are two prediction boxes and two first detection boxes in the second frame image, the overlap value set has 4 overlap values. Similarly, if there are three prediction boxes and three first detection boxes in the second frame image, the overlap value set has 9 overlap values.
[0078] S21242: Select a combination from all combinations of prediction boxes and the first detection box in the second frame image so that the sum of the overlaps of all prediction boxes in the combination with the first detection box in the second frame image reaches a maximum value; and use the selected combination as a one-to-one correspondence between the prediction box and the first detection box in the second frame image.
[0079] S2125: Assign the first detection frame in the second frame image having a one-to-one correspondence to the first detection frame in the first frame image corresponding to the prediction frame, and generate a tracking sequence of passengers at the front door of the first bus stop.
[0080] Exemplary: Combined Figure 3 For bus stop A, the first video stream is in the sixth second, and the first frame image has two first detection frames. Two prediction frames X and Y are obtained based on the first detection frames, and then the first detection frames M and N in the second frame image are obtained. If their IoU is as follows:
[0081]
[0082] Because one-to-one matching is required, the two matching relationships that can be obtained have the following IoUs:
[0083] ①M and X are paired, and N and Y are paired. At this time, the total IoU score = 0.6 + 0.5 = 1.1;
[0084] ②M and Y are paired, N and X are paired, and the total IoU score = 0.8 + 0.7 = 1.5;
[0085] Because the total score of ② is the highest, it is finally decided that M matches Y, and N matches X. When such a correspondence is generated, the first detection frame in the second frame image is assigned one by one to the first detection frame in the first frame image corresponding to the prediction frame, and the first detection frame carried by passenger A and passenger B is increased by one. Similarly, the first detection frame carried by passenger A forms a tracking sequence, and the first detection frame carried by passenger B also forms a tracking sequence.
[0086] S2126: If the first detection frame in a second frame image does not establish a corresponding relationship with any first detection frame in any first frame image, the first detection frame in the second frame image is marked as a new passenger.
[0087] S2127: If no first detection frame in the second frame image establishes a corresponding relationship with the first detection frame in the first frame image, the passenger corresponding to the first detection frame in the first frame image is marked as missing once. When the number of missing times exceeds a first threshold, the passenger is marked as missing. After disappearance, the first detection frame carried by the passenger is determined as a tracking sequence of a passenger at the front door of a first bus stop.
[0088] If no first detection frame in the second frame image establishes a correspondence with the first detection frame in the first frame image, it is very likely that the passenger is blocked or leaves the area where the front door camera collects images. The passenger corresponding to the first detection frame is marked as missing once. When the number of missing times exceeds the first threshold, the passenger is marked as missing. After disappearance, the first detection frame carried by the passenger is determined as a tracking sequence of a front door passenger at the first bus stop.
[0089] S213: Identify passengers in the second video stream of the first bus stop, and obtain zero or more second detection frames, each second detection frame corresponding to a passenger.
[0090] S214: If there is a second detection frame at the first bus stop, a matching relationship between the second detection frames is established to obtain a tracking sequence of passengers at the rear door of the first bus stop.
[0091] Optionally, the method of S213 is the same as the method of S211, and the method of S214 is the same as the method of S212, which will not be described in detail in this embodiment.
[0092] S215: According to the tracking sequence of the front door passengers and the tracking sequence of the rear door passengers of the first bus station, the behaviors of all passengers entering and exiting the bus at the first bus station are determined, and they are divided into boarding passengers and alighting passengers.
[0093] Specifically, the behaviors of all passengers entering and exiting the bus at the first bus stop are determined in the following manner:
[0094] S2151: Obtain the time information and position coordinate information of the tracking sequence of the front door passengers and the back door passengers of the first bus stop, and generate the movement trajectories of all passengers at the first bus stop.
[0095] Since the first detection frame and the second detection frame have position coordinate information in the image, each tracking sequence of the front door passenger and the tracking sequence of the rear door passenger are a motion trajectory.
[0096] S2152: If the movement trajectory of a passenger is along the negative direction of the Y axis of the image in the first video stream / the second video stream, the passenger is judged to be getting off the bus; if the movement trajectory of a passenger is along the positive direction of the Y axis of the image in the first video stream / the second video stream, the passenger is judged to be getting on the bus; in countries or regions that drive on the right, the positive direction of the Y axis is defined as the vertical upward direction of the image; in countries or regions that drive on the left, the positive direction of the Y axis is defined as the vertical downward direction of the image.
[0097] Figure 3 The image captured by the front door camera is shown. Since China is a country that drives on the right, the door of the bus is located on the right side of the driving direction. The captured image is the upper part of the interior of the bus and the lower part of the exterior. Therefore, the positive direction of the Y axis of the image is defined as vertically upward. If the movement trajectory of a passenger is along the positive direction of the Y axis of the image, the passenger is judged to be getting on the bus, otherwise, the passenger is getting off the bus. It is easy to understand that the opposite is true for countries or regions that drive on the left.
[0098] S22: extracting features of passengers getting on the bus at the first bus stop to obtain features of the passengers getting on the bus; extracting features of passengers getting off the bus at the first bus stop to obtain features of the passengers getting off the bus.
[0099] Specifically, S22 includes:
[0100] S221: According to the tracking sequence of the passengers at the front door of the first bus station, a plurality of boarding images of each boarding passenger are obtained from the first video stream / the second video stream of the first bus station. According to the tracking sequence of the passengers at the rear door of the first bus station, a plurality of getting-off images of each getting-off passenger are obtained from the first video stream / the second video stream of the first bus station.
[0101] The embodiment of the present application provides the following method to obtain boarding images and getting off images:
[0102] For each detection box in the tracking sequence, calculate its center Y coordinate (Y direction is the vertical direction of the image). If the Y coordinate moves 100 pixels (configurable hyperparameter) relative to the Y coordinate of the previous snapshot, deduct this snapshot image from the original image. Therefore, each passenger can get multiple snapshot images with Y coordinates that differ by more than 100 pixels. For example, if the size of the camera image is 1920x1080 pixels, then the pixel value in the Y direction is 1080. If a person moves from the top to the bottom of the screen, then this person will generate about 10 snapshot images.
[0103] From the above captured images, after sorting by Y coordinate, four captured images at 1 / 5, 2 / 5, 3 / 5, and 4 / 5 of the total length are selected as the final captured images. For example: assuming that the sequence of captured images has 10 images, then the total length of the sequence is 10, and these 10 images are defined as 0, 1, 2, 3...9, and four images with position subscripts of 1 / 5, 2 / 5, 3 / 5, and 4 / 5 of the total length are selected, that is, the position subscripts are 10*1 / 5=2, 10*2 / 5=4, 10*3 / 5=6, and 10*4 / 5=8.
[0104] Furthermore, the captured images (i.e., boarding images and alighting images) are also included as part of the boarding passenger information package / alighting passenger information package to visualize the corresponding relationship and preserve evidence.
[0105] S222: Input the plurality of boarding images sequentially or splice them into the feature extraction model to obtain a boarding feature vector of each boarding passenger at the first bus stop. Input the plurality of disembarking images sequentially or splice them into the feature extraction model to obtain a disembarking feature vector of each disembarking passenger at the first bus stop.
[0106] Specifically, the feature extraction model can extract representative features from the original data for subsequent algorithm learning and classification. The feature extraction model of the embodiment of the present application can be a convolutional neural network or a feature pyramid.
[0107] In some optional implementations, the final captured images are spliced into four grids and then sent to a convolutional neural network model to calculate a 512-dimensional feature vector. This embodiment fuses features from the perspective of images. The captured images are first spliced, and then the convolutional neural network model is used to adaptively calculate fusion features from these captured images. The convolutional neural network model determines how to retain useful information in multiple captured images. Because the model randomly selects and splices images during training, the features generated by this embodiment can adapt to captured images at various angles, making the features more robust and improving the accuracy of the final match.
[0108] In other optional implementations, the convolutional neural network only inputs one snapshot image at a time, but the dimension of the output feature vector is reduced, for example, the dimension is reduced to 128 dimensions, which is one-fourth of the original solution. In this way, four snapshot images can still be selected at a time, and then their features are calculated separately, and then the four feature vectors are spliced into a 512-dimensional feature vector. The amount of calculation and data flow of this solution (inputting one image into the convolutional neural network in sequence, a total of 4 times) are almost the same as the previous solution (splicing 4 images into four squares and then feeding them into the convolutional neural network). However, this solution does not adaptively select the most valuable features from multiple snapshots, and the features finally generated may have feature redundancy or loss. For example: It is not reasonable to use 128-dimensional features to describe a snapshot of a passenger's hair, clothes, pants, and shoes and another snapshot that only captures the top of the passenger's head, but it is not ruled out that it is still an optional implementation.
[0109] Optionally, the feature extraction model training process is also included before the feature extraction model is used, see Figure 5 , specifically including:
[0110] 1. Prepare a training data set, which contains several passengers, each of whom has multiple camera-captured images;
[0111] 2. Use the neural network model as the feature extraction model.
[0112] 3. Use the metric learning method to train the feature extraction model. The training method is as follows:
[0113] (1) Select three groups of images at one time: reference image A, different images of the same object B, and images of different objects C. Each of the three groups A, B, and C contains 1 to 4 images at random.
[0114] (2) Each group of images is spliced into one image in a 4-square grid. The splicing order is also random. If there are less than four images, the corresponding positions are filled with 0. The spliced image is then sent to the feature extraction model to extract image features. A 512-dimensional feature vector a, b, and c are obtained for the three groups of images A, B, and C, respectively.
[0115] (3) The similarity difference between feature vectors a, b, and c is used as the prediction loss of the model. A classic formula for the prediction loss is: the cross entropy between a and b minus the cross entropy between a and c. Then the chain rule is used to obtain the gradient value of each parameter of the neural network model.
[0116] (4) Use the original model parameters minus the scaled gradient value to obtain the new model parameters.
[0117] (5) Repeat (1) to (5) until the prediction loss approaches zero.
[0118] S23: Pack the identification of the first bus station and the feature vectors of the boarding passengers to form an information package of the boarding passengers at the first bus station. Pack the identification of the first bus station and the feature vectors of the alighting passengers to form an information package of the alighting passengers at the first bus station.
[0119] S3: Match the characteristics of the boarding passengers in the boarding passenger information package with the characteristics of the alighting passengers in the alighting passenger information package to obtain a matching result; and determine the boarding bus stop and alighting bus stop for each passenger based on the matching result.
[0120] Specifically, S3 includes:
[0121] S31: Obtain the boarding time of passengers and the getting off time of passengers based on the first video stream / the second video stream.
[0122] The boarding time can be obtained through the timestamp of the captured image; the time when the tracking sequence is generated can also be recorded, and the generation time of the tracking sequence can be used as the boarding time or the alighting time; and a boarding passenger information package or an alighting passenger information package can also be obtained. This embodiment does not limit the method of obtaining the boarding time and the alighting time.
[0123] S32: Send the boarding time and passenger information packet of the boarding passengers to the boarding cache pool of the first device; send the disembarking time and passenger information packet of the disembarking passengers to the disembarking cache pool of the first device; the first device is a bus host or a cloud server.
[0124] Specifically, the boarding buffer pool and the alighting buffer pool can be arranged in the bus host, and a pairing relationship between the boarding passenger information package and the alighting passenger information package can be established in the bus host. The bus host is installed in the bus and is connected to the front door camera and the rear door camera respectively. In other optional implementations, the boarding buffer pool and the alighting buffer pool are arranged in a cloud server, and a pairing relationship between the boarding passenger information package and the alighting passenger information package can be established in the cloud server. Sending the boarding passenger information package and the alighting passenger information package to the cloud server allows the staff to view the boarding and alighting passenger information package of each bus stop in real time.
[0125] For example, see Figure 3 , bus stop A receives two boarding passenger information packets and sends them to the boarding buffer pool; when the bus arrives at bus stop B, it sends one boarding passenger information packet to the boarding buffer pool and one getting off passenger information packet to the getting off buffer pool; when the bus arrives at bus stop C, it sends two getting off passenger information packets to the getting off buffer pool.
[0126] S33: In the boarding cache pool, the boarding passenger information packets are time-sorted according to the boarding time of the boarding passengers to obtain the boarding passenger information packets based on the first time series; in the disembarking cache pool, the disembarking passenger information packets are time-sorted according to the disembarking time of the disembarking passengers to obtain the disembarking passenger information packets based on the second time series.
[0127] S34: Establish a two-dimensional matrix between the boarding passenger information packages of the first time series and the alighting passenger information packages of the second time series; perform a similarity comparison between the boarding passenger characteristics with an earlier boarding time and the alighting passenger characteristics with a later alighting time in the two-dimensional matrix, and obtain a matching result between the boarding passenger characteristics and the alighting passenger characteristics according to the comparison result.
[0128] Specifically, the cosine value of the angle between each alighting feature vector and all the boarding feature vectors before it (i.e., cosine similarity) is calculated using the following formula:
[0129]
[0130] In this formula, O represents a boarding feature vector, R represents a disembarking feature vector, the numerator of the fraction is the inner product of the two vectors, and the denominator is the product of the moduli of the two vectors. Finally, the pairing of the boarding feature vector and the disembarking feature vector with the largest comprehensive cosine similarity is selected as the final matching relationship. For example: suppose there are 3 boarding feature vectors O, P, Q, and 3 disembarking feature vectors R, S, T, and the order of their generation time is O->R->P->Q->S->T, then we can calculate their similarity and get the following table:
[0131] Get off feature vector\Get on feature vector O P Q R 0.6 - - S 0.7 0.5 0.8 T 0.4 0.7 0.6
[0132] In the table, because the get-off feature vector R is generated before the get-on feature vectors P and Q, there is no possible matching relationship between it and P and Q. Therefore, we set these positions to "-" to indicate that this is an impossible matching relationship. Because a one-to-one pairing is required, the two matching relationships that can be obtained from this table have the following similarities:
[0133] ①O and R are paired, P and S are paired, Q and T are paired, and the total similarity score = 0.6 + 0.5 + 0.6 = 1.7;
[0134] ②O and R are paired, P and T are paired, Q and S are paired, and the total similarity score = 0.6 + 0.8 + 0.7 = 2.1;
[0135] Because the total similarity score of ② is the highest, the corresponding relationships finally determined are: boarding feature vector O and getting off feature vector R, boarding feature vector P and getting off feature vector T, boarding feature vector Q and getting off feature vector S. When the number of boarding and getting off increases, the final corresponding relationship between boarding feature vector and getting off feature vector is generated according to this principle.
[0136] At this point, we have obtained the station at which each passenger gets on the bus, the specific time of getting on the bus, and the station at which each passenger gets off the bus, and the specific time of getting off the bus.
[0137] For example, see Figure 4 So far, we have obtained that the passenger who gets off at bus stop B is passenger B who gets on at bus stop A in the fifth second after the door opens; passenger A who gets on at bus stop A in the first second after the door opens gets off at bus stop C; and the passenger who gets on at bus stop B gets off at bus stop C.
[0138] In addition to being able to count passenger flow information on boarding and alighting, the method described in the embodiments of the present application can also obtain a passenger's specific boarding bus stop and time, and alighting bus stop and time, to implement a more intelligent supervision solution. By splicing multiple captured images and feeding them into a feature extraction model, valuable features in multiple captured images at different angles can be adaptively fused to make the final features more robust. And instead of using artificially designed features, a feature extraction model is used to extract high-dimensional features. These features are valuable feature information automatically selected by the feature extraction model after learning, which makes the feature values more accurate.
[0139] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0140] Figure 6 A schematic structural diagram of a bus passenger boarding and alighting tracking system provided in an embodiment of the present application is shown, comprising: a host 610 and a cloud server 620; the host 610 is integrated with a video acquisition module 611 and an information extraction module 612, and the cloud server 620 is provided with a pairing module 621.
[0141] The video acquisition module 611 is used to acquire a first video stream and a second video stream from the starting bus station to the terminal bus station, wherein the first video stream is a video stream acquired by the bus front door camera 630 during the period when the front door is open at each bus station, and the second video stream is a video stream acquired by the bus rear door camera 640 during the period when the rear door is open at each bus station. The period during which the front door is open can be determined by receiving a front door open / close signal from the bus front door open / close sensor 650 through the host 610. The period during which the rear door is open can be determined by receiving a front door open / close signal from the bus rear door open / close sensor 660 through the host 610.
[0142] The information extraction module 612 is used to obtain each boarding passenger information package and each alighting passenger information package based on the first video stream and the second video stream; the boarding passenger information package includes: boarding passenger characteristics and boarding bus stop; the alighting passenger information package includes: alighting passenger characteristics and alighting bus stop.
[0143] The matching module 621 is used to match the characteristics of the boarding passengers in the boarding passenger information package with the characteristics of the alighting passengers in the alighting passenger information package to obtain a matching result; and determine the boarding bus stop and alighting bus stop for each passenger based on the matching result.
[0144] Specifically, the information extraction module 612 includes: a target recognition module 6121 , a target tracking module 6122 , a segmentation module 6123 , an image acquisition module 6124 and a feature extraction module 6125 .
[0145] The target recognition module 6121 is used to identify passengers in a first video stream of a first bus stop, and obtain zero or more first detection frames, each of which corresponds to a passenger; and to identify passengers in a second video stream of the first bus stop, and obtain zero or more second detection frames, each of which corresponds to a passenger; the first bus stop is any bus stop from a starting bus stop to a terminal bus stop.
[0146] The target tracking module 6122 is used to establish a matching relationship between the first detection frames to obtain a tracking sequence of passengers at the front door of the first bus stop; and to establish a matching relationship between the second detection frames to obtain a tracking sequence of passengers at the back door of the first bus stop.
[0147] The classification module 6123 is used to determine the behaviors of all passengers entering and exiting the bus at the first bus station according to the tracking sequence of the front door passengers and the tracking sequence of the rear door passengers at the first bus station, and classify them into boarding passengers and alighting passengers.
[0148] The image acquisition module 6124 is used to acquire multiple boarding images of each boarding passenger from the first video stream / second video stream of the first bus station according to the tracking sequence of passengers at the front door of the first bus station; and is used to acquire multiple getting off images of each getting off passenger from the first video stream / second video stream of the first bus station according to the tracking sequence of passengers at the back door of the first bus station.
[0149] The feature extraction module 6125 is used to extract the boarding features of passengers at the first bus stop from the boarding image, and to extract the alighting features of passengers at the first bus stop from the alighting image.
[0150] Figure 7 The schematic diagram of the structure of a bus passenger boarding and alighting tracking system provided by an embodiment of the present application is shown, and the tracking system comprises: a host 610; the host 610 is integrated with a video acquisition module 611, an information extraction module and a pairing module 612. The information extraction module 612 comprises: a target recognition module 6121, a target tracking module 6122, a division module 6123, an image acquisition module 6124 and a feature extraction module 6125. The difference between the tracking system of this embodiment and the tracking system of the previous embodiment is that, in the tracking system of this embodiment, the matching module is arranged in the bus host, and the functions of each module are the same as those of the embodiment of the previous tracking system, and the present embodiment will not be repeated here.
[0151] Corresponding to the bus passenger boarding and alighting tracking method described in the above embodiment, Figure 8 The schematic diagram of the structure of the bus passenger boarding and alighting tracking device 800 provided in the embodiment of the present application is shown, comprising:
[0152] The video acquisition module 810 is used to acquire a first video stream and a second video stream from the starting bus stop to the terminal bus stop, wherein the first video stream is a video stream acquired by a front door camera of the bus during the period when the front door is open at each bus stop, and the second video stream is a video stream acquired by a rear door camera of the bus during the period when the rear door is open at each bus stop.
[0153] The information extraction module 820 is used to obtain each boarding passenger information package and each alighting passenger information package based on the first video stream and the second video stream; the boarding passenger information package includes: boarding passenger characteristics and boarding bus stop; the alighting passenger information package includes: alighting passenger characteristics and alighting bus stop.
[0154] The matching module 830 is used to match the characteristics of the boarding passengers in the boarding passenger information package with the characteristics of the alighting passengers in the alighting passenger information package to obtain a matching result; and determine the boarding bus stop and alighting bus stop for each passenger based on the matching result.
[0155] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0156] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0157] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0158] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0159] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0160] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to an electronic device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0161] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0162] The computer program code for performing the operation of the embodiment of the present application can be written in one or more programming languages or a combination thereof, and the programming language includes an object-oriented programming language, such as python, Java, Smalltalk, C++, and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer by any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect to the Internet).
[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0165] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for tracking passengers getting on and off a bus, characterized in that: include: Obtain a first video stream and a second video stream from the starting bus stop to the terminal bus stop, wherein the first video stream is a video stream obtained by a bus front door camera during the period when the front door is open at each bus stop, and the second video stream is a video stream obtained by a bus rear door camera during the period when the rear door is open at each bus stop; Obtaining each boarding passenger information packet and each alighting passenger information packet according to the first video stream and the second video stream; The boarding passenger information package includes: boarding passenger characteristics and boarding bus stop; the disembarking passenger information package includes: disembarking passenger characteristics and disembarking bus stop; Matching the characteristics of the boarding passengers in the boarding passenger information package with the characteristics of the getting-off passengers in the getting-off passenger information package to obtain a matching result; The boarding bus stop and the alighting bus stop for each passenger are determined according to the matching results.
2. The method for tracking passengers getting on and off a bus as claimed in claim 1, characterized in that: The step of obtaining each boarding passenger information packet and each disembarking passenger information packet according to the first video stream and the second video stream comprises: Extracting features of each passenger in the first video stream and the second video stream to obtain features of boarding passengers and alighting passengers at each bus stop; According to the characteristics of the boarding passengers and the alighting passengers at each bus stop, a boarding passenger information package and an alighting passenger information package are obtained.
3. The method for tracking passengers getting on and off a bus as claimed in claim 2, characterized in that: The extracting features of each passenger in the first video stream and the second video stream to obtain the features of boarding passengers and getting off passengers at each bus stop includes: The following steps are performed for the first video stream and the second video stream of each bus station from the starting bus station to the terminal bus station respectively: Identify the first video stream / the second video stream of the first bus station to obtain the identified passenger; the first bus station is any bus station from the starting bus station to the terminal bus station; Tracking the passenger identified in the first video stream / the second video stream to obtain a movement trajectory of the passenger; According to the movement trajectory of passengers, the passengers are divided into boarding passengers and alighting passengers; According to the movement trajectory of the passenger, a plurality of captured images are acquired from the first video stream / the second video stream; Multiple captured images are input sequentially or spliced into a feature extraction model to obtain the characteristics of boarding passengers and alighting passengers.
4. The method for tracking passengers getting on and off a bus as claimed in claim 3, characterized in that: identifying the first video stream / the second video stream of the first bus stop to obtain identified passengers; Tracking the passenger identified in the first video stream / the second video stream to obtain the passenger's movement trajectory includes: Identify passengers in the first video stream / the second video stream of the first bus stop, and obtain zero or more detection frames, each detection frame corresponding to a passenger; Obtaining positions of all detection boxes in a first frame image from the first video stream / second video stream of the first bus stop; Predict the positions of all detection boxes in the first frame image in the second frame image to obtain the positions of several predicted boxes; Obtaining positions of all detection frames in a second frame image from the first video stream / second video stream of the first bus stop; the second frame is later than the first frame; The overlap between the position of each prediction frame and the positions of all detection frames obtained in the second frame image is calculated to obtain a set of overlap values between each prediction frame and all detection frames in the second frame image; From all combinations of prediction frames and detection frames in the second frame image, select a combination so that the sum of overlaps of all prediction frames in the combination with the detection frames in the second frame image reaches a maximum value; and use the selected combination as a one-to-one correspondence between the prediction frames and the detection frames in the second frame image; The detection frame in the second frame image having a one-to-one correspondence is assigned to the detection frame in the first frame image corresponding to the prediction frame, and a tracking sequence of passengers at the first bus stop is generated. The tracking sequence of the passengers is the movement trajectory of the passengers.
5. The method for tracking passengers getting on and off a bus as claimed in claim 3, characterized in that: The acquiring a plurality of captured images from the first video stream / the second video stream according to the movement trajectory of the passenger includes: When it is detected that the passenger has moved a first distance along the motion trajectory, the image is captured from the first video stream / the second video stream to obtain a set of captured images; A plurality of captured images are selected from the set of captured images.
6. The method for tracking passengers getting on and off a bus as claimed in claim 1, characterized in that: The matching of the boarding passenger features in the boarding passenger information package with the disembarking passenger features in the disembarking passenger information package to obtain a matching result includes: Obtaining the boarding time of the boarding passengers and the getting off time of the getting off passengers according to the first video stream / the second video stream; Sending the boarding time and information packet of the boarding passengers to the boarding cache pool of the first device; the first device is a bus host or a cloud server; Sending the disembarking time and disembarking passenger information packet to the disembarking cache pool of the first device; In the boarding buffer pool, the boarding passenger information packets are time-sorted according to the boarding time of the boarding passengers to obtain the boarding passenger information packets based on the first time sequence; In the alighting buffer pool, the alighting passenger information packets are time-sorted according to the alighting time of the alighting passengers to obtain the alighting passenger information packets based on the second time sequence; Establishing a two-dimensional matrix between the boarding passenger information packets of the first time series and the alighting passenger information packets of the second time series; A similarity comparison is performed between the characteristics of the boarding passengers with an earlier boarding time and the characteristics of the getting-off passengers with a later getting-off time in the two-dimensional matrix, and a matching result of the boarding passenger characteristics and the getting-off passenger characteristics is obtained according to the comparison result.
7. A bus passenger boarding and alighting tracking system, characterized in that: include: A host and a cloud server; the host is integrated with a video acquisition module and an information extraction module, and the cloud server is provided with a pairing module; The video acquisition module is used to acquire a first video stream and a second video stream from the starting bus stop to the terminal bus stop, wherein the first video stream is a video stream acquired by a bus front door camera during the period when the front door is open at each bus stop, and the second video stream is a video stream acquired by a bus rear door camera during the period when the rear door is open at each bus stop; The information extraction module is used to obtain each boarding passenger information packet and each alighting passenger information packet according to the first video stream and the second video stream; The boarding passenger information package includes: boarding passenger characteristics and boarding bus stop; the disembarking passenger information package includes: disembarking passenger characteristics and disembarking bus stop; The pairing module is used to match the boarding passenger features in the boarding passenger information package with the alighting passenger features in the alighting passenger information package to obtain a matching result; and determine the boarding bus stop and alighting bus stop for each passenger based on the matching result.
8. A bus passenger boarding and alighting tracking device, characterized in that: include: A video acquisition module, used to acquire a first video stream and a second video stream from a starting bus stop to a terminal bus stop, wherein the first video stream is a video stream acquired by a bus front door camera during the period when the front door is open at each bus stop, and the second video stream is a video stream acquired by a bus rear door camera during the period when the rear door is open at each bus stop; An information extraction module, used for obtaining each boarding passenger information package and each alighting passenger information package according to the first video stream and the second video stream; The boarding passenger information package includes: boarding passenger characteristics and boarding bus stop; the disembarking passenger information package includes: disembarking passenger characteristics and disembarking bus stop; The matching module is used to match the characteristics of the boarding passengers in the boarding passenger information package with the characteristics of the alighting passengers in the alighting passenger information package to obtain a matching result; and determine the boarding bus stop and alighting bus stop for each passenger based on the matching result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Bus origin-destination passenger flow data processing method, device and equipment
CN121765402A
A bus starting and ending point passenger flow data processing method, device and equipment
CN121765402B
