Station passenger clearing method and device

Through image processing and machine learning technology, the number of people entering and leaving the station is automatically counted, which solves the problems of manual customer clearance and missed camera blind spots, and achieves an efficient and accurate customer clearance process.

CN114943930BActive Publication Date: 2025-04-18BEIJING AI FOR RAIL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210481460.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2025-04-18
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

In the prior art, closing the station to clear passengers through manual monitoring and manual inspection is time-consuming and labor-intensive, expensive, and easy to miss in the dead corners of the camera, resulting in inaccurate passenger counting.

Method used

Image processing technology and machine learning algorithms are used to obtain each frame of the entrance and exit of a type of area, determine the detection box through the object detection model, and use the target tracking model to generate a tracker to track the location of the target object, thereby counting the number of people entering and exiting the target object in a type of area.

Benefits of technology

Accurate number of people entering and leaving areas where internal images cannot be taken (such as bathrooms, unopened channels, etc.), improve the accuracy of passenger clearance, replace manual inspections, and improve the efficiency of passenger clearance at the station.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114943930B_ABST
    Figure CN114943930B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for clearing passengers from a station, the method comprising: obtaining each frame image of the entrance and exit of a type of area, and determining the detection frame of all target objects in each frame image; inputting the detection frame of each frame image into a preset target tracking model, generating a tracker corresponding to each detection frame of each frame image, and tracking the position of the target object corresponding to the detection frame according to the tracker of each frame image; determining the number of people entering and leaving the target object of the type of area according to the tracking result of the target object position; wherein the type of area is an area where the internal image cannot be taken. The method tracks the position of the target object corresponding to the detection frame through the tracker of each frame image, thereby realizing the statistics of the number of people entering and leaving the type of area, avoiding the problem of being unable to determine the number of passengers caused by the blind spot of the camera, improving the accuracy of clearing passengers, and at the same time, there is no need to clear passengers through manual patrol methods, which can completely replace manual clearing passengers and improve the efficiency of clearing passengers from the station.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of rail transportation, and in particular to a station passenger clearing method and device. Background Art

[0002] After the subway stops operating every day, before carrying out ticket settlement, station cleaning, equipment maintenance and other work, it is necessary to first ensure that all passengers in the station have left and the station entrances and exits are closed.

[0003] The current method of closing the station and clearing passengers is: after the train attendant broadcasts the end of today's train service, he will confirm whether there are any passengers staying in the station through the station monitoring, and let the special station cleaning personnel guide the passengers stranded in the subway station out of the station. At the same time, the station cleaning personnel will conduct a comprehensive inspection of the station platform, station hall, passages, entrances and exits, and other locations, and focus on cleaning the blind spots of the cameras such as the toilets, closed passage entrances and exits, and the four corners of the platform. After ensuring that all passengers have left the station, they will report the station cleaning results to the duty stationmaster, and then close the station's escalators and entrances and exits in turn.

[0004] However, closing a station and clearing out passengers by manually monitoring and patrolling is not only time-consuming, labor-intensive and costly, but also can only be done through manual patrols to clear out blind spots of cameras, such as toilets and closed passages, which is very time-consuming and may result in errors. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention provides a station passenger clearing method and device.

[0006] The present invention provides a method for clearing passengers from a station, comprising: obtaining each frame image of an entrance and exit of a type of area, and determining detection frames of all target objects in each frame image; inputting the detection frames of each frame image into a preset target tracking model, generating a tracker corresponding to each detection frame of each frame image, and tracking the position of the target object corresponding to the detection frame according to the tracker of each frame image; determining the number of target objects entering and exiting the type of area according to the tracking result of the target object position; wherein the type of area is an area where internal images cannot be taken.

[0007] According to a station passenger clearing method provided by the present invention, the detection frame of each frame image is input into a preset target tracking model to generate a tracker corresponding to each detection frame of each frame image, including: for the second frame and each current frame image thereafter, the tracker generated according to the image frame closest in time is matched with the detection frame of the target object; and the process of matching the unmatched detection frame with the tracker generated by the next closest frame image is repeated until the tracker generated by the earliest frame image is reached; the current frame position information of the target object detection frame is determined according to the matched tracker, and the tracker corresponding to the target object detection frame of the current frame image is determined according to the current frame position information.

[0008] According to a station passenger clearing method provided by the present invention, after reaching the tracker generated by the earliest frame image, it also includes: for the target object detection frame that has not been matched, secondary matching is performed according to the intersection-over-union ratio (IOU), and the tracker corresponding to the frame with the smallest position change is determined; according to the tracker corresponding to the frame with the smallest position change, the current frame tracker of the target object detection frame is determined.

[0009] According to a station clearing method provided by the present invention, after determining the current frame tracker of the target object detection frame based on the tracker corresponding to the frame with the minimum position change, the method also includes: creating a corresponding temporary tracker for the target detection frame that has not yet been matched; in subsequent image frames, if the temporary tracker only appears once, deleting the temporary tracker after a preset time length; if the temporary tracker appears multiple times in the image frame, but the matching failure time length is greater than a preset period, deleting the temporary tracker.

[0010] According to a station clearing method provided by the present invention, the number of people entering and leaving the target object of the first type of area is determined based on the tracking result of the target object position, including: taking the fixed position of each tracker as a collision point, and dividing the image into an inner area and an outer area according to the direction of travel; when it is detected that the collision point of a tracker enters the inner area from the outer area, the number of people entering is increased by one, and when it is detected that the collision point of a tracker enters the outer area from the inner area, the number of people leaving is increased by one; based on the number of people entering and leaving, the number of people entering and leaving the first type of area is determined.

[0011] According to a station clearing method provided by the present invention, the method also includes: acquiring images of two types of areas, inputting each image of the two types of areas into a trained second target detection model, and outputting passenger recognition results in the images of the two types of areas; determining whether the clearing is completed based on the number of inbound and outbound passengers of the target object of the one type of area and the passenger recognition results of the two types of areas; wherein the second target detection model is obtained after training based on sample images of the two types of areas with passenger and staff labels; the two types of areas are other areas outside the one type of areas.

[0012] According to a station passenger clearing method provided by the present invention, the method of obtaining each frame image of the entrance and exit of a type of area and determining the detection frames of all target objects in each frame image includes: inputting each frame image of the entrance and exit of a type of area into a trained first target detection model, and outputting the detection frame of the target object of each frame image; wherein the first target detection model is obtained after training based on sample images of a type of area with different target object labels.

[0013] The present invention also provides a station passenger clearance device, comprising: an acquisition module, used to obtain each frame image of the entrance and exit of a type of area, and determine the detection frame of all target objects in each frame image; a tracking module, used to input the detection frame of each frame image into a preset target tracking model, generate a tracker corresponding to each detection frame of each frame image, and track the position of the target object corresponding to the detection frame according to the tracker of each frame image; a processing module, used to determine the number of target objects entering and exiting the type of area according to the tracking result of the target object position.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned station clearing methods is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the station passenger clearing method as described in any one of the above is implemented.

[0016] The station clearing method and device provided by the present invention tracks the position of the target object corresponding to the detection frame through a tracker in each frame of the image, thereby realizing the statistics of the number of people entering and leaving areas such as toilets and closed passages, and can avoid the problem of being unable to determine the number of passengers due to blind spots of the camera, improve the accuracy of clearing passengers, and at the same time, there is no need to clear passengers through manual patrols, which can completely replace manual clearing and improve the efficiency of clearing passengers at the station. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 This is one of the flow diagrams of the station passenger clearing method provided by the present invention;

[0019] Figure 2This is the second flow chart of the station passenger clearing method provided by the present invention;

[0020] Figure 3 It is a schematic diagram of bidirectional collision detection provided by the present invention;

[0021] Figure 4 This is the third flow chart of the station passenger clearing method provided by the present invention;

[0022] Figure 5 It is a structural schematic diagram of the station passenger clearing device provided by the present invention;

[0023] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Combine the following Figure 1-Figure 6 The present invention describes a station passenger clearing method and device. Figure 1 FIG. 1 is one of the flow charts of the station clearing method provided by the present invention, such as Figure 1 As shown, the present invention provides a station passenger clearing method, comprising:

[0026] 101. Obtain each frame of an image at an entrance and exit of a type of area, and determine the detection frames of all target objects in each frame of the image.

[0027] The first type of area is an area where internal images cannot be captured, such as toilets, end doors, etc., where cameras can only capture images at the entrance but cannot capture internal conditions, also called special areas.

[0028] First, cameras are set up at the entrances and exits of a certain area. For example, images of the entrances and exits can be obtained with the help of existing cameras. Then, the detection frame of the target object is determined with the help of trained deep learning object detection models, such as CenterNet, EfficientNet, FasterRCNN, YOLO series, etc. Depending on the actual situation, the target object can choose to train a model that distinguishes between passengers and staff or does not distinguish between them.

[0029] Use image processing libraries such as Opencv to obtain images frame by frame from cameras in special areas of the subway, and record the location information of the camera. Pass the image into the above-mentioned target detection model, which will output the target object detection results of the image. Generally, it contains the center point coordinates and width and height of many detection boxes, as well as the labels corresponding to the detection boxes.

[0030] 102. Input the detection frame of each frame image into a preset target tracking model, generate a tracker corresponding to each detection frame of each frame image, and track the position of the target object corresponding to the detection frame according to the tracker of each frame image.

[0031] Use deep learning target tracking models such as DeepSort, ByteTrack, and StrongSORT to track the detection frames generated in the previous step. That is, the detection frames generated by consecutive camera frames are passed to the tracking model. The tracking model will regard the detection frames with similar features as the same target and attach the same ID number. The ID numbers of different targets are independent of each other and different.

[0032] 103. Determine the number of people entering and leaving the target object in the first type of area according to the tracking result of the target object position.

[0033] After the above steps, each person in the camera video will have an ID, which will not change easily during movement, and can be used to count the number of people entering and leaving a specific area. Then, based on the comparison of the number of people entering and leaving, it can be used as the basis for clearing passengers from the station.

[0034] The station clearing method provided by the present invention tracks the position of the target object corresponding to the detection frame through a tracker in each frame of the image, thereby realizing the statistics of the number of people entering and leaving areas such as toilets and closed passages, and can avoid the problem of being unable to determine the number of passengers due to blind spots of the camera, thereby improving the accuracy of clearing passengers. At the same time, there is no need to clear passengers through manual patrols, and manual clearing can be completely replaced, thereby improving the efficiency of clearing passengers at the station.

[0035] In one embodiment, the detection frame of each frame image is input into a preset target tracking model to generate a tracker corresponding to each detection frame of each frame image, including: for the second frame and each current frame image thereafter, matching the tracker generated according to the image frame closest in time with the detection frame of the target object; and repeating the process of matching the unmatched detection frame using the tracker generated by the next closest frame image until the tracker generated by the earliest frame image is reached; determining the current frame position information of the target object detection frame according to the matched tracker, and determining the tracker corresponding to the target object detection frame of the current frame image according to the current frame position information.

[0036] Considering that the ID generated through the above 103 steps will not change easily, the ID of the same person will still change when there is a long-term occlusion, so the number of IDs cannot be simply regarded as the number of people.

[0037] Specifically, the detection box output by the target detection model is detection, and several detection boxes are detections. First, detections are passed into the above target tracking model, and a tracker track is created for each detection. Several trackers are tracks.

[0038] When the detections of the second frame and each subsequent frame are passed to the target tracking model, a cascade matching is performed on the existing tracks and detections based on appearance information, that is, the most recently generated tracks are matched with detections first, and tracks and detections with similar appearance information are matched together, and then the second most recently generated tracks are matched with the remaining detections, and so on, until the earliest generated tracks are reached, and the cascade matching is completed. For the matched matchedTracks, the output value of the position is calculated by Kalman filtering as the new tarcks for the next round of tracking.

[0039] The station clearing method of the embodiment of the present invention tracks the detection frames that are not matched and cannot be tracked according to the next most recent image frames in sequence, which can avoid the problem of tracking failure in situations such as long-term occlusion.

[0040] In one embodiment, after reaching the tracker generated by the earliest frame image, the method further includes: for the target object detection frame that has not been matched, performing secondary matching based on the intersection-and-union ratio (IOU), and determining the tracker corresponding to the frame with the smallest position change; and determining the current frame tracker of the target object detection frame based on the tracker corresponding to the frame with the smallest position change.

[0041] Figure 2 FIG. 2 is a flow chart of the station passenger clearing method provided by the present invention. Figure 2 The above-mentioned embodiment includes a combination of the above-mentioned embodiments. For the unmatched detections and tracks, IOU matching is used for secondary matching to match the detections and tracks with smaller position changes. This step is if the target is partially occluded, its appearance information is different from before, and there will be a mismatch in the appearance matching, but the position change is small, and the close track can still be matched with it.

[0042] The station passenger clearance method of an embodiment of the present invention performs secondary matching through IOU and determines the position information of the target object detection frame according to the tracker with the smallest position change, thereby avoiding the matching failure problem caused by partial occlusion of passengers, thereby achieving accurate tracking of each passenger.

[0043] In one embodiment, after determining the current frame tracker of the target object detection frame based on the tracker corresponding to the frame with the minimum position change, the method also includes: creating a corresponding temporary tracker for the target detection frame that has not yet been matched; in subsequent image frames, if the temporary tracker only appears once, deleting the temporary tracker after a preset time length; if the temporary tracker appears multiple times in the image frame, but the matching failure time length is greater than a preset period, deleting the temporary tracker.

[0044] For the current target detection frame that failed to match, a temporary track is established for it. For a mismatched track, if it only appears once and never appears again, it means that the corresponding detection is the result of a false detection. After exceeding the preset time, the temporary track is deleted. If it appears more than once, determine whether its number of mismatches is greater than the maximum life cycle specified by humans. If it is greater, it means that the detection corresponding to this track has not appeared for a long time, and it may be that the target has left the screen, so this track is deleted. If it is less than, it enters the next iteration together with the matched tracks. This is done so that when the target is briefly occluded and reappears after a few frames, the track can still find the corresponding detection.

[0045] The station clearing method of the embodiment of the present invention can avoid the situation where the target is temporarily blocked and then missed when it appears again after a few frames by creating a corresponding temporary tracker for the target detection frame that has not been matched.

[0046] In one embodiment, the number of people entering and exiting the target object of the type of area is determined based on the tracking result of the target object position, including: taking the fixed position of each tracker as a collision point, and dividing the image into an internal area and an external area according to the direction of travel; when it is detected that the collision point of a tracker enters the internal area from the external area, the number of people entering is increased by one, and when it is detected that the collision point of a tracker enters the external area from the internal area, the number of people leaving is increased by one; based on the number of people entering and leaving, the number of people entering and exiting the target object of the type of area is determined.

[0047] Figure 3 is a schematic diagram of bidirectional collision detection provided by the present invention, such as Figure 3As shown in the figure, after obtaining many tracker tracks in the previous step of target tracking, a collision line point is drawn at a fixed point on the edge of each track. Two groups of areas are drawn on the image according to the direction of travel, the upper one is called the inner area and the lower one is called the outer area, which are used to judge the collision line of entry and exit.

[0048] When the collision point of the track hits the inner area, the ID (ID2) of this track is added to the inner area to determine whether this ID has appeared in the outer area. If so, it means that this track has passed through the outer area, that is, it went from the outer area to the inner area, and the number of people going up is +1.

[0049] When the collision point of the track hits the external area, the ID (ID1) of this track is added to the external area to determine whether this ID has appeared in the internal area. If so, it means that this track has passed through the internal area, that is, it went from the internal area to the external area, and the number of people going down is +1.

[0050] Optionally, IDs that do not appear in the two areas for a preset period of time are deleted to improve efficiency.

[0051] The station clearing method of the embodiment of the present invention can achieve accurate counting of the number of people entering and leaving the station and improve the efficiency of clearing passengers in special areas by performing two-way collision detection on the collision point of the tracker from the external area into the internal area and from the external area into the internal area.

[0052] In one embodiment, the method further includes: acquiring images of the second-category area, inputting each image of the second-category area into a trained second target detection model, and outputting passenger recognition results in the images of the second-category area; determining whether the passenger clearance is completed based on the number of inbound and outbound passengers of the target object of the first-category area and the passenger recognition results of the second-category area; wherein the second target detection model is obtained after training based on sample images of the second-category area with passenger and staff labels; the second-category area is other areas outside the first-category area.

[0053] Figure 4 This is the third flow diagram of the station clearing method provided by the present invention. If the target objects of the above-mentioned first-class area are only passengers, then according to the number of in-and-out targets of the first-class area, it is directly determined whether there are passengers stranded in the first-class area (special area), and at the same time, according to the passenger detection results of the second-class area (conventional area), it is determined whether there are passengers stranded in the second-class area. If there are no passengers, it is allowed to close the station and clear the passengers. Among them, the second-class area refers to the part of the station platform, station hall, passage, entrance and exit that can be normally monitored by cameras.

[0054] For detection in conventional areas, we can train a deep learning target detection model (to distinguish it from the target detection model for a type of area in the following text, it is called the second target detection model), such as CenterNet, EfficientNet, FasterRCNN, YOLO series, etc., to identify the input images and select passengers and staff respectively. The specific process is as follows:

[0055] Use BBox-Label-Tool and other annotation tools to annotate camera images. For passengers, use head and shoulders annotation or half-body annotation and set the label as passenger. For subway staff such as station cleaners, police officers, and cleaning staff, use half-body annotation and set the label as staff. The annotation box needs to completely select the upper body of the work clothes as a distinguishing feature from passengers.

[0056] The labeled data is divided into a training set and a test set according to a certain ratio, such as 80% of the data is set as a training set and 20% of the data is set as a test set, and the model is trained and tested to obtain the trained model weights.

[0057] When in use, the model is initialized to load the trained weights, and uses image processing libraries such as Opencv to obtain images frame by frame from cameras in regular areas of the subway, and records the location information of the cameras. The image is passed into the model, and the model outputs the detection results of the image, which generally include the center point coordinates and width and height of many detection boxes, as well as their corresponding labels. According to the previously annotated dataset, the labels will be passengers and staff.

[0058] Output the detection results. If the output results of the model in the above process contain passenger tags, the recorded camera position information and "station closure is not allowed" are output as the detection results of the regular area. If there is no passenger tag, "station closure is allowed" is output as the detection result of the regular area.

[0059] The station clearing method of the present invention can make timely judgments on the passenger detention situation of the entire station through target recognition based on machine learning in combination with conventional areas and special areas, thereby improving the clearing efficiency of the entire station.

[0060] In one embodiment, the method of acquiring each frame image of the entrance and exit of a type of area and determining the detection frames of all target objects in each frame image includes: inputting each frame image of the entrance and exit of a type of area into a trained first target detection model, and outputting the detection frame of the target object in each frame image; wherein the first target detection model is obtained after training based on sample images of a type of area with different target object labels.

[0061] For the detection of target objects in a type of area, that is, a special area, the detection model can be trained based on the same detection model as the second target detection model. For the sake of distinction, the model used for the detection of a type of area is called the first target detection model. Train deep learning target detection models, such as CenterNet, EfficientNet, FasterRCNN, and YOLO series. For specific training and detection steps, see the steps related to conventional area detection. Choose to train a model that distinguishes between passengers and staff or does not distinguish according to the actual situation.

[0062] The station clearing method of the embodiment of the present invention can improve the recognition efficiency of the target object and provide data support for the target tracking model by determining the detection frame for a type of area, that is, the special area, through a target detection model based on machine learning.

[0063] The station clearing device provided by the present invention is described below. The station clearing device described below and the station clearing method described above can be referred to each other.

[0064] Figure 5 Schematic diagram of the structure of the station passenger clearing device provided by the present invention. Figure 5 As shown, the station passenger clearing device includes: an acquisition module 501, a tracking module 502 and a processing module 503. The acquisition module 501 is used to obtain each frame of the entrance and exit of a type of area, and determine the detection frame of all target objects in each frame of the image; the tracking module 502 is used to input the detection frame of each frame of the image into a preset target tracking model, generate a tracker corresponding to each detection frame of each frame of the image, and track the position of the target object corresponding to the detection frame according to the tracker of each frame of the image; the processing module 503 is used to determine the number of target objects entering and leaving the type of area according to the tracking result of the target object position; wherein the type of area is an area where internal images cannot be taken.

[0065] In one embodiment, the tracking module 502 is specifically used to: for the second frame and each current frame image thereafter, match the tracker generated based on the temporally closest image frame with the detection frame of the target object; and repeat the process of matching the unmatched detection frames using the tracker generated by the next closest frame image until the tracker generated by the earliest frame image is reached; determine the current frame position information of the target object detection frame based on the matched tracker, and determine the tracker corresponding to the target object detection frame of the current frame image based on the current frame position information.

[0066] In one embodiment, the tracking module 502 is also used to, after reaching the tracker generated by the earliest frame image: for the target object detection frame that has not been matched, perform secondary matching based on the intersection-and-union ratio (IOU), and determine the tracker corresponding to the frame with the smallest position change; and determine the current frame tracker of the target object detection frame based on the tracker corresponding to the frame with the smallest position change.

[0067] In one embodiment, the tracking module 502 is also used to, after determining the position information of the target object detection frame according to the tracker with the smallest position change: for the target detection frame that has not yet been matched, create a corresponding temporary tracker; in subsequent image frames, if the temporary tracker only appears once, delete the temporary tracker after a preset time length; if the temporary tracker appears multiple times in the image frame, but the matching failure time length is greater than a preset period, delete the temporary tracker.

[0068] In one embodiment, the processing module 503 is specifically used to: use the fixed position of each tracker as a collision point, and divide the image into an internal area and an external area according to the direction of travel; when it is detected that the collision point of a tracker enters the internal area from the external area, the number of people entering is increased by one, and when it is detected that the collision point of a tracker enters the external area from the internal area, the number of people leaving is increased by one; based on the number of people entering and leaving, the number of people entering and leaving the target object of the said type of area is determined.

[0069] In one embodiment, the device also includes a second processing module, which is used to: obtain images of the second category area, input each image of the second category area into a trained second target detection model, and output passenger recognition results in the second category area images; determine whether the passenger clearance is completed based on the number of inbound and outbound passengers of the target object of the first category area and the passenger recognition results of the second category area; wherein the second target detection model is obtained after training based on sample images of the second category area with passenger and staff labels; the second category area is other areas outside the first category area.

[0070] In one embodiment, the acquisition module 501 is specifically used to: input each frame image of the entrance and exit of a type of area into a trained first target detection model, and output the detection box of the target object in each frame image; wherein, the first target detection model is obtained after training based on a type of area sample images with different target object labels.

[0071] The device embodiments provided in the embodiments of the present invention are for implementing the above-mentioned method embodiments. For specific processes and detailed contents, please refer to the above-mentioned method embodiments, which will not be repeated here.

[0072] The station clearing device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned station clearing method embodiment. For the sake of brief description, for matters not mentioned in the station clearing device embodiment, reference may be made to the corresponding contents in the aforementioned station clearing method embodiment.

[0073] Figure 6 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602 and the memory 603 communicate with each other through the communication bus 604. The processor 601 may call the logic instructions in the memory 603 to execute the station passenger clearing method, which includes: obtaining each frame image of the entrance and exit of a type of area, and determining the detection frame of all target objects in each frame image; inputting the detection frame of each frame image into a preset target tracking model, generating a tracker corresponding to each detection frame of each frame image, and tracking the position of the target object corresponding to the detection frame according to the tracker of each frame image; determining the number of target objects entering and leaving the type of area according to the tracking result of the target object position; wherein the type of area is an area where internal images cannot be taken.

[0074] In addition, the logic instructions in the above-mentioned memory 603 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0075] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the station clearing method provided by the above-mentioned methods, the method comprising: obtaining each frame image of the entrance and exit of a type of area, and determining the detection frame of all target objects in each frame image; inputting the detection frame of each frame image into a preset target tracking model, generating a tracker corresponding to each detection frame of each frame image, and tracking the position of the target object corresponding to the detection frame according to the tracker of each frame image; determining the number of target objects entering and exiting the type of area according to the tracking result of the target object position; wherein the type of area is an area where internal images cannot be taken.

[0076] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these 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 invention.

Claims

1. A method for clearing passengers from a station, characterized in that: include: Obtain each frame of the entrance and exit of a type of area, and determine the detection boxes of all target objects in each frame; Inputting the detection frame of each frame image into a preset target tracking model, generating a tracker corresponding to each detection frame of each frame image, and tracking the position of the target object corresponding to the detection frame according to the tracker of each frame image; Determining the number of people entering and leaving the target object in the first type of area according to the tracking result of the target object position; Wherein, the first type of area is an area where internal images cannot be captured; The step of inputting the detection frame of each frame of the image into a preset target tracking model to generate a tracker corresponding to each detection frame of each frame of the image includes: For the second frame and each subsequent current frame image, the tracker generated based on the temporally closest image frame is matched with the detection box of the target object; And repeat the process of matching the unmatched detection frames with the tracker generated by the next closest frame image until the tracker generated by the earliest frame image is reached; The current frame position information of the target object detection frame is determined according to the matched tracker, and the tracker corresponding to the target object detection frame of the current frame image is determined according to the current frame position information.

2. The station clearing method according to claim 1, characterized in that: After reaching the tracker generated by the earliest frame image, the method further includes: For the target object detection frame that has not been matched, a secondary match is performed based on the intersection-over-union ratio (IOU), and the tracker corresponding to the frame with the smallest position change is determined; The current frame tracker of the target object detection box is determined based on the tracker corresponding to the frame with the smallest position change.

3. The station clearing method according to claim 2, characterized in that: After determining the current frame tracker of the target object detection frame according to the tracker corresponding to the frame with the minimum position change, the method further includes: For the target detection boxes that have not yet been matched, create a corresponding temporary tracker; In subsequent image frames, if the temporary tracker appears only once, the temporary tracker is deleted after a preset time period; If the temporary tracker appears multiple times in the image frame but the matching failure duration is greater than a preset period, the temporary tracker is deleted.

4. The station clearing method according to claim 1, characterized in that: The step of determining the number of people entering and leaving the target object in the first type of area according to the tracking result of the target object position includes: The fixed position of each tracker is taken as the collision point, and the image is divided into inner and outer areas according to the travel direction; When a tracker's collision point is detected to enter the inner area from the outer area, the number of people entering will increase by one. When a tracker's collision point is detected to enter the outer area from the inner area, the number of people leaving will increase by one. The number of people entering and leaving the area is determined based on the number of people entering and leaving the area.

5. The station clearing method according to claim 1, characterized in that: The method further comprises: Acquire images of the second-category area, input each image of the second-category area into the trained second object detection model, and output passenger recognition results in the images of the second-category area; Determining whether the passenger clearance is completed according to the number of inbound and outbound passengers among the inbound and outbound numbers of the target objects in the first-class area and the passenger identification result of the second-class area; The second target detection model is obtained after training based on sample images of two types of areas with passenger and staff labels; the two types of areas are other areas other than the first type of areas.

6. The station clearing method according to claim 1, characterized in that: The step of acquiring each frame of an image at an entrance or exit of a type of area and determining a detection frame of all target objects in each frame of the image includes: Input each frame image of the entrance and exit of a type of area into the trained first target detection model, and output the detection frame of the target object in each frame image; The first target detection model is obtained after training based on a class of regional sample images with different target object labels.

7. A station passenger clearing device, characterized in that: include: The acquisition module is used to obtain each frame of the image at the entrance and exit of a type of area, and determine the detection frame of all target objects in each frame of the image; A tracking module, used to input the detection frame of each frame image into a preset target tracking model, generate a tracker corresponding to each detection frame of each frame image, and track the position of the target object corresponding to the detection frame according to the tracker of each frame image; A processing module, used for determining the number of people entering and leaving the target object of the first type of area according to the tracking result of the target object position; Wherein, the first type of area is an area where internal images cannot be captured; The step of inputting the detection frame of each frame of the image into a preset target tracking model to generate a tracker corresponding to each detection frame of each frame of the image includes: For the second frame and each subsequent current frame image, the tracker generated based on the temporally closest image frame is matched with the detection box of the target object; And repeat the process of matching the unmatched detection frames with the tracker generated by the next closest frame image until the tracker generated by the earliest frame image is reached; The current frame position information of the target object detection frame is determined according to the matched tracker, and the tracker corresponding to the target object detection frame of the current frame image is determined according to the current frame position information.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the station clearing method as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the station clearing method as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • People counting method and device based on head shoulder detection

    CN105844234A

  • Subway train passenger detection method and system

    CN114120293A