Passenger flow counting method based on infrared rays
Through infrared sensor array and neural network identification model, identifying and tracking passenger flow target frames, the error counting and missing counting problems in traditional infrared passenger flow counting methods are solved, and more accurate passenger flow statistics are achieved.
Patent Information
- Application Number
- CN202411085541.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional infrared passenger flow counting method has problems of error counting and miss counting, which affects the accuracy of passenger flow statistics.
The infrared sensor array is used to combine the pre-deployed target recognition model to identify and analyze the multi-frame passenger flow count data through neural network to determine the target frames with passenger flow, and determine the real number of passenger flow based on the frame sequence. The edge detection and centroid tracking algorithm are used to optimize passenger flow count.
The accuracy of passenger flow counting is improved, and the phenomenon of error counting and missing counting is effectively reduced. Through feature parameter extraction and infrared signal recognition model construction, the passenger flow counting results are optimized and the statistics are improved.
Smart Images

Figure CN119026629A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data processing, and in particular relates to a passenger flow counting method based on infrared rays. Background Art
[0002] Passenger counting refers to the process of counting the number of people passing through a specific area. This is often used in public places such as retail stores, subway stations, airports, exhibition halls, etc. to help managers understand passenger flow, optimize operations and improve customer experience. Passenger counting can be achieved through a variety of technologies, including video analysis, infrared sensors, geomagnetic sensors, radio frequency identification (RFID), etc. Among them, infrared sensing technology has been widely used in the field of passenger counting due to its advantages such as low cost, easy deployment and low power consumption. However, traditional infrared passenger counting methods have problems such as miscounting and missing counting, which affects the accuracy of passenger counting. Summary of the invention
[0003] The invention provides a passenger flow counting method based on infrared rays, which is used to solve the technical problem of miscounting in the existing infrared passenger flow counting method.
[0004] A passenger flow counting method based on infrared rays, comprising:
[0005] Connecting an infrared sensor array; wherein the infrared sensor array comprises M*N infrared sensors arranged in a matrix form;
[0006] Collect infrared sensor data of the infrared sensor array according to the data sampling frequency to obtain multiple frames of passenger flow counting data; wherein each frame of passenger flow counting data includes all infrared sensor data of the infrared sensor array;
[0007] Use the pre-deployed target recognition model to identify and analyze the multi-frame passenger flow counting data to determine the target frame with passenger flow;
[0008] Based on the target frame with passenger flow, multiple continuous target frames with passenger flow are determined to obtain multiple frame sequences, and the actual passenger flow quantity is determined based on the frame sequences to complete infrared-based passenger flow counting.
[0009] Furthermore, infrared sensor data of the infrared sensor array is collected according to the data sampling frequency to obtain multiple frames of passenger flow counting data, including:
[0010] Obtain the sampling frequency of data stored in the database or entered by staff;
[0011] Collect infrared sensing data of the infrared sensing array according to the data sampling frequency to obtain infrared sensing data of the infrared sensing array at different time points;
[0012] For any time point, the infrared sensor data of the infrared sensor array collected at that time point is combined into a frame of M*N data matrix to obtain a frame of passenger flow counting data;
[0013] The data matrix of the infrared sensor data of the infrared sensor array collected at all time points is constructed to obtain multi-frame passenger flow counting data.
[0014] Furthermore, a pre-deployed target recognition model is used to identify and analyze the multi-frame passenger flow counting data to determine the target frames with passenger flow, including:
[0015] A target recognition model is pre-deployed using a neural network; wherein the target recognition model is used to identify whether there is passenger flow in a frame of passenger flow counting data;
[0016] The pre-deployed target recognition model is used to identify and analyze the multi-frame passenger flow counting data to determine the target frames with passenger flow.
[0017] Furthermore, a neural network is used to pre-deploy a target recognition model, including:
[0018] Build a YOLO neural network model or a CNN neural network model to obtain an initial neural network;
[0019] The initial neural network is trained using an intelligent optimization algorithm to obtain a target recognition model.
[0020] Furthermore, the initial neural network is trained using an intelligent optimization algorithm to obtain a target recognition model, including:
[0021] Set the intelligent optimization algorithm to Adam algorithm;
[0022] According to the Adam algorithm, the initial neural network is trained as follows:
[0023] The initial learning rate is set to 0.001, and each cycle is operated 3000 times. After every four cycles, the learning rate is changed to 0.997 times of the original learning rate. The initial neural network is trained using the label image corresponding to the passenger flow counting data. When the loss value is reduced by 15 times, the learning rate is reduced by 15 times and training continues. When the loss value no longer decreases, the network parameters at this time are saved as the final network parameters of the initial neural network to obtain the target recognition model.
[0024] Further, based on the target frame with passenger flow, multiple continuous target frames with passenger flow are determined to obtain multiple frame sequences, and the real passenger flow number is determined based on the frame sequences to complete the infrared-based passenger flow counting, including:
[0025] Based on the target frame where the passenger flow exists, determining the target frame where the passenger flow initially appears, and adding the target frame where the passenger flow initially appears to the frame sequence;
[0026] Determine whether the next frame of passenger flow counting data is a target frame. If so, add the next frame of passenger flow counting data to the frame sequence and repeat this step. Otherwise, determine that the next frame of passenger flow counting data is not a target frame, and obtain a frame sequence.
[0027] The actual passenger flow quantity is determined based on the frame sequence, and infrared-based passenger flow counting is completed.
[0028] Further, determining the actual passenger flow quantity based on the frame sequence includes:
[0029] For any frame sequence, edge detection is performed on targets in the passenger flow counting data in the frame sequence to obtain edge data of at least one target;
[0030] Based on the time relationship, starting from 1, a unique counting number is assigned to each target in sequence;
[0031] Determining a centroid corresponding to at least one target based on the edge data of the passenger flow counting data;
[0032] Associating the centroid corresponding to each target with its counting number, and obtaining the target counting number and centroid in the passenger flow counting data in the frame sequence;
[0033] For any frame sequence, determine that the centroids of the passenger flow counting data of the next frame and the passenger flow counting data of the current frame are the same as each other;
[0034] For any frame sequence, the moving direction of the centroid is determined according to the position of the same centroid in different passenger flow counting data;
[0035] When the moving direction of the centroid is the same as the preset counting direction and finally disappears behind the boundary, the actual passenger flow number is increased by one to obtain the actual passenger flow number.
[0036] Further, for any frame sequence, edge detection is performed on targets in the passenger flow counting data in the frame sequence to obtain edge data of at least one target, including:
[0037] For the passenger flow counting data in any frame sequence, the passenger flow counting data is binarized, the part with response is filled with 1, and the part without response is filled with 0, so as to obtain the passenger flow counting data after binarization processing;
[0038] Based on the passenger flow counting data after the binarization process, the response intensity is determined as:
[0039]
[0040] Among them, I ij,k Indicates the value of the kth data adjacent to the jth data in the i-th row, S ij represents the response strength of the jth data in the i-th row, and K represents the total number of adjacent data of the jth data in the i-th row;
[0041] According to the response strength of all data points in the passenger flow counting data, the maximum response strength is determined;
[0042] The data points whose response intensity is less than the maximum response intensity are regarded as edge points to obtain edge detection results;
[0043] Based on the edge detection result, determine whether the area covered by the edge detection result exceeds a preset threshold. If so, segment the edge detection result to obtain the edge data of the target. Otherwise, directly use the edge detection result as the edge data of the target.
[0044] Further, based on the edge data of the passenger flow counting data, determining the centroid corresponding to at least one target includes:
[0045] Take the upper left corner of the M*N passenger flow counting data as the origin and determine the coordinates of each data point;
[0046] For each edge data corresponding to a target, the average coordinates corresponding to the edge data are rounded to obtain the centroid corresponding to at least one target.
[0047] Furthermore, for any frame sequence, the moving direction of the centroid is determined according to the position of the same centroid in different passenger flow counting data, including:
[0048] The coordinates of the center of mass in the previous frame are used as the starting coordinates, and the coordinates of the center of mass in the next frame are used as the end coordinates to determine the current moving direction.
[0049] The present invention provides an infrared-based passenger flow counting method, which can simply and quickly determine the generated passenger flow data and passenger flow direction by acquiring data from an infrared sensor array and tracking the data from the infrared sensor array, thereby completing accurate passenger flow counting. The invention adopts a plurality of infrared sensors for detection, thereby improving the accuracy of passenger flow counting. The invention effectively reduces the phenomenon of miscounting and missed counting by extracting characteristic parameters and constructing an infrared signal recognition model. The invention adopts a time series analysis method, thereby further optimizing the passenger flow counting result and improving the accuracy of statistics. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0051] Figure 1 The present invention provides a flowchart of a passenger flow counting method based on infrared rays.
[0052] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0054] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0055] like Figure 1 As shown, an embodiment of the present invention provides a passenger flow counting method based on infrared rays, comprising:
[0056] S101, connecting an infrared sensor array; wherein the infrared sensor array includes M*N infrared sensors arranged in a matrix.
[0057] In the above steps, M represents rows and N represents columns, so the passenger flow data can be effectively collected through the infrared sensor array, thereby improving the accuracy of passenger flow counting.
[0058] S102, collecting infrared sensor data of the infrared sensor array according to the data sampling frequency, and obtaining multiple frames of passenger flow counting data; wherein each frame of passenger flow counting data includes all infrared sensor data of the infrared sensor array;
[0059] Each time the infrared sensor data of the infrared sensor array is completely collected, a frame of passenger flow counting data can be obtained, and then the data can be collected at the currently determined data sampling frequency to obtain multiple passenger flow counting data. By analyzing the same targets in these passenger flow counting data, the final real passenger flow data can be determined, thereby effectively improving the infrared passenger flow counting results.
[0060] It should be noted that sensors consume energy when collecting data. If the collection frequency is too high, it will lead to excessive energy consumption. By setting a lower collection frequency, you can reduce energy usage and extend the service life of the sensor. At the same time, computing resources are also consumed when acquiring data packets. By increasing the time interval for acquiring data packets, the load on the computing node can be reduced. If the data collection frequency of the sensor is too high, a large amount of data will be generated. This will increase the cost of data transmission and the requirements for network bandwidth. By setting a lower collection frequency and a longer time interval, you can reduce the amount of data generated, reduce the cost of data transmission, and avoid network congestion.
[0061] S103, using a pre-deployed target recognition model to identify and analyze multiple frames of passenger flow counting data to determine target frames with passenger flow;
[0062] Using a pre-deployed target recognition model to identify and analyze multiple frames of passenger flow counting data is only a preferred implementation of the present invention. Analysis can also be performed based on statistical methods, machine learning models or domain expert knowledge to determine whether there is a target in a frame of data.
[0063] For example: at the initial moment, the data of each sensor in the infrared sensor array should be the same. After the target passes through the sensing range of the infrared sensor array, the data measured by some sensors will change (that is, there will be a response). Therefore, it is possible to detect whether there is a response to determine whether there is a target. In order to avoid the influence of noise from other organisms or objects (such as plastic bags blown by the wind) on the measurement results, a neural network can be used to analyze the passenger flow counting data, so as to effectively identify the response data generated by humans.
[0064] S104. Based on the target frame with passenger flow, multiple continuous target frames with passenger flow are determined to obtain multiple frame sequences, and the actual passenger flow quantity is determined based on the frame sequences to complete infrared-based passenger flow counting.
[0065] When the infrared sensor array responds, it can only be determined whether there is passenger flow passing through the infrared sensor array, but it cannot be determined whether the passenger flow reaches the area where the passenger flow needs to be measured (for example, when the infrared sensor array is set at the entrance of a shopping mall, it can only be determined that there is passenger flow at the entrance of the shopping mall, but it cannot be determined whether the passenger flow eventually reaches the inside of the shopping mall). Therefore, multiple continuous target frames can be combined for analysis to determine the actual number of passenger flows.
[0066] When passengers pass through the infrared sensor array, there should be responses in different frame data until they leave the infrared sensor array. Therefore, after determining that there is a target in a starting frame, the target should be tracked. When tracking the target, if a new target point appears, the new target point should also be tracked, so that the actual number of passengers can be determined.
[0067] The present invention provides an infrared-based passenger flow counting method, which can simply and quickly determine the generated passenger flow data and passenger flow direction by acquiring data from an infrared sensor array and tracking the data from the infrared sensor array, thereby completing accurate passenger flow counting. The invention adopts a plurality of infrared sensors for detection, thereby improving the accuracy of passenger flow counting. The invention effectively reduces the phenomenon of miscounting and missed counting by extracting characteristic parameters and constructing an infrared signal recognition model. The invention adopts a time series analysis method, thereby further optimizing the passenger flow counting result and improving the accuracy of statistics.
[0068] In the embodiment of the present invention, the infrared sensor data of the infrared sensor array is collected according to the data sampling frequency to obtain multiple frames of passenger flow counting data, including:
[0069] Obtain the sampling frequency of data stored in the database or entered by staff;
[0070] Collect infrared sensing data of the infrared sensing array according to the data sampling frequency to obtain infrared sensing data of the infrared sensing array at different time points;
[0071] For any time point, the infrared sensor data of the infrared sensor array collected at that time point is combined into a frame of M*N data matrix to obtain a frame of passenger flow counting data;
[0072] The data matrix of the infrared sensor data of the infrared sensor array collected at all time points is constructed to obtain multi-frame passenger flow counting data.
[0073] In the embodiment of the present invention, a pre-deployed target recognition model is used to identify and analyze multiple frames of passenger flow counting data to determine target frames with passenger flow, including:
[0074] A target recognition model is pre-deployed using a neural network; wherein the target recognition model is used to identify whether there is passenger flow in a frame of passenger flow counting data;
[0075] For example, a target recognition model is pre-deployed using a neural network, including: constructing a YOLO neural network model or a CNN (convolutional neural network) neural network model to obtain an initial neural network; and using an intelligent optimization algorithm to train the initial neural network to obtain a target recognition model.
[0076] The pre-deployed target recognition model is used to identify and analyze the multi-frame passenger flow counting data to determine the target frames with passenger flow.
[0077] In an embodiment of the present invention, the initial neural network is trained using an intelligent optimization algorithm to obtain a target recognition model, including:
[0078] Set the intelligent optimization algorithm to Adam algorithm;
[0079] According to the Adam algorithm, the initial neural network is trained as follows:
[0080] The initial learning rate is set to 0.001, and each cycle is operated 3000 times. After every four cycles, the learning rate is changed to 0.997 times of the original learning rate. The initial neural network is trained using the label image corresponding to the passenger flow counting data. When the loss value is reduced by 15 times, the learning rate is reduced by 15 times and training continues. When the loss value no longer decreases, the network parameters at this time are saved as the final network parameters of the initial neural network to obtain the target recognition model.
[0081] Optionally, in addition to being set to the Adam algorithm, the intelligent optimization algorithm can also be set to a particle swarm algorithm, a genetic algorithm, and the like, so as to achieve training of the initial neural network.
[0082] In the embodiment of the present invention, based on the target frame with passenger flow, multiple continuous target frames with passenger flow are determined to obtain multiple frame sequences, and the real passenger flow number is determined based on the frame sequences to complete the infrared-based passenger flow counting, including:
[0083] Based on the target frame where the passenger flow exists, determining the target frame where the passenger flow initially appears, and adding the target frame where the passenger flow initially appears to the frame sequence;
[0084] Determine whether the next frame of passenger flow counting data is a target frame. If so, add the next frame of passenger flow counting data to the frame sequence and repeat this step. Otherwise, determine that the next frame of passenger flow counting data is not a target frame, and obtain a frame sequence.
[0085] The actual passenger flow quantity is determined based on the frame sequence, and infrared-based passenger flow counting is completed.
[0086] In the embodiment of the present invention, determining the actual passenger flow quantity based on the frame sequence includes:
[0087] For any frame sequence, edge detection is performed on targets in the passenger flow counting data in the frame sequence to obtain edge data of at least one target;
[0088] Based on the time relationship, starting from 1, a unique counting number is assigned to each target in sequence;
[0089] Determining a centroid corresponding to at least one target based on the edge data of the passenger flow counting data;
[0090] Associating the centroid corresponding to each target with its counting number, and obtaining the target counting number and centroid in the passenger flow counting data in the frame sequence;
[0091] For any frame sequence, determine that the centroids of the passenger flow counting data of the next frame and the passenger flow counting data of the current frame are the same as each other;
[0092] For any frame sequence, the moving direction of the centroid is determined according to the position of the same centroid in different passenger flow counting data;
[0093] When the moving direction of the centroid is the same as the preset counting direction and finally disappears behind the boundary, the actual passenger flow number is increased by one to obtain the actual passenger flow number.
[0094] In order for those skilled in the art to better understand the technical solutions described in the embodiments of the present invention, the technical solutions described in the embodiments of the present invention are explained below by way of examples.
[0095] First, since the infrared sensor array contains M*N infrared sensors arranged in a matrix, the data collected by a row of infrared sensors close to the counting area can be determined as the boundary. When a centroid moves to the vicinity of the boundary and disappears, it can be identified as the real passenger flow. It is worth noting that after moving to the boundary, the part outside the infrared sensor cannot be detected, so the centroid will only keep approaching the boundary. Therefore, the centroid that moves toward the boundary and disappears can be determined as the passenger flow that has entered the counting area, and the counting can be achieved.
[0096] Secondly, when one or two centroids appear, they need to be tracked. When new targets appear, the number of centroids will increase. At this time, they are numbered and tracked.
[0097] Then, in order to avoid mistracking, when the centroid disappears behind the boundary, the tracking task of the centroid is removed and other centroids are continued to be tracked.
[0098] In an embodiment of the present invention, for any frame sequence, edge detection is performed on a target in the passenger flow counting data in the frame sequence to obtain edge data of at least one target, including:
[0099] For the passenger flow counting data in any frame sequence, the passenger flow counting data is binarized, the part with response is filled with 1, and the part without response is filled with 0, so as to obtain the passenger flow counting data after binarization processing;
[0100] Based on the passenger flow counting data after the binarization process, the response intensity is determined as:
[0101]
[0102] Among them, I ij,k Indicates the value of the kth data adjacent to the jth data in the i-th row, S ij represents the response strength of the jth data in the i-th row, and K represents the total number of adjacent data of the jth data in the i-th row;
[0103] According to the response strength of all data points in the passenger flow counting data, the maximum response strength is determined;
[0104] The data points whose response intensity is less than the maximum response intensity are regarded as edge points to obtain edge detection results;
[0105] Based on the edge detection result, determine whether the area covered by the edge detection result exceeds a preset threshold. If so, segment the edge detection result to obtain the edge data of the target. Otherwise, directly use the edge detection result as the edge data of the target.
[0106] The embodiment of the present invention fills the data corresponding to the responding infrared sensor with 1, so when the response intensities of the data points around the data points that are not edges are added together, the value should be 9, and the data points that are not 9 can be determined as edge points.
[0107] In an embodiment of the present invention, determining the centroid corresponding to at least one target based on the edge data of the passenger flow counting data includes:
[0108] Take the upper left corner of the M*N passenger flow counting data as the origin and determine the coordinates of each data point;
[0109] For each edge data corresponding to a target, the average coordinates corresponding to the edge data are rounded to obtain the centroid corresponding to at least one target.
[0110] In the embodiment of the present invention, for any frame sequence, determining the moving direction of the centroid according to the position of the same centroid in different passenger flow counting data includes:
[0111] The coordinates of the center of mass in the previous frame are used as the starting coordinates, and the coordinates of the center of mass in the next frame are used as the end coordinates to determine the current moving direction.
[0112] Optionally, in order to further improve the accuracy of infrared passenger flow counting, the real passenger flow counting condition can also be set as follows: when the moving direction corresponding to the previous frame of data where the centroid disappears at the boundary is positive, it can be identified as real passenger flow data.
[0113] In principle, the centroid tracking algorithm provided by the embodiment of the present invention can achieve accurate passenger flow counting as long as the data sampling frequency is greater than a certain threshold and it is ensured that there is no situation where one centroid catches up with another centroid between the sampling of two frames of data.
[0114] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0115] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0116] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0118] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0119] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A passenger flow counting method based on infrared rays, characterized in that: include: Connecting an infrared sensor array; wherein the infrared sensor array comprises M*N infrared sensors arranged in a matrix form; Collect infrared sensor data of the infrared sensor array according to the data sampling frequency to obtain multiple frames of passenger flow counting data; wherein each frame of passenger flow counting data includes all infrared sensor data of the infrared sensor array; Use the pre-deployed target recognition model to identify and analyze the multi-frame passenger flow counting data to determine the target frame with passenger flow; Based on the target frame with passenger flow, multiple continuous target frames with passenger flow are determined to obtain multiple frame sequences, and the actual passenger flow quantity is determined based on the frame sequences to complete infrared-based passenger flow counting.
2. The infrared-based passenger flow counting method according to claim 1, characterized in that: Collect infrared sensor data from the infrared sensor array according to the data sampling frequency to obtain multiple frames of passenger flow counting data, including: Obtain the sampling frequency of data stored in the database or entered by staff; Collect infrared sensing data of the infrared sensing array according to the data sampling frequency to obtain infrared sensing data of the infrared sensing array at different time points; For any time point, the infrared sensor data of the infrared sensor array collected at that time point is combined into a frame of M*N data matrix to obtain a frame of passenger flow counting data; The data matrix of the infrared sensor data of the infrared sensor array collected at all time points is constructed to obtain multi-frame passenger flow counting data.
3. The infrared-based passenger flow counting method according to claim 2 is characterized in that: Use the pre-deployed target recognition model to identify and analyze the multi-frame passenger flow counting data to determine the target frames with passenger flow, including: A target recognition model is pre-deployed using a neural network; wherein the target recognition model is used to identify whether there is passenger flow in a frame of passenger flow counting data; The pre-deployed target recognition model is used to identify and analyze the multi-frame passenger flow counting data to determine the target frames with passenger flow.
4. The infrared-based passenger flow counting method according to claim 3 is characterized in that: Pre-deployed target recognition models using neural networks, including: Build a YOLO neural network model or a CNN neural network model to obtain an initial neural network; The initial neural network is trained using an intelligent optimization algorithm to obtain a target recognition model.
5. The infrared-based passenger counting method according to claim 4, characterized in that: The initial neural network is trained using an intelligent optimization algorithm to obtain a target recognition model, including: Set the intelligent optimization algorithm to Adam algorithm; According to the Adam algorithm, the initial neural network is trained as follows: The initial learning rate is set to 0.001, and each cycle is operated 3000 times. After every four cycles, the learning rate is changed to 0.997 times of the original learning rate. The initial neural network is trained using the label image corresponding to the passenger flow counting data. When the loss value is reduced by 15 times, the learning rate is reduced by 15 times and training continues. When the loss value no longer decreases, the network parameters at this time are saved as the final network parameters of the initial neural network to obtain the target recognition model.
6. The infrared-based passenger flow counting method according to claim 3, characterized in that: Based on the target frame with passenger flow, multiple continuous target frames with passenger flow are determined to obtain multiple frame sequences, and the actual passenger flow number is determined based on the frame sequences to complete the infrared-based passenger flow counting, including: Based on the target frame where the passenger flow exists, determining the target frame where the passenger flow initially appears, and adding the target frame where the passenger flow initially appears to the frame sequence; Determine whether the next frame of passenger flow counting data is a target frame. If so, add the next frame of passenger flow counting data to the frame sequence and repeat this step. Otherwise, determine that the next frame of passenger flow counting data is not a target frame, and obtain a frame sequence. The actual passenger flow quantity is determined based on the frame sequence, and infrared-based passenger flow counting is completed.
7. The infrared-based passenger counting method according to claim 6, characterized in that: Determining the actual passenger flow quantity based on the frame sequence includes: For any frame sequence, edge detection is performed on targets in the passenger flow counting data in the frame sequence to obtain edge data of at least one target; Based on the time relationship, starting from 1, a unique counting number is assigned to each target in sequence; Determining a centroid corresponding to at least one target based on the edge data of the passenger flow counting data; Associating the centroid corresponding to each target with its counting number, and obtaining the target counting number and centroid in the passenger flow counting data in the frame sequence; For any frame sequence, determine that the centroids of the passenger flow counting data of the next frame and the passenger flow counting data of the current frame are the same as each other; For any frame sequence, the moving direction of the centroid is determined according to the position of the same centroid in different passenger flow counting data; When the moving direction of the centroid is the same as the preset counting direction and finally disappears behind the boundary, the actual passenger flow number is increased by one to obtain the actual passenger flow number.
8. The infrared-based passenger counting method according to claim 7, characterized in that: For any frame sequence, edge detection is performed on a target in the passenger flow counting data in the frame sequence to obtain edge data of at least one target, including: For the passenger flow counting data in any frame sequence, the passenger flow counting data is binarized, the part with response is filled with 1, and the part without response is filled with 0, so as to obtain the passenger flow counting data after binarization processing; Based on the passenger flow counting data after the binarization process, the response intensity is determined as: Among them, I ij,k Indicates the value of the kth data adjacent to the jth data in the i-th row, S ij represents the response strength of the jth data in the i-th row, and K represents the total number of adjacent data of the jth data in the i-th row; According to the response strength of all data points in the passenger flow counting data, the maximum response strength is determined; The data points whose response intensity is less than the maximum response intensity are regarded as edge points to obtain edge detection results; Based on the edge detection result, determine whether the area covered by the edge detection result exceeds a preset threshold. If so, segment the edge detection result to obtain the edge data of the target. Otherwise, directly use the edge detection result as the edge data of the target.
9. The infrared-based passenger counting method according to claim 8, characterized in that: Determining a centroid corresponding to at least one target based on the edge data of the passenger flow counting data includes: Take the upper left corner of the M*N passenger flow counting data as the origin and determine the coordinates of each data point; For each edge data corresponding to a target, the average coordinates corresponding to the edge data are rounded to obtain the centroid corresponding to at least one target.
10. The infrared-based passenger counting method according to claim 9, characterized in that: For any frame sequence, the moving direction of the centroid is determined according to the position of the same centroid in different passenger flow counting data, including: The coordinates of the center of mass in the previous frame are used as the starting coordinates, and the coordinates of the center of mass in the next frame are used as the end coordinates to determine the current moving direction.
Citation Information
Patent Citations
Infrared array number-of-personnel sensor-based counting method and apparatus
CN106600777A
Non-invasive people number detection method, device and system based on infrared array sensor
CN113611012A
Video target segmentation method based on self-supervision
CN114863348A
River and lake supervision method and system based on unmanned aerial vehicle
CN115690628A
Cited By
Personnel counting method and system based on infrared blocking feature fusion
CN122490455A
