Passenger management method, device, equipment, storage medium and computer program product
By using video capture and target detection models to identify the binding relationship between passengers and seats, the problem of low passenger management efficiency in intelligent transportation systems has been solved, and efficient and accurate passenger management has been achieved.
Patent Information
- Application Number
- CN202511009454.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-11-11
AI Technical Summary
Existing intelligent transportation systems rely on manual checks to verify passenger seating arrangements, resulting in low efficiency and accuracy, which affects the normal operation of the system.
Video data from the train carriage is collected using video capture equipment. Frames are extracted using a pre-trained target detection model to identify faces and seat detection boxes, calculate the overlap ratio (IoU), determine the binding relationship between passengers and seats, and achieve automatic passenger management.
It achieves efficient and accurate passenger seat identification and association, avoiding the inefficiency and inaccuracy of manual recording methods, and improving the management efficiency and accuracy of intelligent transportation systems.
Smart Images

Figure CN120932209A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a passenger management method, apparatus, device, storage medium, and computer program product. Background Technology
[0002] With the rapid development of intelligent transportation systems, passenger monitoring and management inside vehicles has become an important technical means to ensure passenger safety, optimize passenger experience, and improve vehicle management efficiency. Accurately recording and displaying passenger information has become a key link in realizing vehicle passenger management.
[0003] Especially in scenarios where multiple people share a vehicle (such as rail transit trains or high-speed trains), how to quickly and accurately identify passenger identities and achieve passenger-seat binding has a significant impact on the operational efficiency of intelligent transportation systems.
[0004] However, the existing passenger management system on trains still uses the most primitive manual management method, which verifies passenger seating by manual inspection. With the increasing number of passengers, this primitive management method is obviously very inefficient.
[0005] Therefore, developing a universal and efficient passenger management system has become an important research direction in the field of intelligent transportation. Summary of the Invention
[0006] This application provides a passenger management method to address the problem that existing intelligent transportation systems require manual checks to verify passenger seating. With the increasing number of passengers, this primitive management method is inefficient and has low accuracy, which greatly affects the normal operation of the intelligent transportation system.
[0007] This application also provides a passenger management device to address the problem that existing intelligent transportation systems require manual checks to verify passenger seating when managing passengers. With the increasing number of passengers, this primitive management method is inefficient and has low accuracy, which greatly affects the normal operation of the intelligent transportation system.
[0008] This application also provides a passenger management device to address the problem that existing intelligent transportation systems require manual checks to verify passenger seating when managing passengers. With the increasing number of passengers, this primitive management method is inefficient and has low accuracy, which greatly affects the normal operation of the intelligent transportation system.
[0009] This application also provides a computer-readable storage medium to address the problem that existing intelligent transportation systems require manual checks to verify passenger seating when managing passengers. With the increasing number of passengers, this primitive management method is inefficient and has low accuracy, which greatly affects the normal business processing of intelligent transportation systems.
[0010] A computer program product is provided to address the problem that existing intelligent transportation systems require manual checks to verify passenger seating when managing passengers. With the increasing number of passengers, this primitive management method is inefficient and has low accuracy, which greatly affects the normal operation of the intelligent transportation system.
[0011] The embodiments of this application adopt the following technical solutions: A passenger management method includes: acquiring video data of a target carriage using a preset video acquisition device; performing frame extraction processing on the video data to obtain at least one carriage image corresponding to the target carriage; performing target detection processing on the carriage image based on a pre-trained target detection model to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model; determining the seat information corresponding to each seat detection box in the set of seat detection boxes; determining the overlap degree (IoU) between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes; determining the binding relationship between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes based on the overlap degree (IoU); determining the occupancy information of each seat in the target carriage based on the binding relationship and the seat information; and performing passenger management on the target carriage based on the occupancy information.
[0012] A passenger management device includes: an image acquisition unit, configured to acquire video data of a target carriage using a preset video acquisition device, and perform frame extraction processing on the video data to obtain at least one carriage image corresponding to the target carriage; a target detection unit, configured to perform target detection processing on the carriage image based on a pre-trained target detection model, and obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model; a seat information determination unit, configured to determine the seat information corresponding to each seat detection box in the set of seat detection boxes; a calculation unit, configured to determine the overlap degree (IoU) between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes; a seat binding unit, configured to determine the binding relationship between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes based on the overlap degree (IoU); and a management unit, configured to determine the occupancy information of each seat in the target carriage based on the binding relationship and the seat information, and perform passenger management of the target carriage based on the occupancy information.
[0013] A passenger management device, comprising: The system includes a processor and a memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the following operations: acquire video data of a target carriage using a preset video acquisition device; perform frame extraction processing on the video data to obtain at least one carriage image corresponding to the target carriage; perform target detection processing on the carriage image based on a pre-trained target detection model to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model; determine the seat information corresponding to each seat detection box in the set of seat detection boxes; determine the overlap ratio (IoU) between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes; determine the binding relationship between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes based on the overlap ratio (IoU); determine the occupancy information of each seat in the target carriage based on the binding relationship and the seat information; and perform passenger management in the target carriage based on the occupancy information.
[0014] A computer-readable storage medium stores one or more programs that, when executed by an electronic device including multiple applications, cause the electronic device to perform the following operations: acquiring video data of a target carriage using a preset video acquisition device; performing frame extraction processing on the video data to obtain at least one carriage image corresponding to the target carriage; performing target detection processing on the carriage image based on a pre-trained target detection model to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model; determining seat information corresponding to each seat detection box in the set of seat detection boxes; determining the overlap degree (IoU) between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes; determining the binding relationship between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes based on the overlap degree (IoU); determining the occupancy information of each seat in the target carriage based on the binding relationship and the seat information; and performing passenger management of the target carriage based on the occupancy information.
[0015] A computer program product includes a computer program that, when executed by a processor, performs the following: acquiring video data of a target carriage using a preset video acquisition device; performing frame extraction processing on the video data to obtain at least one carriage image corresponding to the target carriage; performing target detection processing on the carriage image based on a pre-trained target detection model to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model; determining seat information corresponding to each seat detection box in the set of seat detection boxes; determining the overlap degree (IoU) between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes; determining the binding relationship between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes based on the overlap degree (IoU); determining the occupancy information of each seat in the target carriage based on the binding relationship and the seat information; and performing passenger management of the target carriage based on the occupancy information.
[0016] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: The passenger management method provided in this application allows for seat association and passenger management within a train carriage. Video data of the target carriage can be collected using a video acquisition device pre-installed in the carriage. Frame extraction is performed on the video data to obtain at least one carriage image corresponding to the target carriage. Then, based on a pre-trained target detection model, target detection processing is performed on the collected carriage image to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model. The seat information corresponding to each seat detection box in the seat detection box set is determined. The overlap ratio (IoU) between each face detection box in the face detection box set and each seat detection box in the seat detection box set is determined. Based on the overlap ratio (IoU), the binding relationship between each face detection box in the face detection box set and each seat detection box in the seat detection box set is determined. Based on the binding relationship and seat information, the occupancy information of each seat in the target carriage is determined, thereby enabling passenger management of the target carriage based on the determined occupancy information. The method provided in this application embodiment has two advantages. First, by using video acquisition and target detection, it can efficiently and accurately identify and associate passengers in vehicles, avoiding the inefficiency and inaccuracy of existing manual recording methods. Second, when performing target detection, this application embodiment outputs corresponding seat detection box sets and face detection box sets for seats and passengers' faces, respectively. In the process of outputting seat detection boxes, the seat detection boxes are grouped, and the original position information of each seat detection box is optimized and adjusted based on the position information between each seat detection box in the same group. The seat information corresponding to the optimized and adjusted seat detection box is then determined, thereby ensuring the accuracy of the seat detection boxes output by the target detection model, and thus ensuring the accuracy of subsequent passenger seat binding management based on the seat detection boxes. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of the specific structure of a passenger management system provided in an embodiment of this application; Figure 2 This is a schematic flowchart illustrating a passenger management method provided in an embodiment of this application. Figure 3 This is a schematic diagram of the specific structure of a passenger management device provided in an embodiment of this application; Figure 4 This is a schematic diagram of the specific structure of a passenger management device provided in an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] To address the issue that existing intelligent transportation systems require manual checks to verify passenger seating, which is inefficient and inaccurate with increasing passenger numbers, significantly impacting the normal operation of the intelligent transportation system, this application provides a passenger management system and a passenger management method based on this system.
[0020] The specific structure of the passenger management system provided in this application embodiment is as follows: Figure 1 As shown, the system mainly consists of a front-end video acquisition module, a target detection module, a passenger seat information recognition module, and a back-end passenger management unit. The front-end video acquisition module uses cameras pre-installed inside the carriage to capture images of the carriage during vehicle operation. The target detection module performs target detection on the carriage images captured by the front-end video acquisition module, inputting corresponding seat detection boxes and face detection boxes. The passenger seat information recognition module determines the current passenger's seat information based on the overlap between the seat detection boxes and face detection boxes, and uploads the determined passenger seat information to the back-end passenger management unit, thereby enabling the management of passengers in the carriage.
[0021] Based on the aforementioned passenger management system, a schematic diagram illustrating the specific implementation process of the passenger management method provided in this application is shown below. Figure 2 As shown, the main steps include the following: Step 11: Collect video data of the target carriage according to the preset video acquisition device, and perform frame extraction processing on the video data to obtain at least one carriage image corresponding to the target carriage. It should be noted that, in order to ensure that the video acquisition equipment (such as cameras) can capture clear and accurate images of the carriage, in this embodiment of the application, multiple sets of cameras can be set at different locations in the same carriage to ensure that clear images of each row of passengers and seats in the carriage can be captured.
[0022] Specifically, in this embodiment, the carriage camera can be set up as follows: a first camera a is installed in front of the first row of seats at the front of the carriage. The carriage image 1 is captured by camera a. The face images contained in the carriage image 1 are identified by a face detection algorithm. The pixel size of each face image is determined. Face images whose pixel size is greater than a preset pixel threshold (for example, the preset pixel threshold can be 100*100. When the pixel size of the face image is less than the preset pixel threshold, it can be determined that the face image does not meet the clarity requirements) are selected. The seat row corresponding to the face image is determined. A second camera is installed in the back row of the seat row. This process is repeated until the face images of the last row of the carriage captured by the camera meet the preset pixel threshold.
[0023] Additionally, it should be noted that in this embodiment of the application, the video acquisition device (such as a camera) can perform video acquisition of the carriage based on the GB28181 protocol.
[0024] In one implementation, after acquiring video data of the target carriage via a camera, the passenger management system can perform frame extraction on the acquired video data to facilitate subsequent processing by the target detection module. For example, it can use the OpenCV library for video frame extraction or use a decorate video codec to extract the corresponding frame images of the target carriage. These frame images are then preprocessed, such as by resizing, to make them suitable for neural network input, thereby obtaining multiple carriage images corresponding to the target carriage. It should be noted that this application does not limit the specific method used for frame extraction.
[0025] Step 12: Based on the pre-trained target detection model, perform target detection processing on the carriage images acquired by performing Step 11 to obtain the set of face detection boxes and seat detection boxes output by the target detection model. In one implementation, the present application embodiment can construct and train an object detection model based on a multimodal large model. The multimodal large model has a strong cross-domain recognition capability, and only a small amount of training data is needed for model fine-tuning to achieve high detection accuracy, which greatly reduces the development cost of the object detection model.
[0026] Specifically, in the embodiments of this application, the target detection model can be trained according to the following sub-steps, including: Sub-step 1201: Construct the training dataset; It should be noted that, considering that seat backs are easily obscured by passengers during vehicle operation, in order to ensure that the trained target detection model can accurately identify obscured seats, in this embodiment of the application, it is necessary to collect a certain proportion of obscured seat back data when constructing the training dataset.
[0027] Specifically, in this embodiment of the application, a training image set can be constructed based on pre-collected seat images, passenger face images, and seat images with faces obscured.
[0028] Sub-step 1202: Extract the text description corresponding to the object to be detected; In this embodiment of the application, the label category to which the sample object to be detected belongs in each sample image can be labeled manually or by machine, and a text description of the sample object can be constructed based on these label categories so that the target detection model can be trained based on these text descriptions.
[0029] Sub-step 1203: Input the text description into the embedded embedding model to obtain the text features corresponding to the training sample images; Sub-step 1204: Input the training sample images into the initial target detection model to obtain the image features corresponding to the training sample images; In one implementation, the initial object detection model may consist of a backbone network layer, a semantic branch network layer, a classification network layer, and a regression network layer. This application embodiment does not limit the specific composition of the initial object detection model. The training image obtained through sub-step 1201 is input into the initial object detection model for feature extraction, resulting in multi-scale image features corresponding to the training image.
[0030] Sub-step 1205: Based on text features and image features, and using a preset bounding box regression loss function and a preset semantic matching loss function, optimize and train the initial object detection model to obtain the trained object detection model.
[0031] In this embodiment, the text features obtained by executing sub-step 1203 and the image features obtained by executing sub-step 1204 are used to calculate the value of the target loss function. Based on the classification results and location information of each sample object in the training image output by the initial target detection model, the values of the bounding box regression loss function and the semantic matching loss function are calculated respectively. The values of the target loss function, the bounding box regression loss function, and the semantic matching loss function are used to constrain the update of the model parameters during the training process until the values of each target loss function meet the preset conditions. Then, the update of the model parameters is stopped, the training of the initial target detection model is completed, and a trained target detection model is generated.
[0032] In this embodiment, Intersection over Union (IoU) loss, Complete Intersection over Union (CIoU) loss, or the more novel Shape Intersection over Union (shape-IoU) loss can be used as the bounding box regression loss function for constraint calculation. Any classification loss function, such as Binary Cross Entropy Loss (BCE) loss or Cross-Entropy Loss (CE) loss, can be used as the target loss function for constraint calculation. Maximum likelihood loss can be used as the semantic matching loss function for constraint calculation.
[0033] Additionally, it should be noted that the target detection model trained by performing the above sub-steps 1201-1205 can be further validated and updated using the validation images to form a target detection model with better prediction performance. The specific validation process will not be elaborated here.
[0034] The trained object detection model is used to perform object detection processing on the carriage image obtained by executing step 11, thereby obtaining the set of face detection boxes and the set of seat detection boxes output by the object detection model.
[0035] Step 13: Determine the seat information corresponding to each seat detection box in the seat detection box set obtained by performing Step 12; It should be noted that due to external interference such as passenger obstruction and changes in lighting, the seat detection boxes identified by the target detection model may have positional deviations or be missing. In order to avoid the seat detection boxes from mismatching with seat information due to the above problems, in this embodiment of the application, the passenger management system can optimize each seat detection box output by the target detection model before determining the seat information corresponding to each seat detection box.
[0036] In one implementation, the passenger management system can adjust and optimize the position information of each seat detection box based on the relationship between the original position information corresponding to each seat detection box, so as to ensure that the number and position of the seat detection boxes output by the target detection model match the actual seats in the carriage.
[0037] In this embodiment of the application, the passenger management system can adjust the seat detection boxes output by the target detection model according to the following sub-steps, and determine the seat information corresponding to each seat detection box after adjustment, including: Sub-step 1301: Determine the original position information corresponding to each seat detection box in the seat detection box set, wherein the original position information includes the original X-axis position information and Y-axis position information of each seat detection box; The seat detection box set is the detection result output by the object detection model after performing object detection processing on the carriage image captured by the same camera (e.g., a camera set in the first row of the carriage).
[0038] By placing each seat detection box in the seat detection box set into a Cartesian coordinate system, the original X-axis position information of each seat detection box can be determined (including the minimum X-coordinate of the seat detection box on the X-axis). min and the maximum coordinate X on the X-axis. max ) and the original Y-axis position information (including the minimum coordinate Y of the seat detection box on the Y-axis). min and the maximum coordinate Y on the Y-axis max ).
[0039] Sub-step 1302: According to the Y-axis position information of the seat detection boxes, group each seat detection box in the set of seat detection boxes to obtain at least one detection box group; Since the Y-axis coordinates of seats in the same row in the carriage are basically the same, in this embodiment of the application, the seat detection boxes in the seat detection box set can be grouped according to the Y-axis position information of each seat detection box to obtain at least one detection box group, and each detection box group corresponds to a row of seats in the actual carriage.
[0040] Sub-step 1303: Determine the number of seats corresponding to each detection box group based on the original X-axis position information of each seat detection box in the detection box group; It should be noted that, under normal circumstances, the seat detection boxes output by the object detection model correspond one-to-one with the seats in the carriage. That is, the number of seat detection boxes can reflect the number of seats in the carriage. However, in some cases (such as obstruction or poor lighting), the number of seat detection boxes identified by the object detection model may not match the actual number of seats in the carriage. In this case, the passenger management system needs to redetermine the number of seats corresponding to the detection box group based on the size relationship between the original X-axis position information of each seat detection box in a group, and fill in the missing seat detection boxes.
[0041] Specifically, in one embodiment, the passenger management system can determine the number of seats corresponding to each group of detection frames by the following method: determining the number of seat detection frames in the detection frame group; sorting each seat detection frame in the detection frame group according to the X-axis direction, traversing each seat detection frame in the detection frame group in turn, determining the first maximum X-axis coordinate corresponding to the current seat detection frame and the first minimum X-axis coordinate corresponding to the second seat detection frame located after the current seat detection frame based on the original X-axis position information of the seat detection frame; and determining the difference between the first minimum X-axis coordinate and the first maximum X-axis coordinate.
[0042] When the difference is within a preset value range (wherein the preset value range is set by the passenger management system based on the interval between two adjacent seats in the carriage), it means that each seat detection box in the detection box group output by the target detection model is adjacent to each other and there is no overlap of detection boxes. This indicates that the target detection model has correctly identified each seat in a row of seats, and the number of seat detection boxes is determined as the number of seats corresponding to the detection box group.
[0043] When the difference exceeds the preset value range, it indicates that the interval between two adjacent seat detection boxes in the detection box group output by the target detection model exceeds the preset interval. This indicates that there may be missing seats in the currently identified detection box group. The passenger management system will then determine the number of missing detection boxes based on the original X-axis position information between the two adjacent detection boxes, and then determine the number of seats corresponding to the detection box group based on the number of missing detection boxes and the number of identified seat detection boxes.
[0044] In one implementation, the passenger management system can determine the number of missed detection frames and then determine the number of seats corresponding to the detection frame group by the following method: determining the second minimum X-axis coordinate corresponding to the second seat detection frame; determining the modification parameter based on the first minimum X-axis coordinate, the first maximum X-axis coordinate, and the second minimum X-axis coordinate; and determining the number of seats corresponding to the detection frame group based on the number of seat detection frames and the modification parameter.
[0045] In this embodiment of the application, the passenger management system can determine the modification parameters according to the following formula [1]: [1] Where i represents the sorting index of the current seat detection box in the detection box group, i+1 represents the seat detection box index following seat detection box i in the detection box group, and X (i+1)min This represents the minimum X-axis coordinate of the seat detection box in sequence i+1. (i)max This represents the maximum X-axis coordinate of seat detection box i. (i)min This represents the minimum X-axis coordinate of seat detection box i.
[0046] Sub-step 1304: Determine whether the number of seats determined by executing sub-step 1303 is the same as the number of seat detection boxes contained in the detection box group output by the target detection model. Sub-step 1305: When the judgment result obtained by executing sub-step 1304 is yes, update the original X-axis position information of each seat detection box in the detection box group according to the size relationship between the original X-axis position information of each seat detection box in the detection box group. In one implementation, the passenger management system may update the original X-axis position information of each seat detection frame in the detection frame group according to the following sub-steps: Sub-step 1305a: Iterate through each seat detection box in the detection box group, determine the first maximum X-axis coordinate and the first minimum X-axis coordinate corresponding to the current seat detection box, and the second minimum X-axis coordinate and the second maximum X-axis coordinate corresponding to the second seat detection box; For ease of description, the current seat detection box will be referred to as A in the following text. i , will be located in A i The subsequent seat detection box is called A. i+1 .
[0047] Sub-step 1305b: When the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate is within the preset value range, the original X-axis position of the seat detection box is retained; Sub-step 1305c: When the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate exceeds a preset value range, the original X-axis position information of the second seat detection box is updated according to the first maximum X-axis coordinate and the first minimum X-axis coordinate to obtain the second X-axis position information corresponding to the second seat detection box.
[0048] Specifically, the passenger management system can update the original X-axis position information of each seat detection frame in the detection frame group according to the following sub-steps: Sub-step 1305c-1: When the difference between the first minimum X-axis coordinate and the second minimum X-axis coordinate is within a preset value range, and the difference between the width of the second seat detection box and twice the width of the current seat detection box is within a preset value range, it indicates that due to occlusion or other reasons, seat detection box A in the target detection model's input detection box group is not included. i+1 With A i Overlapping, according to the normal carriage layout, seat detection frame A i+1 With A i They should be connected, meaning A can be connected. i The first maximum X-axis coordinate is determined as A i+1The second smallest X-axis coordinate, thus realizing the A i+1 The update of the original location information yields A. i+1 The corresponding second X-axis position information.
[0049] Sub-step 1305c-2: When the difference between the first minimum X-axis coordinate and the second minimum X-axis coordinate is within a preset value range, and A i+1 The width is less than A i When the width is twice that of the first maximum X-axis coordinate, the second minimum X-axis coordinate is updated based on the first maximum X-axis coordinate, and the second maximum X-axis coordinate is updated based on the first maximum X-axis coordinate and the width of the second seat detection box to obtain the second X-axis position information corresponding to the second seat detection box. Specifically, A can be... i+1 The second smallest X-axis coordinate is replaced by A i The maximum X-axis coordinate, and A i+1 Replace the maximum X-axis coordinate with A i Maximum X-axis coordinate plus A i The width.
[0050] Sub-step 1305c-3: When the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate exceeds the preset numerical range, and A i+1 The width is less than A i When the width is specified, the second minimum X-axis coordinate is updated based on the first maximum X-axis coordinate to obtain the second X-axis position information corresponding to the second seat detection box.
[0051] Specifically, A i+1 The minimum X-axis coordinate is replaced with A. i The maximum X-axis coordinate.
[0052] Sub-step 1306: When the judgment result obtained by executing sub-step 1304 is negative, the seat detection boxes in the detection box group are completed according to the size relationship between the original X-axis position information of each seat detection box in the detection box group. Specifically, the passenger management system can complete the seat detection boxes in the detection box group by following these sub-steps: Sub-step 1306a: Iterate through each seat detection box in the detection box group to determine the current seat detection box A. i The corresponding first maximum X-axis coordinate and first minimum X-axis coordinate, and the second seat detection box A i+1 The corresponding second minimum X-axis coordinate and the second maximum X-axis coordinate; Sub-step 1306b: When the second minimum X-axis coordinate is greater than the sum of the first maximum X-axis coordinate and the width of the current seat detection box, the seat detection boxes in the detection box group are completed.
[0053] In one implementation, the passenger management system can specifically complete the seat detection boxes in the detection box group according to the following method: When A i+1 The minimum X-axis coordinate is greater than A i Maximum X-axis coordinate plus A i When the width is [value], then A can be [value]. i The maximum X-axis coordinate is determined as A i With A i+1 The minimum X-axis coordinate of the detection box to be filled between the two seats is determined, and the minimum X-axis coordinate of the detection box to be filled is compared with A. i The sum of the widths determines the maximum X-axis coordinate of the detection frame for the seat to be completed.
[0054] When A i+1 The minimum X-axis coordinate is greater than A i Maximum X-axis coordinate and A i When the width and the set value are summed, then A can be... i The minimum X-axis coordinate and A i The difference in width is determined as A. i With A i+1 The minimum X-axis coordinate of the detection box to be filled between the two seats is determined, and the minimum X-axis coordinate of the detection box to be filled is compared with A. i The sum of the widths determines the maximum X-axis coordinate of the detection frame for the seat to be completed.
[0055] Sub-step 1307: Based on the second position information, determine the seat information corresponding to each seat detection box in the seat detection box set.
[0056] After adjusting the seat detection boxes output by the object detection model by performing the above sub-steps, each seat detection box can basically represent the position information of each seat in the carriage. The passenger management system can then assign a number to each seat detection box in each set of preset cameras, starting with the set of seat detection boxes output by the object detection model for the image of the carriage captured by camera number one, and associate each number with the actual seat number to determine the seat information corresponding to each seat detection box in the set. It should also be noted that there are overlapping areas between different cameras. To ensure the accuracy of the seat numbers, the passenger management system can start from the last camera and number the seats in reverse order, finding the overlapping seats and saving the seat detection box number corresponding to the next camera.
[0057] Step 14: Determine the overlap ratio (IoU) between each face detection box in the face detection box set and each seat detection box in the seat detection box set. Specifically, the passenger management system first sorts the detection boxes output by the target detection model by category (i.e., face detection boxes and seat detection boxes) by coordinates. Let the set of face detection boxes be denoted as B, and the set of seat detection boxes as A. Using face detection boxes B as a reference, the system iterates through the set to find the corresponding seat detection boxes in set A for each face detection box in set B. For example, if the current face detection box is B... i Then, the set of seat detection boxes A and the corresponding seat detection boxes before and after it are {A}. i-1 A i A i+1}
[0058] Secondly, the passenger management system can calculate the IoU of the selected face detection box and seat detection box respectively according to the following formula [2]: [2] Where A∩B represents the area of the overlapping portion of detection boxes A and B, area A The area represents the area of the detection box A. B This represents the area of detection box B.
[0059] Step 15: Determine the binding relationship between each face detection box in the face detection box set and each seat detection box in the seat detection box set according to the overlap ratio IoU; Select the seat detection bounding box with the largest IoU that is greater than a set threshold, and determine the binding relationship between the face detection bounding box and the seat detection bounding box. For example, by executing step 14, determine that the current face detection bounding box is B. i With seat detection box A i+1 If the IoU value is the highest, then the face detection bounding box can be determined as B. i With seat detection box A i+1 The binding relationship.
[0060] Step 16: Based on the binding relationship and seat information, determine the seating information of each seat in the target carriage, and manage passengers in the target carriage according to the seating information.
[0061] After establishing the binding relationship between the face detection frame and the seat detection frame, the passenger management system can further determine the passenger's seating information corresponding to the face detection frame based on the seat information (e.g., seat information: carriage 7, seat 05c). By performing face recognition on the face image within the face detection frame, the passenger information is determined. By comparing this passenger information with the ticket information pre-stored in the system, it can be determined whether the passenger has purchased a ticket and whether the passenger is seated according to the ticket information. For passengers who have not purchased a ticket or are not seated according to the ticket information, the system can remind the train staff, thereby realizing the management of passengers in the carriage.
[0062] The passenger management method provided in this application allows for seat association and passenger management within a train carriage. Video data of the target carriage can be collected using a video acquisition device pre-installed in the carriage. Frame extraction is performed on the video data to obtain at least one carriage image corresponding to the target carriage. Then, based on a pre-trained target detection model, target detection processing is performed on the collected carriage image to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model. The seat information corresponding to each seat detection box in the seat detection box set is determined. The overlap ratio (IoU) between each face detection box in the face detection box set and each seat detection box in the seat detection box set is determined. Based on the overlap ratio (IoU), the binding relationship between each face detection box in the face detection box set and each seat detection box in the seat detection box set is determined. Based on the binding relationship and seat information, the occupancy information of each seat in the target carriage is determined, thereby enabling passenger management of the target carriage based on the determined occupancy information. The method provided in this application embodiment has two advantages. First, by using video acquisition and target detection, it can efficiently and accurately identify and associate passengers in vehicles, avoiding the inefficiency and inaccuracy of existing manual recording methods. Second, when performing target detection, this application embodiment outputs corresponding seat detection box sets and face detection box sets for seats and passengers' faces, respectively. In the process of outputting seat detection boxes, the seat detection boxes are grouped, and the original position information of each seat detection box is optimized and adjusted based on the position information between each seat detection box in the same group. The seat information corresponding to the optimized and adjusted seat detection box is then determined, thereby ensuring the accuracy of the seat detection boxes output by the target detection model, and thus ensuring the accuracy of subsequent passenger seat binding management based on the seat detection boxes.
[0063] In one embodiment, this application also provides a passenger management device to address the problem that existing intelligent transportation systems require manual checks to verify passenger seating. With the increasing number of passengers, this primitive management method is inefficient and inaccurate, significantly impacting the normal operation of the intelligent transportation system. A schematic diagram of the specific structure of the passenger management device is shown below. Figure 3 As shown, it includes: an image acquisition unit 31, a target detection unit 32, a seat information determination unit 33, a calculation unit 34, a seat binding unit 35, and a management unit 36.
[0064] The image acquisition unit 31 is used to acquire video data of the target carriage according to a preset video acquisition device, perform frame extraction processing on the video data, and obtain at least one carriage image corresponding to the target carriage. The target detection unit 32 is used to perform target detection processing on the carriage image based on a pre-trained target detection model to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model. The seat information determination unit 33 is used to determine the seat information corresponding to each seat detection box in the seat detection box set; The calculation unit 34 is used to determine the overlap ratio (IoU) between each face detection box in the face detection box set and each seat detection box in the seat detection box set. The seat binding unit 35 is used to determine the binding relationship between each face detection box in the face detection box set and each seat detection box in the seat detection box set according to the overlap ratio IoU. The management unit 36 is used to determine the occupancy information of each seat in the target carriage based on the binding relationship and the seat information, and to perform passenger management in the target carriage based on the occupancy information.
[0065] In one embodiment, the system further includes a model training unit, specifically configured to: construct a training image set based on pre-collected seat images, passenger face images, and seat images with faces occluded; select training sample images from the training image set and determine the text description corresponding to the object to be detected in the training sample images; input the text description into an embedded embedding model to obtain text features corresponding to the training sample images; input the training sample images into an initial object detection model to obtain image features corresponding to the training sample images; and optimize and train the initial object detection model based on the text features and the image features, using a preset bounding box regression loss function and a preset semantic matching loss function, to obtain a trained object detection model.
[0066] In one embodiment, the seat information determination unit 33 is specifically configured to: determine the original position information corresponding to each seat detection frame in the seat detection frame set, wherein the original position information includes the original X-axis position information and Y-axis position information of each seat detection frame; group the seat detection frames in the seat detection frame set according to the Y-axis position information of the seat detection frames to obtain at least one detection frame group; determine the number of seats corresponding to the detection frame group according to the original X-axis position information of each seat detection frame in the detection frame group; determine whether the number of seats is the same as the number of each seat detection frame contained in the detection frame group; when the determination result is yes, determine the number of seats corresponding to each seat detection frame in the detection frame group according to the original X-axis position information of each seat detection frame in the detection frame group. The original X-axis position information is used to update the original X-axis position information of each seat detection box in the detection box group based on the size relationship between the original X-axis position information. This yields the second X-axis position information corresponding to each seat detection box in the detection box group. Based on the second X-axis position information and the Y-axis position information, the second position information corresponding to each seat detection box is determined. If the determination result is negative, the seat detection boxes in the detection box group are completed based on the size relationship between the original X-axis position information of each seat detection box in the detection box group, and the second position information corresponding to each seat detection box in the completed detection box group is determined. Based on the second position information, the seat information corresponding to each seat detection box in the seat detection box set is determined.
[0067] In one embodiment, the seat information determination unit 33 is specifically configured to: determine the number of seat detection frames in the detection frame group; sort each seat detection frame in the detection frame group according to the X-axis direction, traverse each seat detection frame in the detection frame group sequentially, and determine the first maximum X-axis coordinate corresponding to the current seat detection frame and the second minimum X-axis coordinate corresponding to the second seat detection frame located after the current seat detection frame based on the original X-axis position information of the seat detection frame; determine the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate; when the difference is within a preset value range, determine the number of seat detection frames as the number of seats corresponding to the detection frame group; when the difference exceeds the preset value range, determine the first minimum X-axis coordinate corresponding to the current seat detection frame, determine a modification parameter based on the first minimum X-axis coordinate, the first maximum X-axis coordinate, and the second minimum X-axis coordinate, and determine the number of seats corresponding to the detection frame group based on the number of seat detection frames and the modification parameter.
[0068] In one embodiment, the seat information determination unit 33 is specifically configured to: sequentially traverse each seat detection box in the detection box group, determine the first maximum X-axis coordinate and the first minimum X-axis coordinate corresponding to the current seat detection box, and the second minimum X-axis coordinate and the second maximum X-axis coordinate corresponding to the second seat detection box; when the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate is within the preset value range, the original X-axis position of the seat detection box is retained; when the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate exceeds the preset value range, the original X-axis position information of the second seat detection box is updated according to the first maximum X-axis coordinate and the first minimum X-axis coordinate to obtain the second X-axis position information corresponding to the second seat detection box.
[0069] In one embodiment, the seat information determination unit 33 is specifically configured to: update the second minimum X-axis coordinate based on the first maximum X-axis coordinate when the difference between the first minimum X-axis coordinate and the second minimum X-axis coordinate is within a preset value range, and the difference between the width of the second seat detection frame and twice the width of the current seat detection frame is within a preset value range, thereby obtaining the second X-axis position information corresponding to the second seat detection frame; update the second minimum X-axis coordinate based on the first maximum X-axis coordinate, and update the second maximum X-axis coordinate based on the first maximum X-axis coordinate and the width of the second seat detection frame, thereby obtaining the second X-axis position information corresponding to the second seat detection frame; update the second minimum X-axis coordinate based on the first maximum X-axis coordinate and the width of the second seat detection frame, thereby obtaining the second X-axis position information corresponding to the second seat detection frame; and update the second minimum X-axis coordinate based on the first maximum X-axis coordinate when the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate exceeds the preset value range, and the width of the second seat detection frame is less than the width of the current seat detection frame, thereby obtaining the second X-axis position information corresponding to the second seat detection frame.
[0070] In one embodiment, the seat information determination unit 33 is specifically used to: sequentially traverse each seat detection box in the detection box group, determine the first maximum X-axis coordinate and the first minimum X-axis coordinate corresponding to the current seat detection box, and the second minimum X-axis coordinate and the second maximum X-axis coordinate corresponding to the second seat detection box; when the second minimum X-axis coordinate is greater than the sum of the first maximum X-axis coordinate and the width of the current seat detection box, complete the seat detection boxes in the detection box group.
[0071] The passenger management method provided in this application allows for seat association and passenger management within a train carriage. Video data of the target carriage can be collected using a video acquisition device pre-installed in the carriage. Frame extraction is performed on the video data to obtain at least one carriage image corresponding to the target carriage. Then, based on a pre-trained target detection model, target detection processing is performed on the collected carriage image to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model. The seat information corresponding to each seat detection box in the seat detection box set is determined. The overlap ratio (IoU) between each face detection box in the face detection box set and each seat detection box in the seat detection box set is determined. Based on the overlap ratio (IoU), the binding relationship between each face detection box in the face detection box set and each seat detection box in the seat detection box set is determined. Based on the binding relationship and seat information, the occupancy information of each seat in the target carriage is determined, thereby enabling passenger management of the target carriage based on the determined occupancy information. The method provided in this application embodiment has two advantages. First, by using video acquisition and target detection, it can efficiently and accurately identify and associate passengers in vehicles, avoiding the inefficiency and inaccuracy of existing manual recording methods. Second, when performing target detection, this application embodiment outputs corresponding seat detection box sets and face detection box sets for seats and passengers' faces, respectively. In the process of outputting seat detection boxes, the seat detection boxes are grouped, and the original position information of each seat detection box is optimized and adjusted based on the position information between each seat detection box in the same group. The seat information corresponding to the optimized and adjusted seat detection box is then determined, thereby ensuring the accuracy of the seat detection boxes output by the target detection model, and thus ensuring the accuracy of subsequent passenger seat binding management based on the seat detection boxes.
[0072] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Please refer to it. Figure 4 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.
[0073] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0074] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0075] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a passenger management device at the logical level. The processor executes the program stored in memory and specifically performs the following operations: Video data of the target carriage is acquired using a preset video acquisition device. Frame extraction is performed on the video data to obtain at least one carriage image corresponding to the target carriage. Based on a pre-trained target detection model, target detection processing is performed on the carriage image to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model. The seat information corresponding to each seat detection box in the set of seat detection boxes is determined. The overlap ratio (IoU) between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes is determined. The binding relationship between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes is determined based on the overlap ratio (IoU). Based on the binding relationship and the seat information, the occupancy information of each seat in the target carriage is determined, and passenger management is performed on the target carriage based on the occupancy information.
[0076] The above is as stated in this application. Figure 4The passenger management electronic device method disclosed in the illustrated embodiments can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0077] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0078] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform... Figure 2 The method of the illustrated embodiment is specifically used to perform the following operations: Video data of the target carriage is acquired using a preset video acquisition device. Frame extraction is performed on the video data to obtain at least one carriage image corresponding to the target carriage. Based on a pre-trained target detection model, target detection processing is performed on the carriage image to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model. The seat information corresponding to each seat detection box in the set of seat detection boxes is determined. The overlap ratio (IoU) between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes is determined. The binding relationship between each face detection box in the set of face detection boxes and each seat detection box in the set of seat detection boxes is determined based on the overlap ratio (IoU). Based on the binding relationship and the seat information, the occupancy information of each seat in the target carriage is determined, and passenger management is performed on the target carriage based on the occupancy information.
[0079] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention 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.
[0080] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will 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 and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0081] 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.
[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed 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.
[0083] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0084] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0085] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0086] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0087] 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.
[0088] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A passenger management method, characterized in that, include: Video data of the target carriage is collected by a preset video acquisition device, and the video data is processed by frame extraction to obtain at least one carriage image corresponding to the target carriage. Based on a pre-trained target detection model, target detection processing is performed on the carriage image to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model. Determine the seat information corresponding to each seat detection box in the seat detection box set; Determine the overlap ratio (IoU) between each face detection box in the face detection box set and each seat detection box in the seat detection box set; The binding relationship between each face detection box in the face detection box set and each seat detection box in the seat detection box set is determined based on the overlap ratio IoU. Based on the binding relationship and the seat information, the occupancy information of each seat in the target carriage is determined, and passenger management is performed on the target carriage based on the occupancy information.
2. The method according to claim 1, characterized in that, Pre-training the object detection model specifically includes: A training image set is constructed based on pre-collected seat images, passenger face images, and seat images with faces occluded. Training sample images are selected from the training image set, and the text descriptions corresponding to the objects to be detected in the training sample images are determined. The text description is input into the embedded embedding model to obtain the text features corresponding to the training sample image; The training sample images are input into the initial target detection model to obtain the image features corresponding to the training sample images; Based on the text features and image features, the initial object detection model is optimized and trained using a preset bounding box regression loss function and a preset semantic matching loss function to obtain the trained object detection model.
3. The method according to claim 1, characterized in that, The step of determining the seat information corresponding to each seat detection box in the seat detection box set specifically includes: Determine the original position information corresponding to each seat detection box in the seat detection box set, wherein the original position information includes the original X-axis position information and Y-axis position information of each seat detection box; Based on the Y-axis position information of the seat detection boxes, each seat detection box in the set of seat detection boxes is grouped to obtain at least one detection box group; Based on the original X-axis position information of each seat detection box in the detection box group, determine the number of seats corresponding to the detection box group; Determine whether the number of seats is the same as the number of seat detection frames contained in the detection frame group; When the judgment result is yes, the original X-axis position information of each seat detection box in the detection box group is updated according to the size relationship between the original X-axis position information of each seat detection box in the detection box group, so as to obtain the second X-axis position information corresponding to each seat detection box in the detection box group. Based on the second X-axis position information and the Y-axis position information, the second position information corresponding to the seat detection box is determined. When the judgment result is negative, the seat detection boxes in the detection box group are completed according to the size relationship between the original X-axis position information of each seat detection box in the detection box group, and the second position information corresponding to each seat detection box in the detection box group after completion is determined. Based on the second location information, determine the seat information corresponding to each seat detection box in the seat detection box set.
4. The method according to claim 3, characterized in that, The step of determining the number of seats corresponding to each detection frame group based on the original X-axis position information of each seat detection frame in the detection frame group specifically includes: Determine the number of seat detection frames in the detection frame group; Sort the seat detection boxes in the detection box group according to the X-axis direction, traverse the seat detection boxes in the detection box group in turn, and determine the first maximum X-axis coordinate corresponding to the current seat detection box and the second minimum X-axis coordinate corresponding to the second seat detection box located after the current seat detection box based on the original X-axis position information of the seat detection box. Determine the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate; When the difference is within a preset value range, the number of seat detection frames is determined to be the number of seats corresponding to the detection frame group; When the difference exceeds a preset value range, the first minimum X-axis coordinate corresponding to the current seat detection box is determined. Based on the first minimum X-axis coordinate, the first maximum X-axis coordinate, and the second minimum X-axis coordinate, the modification parameter is determined. Based on the number of seat detection boxes and the modification parameter, the number of seats corresponding to the detection box group is determined.
5. The method according to claim 4, characterized in that, The step of updating the original X-axis position information of each seat detection frame in the detection frame group based on the size relationship between the original X-axis position information of each seat detection frame in the detection frame group, to obtain the second X-axis position information corresponding to each seat detection frame in the detection frame group, specifically includes: Iterate through each seat detection box in the detection box group in sequence, and determine the first maximum X-axis coordinate and the first minimum X-axis coordinate corresponding to the current seat detection box, as well as the second minimum X-axis coordinate and the second maximum X-axis coordinate corresponding to the second seat detection box; When the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate is within the preset value range, the original X-axis position of the seat detection frame is retained. When the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate exceeds the preset value range, the original X-axis position information of the second seat detection frame is updated according to the first maximum X-axis coordinate and the first minimum X-axis coordinate to obtain the second X-axis position information corresponding to the second seat detection frame.
6. The method according to claim 5, characterized in that, When the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate exceeds the preset value range, the original X-axis position information of the second seat detection frame is updated based on the first maximum X-axis coordinate and the first minimum X-axis coordinate to obtain the second X-axis position information corresponding to the second seat detection frame, specifically including: When the difference between the first minimum X-axis coordinate and the second minimum X-axis coordinate is within the preset value range, and the difference between the width of the second seat detection frame and twice the width of the current seat detection frame is within the preset value range, the second minimum X-axis coordinate is updated according to the first maximum X-axis coordinate to obtain the second X-axis position information corresponding to the second seat detection frame. When the difference between the first minimum X-axis coordinate and the second minimum X-axis coordinate is within the preset value range, and the width of the second seat detection box is less than twice the width of the current seat detection box, the second minimum X-axis coordinate is updated according to the first maximum X-axis coordinate, and the second maximum X-axis coordinate is updated according to the first maximum X-axis coordinate and the width of the second seat detection box, so as to obtain the second X-axis position information corresponding to the second seat detection box. When the difference between the second minimum X-axis coordinate and the first maximum X-axis coordinate exceeds the preset value range, and the width of the second seat detection box is less than the width of the current seat detection box, the second minimum X-axis coordinate is updated according to the first maximum X-axis coordinate to obtain the second X-axis position information corresponding to the second seat detection box.
7. The method according to claim 3, characterized in that, The step of completing the seat detection frames in the detection frame group based on the size relationship between the original X-axis position information of each seat detection frame in the detection frame group specifically includes: Iterate through each seat detection box in the detection box group in sequence, and determine the first maximum X-axis coordinate and the first minimum X-axis coordinate corresponding to the current seat detection box, as well as the second minimum X-axis coordinate and the second maximum X-axis coordinate corresponding to the second seat detection box; When the second minimum X-axis coordinate is greater than the sum of the first maximum X-axis coordinate and the width of the current seat detection box, the seat detection boxes in the detection box group are completed.
8. A passenger management device, characterized in that, include: The image acquisition unit is used to acquire video data of the target carriage according to a preset video acquisition device, perform frame extraction processing on the video data, and obtain at least one carriage image corresponding to the target carriage. The object detection unit is used to perform object detection processing on the carriage image based on a pre-trained object detection model, and obtain a set of face detection boxes and a set of seat detection boxes output by the object detection model. A seat information determination unit is used to determine the seat information corresponding to each seat detection box in the seat detection box set; The calculation unit is used to determine the overlap ratio (IoU) between each face detection box in the face detection box set and each seat detection box in the seat detection box set. A seat binding unit is used to determine the binding relationship between each face detection box in the face detection box set and each seat detection box in the seat detection box set according to the overlap ratio IoU. The management unit is used to determine the occupancy information of each seat in the target carriage based on the binding relationship and the seat information, and to manage passengers in the target carriage based on the occupancy information.
9. A passenger management device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the following operations: Video data of the target carriage is collected by a preset video acquisition device, and the video data is processed by frame extraction to obtain at least one carriage image corresponding to the target carriage. Based on a pre-trained target detection model, target detection processing is performed on the carriage image to obtain a set of face detection boxes and a set of seat detection boxes output by the target detection model. Determine the seat information corresponding to each seat detection box in the seat detection box set; Determine the overlap ratio (IoU) between each face detection box in the face detection box set and each seat detection box in the seat detection box set; The binding relationship between each face detection box in the face detection box set and each seat detection box in the seat detection box set is determined based on the overlap ratio IoU. Based on the binding relationship and the seat information, the occupancy information of each seat in the target carriage is determined, and passenger management is performed on the target carriage based on the occupancy information.
10. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of applications, cause the electronic device to perform the passenger management method as described in any one of claims 1-7.
11. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the passenger management method as described in any one of claims 1-7.