CN111339873B - Passenger flow statistical method and device, storage medium and computing equipment - Google Patents

Passenger flow statistical method and device, storage medium and computing equipment Download PDF

Info

Publication number
CN111339873B
CN111339873B CN202010099830.XA CN202010099830A CN111339873B CN 111339873 B CN111339873 B CN 111339873B CN 202010099830 A CN202010099830 A CN 202010099830A CN 111339873 B CN111339873 B CN 111339873B
Authority
CN
China
Prior art keywords
area
target object
target
passenger flow
head frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010099830.XA
Other languages
Chinese (zh)
Other versions
CN111339873A (en
Inventor
杨帆
文检萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaoshi Technology (Jiangsu) Co.,Ltd.
Original Assignee
Nanjing Zhenshi Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Zhenshi Intelligent Technology Co Ltd filed Critical Nanjing Zhenshi Intelligent Technology Co Ltd
Priority to CN202010099830.XA priority Critical patent/CN111339873B/en
Publication of CN111339873A publication Critical patent/CN111339873A/en
Application granted granted Critical
Publication of CN111339873B publication Critical patent/CN111339873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/53Recognition of crowd images, e.g. recognition of crowd congestion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands

Abstract

The embodiment of the application discloses a passenger flow statistical method, a passenger flow statistical device, a storage medium and computing equipment, and belongs to the technical field of image processing. The method comprises the following steps: acquiring a video obtained by shooting a target area; if a target object is detected in the video, acquiring the area of an imaging head frame of the target object when the target object is located at a passenger flow statistical position in the target area, wherein the area of the imaging head frame is the area of a bounding box of the head of the target object in the video; if the target object crosses the passenger flow statistical position, detecting that the target object is a child or an adult according to the area of the imaging head frame; and counting the passenger flow of the target area according to the detection result. According to the embodiment of the application, whether the target object is the child or not can be determined through the area of the imaging head frame, and the problems that the cost of passenger flow statistics is high, the shooting difficulty angle is high and more resources are occupied due to the fact that the child is identified through face recognition are solved.

Description

Passenger flow statistical method and device, storage medium and computing equipment
Technical Field
The embodiment of the application relates to the technical field of image processing, in particular to a passenger flow statistical method, a passenger flow statistical device, a storage medium and computing equipment.
Background
In passenger traffic statistics using machines, the technique of "line marking" is commonly used. That is, a person crosses the line of the passenger flow statistics, and then counts a passenger flow. The principle of passenger flow statistics is as follows: the method comprises the steps of recognizing the movement track of a person in a video by deep learning of the video, drawing a quadrangle with a direction in a specified area of the video, and carrying out passenger flow statistics on the person when the movement track of the person passes through the quadrangle in a certain defined mode.
When the passenger flow statistics is carried out, the purchasing ability of personnel is required to be evaluated, and people without purchasing ability, such as children, are eliminated, so that the effectiveness of the passenger flow statistics is improved. In the related art, the age of a person can be obtained by performing face recognition on the person in the video, so that whether the person is a child is recognized according to the age, and the passenger flow generated by the child is excluded.
Because high-quality images are needed when the age of the personnel is identified, higher requirements are put forward on the definition of the camera, and therefore the cost of passenger flow statistics is increased; higher requirements are also provided for environments such as light, angles and the like during shooting, so that the difficulty of video shooting is improved. In addition, face recognition requires more resources.
Disclosure of Invention
The embodiment of the application provides a passenger flow statistics method and device, a storage medium and computing equipment, which are used for solving the problems of higher passenger flow statistics cost, shooting difficulty angle and more resource occupation caused by identifying children through face recognition. The technical scheme is as follows:
in one aspect, a method for passenger flow statistics is provided, the method comprising:
acquiring a video obtained by shooting a target area;
if a target object is detected in the video, acquiring the area of an imaging head frame of the target object when the target object is located at a passenger flow statistical position in the target area, wherein the area of the imaging head frame is the area of a bounding box of the head of the target object in the video;
if the target object crosses the passenger flow statistical position, detecting that the target object is a child or an adult according to the area of the imaging head frame;
and counting the passenger flow of the target area according to the detection result.
In one aspect, a passenger flow statistics apparatus is provided, the apparatus comprising:
the acquisition module is used for acquiring a video obtained by shooting a target area;
the obtaining module is further configured to obtain an area of an imaging head frame of the target object when the target object is located at a passenger flow statistical position in the target area if the target object is detected in the video, where the area of the imaging head frame is an area of a bounding box of a head of the target object in the video;
the detection module is used for detecting that the target object is a child or an adult according to the area of the imaging head frame if the target object crosses the passenger flow statistical position;
and the counting module is used for counting the passenger flow of the target area according to the detection result.
In one aspect, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded and executed by a processor to implement a passenger flow statistics method as described above.
In one aspect, a computing device is provided that includes a processor and a memory having at least one instruction stored therein, the instruction being loaded and executed by the processor to implement a passenger flow statistics method as described above.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
if the target object in the video is located at the passenger flow statistical position in the target area, the area of an imaging head frame of the target object can be obtained; since the area of the imaging head frame is the area of the bounding box of the head of the target object in the video, if the target object passes through the passenger flow statistical position, the target object can be detected to be a child or an adult according to the area of the imaging head frame; and finally, counting the passenger flow of the target area according to the detection result. Therefore, whether the target object is a child or an adult can be detected through the area of the imaging head frame, the requirement on the image quality for obtaining the area of the imaging head frame is not high, so that the requirement on the definition of the camera is low, passenger flow statistics can be realized by using the camera with common shooting precision, and the cost of the passenger flow statistics can be reduced; and the requirements of the area of the imaging head frame on the environments such as light, angles and the like during shooting are low, so that the video shooting difficulty can be reduced. In addition, the algorithm for acquiring the area of the imaging head frame is simple, and only fewer resources are occupied, so that the resources can be saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for providing statistics of passenger flow according to one embodiment of the present application;
FIG. 2 is a flow chart of a method for providing statistics of passenger flow according to another embodiment of the present application;
FIG. 3 is a schematic diagram of the relationship between imaging position and height provided by another embodiment of the present application;
fig. 4 is a block diagram of a passenger flow statistics apparatus according to still another embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application more clear, the embodiments of the present application will be further described in detail with reference to the accompanying drawings.
The application scenario of the present application is described first below.
The method and the device can be used for counting the passenger flow in the target area. For example, when the target area is a store, the present application may be used to count the amount of traffic in the store.
In one implementation, a capture device may be installed at the door of each store, and the capture device may be connected to a computing device, so that the capture device may capture an area in the store, and send the captured video to the computing device, and the computing device may count the amount of traffic in the store according to the video.
Wherein, can dispose the camera among the collection equipment, for example, collection equipment can be rifle bolt camera. The collecting device and the computing device may be connected through a wired network or a wireless network, which is not limited in this embodiment.
Referring to fig. 1, a flow chart of a method for providing a passenger flow statistics method according to an embodiment of the present application is shown, where the passenger flow statistics method can be applied to a computing device. The passenger flow statistical method can comprise the following steps:
step 101, acquiring a video obtained by shooting a target area.
The acquisition device can shoot the target area and send the shot video to the computing device in real time, and the computing device can receive the video.
Step 102, if a target object is detected in the video, when the target object is located at the passenger flow statistical position in the target area, acquiring an imaging head frame area of the target object, wherein the imaging head frame area is an area of a bounding box of the head of the target object in the video.
The computing device can detect whether a target object exists in the video, and if the target object exists in the video, the computing device tracks the target object to obtain a motion track of the target object. Wherein the target object may be an adult or a child.
It should be noted that a passenger flow statistical position is preset in the target area, and when the target object does not cross the passenger flow statistical position, it is determined that the target object does not enter the target area, and the target object is not counted as the passenger flow of the target area; when the target object crosses the passenger flow statistical position, the target object is determined to enter the target area, and the target object needs to be counted as the passenger flow of the target area. The passenger flow statistical position may be a quadrilateral with a direction, or may be a line, and this embodiment is not limited.
If the target object is located at the passenger flow statistical position according to the movement track, the target object may cross the passenger flow statistical position and enter the target area, at this time, the computing device may obtain the area of the imaging head frame of the target object, so that after the target object crosses the passenger flow statistical position, the computing device may determine whether the target object is an adult or a child according to the area of the imaging head frame.
The area of the imaging head frame may be the area of a bounding box drawn for the head of the target object after the head is recognized by the computing device, and the bounding box may also be referred to as the imaging head frame.
And 103, if the target object crosses the passenger flow statistical position, detecting that the target object is a child or an adult according to the area of the imaging head frame.
The computing device may continue to track the trajectory of the target object in the video, and after it is determined that the target object crosses the passenger flow statistical position, the computing device may detect whether the target object is a child or an adult according to the area of the imaging head frame, where a specific detection method is described in detail below and is not described herein again.
In this embodiment, the computing device can identify whether the target object is a child or an adult according to the area of the imaging head frame, and compared with the method of identifying the age of the target object by face recognition in the related art and then determining whether the target object is a child or an adult, this embodiment has the following advantages:
1. the computing equipment only needs to identify the head of the target object in the video without identifying the facial details of the target object, so that the requirement on the image quality is not high, the requirement on the definition of the camera is met, the method can be realized by using the camera with the common shooting precision, and the camera with the high shooting precision is not needed to be configured, so that the cost of passenger flow statistics can be reduced;
2. the computing equipment only needs to identify the head of the target object in the video without identifying the facial details of the target object, so that the requirements on environments such as light, angles and the like during shooting are low, and the video shooting difficulty can be reduced;
3. the algorithm for acquiring the area of the imaging head frame is simple, local computing resources are not increased basically, the method can be realized by only increasing a small amount of acquired data, and resources can be saved.
And 104, counting the passenger flow of the target area according to the detection result.
In this embodiment, the computing device may obtain two detection results, where the first detection result indicates that the target object is an adult, and the second detection result indicates that the target object is a child. After the detection result is obtained, the computing device may count the passenger flow volume of the target area according to the detection result, and the specific statistical method is described in detail below and is not described herein again.
To sum up, according to the passenger flow statistics method provided in the embodiment of the present application, if a target object in a video is located at a passenger flow statistics position in a target area, an area of an imaging head frame of the target object may be obtained; since the area of the imaging head frame is the area of the bounding box of the head of the target object in the video, if the target object passes through the passenger flow statistical position, the target object can be detected to be a child or an adult according to the area of the imaging head frame; and finally, counting the passenger flow of the target area according to the detection result. Therefore, whether the target object is a child or an adult can be detected through the area of the imaging head frame, the requirement on the image quality for obtaining the area of the imaging head frame is not high, so that the requirement on the definition of the camera is low, passenger flow statistics can be realized by using the camera with common shooting precision, and the cost of the passenger flow statistics can be reduced; and the requirements of the area of the imaging head frame on the environments such as light, angles and the like during shooting are low, so that the video shooting difficulty can be reduced. In addition, the algorithm for acquiring the area of the imaging head frame is simple, and only fewer resources are occupied, so that the resources can be saved.
Referring to fig. 2, a flow chart of a method for providing a passenger flow statistics method according to another embodiment of the present application is shown, where the passenger flow statistics method can be applied to a computing device. The passenger flow statistical method can comprise the following steps:
step 201, acquiring a video obtained by shooting a target area.
The acquisition device can shoot the target area and send the shot video to the computing device in real time, and the computing device can receive the video.
Step 202, if a target object is detected in the video, when the target object is located at the passenger flow statistical position in the target area, acquiring an imaging head frame area of the target object, wherein the imaging head frame area is an area of a bounding box of the head of the target object in the video.
In the embodiment, a passenger flow statistical position is preset in the target area, when the target object does not cross the passenger flow statistical position, it is determined that the target object does not enter the target area, and the target object is not counted as the passenger flow of the target area; when the target object crosses the passenger flow statistical position, the target object is determined to enter the target area, and the target object needs to be counted as the passenger flow of the target area. Wherein the target object may be an adult or a child. The passenger flow statistical position may be a quadrilateral with a direction, or may be a line, and this embodiment is not limited.
If the target object is located at the passenger flow statistical position according to the movement track, the target object may cross the passenger flow statistical position and enter the target area, at this time, the computing device may obtain the area of the imaging head frame of the target object, so that after the target object crosses the passenger flow statistical position, the computing device may determine whether the target object is an adult or a child according to the area of the imaging head frame. The area of the imaging head frame may be the area of a bounding box drawn for the head of the target object after the head is recognized by the computing device, and the bounding box may also be referred to as the imaging head frame.
In one possible implementation, when the target object is located at the passenger flow statistical position in the target area, acquiring the area of the imaging head frame of the target object may include the following sub-steps:
step 2021, detecting an imaging head frame of the target object in the video, and generating a moving track of the target object according to the imaging head frame.
The computing device can detect whether a target object exists in the video, and if the target object exists in the video, the computing device tracks the target object to obtain a motion track of the target object.
In one embodiment, the computing device may divide a video into a plurality of video frames, detect each video frame, when an imaging header frame of a target object is detected in a certain video frame, assign a tracking identifier (Trackid) to the imaging header frame, and store the position of the target object corresponding to the tracking identifier; and continuously detecting the imaging head frame of the target object in subsequent video frames, and storing the position of the target object in each video frame corresponding to the tracking identifier, so that the motion track of the imaging head frame of the target object can be obtained, and the motion track of the target object can also be obtained.
Step 2022, when the passenger flow statistical position of the target object in the target area is determined according to the moving track, calculating the area of the imaging head frame to obtain the area of the imaging head frame.
When it is determined that the target object is located at the passenger flow statistical position, the computing device may calculate the area of the imaging head frame according to the proportion of the imaging head frame in the video frame and the area of the video frame, or the computing device may calculate the area of the imaging head frame according to the number of pixels included in the imaging head frame and the area of each pixel, or the computing device may also calculate the area of the imaging head frame through other algorithms, which is not limited in this embodiment.
And 203, if the target object passes through the passenger flow statistical position, calculating target characteristic parameters of the target object according to the area of the imaging head frame, wherein the target characteristic parameters comprise target head circumference parameters and target height parameters of the target object.
According to analysis, at least two influence factors of the head circumference and the height exist in the size of the area of the imaging head frame, and the relationship between the head circumference and the height and the area of the imaging head frame is explained below.
1. Head circumference
When two objects with different head circumference parameters stand at the same position, namely the distance between the two objects and the acquisition equipment is the same, the imaging of the object with the large head circumference parameter in the video is large, the imaging of the object with the small head circumference parameter in the video is small, the imaging size is in direct proportion to the side length of the imaging head frame, and the area of the imaging head frame is equal to the square of the side length of the imaging head frame. As can be seen from the above relationship, assuming that the head circumference parameter is He, the head frame area is S, and the first coefficient is α, then S ═ α × He2
2. Height of a person
When the collecting device is looking down for shooting and two objects with different height parameters are required to be imaged at the same position, the object with the larger height parameter is closer to the collecting device, and the object with the smaller height parameter is farther from the collecting device, as shown in fig. 3. The distance between the height parameter and the acquisition equipment is in direct proportion to the side length of the imaging head frame, the area of the imaging head frame is equal to the square of the side length of the imaging head frame, and according to the relation, if the height parameter is recorded as H, the area of the imaging head frame is recorded as S, the second coefficient is recorded as beta, the S is beta multiplied by H2
When the area S of the imaging head frame of the target object is known, if the target head circumference parameter and the target height parameter of the target object are required to be solved, the first coefficient and the second coefficient need to be solved. Wherein the first coefficient and the second coefficient are fixed values.
The method for calculating the target characteristic parameters of the target object according to the area of the imaging head frame comprises the following substeps:
step 2031, a first coefficient and a second coefficient are obtained.
In a possible implementation manner, a specific target object may be located at the passenger flow statistical position in the target area, the specific imaging head frame area of the specific target object is obtained, and then the head circumference parameter and the height parameter of the specific target object are measured, so that the first coefficient and the second coefficient can be calculated.
At this time, acquiring the first coefficient and the second coefficient may include: measuring a specific head circumference parameter and a specific height parameter of a specific subject; when a specific object is located at a passenger flow statistical position in a target area, acquiring the area of a specific imaging head frame of the specific object; dividing the area of the specific imaging head portrait by the square of the specific head circumference parameter to obtain a first coefficient; and dividing the area of the specific imaging head portrait by the square of the specific height parameter to obtain a second coefficient.
Step 2032, performing an evolution operation on the quotient of the area of the imaging head frame divided by the first coefficient to obtain a target head circumference parameter.
The area of the imaging head frame is in direct proportion to the square of the target head circumference parameter, and the S is alpha multiplied by He2The target head circumference parameter can be obtained by conversion
Figure BDA0002386582540000081
Since the imaging head frame area S and the first coefficient α are known, the target head circumference parameter can be calculated.
And 2033, performing evolution operation on the quotient of the area of the imaging head frame divided by the second coefficient to obtain the target height parameter.
The area of the imaging head frame is in direct proportion to the square of the target height parameter, and the S is beta multiplied by H2The target height parameter can be obtained by conversion
Figure BDA0002386582540000082
Since the imaging head frame area S and the second coefficient β are known, the target height parameter can be calculated.
And step 204, calculating the probability that the target object is the child according to the target characteristic parameters.
In this embodiment, the computing device may preset a child age threshold N, and then calculate the sum of the probabilities that the target object is less than or equal to the age of N, that is, the probability that the target object is a child may be obtained. For example, if N is 14, the computing device may calculate the probability that the target object is a child aged 1, the probability that the target object is a child aged 2, the probability that the target object is a child aged 3, and … …, the probability that the target object is a child aged 14, and then add the 14 probabilities to obtain the probability that the target object is a child.
Wherein, calculating the probability that the target object is a child according to the target characteristic parameters may include the following substeps:
step 2041, acquiring a first characteristic parameter of an adult and N groups of second characteristic parameters of children from a standard table, wherein the first characteristic parameter comprises a head circumference average value and a height average value of the adult, the ith group of second characteristic parameters comprises a head circumference average value and a height average value of the ith child, and i is greater than or equal to 1 and less than or equal to a child age threshold N.
The standard table comprises the average value of the head circumference of the minor and the adult in each age group of the national standard, so the average value of the head circumference of the adult and the average value of the head circumference of the child at each age can be obtained by table look-up. The standard table also comprises the height average values of the minor and the adult of each age according to the national standard, so that the height average value of the adult and the height average value of the child of each age can be obtained by looking up the table.
And forming a first characteristic parameter by using the head circumference average value and the height average value of the adults in the data, and forming a group of second characteristic parameters by using the head circumference average value and the height average value of children at each age to obtain N groups of second characteristic parameters.
Step 2042, calculating the total probability that the target object is less than or equal to N years according to the target characteristic parameters, the first characteristic parameters, the N groups of second characteristic parameters and the posterior probability calculation formula of Bayes.
Bayesian is the posterior probability formula P (a | B) ═ P (a) × P (B | a)/P (B), which represents the probability of an event a occurring under the condition that another event B has occurred. If A is the designated age and B is the feature parameter, i.e. (height parameter H, head circumference parameter He) binary, then the total probability formula for calculating the target object is less than or equal to N years old is
Figure BDA0002386582540000091
Step 2043, determine the total probability as the probability that the target object is a child.
In step 205, if the probability is greater than or equal to the preset threshold, a detection result indicating that the target object is a child is generated, and step 207 is executed.
The computing device may preset a preset threshold and determine whether the target object is an adult or a child based on the preset threshold. The preset threshold may be an empirical value or a numerical value calculated by a calculation formula, and this embodiment is not limited.
In step 206, if the probability is smaller than the preset threshold, a detection result indicating that the target object is an adult is generated, and step 207 is executed.
And step 207, counting the passenger flow of the target area according to the detection result.
In this embodiment, the computing device may obtain two detection results, where the first detection result indicates that the target object is an adult, and the second detection result indicates that the target object is a child.
In this embodiment, the computing device may preset a statistical policy, and perform passenger flow statistics according to the statistical policy and the detection result. Two possible statistical strategies are explained below.
When the statistical strategy is to count the passenger flow of adults and children and mark the passenger flow type, the counting the passenger flow of the target area according to the detection result may include: when the detection result indicates that the target object is an adult, updating the passenger flow of the target area, and recording the current passenger flow type as an adult; and when the detection result indicates that the target object is a child, updating the passenger flow of the target area, and recording the current passenger flow type as the child.
For example, when the target object entering the target area is an adult, the passenger flow volume is increased by 1, and the passenger flow type is marked as an adult; when the target object entering the target area is a child, the passenger flow is increased by 1, and the passenger flow type is marked as a child. Therefore, the computing device can count the passenger flow of adults and the passenger flow of children, and can enrich the statistical mode of the passenger flow.
When the statistical strategy is to count the passenger flow of adults, the counting the passenger flow of the target area according to the detection result may include: when the detection result indicates that the target object is an adult, updating the passenger flow volume of the target area; when the detection result indicates that the target object is a child, the passenger flow volume of the target area is not updated.
For example, when the target object entering the target area is an adult, the passenger flow volume is increased by 1; when the target object entering the target area is a child, the passenger flow volume is not updated. Therefore, the computing device can count the passenger flow of the adults and improve the accuracy of the passenger flow.
When the passenger flow statistical method provided by the embodiment is implemented, the testers find that the embodiment has a good recognition effect on the target objects of smaller ages. When defining non-purchasing children at and below age 14 (i.e., N is 14), the recognition accuracy is above 99%, and the recognition accuracy is attached below, as shown in table one.
Watch 1
Age (age) N≤9 N≤13 N≤16
Rate of accuracy 100% 99% 92%
To sum up, according to the passenger flow statistics method provided in the embodiment of the present application, if a target object in a video is located at a passenger flow statistics position in a target area, an area of an imaging head frame of the target object may be obtained; since the area of the imaging head frame is the area of the bounding box of the head of the target object in the video, if the target object passes through the passenger flow statistical position, the target object can be detected to be a child or an adult according to the area of the imaging head frame; and finally, counting the passenger flow of the target area according to the detection result. Therefore, whether the target object is a child or an adult can be detected through the area of the imaging head frame, the requirement on the image quality for obtaining the area of the imaging head frame is not high, so that the requirement on the definition of the camera is low, passenger flow statistics can be realized by using the camera with common shooting precision, and the cost of the passenger flow statistics can be reduced; and the requirements of the area of the imaging head frame on the environments such as light, angles and the like during shooting are low, so that the video shooting difficulty can be reduced. In addition, the algorithm for acquiring the area of the imaging head frame is simple, and only fewer resources are occupied, so that the resources can be saved.
Referring to fig. 4, a block diagram of a passenger flow statistics apparatus provided in an embodiment of the present application is shown, where the passenger flow statistics apparatus can be applied to a computing device. The passenger flow statistics device can comprise:
an obtaining module 410, configured to obtain a video obtained by shooting a target area;
the obtaining module 410 is further configured to, if a target object is detected in the video, obtain an area of an imaging header frame of the target object when the target object is located at a passenger flow statistical position in the target area, where the area of the imaging header frame is an area of a bounding box of a head of the target object in the video;
the detection module 420 is used for detecting whether the target object is a child or an adult according to the area of the imaging head frame if the target object crosses the passenger flow statistical position;
and the counting module 430 is used for counting the passenger flow of the target area according to the detection result.
In an alternative embodiment, the detecting module 420 is further configured to:
calculating target characteristic parameters of the target object according to the area of the imaging head frame, wherein the target characteristic parameters comprise target head circumference parameters and target height parameters of the target object;
calculating the probability that the target object is a child according to the target characteristic parameters;
if the probability is greater than or equal to a preset threshold value, generating a detection result for indicating that the target object is a child;
and if the probability is smaller than a preset threshold value, generating a detection result for indicating that the target object is an adult.
In an alternative embodiment, the detecting module 420 is further configured to:
acquiring a first characteristic parameter of an adult and N groups of second characteristic parameters of children from a standard table, wherein the first characteristic parameter comprises a head circumference average value and a height average value of the adult, the ith group of second characteristic parameters comprises a head circumference average value and a height average value of the ith child, and i is greater than or equal to 1 and less than or equal to a child age threshold N;
calculating the total probability that the target object is less than or equal to N years according to the target characteristic parameters, the first characteristic parameters, the N groups of second characteristic parameters and a posterior probability calculation formula of Bayes;
the full probability is determined as the probability that the target object is a child.
In an alternative embodiment, the detecting module 420 is further configured to:
acquiring a first coefficient and a second coefficient;
performing evolution operation on a quotient obtained by dividing the area of the imaging head frame by a first coefficient to obtain a target head circumference parameter;
and performing evolution operation on the quotient of the area of the imaging head frame divided by the second coefficient to obtain the target height parameter.
In an alternative embodiment, the detecting module 420 is further configured to:
measuring a specific head circumference parameter and a specific height parameter of a specific subject;
when the specific object is located at the passenger flow statistical position in the target area, acquiring the specific imaging head frame area of the specific object;
dividing the area of the specific imaging head portrait by the square of the specific head circumference parameter to obtain a first coefficient;
and dividing the area of the specific imaging head portrait by the square of the specific height parameter to obtain a second coefficient.
In an optional embodiment, the obtaining module 410 is further configured to:
detecting an imaging head frame of a target object in a video, and generating a moving track of the target object according to the imaging head frame;
and when the passenger flow statistical position of the target object in the target area is determined according to the moving track, calculating the area of the imaging head frame to obtain the area of the imaging head frame.
In an alternative embodiment, the statistics module 430 is further configured to:
when the detection result indicates that the target object is an adult, updating the passenger flow of the target area, and recording the current passenger flow type as an adult; when the detection result indicates that the target object is a child, updating the passenger flow volume of the target area, and recording the current passenger flow type as the child; alternatively, the first and second electrodes may be,
when the detection result indicates that the target object is an adult, updating the passenger flow volume of the target area; when the detection result indicates that the target object is a child, the passenger flow volume of the target area is not updated.
To sum up, with the passenger flow statistics apparatus provided in the embodiment of the present application, if a target object in a video is located at a passenger flow statistics position in a target area, an area of an imaging head frame of the target object may be obtained; since the area of the imaging head frame is the area of the bounding box of the head of the target object in the video, if the target object passes through the passenger flow statistical position, the target object can be detected to be a child or an adult according to the area of the imaging head frame; and finally, counting the passenger flow of the target area according to the detection result. Therefore, whether the target object is a child or an adult can be detected through the area of the imaging head frame, the requirement on the image quality for obtaining the area of the imaging head frame is not high, so that the requirement on the definition of the camera is low, passenger flow statistics can be realized by using the camera with common shooting precision, and the cost of the passenger flow statistics can be reduced; and the requirements of the area of the imaging head frame on the environments such as light, angles and the like during shooting are low, so that the video shooting difficulty can be reduced. In addition, the algorithm for acquiring the area of the imaging head frame is simple, and only fewer resources are occupied, so that the resources can be saved.
One embodiment of the present application provides a computer-readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded and executed by a processor to implement a passenger flow statistics method as described above.
One embodiment of the present application provides a computing device comprising a processor and a memory, the memory having stored therein at least one instruction, the instruction being loaded and executed by the processor to implement a passenger flow statistics method as described above.
It should be noted that: in the passenger flow statistics device provided in the above embodiment, only the division of the above functional modules is used for illustration when performing passenger flow statistics, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the passenger flow statistics device is divided into different functional modules to complete all or part of the above described functions. In addition, the passenger flow statistics device provided by the above embodiment and the passenger flow statistics method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description should not be taken as limiting the embodiments of the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the embodiments of the present application should be included in the scope of the embodiments of the present application.

Claims (7)

1. A method of statistics of passenger flow, the method comprising:
acquiring a video obtained by shooting a target area;
if a target object is detected in the video, acquiring the area of an imaging head frame of the target object when the target object is located at a passenger flow statistical position in the target area, wherein the area of the imaging head frame is the area of a bounding box of the head of the target object in the video;
if the target object crosses the passenger flow statistical position, detecting that the target object is a child or an adult according to the area of the imaging head frame;
counting the passenger flow of the target area according to the detection result;
the detecting that the target object is a child or an adult according to the imaging head frame area comprises: calculating target characteristic parameters of the target object according to the area of the imaging head frame, wherein the target characteristic parameters comprise target head circumference parameters and target height parameters of the target object; calculating the probability that the target object is a child according to the target characteristic parameters; if the probability is greater than or equal to a preset threshold value, generating a detection result for indicating that the target object is a child; if the probability is smaller than a preset threshold value, generating a detection result for indicating that the target object is an adult;
the calculating the target characteristic parameter of the target object according to the area of the imaging head frame comprises the following steps: acquiring a first coefficient and a second coefficient; performing an evolution operation on a quotient obtained by dividing the area of the imaging head frame by the first coefficient to obtain the target head circumference parameter; performing an evolution operation on a quotient obtained by dividing the area of the imaging head frame by the second coefficient to obtain the target height parameter;
the obtaining the first coefficient and the second coefficient includes: measuring a specific head circumference parameter and a specific height parameter of a specific subject; when the specific object is located at the passenger flow statistical position in the target area, acquiring the specific imaging head frame area of the specific object; calculating a first square value of the specific head circumference parameter, and dividing the area of the specific imaging head frame by the first square value to obtain a first coefficient; and calculating a second square value of the specific height parameter, and dividing the area of the specific imaging head frame by the second square value to obtain a second coefficient.
2. The method of claim 1, wherein said calculating the probability that the target object is a child based on the target feature parameters comprises:
acquiring a first characteristic parameter of an adult and N groups of second characteristic parameters of children from a standard table, wherein the first characteristic parameter comprises a head circumference average value and a height average value of the adult, the ith group of second characteristic parameters comprises a head circumference average value and a height average value of the ith child, and i is more than or equal to 1 and less than or equal to a child age threshold N;
calculating the total probability that the target object is less than or equal to N years according to the target characteristic parameters, the first characteristic parameters, the N groups of second characteristic parameters and a posterior probability calculation formula of Bayes;
determining the total probability as a probability that the target object is a child.
3. The method of claim 1, wherein obtaining an imaging head frame area of the target object while the target object is located at a passenger flow statistical position within the target area comprises:
detecting an imaging head frame of the target object in the video, and generating a moving track of the target object according to the imaging head frame;
and when the passenger flow statistical position of the target object in the target area is determined according to the moving track, calculating the area of the imaging head frame to obtain the area of the imaging head frame.
4. The method according to any one of claims 1 to 3, wherein the counting the passenger flow of the target area according to the detection result comprises:
when the detection result indicates that the target object is an adult, updating the passenger flow volume of the target area, and recording that the current passenger flow type is an adult; when the detection result indicates that the target object is a child, updating the passenger flow volume of the target area, and recording the current passenger flow type as the child; alternatively, the first and second electrodes may be,
updating the passenger flow volume of the target area when the detection result indicates that the target object is an adult; when the detection result indicates that the target object is a child, the passenger flow volume of the target area is not updated.
5. A passenger flow statistics apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a video obtained by shooting a target area;
the obtaining module is further configured to obtain an area of an imaging head frame of the target object when the target object is located at a passenger flow statistical position in the target area if the target object is detected in the video, where the area of the imaging head frame is an area of a bounding box of a head of the target object in the video;
the detection module is used for detecting that the target object is a child or an adult according to the area of the imaging head frame if the target object crosses the passenger flow statistical position;
the statistical module is used for counting the passenger flow of the target area according to the detection result;
the detection module is further used for calculating target characteristic parameters of the target object according to the area of the imaging head frame, wherein the target characteristic parameters comprise target head circumference parameters and target height parameters of the target object; calculating the probability that the target object is a child according to the target characteristic parameters; if the probability is greater than or equal to a preset threshold value, generating a detection result for indicating that the target object is a child; if the probability is smaller than a preset threshold value, generating a detection result for indicating that the target object is an adult;
the detection module is further used for acquiring a first coefficient and a second coefficient; performing an evolution operation on a quotient obtained by dividing the area of the imaging head frame by the first coefficient to obtain the target head circumference parameter; performing an evolution operation on a quotient obtained by dividing the area of the imaging head frame by the second coefficient to obtain the target height parameter;
the detection module is also used for measuring specific head circumference parameters and specific height parameters of a specific object; when the specific object is located at the passenger flow statistical position in the target area, acquiring the specific imaging head frame area of the specific object; calculating a first square value of the specific head circumference parameter, and dividing the area of the specific imaging head frame by the first square value to obtain a first coefficient; and calculating a second square value of the specific height parameter, and dividing the area of the specific imaging head frame by the second square value to obtain a second coefficient.
6. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the passenger flow statistics method of any of claims 1 to 4.
7. A computing device comprising a processor and a memory, the memory having stored therein at least one instruction that is loaded and executed by the processor to implement the passenger flow statistics method of any of claims 1-4.
CN202010099830.XA 2020-02-18 2020-02-18 Passenger flow statistical method and device, storage medium and computing equipment Active CN111339873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010099830.XA CN111339873B (en) 2020-02-18 2020-02-18 Passenger flow statistical method and device, storage medium and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010099830.XA CN111339873B (en) 2020-02-18 2020-02-18 Passenger flow statistical method and device, storage medium and computing equipment

Publications (2)

Publication Number Publication Date
CN111339873A CN111339873A (en) 2020-06-26
CN111339873B true CN111339873B (en) 2021-04-20

Family

ID=71185420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010099830.XA Active CN111339873B (en) 2020-02-18 2020-02-18 Passenger flow statistical method and device, storage medium and computing equipment

Country Status (1)

Country Link
CN (1) CN111339873B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112465855B (en) * 2021-02-02 2021-04-20 南京甄视智能科技有限公司 Passenger flow statistical method, device, storage medium and equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872422A (en) * 2010-02-10 2010-10-27 杭州海康威视软件有限公司 People flow rate statistical method and system capable of precisely identifying targets
US8116564B2 (en) * 2006-11-22 2012-02-14 Regents Of The University Of Minnesota Crowd counting and monitoring
CN104008396A (en) * 2014-05-22 2014-08-27 南京邮电大学 In and out people flow statistical method based on people head color and shape features
CN104268506A (en) * 2014-09-15 2015-01-07 郑州天迈科技股份有限公司 Passenger flow counting detection method based on depth images
CN105069429A (en) * 2015-07-29 2015-11-18 中国科学技术大学先进技术研究院 People flow analysis statistics method based on big data platform and people flow analysis statistics system based on big data platform
CN105893962A (en) * 2016-03-31 2016-08-24 成都信息工程大学 Method for counting passenger flow at airport security check counter
KR101711328B1 (en) * 2016-02-26 2017-03-03 경성대학교 산학협력단 Method for classifying children and adult by using head and body height in images obtained from camera such as CCTV
CN107590458A (en) * 2017-05-04 2018-01-16 中华电信股份有限公司 Gender and age identification method of vertical image people flow counting
CN108596042A (en) * 2018-03-29 2018-09-28 青岛海尔智能技术研发有限公司 Enabling control method and system
CN108876990A (en) * 2018-05-31 2018-11-23 深圳市零度智控科技有限公司 Intelligent door lock and its control method, device and readable storage medium storing program for executing
CN110222637A (en) * 2019-06-04 2019-09-10 深圳市基鸿运科技有限公司 A kind of passenger flow statistical method and its system based on 3D rendering Head recognition
CN110717400A (en) * 2019-09-12 2020-01-21 北京华捷艾米科技有限公司 Passenger flow statistical method, device and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160118783A (en) * 2015-04-03 2016-10-12 한화테크윈 주식회사 Method and Apparatus for counting the number of person
CN106778637B (en) * 2016-12-19 2020-01-07 江苏慧眼数据科技股份有限公司 Statistical method for man and woman passenger flow
CN107862263A (en) * 2017-10-27 2018-03-30 苏州三星电子电脑有限公司 The gender identification method of smart machine and sex identification device
US10540545B2 (en) * 2017-11-22 2020-01-21 Intel Corporation Age classification of humans based on image depth and human pose
CN109871804A (en) * 2019-02-19 2019-06-11 上海宝尊电子商务有限公司 A kind of method and system of shop stream of people discriminance analysis

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8116564B2 (en) * 2006-11-22 2012-02-14 Regents Of The University Of Minnesota Crowd counting and monitoring
CN101872422A (en) * 2010-02-10 2010-10-27 杭州海康威视软件有限公司 People flow rate statistical method and system capable of precisely identifying targets
CN104008396A (en) * 2014-05-22 2014-08-27 南京邮电大学 In and out people flow statistical method based on people head color and shape features
CN104268506A (en) * 2014-09-15 2015-01-07 郑州天迈科技股份有限公司 Passenger flow counting detection method based on depth images
CN105069429A (en) * 2015-07-29 2015-11-18 中国科学技术大学先进技术研究院 People flow analysis statistics method based on big data platform and people flow analysis statistics system based on big data platform
KR101711328B1 (en) * 2016-02-26 2017-03-03 경성대학교 산학협력단 Method for classifying children and adult by using head and body height in images obtained from camera such as CCTV
CN105893962A (en) * 2016-03-31 2016-08-24 成都信息工程大学 Method for counting passenger flow at airport security check counter
CN107590458A (en) * 2017-05-04 2018-01-16 中华电信股份有限公司 Gender and age identification method of vertical image people flow counting
CN108596042A (en) * 2018-03-29 2018-09-28 青岛海尔智能技术研发有限公司 Enabling control method and system
CN108876990A (en) * 2018-05-31 2018-11-23 深圳市零度智控科技有限公司 Intelligent door lock and its control method, device and readable storage medium storing program for executing
CN110222637A (en) * 2019-06-04 2019-09-10 深圳市基鸿运科技有限公司 A kind of passenger flow statistical method and its system based on 3D rendering Head recognition
CN110717400A (en) * 2019-09-12 2020-01-21 北京华捷艾米科技有限公司 Passenger flow statistical method, device and system

Also Published As

Publication number Publication date
CN111339873A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
US10445567B2 (en) Pedestrian head identification method and system
US8655078B2 (en) Situation determining apparatus, situation determining method, situation determining program, abnormality determining apparatus, abnormality determining method, abnormality determining program, and congestion estimating apparatus
US11049259B2 (en) Image tracking method
CN105631418A (en) People counting method and device
CN110287907B (en) Object detection method and device
CN111860587B (en) Detection method for small targets of pictures
US20170053172A1 (en) Image processing apparatus, and image processing method
CN111091057A (en) Information processing method and device and computer readable storage medium
CN111339873B (en) Passenger flow statistical method and device, storage medium and computing equipment
CN110766715B (en) Multi-target tracking method combined with single target track
CN110555349A (en) working time length statistical method and device
CN111814690A (en) Target re-identification method and device and computer readable storage medium
CN109299702B (en) Human behavior recognition method and system based on depth space-time diagram
CN111382606A (en) Tumble detection method, tumble detection device and electronic equipment
CN110889347B (en) Density traffic flow counting method and system based on space-time counting characteristics
CN111027482B (en) Behavior analysis method and device based on motion vector segmentation analysis
CN114550069B (en) Piglet nipple counting method based on deep learning
JP6893812B2 (en) Object detector
CN113408342B (en) Target detection method for determining intersection ratio threshold based on features
CN111461086A (en) People counting method and system based on head detection
CN110096959B (en) People flow calculation method, device and computer storage medium
CN113807319A (en) Face recognition optimization method, device, equipment and medium
CN112907623A (en) Statistical method and system for moving object in fixed video stream
CN111860261A (en) Passenger flow value statistical method, device, equipment and medium
CN111695404A (en) Pedestrian falling detection method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 210000 Longmian Avenue 568, High-tech Park, Jiangning District, Nanjing City, Jiangsu Province

Patentee after: Xiaoshi Technology (Jiangsu) Co.,Ltd.

Address before: 210000 Longmian Avenue 568, High-tech Park, Jiangning District, Nanjing City, Jiangsu Province

Patentee before: NANJING ZHENSHI INTELLIGENT TECHNOLOGY Co.,Ltd.