Passenger flow statistics method and system for smart cameras

By acquiring video images from intelligent cameras, determining the detection target and coordinates, and using adaptive modes and optimization algorithms to generate curved entry and exit lines, the problem of inaccurate passenger flow statistics in existing technologies is solved, achieving higher statistical accuracy.

CN118799795BActive Publication Date: 2026-11-17CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410170379.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-06
Publication Date
2026-11-17
Estimated Expiration
2044-02-06

AI Technical Summary

Technical Problem

Existing intelligent security cameras have problems in passenger flow statistics, such as failing to detect people's heads and shoulders, people appearing in the frame after their figures or heads have already crossed the line, and targets actually crossing the line but whose coordinates cannot be crossed, resulting in large deviations in passenger flow statistics.

Method used

By acquiring the target (human figure and/or head and shoulders) in the video image, the initial and final coordinates are determined. An adaptive mode and confidence threshold are used to judge the target. The entry and exit lines are optimized by combining clustering algorithm and nonlinear support vector machine algorithm to generate curve entry and exit lines to improve statistical accuracy.

Benefits of technology

It reduces the deviation of passenger flow statistics, improves the accuracy of passenger flow statistics, and adapts to the needs of passenger flow statistics in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799795B_ABST
    Figure CN118799795B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for passenger flow statistics using intelligent cameras, relating to the field of artificial intelligence technology. The method includes: acquiring video images of passenger flow entering and exiting; identifying detection targets in the video images, where the detection targets are human figures and / or heads and shoulders; determining the initial coordinates of passenger entry and the final coordinates of passenger exit in the video images, with a one-to-one correspondence between the initial and final coordinates; optimizing the initial entry / exit line based on the initial and final coordinates to obtain an optimized entry / exit line; the initial entry / exit line is a straight line, while the optimized entry / exit line is a curve; and determining the passenger flow based on the detection targets and the optimized entry / exit line. This invention enables intelligent security cameras with passenger flow statistics functions to reduce the deviation in passenger flow statistics and improve the accuracy of passenger flow statistics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for passenger flow statistics using smart cameras. Background Technology

[0002] The combination of IoT and AI technologies is rapidly enabling the intelligentization of security monitoring services. Current smart security cameras are equipped with embedded Neural Processing Units (NPUs), capable of real-time analysis and processing of computational tasks in specific scenarios. Since security cameras are typically installed in high-traffic public areas, such as street intersections, community / scenic area / corporate park / shop entrances and exits, passenger flow statistics have become a primary application for smart security cameras.

[0003] Existing methods for passenger flow statistics based on smart security cameras mainly employ machine learning methods to train models for head recognition, face recognition, human detection, and head and shoulder detection. Then, the video is analyzed frame by frame to count the number of people entering or leaving the area.

[0004] Currently, the most common method for passenger flow statistics on smart cameras is to use artificial intelligence algorithms to determine whether a target has crossed the line. However, passenger flow statistics algorithms based on target crossing the line are susceptible to problems due to equipment installation, such as: failing to detect people's heads and shoulders, people appearing in the frame after their figures or heads have already crossed the line, and targets actually crossing the line but whose coordinates cannot be found, leading to significant deviations in passenger flow statistics results. Summary of the Invention

[0005] This invention provides a method and system for passenger flow statistics using smart cameras, in order to solve the problem of inaccurate passenger flow statistics in the prior art.

[0006] This invention provides a method for passenger flow statistics using smart cameras, comprising:

[0007] Acquire video images of passenger flow entering and exiting;

[0008] Identify a target in the video image, wherein the target is a human figure and / or head and shoulders;

[0009] Determine the initial coordinates of the passenger flow entering and the final coordinates of the passenger flow leaving in the video image, wherein the initial coordinates and the final coordinates correspond one-to-one;

[0010] The initial entry / exit line is optimized based on the initial and final coordinates to obtain the optimized entry / exit line; the initial entry / exit line is a straight line, and the optimized entry / exit line is a curve;

[0011] Passenger flow is determined based on the detection target and the optimized entry / exit lines.

[0012] Optionally, determining the detection target in the video image includes:

[0013] Determine the coordinates of the human figure in the video image, the first detection confidence score of the human figure, the coordinates of the head and shoulders, and the second detection confidence score of the head and shoulders;

[0014] The detection target is determined based on the first detection confidence level and the second detection confidence level.

[0015] Optionally, the detection target is a pre-defined target, wherein the pre-defined target is a human figure and / or head and shoulders.

[0016] Optionally, determining the detection target based on the first detection confidence level and the second detection confidence level includes:

[0017] If the first detection confidence level is greater than or equal to the first threshold, and the second detection confidence level is less than the second threshold, then a human figure is used as the detection target.

[0018] If the first detection confidence is less than the first threshold, and the second detection confidence is less than or equal to the second threshold, then the head and shoulders are used as the detection target.

[0019] Optionally, it also includes:

[0020] If the first detection confidence is less than the first threshold and the second detection confidence is less than the second threshold, then the coordinates of the human figure in the next frame of the video image, the first detection confidence of the human figure, the coordinates of the head and shoulders, and the second detection confidence of the head and shoulders are determined until the detection target is determined.

[0021] Optionally, after determining the initial coordinates of passenger entry and the final coordinates of passenger exit in the video image, and before optimizing the initial entry / exit lines based on the initial and final coordinates, the method further includes:

[0022] The initial and final coordinates are cleaned, and the initial and final coordinates located on the same side as the initial entry and exit lines are deleted.

[0023] Optionally, a clustering algorithm is used to clean the initial and final coordinates.

[0024] Optionally, the initial approach and exit lines are optimized based on the initial and final coordinates, including:

[0025] Based on the initial and final coordinates, a nonlinear support vector machine algorithm is used to optimize the initial entry and exit lines.

[0026] This invention also provides a passenger flow statistics system for smart cameras, comprising:

[0027] The video image acquisition module is used to acquire video images of passenger flow entering and exiting.

[0028] A target determination module is used to determine a target in the video image, wherein the target is a human figure and / or head and shoulders;

[0029] The coordinate determination module is used to determine the initial coordinates of the passenger flow entering and the final coordinates of the passenger flow leaving in the video image, wherein the initial coordinates and the final coordinates correspond one-to-one.

[0030] The inbound / outbound line optimization module is used to optimize the initial inbound / outbound line based on the initial coordinates and the final coordinates to obtain the optimized inbound / outbound line; the initial inbound / outbound line is a straight line, and the optimized inbound / outbound line is a curve;

[0031] The passenger flow statistics module is used to determine the passenger flow based on the detection target and the optimized entry and exit lines.

[0032] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the passenger flow statistics method for smart cameras.

[0033] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the passenger flow statistics method for intelligent cameras.

[0034] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the passenger flow statistics method for intelligent cameras.

[0035] This invention provides a method and system for passenger flow statistics for intelligent cameras. The method involves: acquiring video images of passenger flow entering and exiting; identifying detection targets in the video images, where the detection targets are human figures and / or heads and shoulders; determining the initial coordinates of passenger entry and the final coordinates of passenger exit in the video images, with a one-to-one correspondence between the initial and final coordinates; optimizing the initial entry / exit line based on the initial and final coordinates to obtain an optimized entry / exit line; the initial entry / exit line being a straight line, and the optimized entry / exit line being a curve; and determining the passenger flow based on the detection targets and the optimized entry / exit line. In other words, by optimizing the initial entry / exit line, this invention enables intelligent security cameras with passenger flow statistics functions to reduce the deviation in passenger flow statistics and improve the accuracy of passenger flow statistics. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0037] Figure 1 This is a flowchart of the passenger flow statistics method for smart cameras provided by the present invention;

[0038] Figure 2 This is a block diagram of a passenger flow statistics system for smart cameras provided by the present invention;

[0039] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0041] The following is combined Figures 1-3 This invention describes a passenger flow statistics method and system for smart cameras.

[0042] Figure 1 This is a flowchart of the passenger flow statistics method for smart cameras provided by the present invention, as follows: Figure 1 As shown, a method for passenger flow statistics using smart cameras includes:

[0043] Step 101: Acquire video images of passenger flow entering and exiting.

[0044] It should be noted that this invention utilizes the computing resources (i.e., NPU) of the intelligent security camera to acquire video images of people entering and exiting the area.

[0045] Step 102: Determine the detection target in the video image, wherein the detection target is a human figure and / or head and shoulders.

[0046] In one specific embodiment, step 102 includes:

[0047] Step 1021: Determine the coordinates of the human figure in the video image, the first detection confidence of the human figure, the coordinates of the head and shoulders, and the second detection confidence of the head and shoulders.

[0048] It should be noted that this invention employs an adaptive human figure and head-shoulder detection model. Here, "human figure" refers to the external outline of the human body, and "head-shoulder" refers to the area above the shoulders.

[0049] After video image frames are sent to the passenger flow statistics SDK, the human head and shoulder model infers and calculates the human coordinates and head and shoulder coordinates in the video frame in real time (according to the frame).

[0050] Step 1022: Determine the detection target based on the first detection confidence level and the second detection confidence level; the detection target includes a human figure and / or head and shoulders.

[0051] It should be noted that a priority strategy is used here, meaning that the target (human figure or head and shoulders) whose detection confidence reaches the corresponding set threshold first is selected as the detection target. This strategy is reasonable and effective for the current 2D image. For example, if a person moves from a distance to a closer location, appearing as moving from the top edge to the bottom edge of the image in the video, the human figure detection result will definitely be earlier than the head and shoulders detection result; conversely, if a person moves from a closer location to a distant location, appearing as moving from the bottom edge to the top edge of the image in the video, the head and shoulders detection result will definitely be earlier than the human figure detection result. Therefore, the priority strategy adopted in this invention is beneficial for timely determination of the target's coordinates, subsequent assignment of a tracking number, and then determination of whether the target has crossed the entry / exit line. This method and strategy can solve the problems in existing technologies where the head and shoulders of a person cannot be detected, or where the human figure or head has already crossed the line when the person appears in the image.

[0052] In one specific embodiment, step 1022 includes:

[0053] If the first detection confidence level is greater than or equal to the first threshold, and the second detection confidence level is less than the second threshold, then a human figure is used as the detection target.

[0054] If the first detection confidence is less than the first threshold, and the second detection confidence is less than or equal to the second threshold, then the head and shoulders are used as the detection target.

[0055] In this invention, the target (human figure or head and shoulders) is selected as the detection target first based on the detection confidence level of that target. This adaptive adjustment of the detection target helps improve the accuracy of passenger flow statistics.

[0056] In one specific embodiment, step 1022 further includes:

[0057] If the first detection confidence is less than the first threshold and the second detection confidence is less than the second threshold, then the coordinates of the human figure in the next frame of the video image, the first detection confidence of the human figure, the coordinates of the head and shoulders, and the second detection confidence of the head and shoulders are determined until the detection target is determined.

[0058] This invention provides an adaptive detection mode for human figures and heads and shoulders, which can adapt to different passenger flow statistics scenarios and ensure the accuracy of passenger flow statistics.

[0059] It should be noted that if the first detection confidence is greater than or equal to the first threshold, and the second detection confidence is less than or equal to the second threshold, then either the human figure or the head and shoulders can be used as the detection target.

[0060] It should be mentioned that this invention supports the use of an adaptive approach to determine the detection target, and also supports the pre-setting of the detection target as a human figure, head and shoulders, or both human figure and head and shoulders.

[0061] Step 103: Determine the initial coordinates of the passenger flow entering and the final coordinates of the passenger flow leaving in the video image, wherein the initial coordinates and the final coordinates correspond one-to-one.

[0062] It should be noted that during the passenger flow statistics process, a line segment needs to be drawn as the initial entry and exit line when configuring the "passenger flow direction".

[0063] In one specific embodiment, after step 103 and before step 104, the following is also included:

[0064] The initial and final coordinates are cleaned, and the initial and final coordinates located on the same side as the initial entry and exit lines are deleted.

[0065] The optimization of entry and exit lines in this invention requires the collection of valid coordinates that cross the initial entry and exit lines. By using a clustering algorithm to collect the valid initial coordinates of personnel entering and the final coordinates of personnel leaving, this method can achieve the goal of cleaning and filtering invalid coordinates, thereby ensuring the optimization effect of entry and exit lines.

[0066] In one specific embodiment, a clustering algorithm is used to clean the initial and final coordinates.

[0067] This invention uses a clustering algorithm to clean the data during the optimization process of incoming and outgoing lines, which can filter out invalid human figures or head and shoulder coordinates detected in the image.

[0068] Step 104: Optimize the initial entry / exit line based on the initial and final coordinates to obtain the optimized entry / exit line; the initial entry / exit line is a straight line, and the optimized entry / exit line is a curve.

[0069] It should be noted that the optimization process of the initial entry / exit line based on the initial and final coordinates in this invention is not required for every pair of initial and final coordinates obtained, but rather is only performed when certain conditions are triggered. Furthermore, the optimization of the initial entry / exit line in this invention can be either proactive or reactive. Therefore, for a period of time before a particular entry / exit line is optimized, it may be the initial entry / exit line or the entry / exit line after the previous optimization.

[0070] Passive optimization is achieved by staff triggering an optimization button through a human-computer interaction via a passenger flow statistics app, thereby optimizing the entry and exit lines. During optimization, the data used is the initial and final coordinates of a period of time before the button is triggered. Active optimization is achieved by setting an optimization time period, such as one day or one week. After the set optimization time period, the system automatically triggers the entry and exit line optimization function, and then optimizes the initial entry and exit lines based on the initial and final coordinates of the past day or week.

[0071] Moreover, each optimization of the entry and exit lines in this invention is based on the initial and final coordinates recorded over a previous period, thus the accuracy of passenger flow statistics for this scenario will become increasingly higher.

[0072] It should be noted that, due to geographical limitations in the actual deployment of smart security cameras, installation and maintenance personnel may find it difficult to deploy the equipment in the ideal location according to the installation requirements. However, the initial entry and exit lines configured by users on the two-dimensional plane are often straight lines, which may not be the optimal judgment line segments, resulting in the passenger flow statistics effect often failing to meet the expected performance.

[0073] The inventors discovered that although the positions of people entering and exiting in passenger flow videos exhibit randomness, the coordinates of these behaviors show clustering characteristics in specific scenarios. Based on this, entry and exit lines are generally determined to be curves. Therefore, this invention proposes an entry and exit line optimization method to obtain the optimal entry and exit lines for different scenarios.

[0074] The optimization process is as follows:

[0075] Step 1 (Startup Optimization): The smart security camera records the initial and final coordinates of people entering and exiting.

[0076] Step 2 (Data Cleaning): In the video scene of passenger flow statistics, most of the initial and final coordinates are on both sides of the entrance and exit lines, but a small number of people appear in the frame but do not cross the entrance and exit lines. Therefore, before optimizing the entrance and exit lines, it is necessary to filter out the initial and final coordinates that do not cross the entrance and exit lines. Furthermore, this invention uses a clustering algorithm to achieve data cleaning, the specific formula of which is as follows:

[0077]

[0078] Where x represents the in / out coordinates, "in" represents the initial coordinates and "out" represents the final coordinates, i represents the sample index, j represents the sample category index, k represents the total number of sample categories, and μ... j Let x be the coordinate of the j-th sample category, n be the total number of samples in x, μ be the category to which the sample belongs, and here be the cluster head of valid in / out coordinates and invalid coordinates, r ij In x (i) The value is 1 if it is classified as a valid coordinate class, and -1 otherwise.

[0079] Step 3 (Entry / Exit Line Optimization): Optimize the entry / exit lines based on the initial and final coordinates obtained in Step 2. Due to installation limitations, smart security cameras cannot monitor all entrances / exits simultaneously. For example, if a passageway has doors or entrances / exits on both sides, but the smart security camera can only face the door on the left due to installation limitations, it cannot face the door on the right. Therefore, only the left door is displayed on the screen. However, people can enter from the top and exit from the right, enter from the bottom and exit from the right, or enter from the left and exit from the right. Initially, these coordinates are marked on the top, left, and bottom edges of the screen, and the final coordinates are marked on the right edge of the screen. Since the initial entry / exit lines (straight lines) cannot cover the passenger flow statistics task for this scenario, this invention uses a nonlinear Support Vector Machine (SVM) algorithm to optimize the initial entry / exit lines.

[0080] In the process of optimizing nonlinear SVMs, we need to replace the inner product in linear SVMs with a kernel function. The kernel function used here is the Gaussian kernel function:

[0081]

[0082] This represents the distance between point x and the center point z on a Gaussian distribution with variance σ. Using the kernel function K(x,z) and selecting an appropriate penalty parameter C (C > 0, a smaller C results in a smaller penalty for misclassification, and a larger C results in a larger penalty for misclassification), an optimization problem is constructed.

[0084]

[0085] Where i and j are the indices of the input / output coordinate samples, with a total of n, X is the column vector representing the input and output coordinates, y represents the labels of the input and output coordinates, a is the Lagrange multiplier, and n is the number of samples. Since the algorithmic complexity of the quadratic programming problem is proportional to the number of data samples, the more efficient SMO (Sequential Minimal Optimization) algorithm is considered for practical applications to obtain the optimal solution. choose A satisfaction The amount calculate

[0086]

[0087] An array of coefficients to make formula (5) equal to 0.

[0088] The final optimized inbound and outbound lines are as follows:

[0089]

[0090] Based on the optimized incoming and outgoing lines, practical applications will use...

[0091] Infer the labels for the initial and final coordinates.

[0092] In one specific embodiment, step 105 includes:

[0093] Based on the initial and final coordinates, a nonlinear support vector machine algorithm is used to optimize the initial entry and exit lines.

[0094] This invention optimizes the initial entry and exit lines based on the coordinates of people entering and exiting in a scene, generating optimized entry and exit lines. Based on the optimized entry and exit lines, the accuracy of passenger flow statistics can be effectively improved.

[0095] It should be mentioned that the present invention can also select other algorithms to optimize the initial incoming and outgoing lines, such as deep learning algorithms, etc., which will not be elaborated here.

[0096] Step 105: Determine passenger flow based on the detection target and the optimized entry / exit lines.

[0097] It should be noted that the present invention uses formula (6) to calculate whether the initial coordinates and final coordinates cross the optimized entry and exit lines in order to determine the passenger flow.

[0098] In summary, this invention determines the detection target through a first detection confidence level and a second detection confidence level. The detection target includes human figures and / or head and shoulders, which can be adaptively adjusted. Furthermore, this invention optimizes the initial entry and exit lines, enabling intelligent security cameras to reduce the deviation of passenger flow statistics and improve the accuracy of passenger flow statistics.

[0099] The passenger flow statistics system for smart cameras provided by this invention will be described below. The passenger flow statistics system for smart cameras described below can be referred to in correspondence with the passenger flow statistics method for smart cameras described above.

[0100] Figure 2 This is a block diagram of a passenger flow statistics system for smart cameras provided by the present invention, as shown below. Figure 2 As shown, a passenger flow statistics system for smart cameras includes:

[0101] The video image acquisition module 201 is used to acquire video images of passenger flow entering and exiting.

[0102] The target determination module 202 is used to determine the target in the video image, wherein the target is a human figure and / or head and shoulders.

[0103] In one specific embodiment, the target determination module 202 is specifically used for:

[0104] Determine the coordinates of the human figure in the video image, the first detection confidence score of the human figure, the coordinates of the head and shoulders, and the second detection confidence score of the head and shoulders;

[0105] The detection target is determined based on the first detection confidence level and the second detection confidence level.

[0106] In one specific embodiment, the detection target is a pre-defined target, which is a human figure and / or head and shoulders.

[0107] In one specific embodiment, the target determination module 202 is specifically used for:

[0108] If the first detection confidence level is greater than or equal to the first threshold, and the second detection confidence level is less than the second threshold, then a human figure is used as the detection target.

[0109] If the first detection confidence is less than the first threshold, and the second detection confidence is less than or equal to the second threshold, then the head and shoulders are used as the detection target.

[0110] In one specific embodiment, the target determination module 202 is further configured to:

[0111] If the first detection confidence is less than the first threshold and the second detection confidence is less than the second threshold, then the coordinates of the human figure in the next frame of the video image, the first detection confidence of the human figure, the coordinates of the head and shoulders, and the second detection confidence of the head and shoulders are determined until the detection target is determined.

[0112] The coordinate determination module 203 is used to determine the initial coordinates of the passenger flow entering and the final coordinates of the passenger flow leaving in the video image, wherein the initial coordinates and the final coordinates correspond one-to-one.

[0113] In one specific embodiment, after the coordinate determination module 203 and before the incoming / outgoing line optimization module 204, a data cleaning module is further included, the data cleaning module being specifically used for:

[0114] The initial and final coordinates are cleaned, and the initial and final coordinates located on the same side as the initial entry and exit lines are deleted.

[0115] In one specific embodiment, the data cleaning module uses a clustering algorithm to clean the initial and final coordinates.

[0116] The inbound / outbound line optimization module 204 is used to optimize the initial inbound / outbound line according to the initial coordinates and the final coordinates to obtain the optimized inbound / outbound line; the initial inbound / outbound line is a straight line, and the optimized inbound / outbound line is a curve.

[0117] In one specific embodiment, the incoming / outgoing line optimization module 204 is specifically used for:

[0118] Based on the initial and final coordinates, a nonlinear support vector machine algorithm is used to optimize the initial entry and exit lines.

[0119] The passenger flow statistics module 205 is used to determine the passenger flow based on the detection target and the optimized entry and exit lines.

[0120] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a passenger flow statistics method for intelligent cameras, the method including:

[0121] Acquire video images of passenger flow entering and exiting.

[0122] Identify a target in the video image, wherein the target is a human figure and / or head and shoulders.

[0123] The initial coordinates of the passenger flow entering and the final coordinates of the passenger flow leaving in the video image are determined, and the initial coordinates and the final coordinates correspond one-to-one.

[0124] The initial entry / exit line is optimized based on the initial and final coordinates to obtain the optimized entry / exit line; the initial entry / exit line is a straight line, and the optimized entry / exit line is a curve.

[0125] Passenger flow is determined based on the detection target and the optimized entry / exit lines.

[0126] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0127] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute a passenger flow statistics method for intelligent cameras, the method comprising:

[0128] Acquire video images of passenger flow entering and exiting.

[0129] Identify a target in the video image, wherein the target is a human figure and / or head and shoulders.

[0130] The initial coordinates of the passenger flow entering and the final coordinates of the passenger flow leaving in the video image are determined, and the initial coordinates and the final coordinates correspond one-to-one.

[0131] The initial entry / exit line is optimized based on the initial and final coordinates to obtain the optimized entry / exit line; the initial entry / exit line is a straight line, and the optimized entry / exit line is a curve.

[0132] Passenger flow is determined based on the detection target and the optimized entry / exit lines.

[0133] In another aspect, 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 perform a passenger flow statistics method for a smart camera, the method comprising:

[0134] Acquire video images of passenger flow entering and exiting.

[0135] Identify a target in the video image, wherein the target is a human figure and / or head and shoulders.

[0136] The initial coordinates of the passenger flow entering and the final coordinates of the passenger flow leaving in the video image are determined, and the initial coordinates and the final coordinates correspond one-to-one.

[0137] The initial entry / exit line is optimized based on the initial and final coordinates to obtain the optimized entry / exit line; the initial entry / exit line is a straight line, and the optimized entry / exit line is a curve.

[0138] Passenger flow is determined based on the detection target and the optimized entry / exit lines.

[0139] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A passenger flow counting method for a smart camera, characterized by, include: Acquire video images of passenger flow entering and exiting; Identify a target in the video image, wherein the target is a human figure and / or head and shoulders; Determine the initial coordinates of the passenger flow entering and the final coordinates of the passenger flow leaving in the video image, wherein the initial coordinates and the final coordinates correspond one-to-one; The initial entry / exit line is optimized based on the initial and final coordinates to obtain the optimized entry / exit line; the initial entry / exit line is a straight line, and the optimized entry / exit line is a curve; Passenger flow is determined based on the detection target and the optimized entry / exit lines; The optimization of the initial entry / exit line based on the initial and final coordinates includes: optimizing the initial entry / exit line using a nonlinear support vector machine algorithm based on the initial and final coordinates.

2. The method of claim 1, wherein, Determining the target in the video image includes: Determine the coordinates of the human figure in the video image, the first detection confidence score of the human figure, the coordinates of the head and shoulders, and the second detection confidence score of the head and shoulders; The detection target is determined based on the first detection confidence level and the second detection confidence level.

3. The method of claim 1, wherein, The detection target is a pre-defined target, which is a human figure and / or head and shoulders.

4. The method of claim 2, wherein the method further comprises: Determining the detection target based on the first detection confidence level and the second detection confidence level includes: If the first detection confidence level is greater than or equal to the first threshold, and the second detection confidence level is less than the second threshold, then a human figure is used as the detection target. If the first detection confidence is less than the first threshold, and the second detection confidence is less than or equal to the second threshold, then the head and shoulders are used as the detection target.

5. The passenger flow statistics method for intelligent cameras according to claim 4, characterized in that, Also includes: If the first detection confidence is less than the first threshold and the second detection confidence is less than the second threshold, then the coordinates of the human figure in the next frame of the video image, the first detection confidence of the human figure, the coordinates of the head and shoulders, and the second detection confidence of the head and shoulders are determined until the detection target is determined.

6. The passenger flow statistics method for intelligent cameras according to any one of claims 1-5, characterized in that, After determining the initial coordinates of passenger entry and the final coordinates of passenger exit in the video image, and before optimizing the initial entry and exit routes based on the initial and final coordinates, the process further includes: The initial and final coordinates are cleaned by removing those located on the same side as the initial entry and exit lines.

7. The passenger flow statistics method for intelligent cameras according to claim 6, characterized in that, Clustering algorithms were used to clean the initial and final coordinates.

8. A passenger flow statistics system for intelligent cameras, characterized in that, include: The video image acquisition module is used to acquire video images of passenger flow entering and exiting. A target determination module is used to determine a target in the video image, wherein the target is a human figure and / or head and shoulders; The coordinate determination module is used to determine the initial coordinates of the passenger flow entering and the final coordinates of the passenger flow leaving in the video image, wherein the initial coordinates and the final coordinates correspond one-to-one. The inbound / outbound line optimization module is used to optimize the initial inbound / outbound line based on the initial coordinates and the final coordinates to obtain the optimized inbound / outbound line; the initial inbound / outbound line is a straight line, and the optimized inbound / outbound line is a curve; The passenger flow statistics module is used to determine passenger flow based on the detection target and the optimized entry and exit lines; The optimization of the initial entry / exit line based on the initial and final coordinates includes: optimizing the initial entry / exit line using a nonlinear support vector machine algorithm based on the initial and final coordinates.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the passenger flow statistics method for smart cameras as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the passenger flow statistics method for intelligent cameras as described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the passenger flow statistics method for intelligent cameras as described in any one of claims 1 to 7.