Passenger flow counting method, device and electronic equipment

By using gait feature deduplication technology in passenger flow statistics, the repetition problem when different cameras are counted is solved, and the accuracy and efficiency of passenger flow statistics are improved.

CN115019345BActive Publication Date: 2025-05-06ZHEJIANG DAHUA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210710670.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-22
Publication Date
2025-05-06
Estimated Expiration
2042-06-22

AI Technical Summary

Technical Problem

When stating passenger flow, the existing technology has limited coverage area for a single camera device, which makes it easy to repeat the passenger flow counted by different cameras, which in turn affects the accuracy of passenger flow statistics.

Method used

By determining the movement direction of the target and the target in the image, deduplication of the repeating target based on the gait characteristics, and removing the repeating target in the same movement direction, thereby determining the passenger flow in each movement direction.

Benefits of technology

It improves the accuracy of passenger flow statistics, reduces statistical errors caused by duplicate data, and improves statistical efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115019345B_ABST
    Figure CN115019345B_ABST
Patent Text Reader

Abstract

The present application discloses a passenger flow counting method, device and electronic device for improving the accuracy of the method for determining passenger flow. The method comprises: determining a target in an image and the direction of movement of the target; wherein the image is an image in a set of images captured by at least two devices; in each of the movement directions, marking the target with the same gait feature as a repeated target; removing the repeated targets in the same movement direction, and determining the passenger flow corresponding to each of the movement directions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a passenger flow counting method, device and electronic equipment. Background Art

[0002] In recent years, more and more large shopping malls, supermarkets and other commercial areas have been built to meet people's needs for shopping, dining, gatherings, entertainment, etc. These large commercial areas have now become a part of people's daily lives. However, the passenger flow in commercial areas is tens of millions, and counting passenger flow has become one of the operational difficulties for businesses. The main reason for this difficulty is that a single camera device has a limited coverage area, and multiple cameras are often set up above each business premises according to the area, which leads to inevitable duplication of passenger flow counted by different cameras. Therefore, if the passenger flow determined by each camera is simply accumulated as the total passenger flow, it will be seriously inconsistent with the actual situation, and the aforementioned total passenger flow will lose its original reference significance. Summary of the invention

[0003] The present application provides a passenger flow counting method, device and electronic device to improve the accuracy of the method for determining passenger flow.

[0004] In a first aspect, the present application provides a passenger flow counting method, comprising:

[0005] Determine a target in an image and a moving direction of the target; wherein the image is an image in a set of images captured by at least two devices;

[0006] In each of the movement directions, marking the targets with the same gait characteristics as repeated targets;

[0007] Duplicate targets in the same movement direction are removed, and the passenger flow corresponding to each movement direction is determined.

[0008] After determining the target in the image and the direction of movement of the target, the above-mentioned application embodiment determines the repeated targets in each direction of movement based on the gait characteristics of the target, and removes the repeated targets in each direction of movement to determine the passenger flow in each direction. The method provided by the above-mentioned application embodiment for quickly determining the repeated targets in each direction and removing duplicates based on gait characteristics to determine the passenger flow in each direction can effectively improve the accuracy of the method for determining the passenger flow. Moreover, compared with features such as faces, gait features can extract less feature data while ensuring the distinction between different targets. Therefore, deduplication through gait features can also effectively improve the efficiency of the method for determining repeated targets and passenger flow.

[0009] In a possible implementation manner, determining the target in the image and the moving direction of the target includes:

[0010] Based on a human body detection framework, the target in the image is determined, and the head and shoulder features of each of the targets in at least two of the images are determined by a head and shoulder detection method; wherein the head and shoulder features include a head and shoulder contour and a head and shoulder area ratio of the target; the shooting time interval corresponding to the at least two images is within a set time range, and the at least two images are arranged in chronological order;

[0011] In the at least two images, determining a first target where the similarity of the head and shoulder features is not less than a similarity threshold;

[0012] determining a moving trajectory of the first target according to a position of the first target in the at least two images;

[0013] Based on the movement trajectory, a movement direction of the first target is determined.

[0014] In a possible implementation manner, the image includes a first image and a second image, and the shooting time of the first image is earlier than the shooting time of the second image; then determining the target in the image and the moving direction of the target includes:

[0015] Based on a human body detection framework, a target in the image is determined, and a Kalman filter method is used to predict the location information of a second target in the first image; wherein the location information indicates the location information of the second target at a predicted time; and the Kalman filter method is used to predict the location change of a target over time;

[0016] Based on the positioning information, determine the second image and a third target in the second image; then the third target and the second target are the same target;

[0017] Based on the positions of the same object in the first image and the second image, a moving direction of the same object is determined.

[0018] In a possible implementation manner, determining the second image and the third target in the second image based on the positioning information includes:

[0019] Based on the positioning information, determining the second image, and determining a predicted target in the second image;

[0020] When the number of predicted targets is 1, the predicted target is the third target; when the number of predicted targets is greater than 1, the Hungarian algorithm is used to determine the third target that uniquely matches the second target among all the predicted targets; wherein the Hungarian algorithm indicates that in the second image, the third target is uniquely determined so that the first difference between the third target and the second target, and the second difference between the corresponding same target on the first image and the second image do not exceed a first set threshold.

[0021] In a possible implementation manner, before marking the targets with the same gait characteristics as repeated targets in each of the movement directions, the method includes:

[0022] In the first training image, an outline of any preset target is marked to obtain a second training image;

[0023] Extracting the contours of the preset target in the second training image in sequence to obtain a gait graph sequence of the preset target;

[0024] Inputting the gait graph sequence into a first recognition model to obtain a first gait feature; wherein the first recognition model includes a mapping relationship between a preset gait feature and the preset target;

[0025] Based on the difference between the first gait feature and the preset gait feature, the first recognition model is adjusted until the similarity between the first gait feature and the preset gait feature of the preset target is greater than a second set threshold, thereby obtaining a second recognition model; wherein the second recognition model is used to recognize the gait features of the target in the image.

[0026] In a second aspect, the present application provides a passenger flow counting device, comprising:

[0027] Direction unit: used to determine the target in the image and the moving direction of the target; wherein the image is an image in a set of images taken by at least two devices;

[0028] A marking unit: used for marking the targets with the same gait characteristics as repeated targets in each of the movement directions;

[0029] Determination unit: used to remove repeated targets in the same movement direction and determine the passenger flow corresponding to each movement direction.

[0030] In a possible implementation manner, the direction unit is specifically used to determine the target in the image based on a human body detection framework, and determine the head and shoulder features of each of the targets in at least two of the images through a head and shoulder detection method; wherein the head and shoulder features include the head and shoulder contour and the head and shoulder area ratio of the target; the shooting time interval corresponding to the at least two images is within a set time range, and the at least two images are arranged in chronological order; in the at least two images, determine the first target whose similarity of the head and shoulder features is not less than a similarity threshold; determine the moving trajectory of the first target according to the position of the first target in the at least two images; and determine the movement direction of the first target based on the moving trajectory.

[0031] In a possible implementation, the image includes a first image and a second image, and the shooting time of the first image is earlier than the shooting time of the second image. The direction unit is also used to determine the target in the image based on a human body detection framework, and use a Kalman filter method to predict the positioning information of the second target in the first image; wherein the positioning information indicates the position information of the second target at the predicted time; the Kalman filter method is used to predict the position change of the target over time; based on the positioning information, the second image and the third target in the second image are determined; then the third target and the second target are the same target; based on the position of the same target in the first image and the second image, the movement direction of the same target is determined.

[0032] In a possible implementation, the direction unit is also used to determine the second image based on the positioning information, and to determine a predicted target in the second image; when the number of the predicted targets is 1, the predicted target is a third target; when the number of the predicted targets is greater than 1, a third target that uniquely matches the second target is determined among all the predicted targets through a Hungarian algorithm; wherein the Hungarian algorithm indicates that the third target is uniquely determined in the second image, so that a first difference between the third target and the second target, and a second difference between the corresponding same target on the first image and the second image do not exceed a first set threshold.

[0033] A possible implementation further includes a training unit, which is specifically used to mark the outline of any preset target in a first training image to obtain a second training image; extract the outline of the preset target in the second training image in sequence to obtain a gait graph sequence of the preset target; input the gait graph sequence into a first recognition model to obtain a first gait feature; wherein the first recognition model includes a mapping relationship between a preset gait feature and the preset target; based on the difference between the first gait feature and the preset gait feature, the first recognition model is adjusted until the similarity between the first gait feature and the preset gait feature of the preset target is greater than a second set threshold, to obtain a second recognition model; wherein the second recognition model is used to recognize the gait features of the target in the image.

[0034] In a third aspect, the present application further provides a readable storage medium, comprising:

[0035] Memory,

[0036] The memory is used to store instructions. When the instructions are executed by the processor, the device including the readable storage medium performs the method described in the first aspect and any possible implementation manner.

[0037] In a fourth aspect, the present application further provides an electronic device, including:

[0038] Memory, used to store computer programs;

[0039] The processor is used to execute the computer program stored in the memory to implement the method described in the first aspect and any possible implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A flow chart of a passenger flow counting method applicable to an embodiment of the present application;

[0041] Figure 2 A schematic diagram of determining the target motion direction provided by an embodiment of the present application;

[0042] Figure 3 A schematic diagram of the structure of a passenger flow counting device provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of the structure of a passenger flow counting electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to solve the problem of low accuracy of the passenger flow determined by the existing technology, this application proposes a passenger flow counting method: after determining the target and the direction of movement of the target in the image, the gait characteristics of all targets are determined based on the principle that different targets have different gait characteristics, and the gait characteristics are used to deduplicate the targets with different movement directions. Through gait deduplication, it is possible to remove duplicate data caused by multiple devices simultaneously shooting the same target, and also remove duplicate data caused by the same target appearing in the camera multiple times in a short period of time, thereby effectively improving the accuracy of the method for determining passenger flow.

[0045] In order to better understand the above technical scheme, the technical scheme of the present application is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical scheme of the present application, rather than limitations on the technical scheme of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.

[0046] Please refer to Figure 1 The embodiment of the present application provides a passenger flow statistics method to improve the accuracy of the method for determining passenger flow. The processing process of the method is as follows:

[0047] Step 101: Determine a target in an image and a moving direction of the target.

[0048] Specifically, the above-mentioned device can be a video camera or a camera that takes pictures at set intervals. The installation method of the device can be determined according to the height of the installation site. For places with higher floor heights, the installation height of the equipment is greater than 2.5 meters. In this case, the device is installed in an oblique manner. For places with low floor heights, the installation height of the equipment generally does not exceed 2.5 meters. In this case, the device is installed in a top-mounted manner. According to the monitoring range supported by the equipment and the area of ​​the site, an embodiment of the present application sets multiple devices to monitor from different directions, and uploads the monitoring images (screens) to the web interface for processing, so that the above-mentioned images are images in the image set taken by at least two devices.

[0049] After acquiring the image, the target in the image and the movement direction of the corresponding target can be determined, which is described in detail below.

[0050] First, a human body detection framework is used to determine the target in each frame (sheet) of the image. The number of the target can be multiple. After determining the target on each frame (sheet) of the image, it is also necessary to determine the correspondence between the targets in multiple frames (sheets) of the image. The above-mentioned human body detection framework can be Yolov5 or CenterNet. The following provides two embodiments for determining the correspondence between targets between images.

[0051] Embodiment 1:

[0052] First, the head and shoulder features of each target in at least two images are determined by a head and shoulder detection method. The head and shoulder features can be the head contour, shoulder contour, or head and shoulder contour, and head and shoulder area ratio of the target.

[0053] Then, the head and shoulder features of the target in any two images are compared. If and only if the head and shoulder features are not less than the similarity threshold, the corresponding target can be determined to be the same target in different images. The aforementioned same target is marked as the first target, and the movement trajectory of the first target can be determined according to the position of the first target in each image. Based on the movement trajectory, the movement direction of the first target can be determined.

[0054] It should be noted that the interval between the shooting times of any two images mentioned above is within the set time range to avoid the same target appearing in images shot by different devices, and when the images are shot at the same time, the influence on the determination of the target's movement direction. At the same time, it can avoid the distortion of the movement trajectory of the determined target caused by the shooting time interval between any two images being too long. Therefore, the above method of limiting the shooting time between images can achieve the purpose of filtering invalid images, thereby improving the efficiency of the embodiment of the present application in identifying the same target in different images.

[0055] Embodiment 2:

[0056] Kalman filtering is an algorithm that uses linear system state equations to optimally estimate the target state through observation data. The algorithm is based on the Markov hypothesis, which believes that the current state is only related to the last state (in contrast, nonlinear optimization believes that the current state is related to all past states), and can be predicted based on the measurement data of multiple sensors (i.e., the characteristic data of the target in the image in the embodiment of the present application). Therefore, the embodiment of the present application uses the Kalman filtering method to predict the position change of the second target in the first image over time, that is, the positioning information of the second target in the first image at the predicted time. The predicted time can be any time after the shooting time of the first image. Specifically, the second image corresponding to the predicted time can be determined according to the shooting time, and the position information can be the coordinates of the second target in the second image. Therefore, the predicted target in the second image can be determined according to the positioning information. Therefore, when the number of predicted targets is 1, it can be determined that the predicted target is the third target, and the third target is the same target corresponding to the second target. Further, the moving trajectory of the same target and the corresponding direction of movement can be determined according to the position of the same target in the first image and the second image in the above-mentioned image.

[0057] In particular, when the passenger flow in the venue is large and exceeds a certain level, congestion occurs; coupled with the camera shooting from different angles, a possible situation is that multiple targets appear at the same position in the monitoring screen (i.e., image), and some of the targets are close to each other. In other words, when the number of predicted targets determined in the second image based on the Kalman prediction method is more than one, it is necessary to uniquely determine a third target corresponding to the second target in the first image from the above multiple predicted targets. In an embodiment of the present application, the Hungarian algorithm is used to determine the third target corresponding to the second target in the first image from the multiple predicted targets in the second image.

[0058] The Hungarian algorithm is a combinatorial optimization algorithm for solving task allocation. In an embodiment of the present application, the third target is uniquely determined in the second image by the Hungarian algorithm, so that the first difference between the third target and the second target, and the second difference between other mutually corresponding targets on the first image and the second image do not exceed the first set threshold. Therefore, in an embodiment of the present application, the positioning information of the second target on the first image is predicted by the Kalman filter algorithm, and the second image is determined in multiple frames (sheets) of images after the first image based on the positioning information, and after determining the predicted target on the second image, when the number of predicted targets in the second image is greater than 1, the corresponding third target with the second target can be determined in multiple predicted targets by the Hungarian algorithm. Specifically, while determining that the third target in the predicted target matches the first target, the corresponding relationship between the third target on the second image and the second target on the first image is further verified by determining the corresponding relationship between the second image and other targets on the first image. When the third target and the second target do not correspond, it can be found by the Hungarian algorithm that at least one pair of targets in the first image and the second image cannot match. That is, if and only if all the targets appearing on the second image predicted by the Kalman filter method can be determined on the second image by the Hungarian algorithm and successfully matched with the targets in the first image, the correspondence between the third target and the second target can be further verified. In other words, in the embodiment of the present application, by combining the Kalman algorithm and the Hungarian algorithm, the accuracy of determining the same target corresponding to the first image and the second image is further improved. After the targets in multiple frames (sheets) of images are matched, the moving trajectory of the target can be determined by the position of the target in each frame (sheet) of the image, and then the direction of movement of the target can be determined.

[0059] It should be noted that the shooting time of the first image is earlier than the shooting time of the second image. Since the aforementioned motion trajectory itself does not have directionality, and the motion direction carries the direction information of the target movement. Therefore, when determining the motion direction based on the motion trajectory, it is necessary to determine the direction of the motion trajectory. When the shooting time of the first image is earlier than the shooting time of the second image, the order of the trajectory points on the motion trajectory can be determined according to the order of the shooting time of the first image and the second image, thereby accurately determining the motion direction.

[0060] Therefore, the first image and the second image may be the first image and the second image taken by the same device at different times, or the first image and the second image taken by different devices at different times. In the above two cases, the images can be further refined according to the situation of any target into: the target in the first image and the second image does not move, and the target in the first image and the second image moves.

[0061] When the target moves in the first image and the second image, the trajectory points of the target in the first image are connected with the trajectory points in the second image. Similarly, the trajectory points of the target in any two frames (sheets) of images with a time sequence are connected to determine the movement trajectory of the target.

[0062] When the same target does not move in the first image and the second image, the moving trajectory line has two overlapping trajectory points. Similarly, based on the above method, any two frames (frames) of the target with different shooting times, the first image and the second image, and the trajectory points of the target in the corresponding images are determined. These trajectory points and the two overlapping trajectory points are connected to still obtain the moving trajectory of the target.

[0063] Based on the method provided in the above embodiment 1 or embodiment 2, the moving direction of the target can be determined, which is described in detail below. The moving direction can be any one or more combinations of entering a place, leaving a place, and passing a place. Figure 2 Schematic diagram of determining the target movement direction provided by the embodiment of the present application. The embodiment of the present application sets an area of ​​interest smaller than the monitoring area, and divides the area of ​​interest into a first area and a second area by a trip line. Figure 2 As shown, by determining the occurrence of the trajectory point representing the target position in the first area and the second area, the moving direction of the target can be determined. Figure 2As shown in part (a) of , the order in which the track points on the moving track appear can be determined based on the shooting time of the image. When the track point first appears in the first area and then in the second area, and the moving track corresponding to the track point intersects with the boundary line between the first area and the second area, the moving direction of the target is determined to be entering. When the track point first appears in the second area and then in the first area, and the track point intersects with the boundary line between the first area and the second area, the moving direction of the target is determined to be leaving. Figure 2 As shown in part (b) of FIG. 1 , when the trajectory line of the target only intersects with the boundary line of the first area or the second area, the moving direction of the target is determined to be passing.

[0064] Step 102: In each movement direction, mark the targets with the same gait characteristics as repeated targets.

[0065] Among them, the gait features indicate the contour features and skeleton features of the target when walking.

[0066] Specifically, compared to determining repeated targets by facial features, determining repeated targets by gait features is an efficient and accurate strategy. The reason is: although facial features can more comprehensively identify the differences between different targets, on the one hand, the extraction of facial features is still limited by factors such as light, crowding, and shooting angles, which can easily lead to unclear shooting and inability to accurately extract target features. On the other hand, since facial features are richer in features, the model has a higher amount of computational effort when extracting and calculating, resulting in poor efficiency. Therefore, determining repeated targets by gait features can effectively improve the efficiency and accuracy of the method for determining repeated targets.

[0067] In fact, before marking the target with the same gait characteristics as a repeated target, the first recognition model is first trained to obtain the second recognition model to ensure that the second recognition model can correctly recognize the gait characteristics of the target. Specifically, the composition of the first recognition model can be multiple: it can be composed of a convolutional neural network (CNN) or a generator adversarial network (GAN). When training the first recognition model, first determine the preset target of the first training image through the human detection framework described in step 101, and mark the contour of any preset target to obtain a second training image. Then, extract the contours of the preset targets in the second training image in turn to obtain a gait graph sequence of the aforementioned preset targets. Then, the gait graph sequence can be input into the first recognition model to obtain the first gait feature. Since the first recognition model includes the preset gait features of the preset target and the corresponding relationship between the preset gait features and the preset target, the first recognition model can be adjusted according to the difference between the first gait features and the preset gait features, so that the first gait features output by the first recognition model gradually tend to the preset gait features until the similarity between the first gait features and the preset gait features is greater than the second set threshold, thereby obtaining the second recognition model.

[0068] By training the first recognition model in the above-mentioned application embodiment to obtain the second recognition model, the accuracy of the target gait features determined in the embodiment of the present application can be ensured, thereby improving the accuracy of the repeated targets determined in the embodiment of the present application.

[0069] Step 103: Remove duplicate targets in the same moving direction and determine the passenger flow corresponding to each moving direction.

[0070] Specifically, in the same moving direction, when the target is determined to be a repeated target, the passenger flow remains unchanged; otherwise, the number of targets is used as the additional passenger flow. Then, based on the aforementioned additional passenger flow, the passenger flow corresponding to any moving direction is determined.

[0071] In the above application embodiment, by refining the target's movement direction, the passenger flow in each movement direction is accurately determined, and more accurate and powerful data support is provided for subsequent data analysis. For example, when analyzing the group of people of interest, the passenger flow data of the movement direction can be used to assist the analysis: this part of the data can show that there is still a group of people who are interested in the goods and services in this area, but leave for reasons that need further verification.

[0072] Based on the same inventive concept, a passenger flow counting device is provided in the embodiment of the present application. Figure 1 The specific implementation of the device corresponds to the passenger flow counting method shown in the figure. The specific implementation of the device can refer to the description of the above method embodiment part, and the repeated parts will not be repeated. Figure 3 , the device comprises:

[0073] Direction unit 301: used to determine the target in the image and the moving direction of the target.

[0074] The images are images in an image set taken by at least two devices.

[0075] The direction unit 301 is specifically used to determine the target in the image based on the human body detection framework, and determine the head and shoulder features of each of the targets in at least two of the images through a head and shoulder detection method; wherein the head and shoulder features include the head and shoulder contour and the head and shoulder area ratio of the target; the shooting time interval corresponding to the at least two images is within a set time range, and the at least two images are arranged in chronological order; in the at least two images, determine the first target whose similarity of the head and shoulder features is not less than a similarity threshold; determine the moving trajectory of the first target according to the position of the first target in the at least two images; and determine the movement direction of the first target based on the moving trajectory.

[0076] The image includes a first image and a second image, and the shooting time of the first image is earlier than the shooting time of the second image. The direction unit 301 is also used to determine the target in the image based on the human body detection framework, and use the Kalman filter method to predict the positioning information of the second target in the first image in the second image; wherein the positioning information indicates the position information of the second target at the prediction time; the Kalman filter method is used to predict the position change of the target over time; based on the positioning information, the second image and the third target in the second image are determined; then the third target and the second target are the same target; based on the position of the same target in the first image and the second image, the movement direction of the same target is determined.

[0077] The direction unit 301 is also used to determine the second image based on the positioning information, and determine the predicted target in the second image; when the number of the predicted targets is 1, the predicted target is the third target; when the number of the predicted targets is greater than 1, the Hungarian algorithm is used to determine the third target that uniquely matches the second target among all the predicted targets; wherein the Hungarian algorithm indicates that the third target is uniquely determined in the second image, so that the first difference between the third target and the second target, and the second difference between the corresponding same target on the first image and the second image do not exceed a first set threshold.

[0078] The marking unit 302 is used to mark the targets with the same gait characteristics as repeated targets in each of the movement directions.

[0079] The gait features indicate the contour features and skeleton features of the target when walking.

[0080] The determination unit 303 is used to remove repeated targets in the same movement direction and determine the passenger flow corresponding to each movement direction.

[0081] The device for determining passenger flow based on gait features also includes a training unit. The training unit is specifically used to mark the outline of any preset target in the first training image to obtain a second training image; extract the outline of the preset target in the second training image in sequence to obtain a gait graph sequence of the preset target; input the gait graph sequence into a first recognition model to obtain a first gait feature; wherein the first recognition model includes a mapping relationship between a preset gait feature and the preset target; based on the difference between the first gait feature and the preset gait feature, the first recognition model is adjusted until the similarity between the first gait feature and the preset gait feature of the preset target is greater than a second set threshold, thereby obtaining a second recognition model; wherein the second recognition model is used to recognize the gait features of the target in the image.

[0082] Based on the same inventive concept, the embodiment of the present application further provides a readable storage medium, including:

[0083] Memory,

[0084] The memory is used to store instructions. When the instructions are executed by the processor, the device including the readable storage medium completes the passenger flow counting method as described above.

[0085] Based on the same inventive concept as the above passenger flow counting method, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the function of the above passenger flow counting method, please refer to Figure 4 , the electronic device comprises:

[0086] At least one processor 401, and a memory 402 connected to the at least one processor 401. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. Figure 4 In the example, the processor 401 and the memory 402 are connected via the bus 400. The bus 400 is Figure 4 The connection between other components is shown by bold lines, and is not intended to be limiting. The bus 400 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 401 can also be called a controller, and there is no limitation on the name.

[0087] In the embodiment of the present application, the memory 402 stores instructions that can be executed by at least one processor 401. The at least one processor 401 can execute the passenger flow counting method discussed above by executing the instructions stored in the memory 402. The processor 401 can implement Figure 3 The functions of each module in the device shown.

[0088] Among them, the processor 401 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 402 and calling the data stored in the memory 402, the various functions of the device and process data, the device can be monitored as a whole.

[0089] In one possible design, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0090] The processor 401 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the passenger flow counting method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0091] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0092] By programming the processor 401, the code corresponding to the passenger flow counting method described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 1 The steps of the passenger flow counting method are shown in FIG. How to design and program the processor 401 is a technique known to those skilled in the art and will not be described in detail here.

[0093] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0094] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0096] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0097] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a universal serial bus flash disk (Universal Serial Bus flash disk), a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a disk or an optical disk, and other media that can store program codes.

[0098] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A passenger flow counting method, characterized in that: include: Based on a human body detection framework, a target in an image is determined, and head and shoulder features of each target in at least two images are determined by a head and shoulder detection method; wherein the images are images in a set of images taken by at least two devices; the head and shoulder features include a head and shoulder contour and a head and shoulder area ratio of the target; the shooting time interval corresponding to the at least two images is within a set time range, and the at least two images are arranged in chronological order; In the at least two images, determining a first target where the similarity of the head and shoulder features is not less than a similarity threshold; determining a moving trajectory of the first target according to a position of the first target in the at least two images; Based on the movement trajectory, determining a movement direction of the first target; In each of the movement directions, marking the targets with the same gait characteristics as repeated targets; Duplicate targets in the same movement direction are removed, and the passenger flow corresponding to each movement direction is determined.

2. The method according to claim 1, characterized in that Before marking the targets with the same gait characteristics as repeated targets in each of the movement directions, the method further includes: In the first training image, an outline of any preset target is marked to obtain a second training image; Extracting the contours of the preset target in the second training image in sequence to obtain a gait graph sequence of the preset target; Inputting the gait graph sequence into a first recognition model to obtain a first gait feature; wherein the first recognition model includes a mapping relationship between a preset gait feature and the preset target; Based on the difference between the first gait feature and the preset gait feature, the first recognition model is adjusted until the similarity between the first gait feature and the preset gait feature of the preset target is greater than a second set threshold, thereby obtaining a second recognition model; wherein the second recognition model is used to recognize the gait features of the target in the image.

3. A passenger flow counting device, characterized in that: include: Direction unit: used to determine the target in the image based on the human body detection framework, and determine the head and shoulder features of each target in at least two of the images by the head and shoulder detection method; wherein the image is an image in a set of images taken by at least two devices; the head and shoulder features include the head and shoulder contour and the head and shoulder area ratio of the target; the shooting time interval corresponding to the at least two images is within a set time range, and the at least two images are arranged in chronological order; in the at least two images, determine the first target whose similarity of the head and shoulder features is not less than a similarity threshold; determine the movement trajectory of the first target according to the position of the first target in the at least two images; determine the movement direction of the first target based on the movement trajectory; A marking unit: used for marking the targets with the same gait characteristics as repeated targets in each of the movement directions; Determination unit: used to remove repeated targets in the same movement direction and determine the passenger flow corresponding to each movement direction.

4. The device according to claim 3, characterized in that It also includes a training unit, which is specifically used to mark the outline of any preset target in the first training image to obtain a second training image; extract the outline of the preset target in the second training image in turn to obtain a gait diagram sequence of the preset target; input the gait diagram sequence into a first recognition model to obtain a first gait feature; wherein the first recognition model includes a mapping relationship between a preset gait feature and the preset target; based on the difference between the first gait feature and the preset gait feature, the first recognition model is adjusted until the similarity between the first gait feature and the preset gait feature of the preset target is greater than a second set threshold, thereby obtaining a second recognition model; wherein the second recognition model is used to recognize the gait features of the target in the image.

5. A readable storage medium, characterized in that: include, Memory, The memory is used to store instructions. When the instructions are executed by the processor, the device including the readable storage medium implements the method according to any one of claims 1 to 2.

6. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method according to any one of claims 1 to 2 when executing the computer program stored in the memory.

Citation Information

Patent Citations

  • Target traffic statistical method and device

    CN113592785A

  • Object counting method and device, computer equipment and storage medium

    CN113674221A

  • Road area calibration method and electronic equipment

    CN113763425A