A method and system for detecting crowd density based on unmanned aerial vehicles (UAVs)
By acquiring ground images using drones, identifying human locations, and generating Gaussian distribution maps, the problem of existing technologies being unable to provide crowd density data is solved, enabling rapid and accurate crowd density monitoring.
Patent Information
- Application Number
- CN202410626123.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-05-20
AI Technical Summary
Existing drone-based crowd detection technologies cannot provide crowd density data, and are computationally complex and resource-intensive, making it difficult to intuitively understand crowd gathering.
By acquiring ground images using drones, identifying human locations and generating Gaussian distribution maps, obtaining density influence coefficients, and finally superimposing the density influence coefficients, a crowd density distribution map is generated.
It enables the rapid and accurate acquisition of crowd density distribution maps, improving the intuitiveness and management efficiency of crowd situation monitoring.
Smart Images

Figure CN118447419B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision, specifically to a method and system for detecting crowd density based on unmanned aerial vehicles (UAVs). Background Technology
[0002] In the existing technology, there are technical solutions for detecting crowd gatherings based on drones. These solutions can count the number of people, but their statistical methods are complex and resource-intensive, and they cannot provide relevant data on crowd density, which is not conducive to intuitively understanding the situation of crowd gatherings. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a method and system for detecting crowd density based on unmanned aerial vehicles (UAVs). The algorithm is simple and easy to implement. It can generate a Gaussian distribution map by using the position coordinates and influence radius of each person, obtain the density influence coefficient from the Gaussian distribution map, and finally superimpose the density influence coefficient to quickly obtain a crowd density distribution map.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] On the one hand, a method for detecting crowd density based on unmanned aerial vehicles (UAVs) is provided, which includes:
[0006] S1. Control the drone to fly and inspect the designated area according to the set cruising altitude and route;
[0007] S2. During the drone inspection process, ground images are acquired in real time through the imaging equipment mounted on the drone's gimbal;
[0008] S3. Identify human bodies in the ground image, output the position coordinates of the human body in the ground image, and count the total number of human bodies identified.
[0009] S4. Cluster the identified human bodies to identify the crowd and obtain the distance from the crowd F to the drone;
[0010] S5. Obtain a crowd density distribution map based on the distance between the crowd and the drone.
[0011] Preferably, the imaging device acquires ground images at a downward angle of 45°-90°.
[0012] Preferably, in step S4, the distance s from the crowd F on the ground to the drone is obtained using formula (1):
[0013] s=H / sina (1)
[0014] Where H is the altitude of the UAV above the ground; a is the pitch angle of the imaging device on the UAV.
[0015] Preferably, in step S5, obtaining the crowd density distribution map based on the distance between the crowd and the drone includes the following steps:
[0016] According to formula (2), the radius r of the population density influence area for each person in the population F on the ground is obtained:
[0017] r=(R*S) / s (2)
[0018] Where R is the radius of the area affected by the crowd density centered on a person in the image where the person is located, when the distance from the person to the drone is S; and R is the number of pixels; s is the distance from the person to the drone.
[0019] The position coordinates (x, y) of each human body in the ground image and its influence radius r of the crowd density are converted into a Gaussian distribution map, and the density influence coefficient of the human body on the surrounding area is obtained based on the Gaussian distribution map.
[0020] The density influence coefficients of all human bodies are superimposed to obtain a population density distribution map.
[0021] Preferably, step S3, which involves identifying human bodies in the ground image, includes the following steps:
[0022] Automatically identify human heads in ground images based on dense target detection algorithms.
[0023] Preferably, in step S4, the identified human bodies are clustered to identify the population, including the following steps:
[0024] The crowd is clustered based on the distance between people's heads in the ground image.
[0025] Preferably, the crowd is clustered based on the distance between heads in the ground image, including:
[0026] In the ground image, people whose head distance is less than or equal to the head distance threshold are clustered. When the number of people in a cluster is greater than or equal to the number of people in the cluster, it is considered to form a group of people, and they are marked by different colors or other methods.
[0027] Preferably, the crowd density detection method further includes: S6, the drone sends the crowd information to the monitoring terminal and generates an alarm message.
[0028] Preferably, the crowd information includes one or more of the following: the location coordinates of the human body in the ground image, the total number of human bodies in the crowd, and the crowd density distribution map.
[0029] On the other hand, a crowd density detection system is also provided, which is used to implement the above-mentioned crowd density detection method, and includes:
[0030] Drones;
[0031] Imaging equipment, which is mounted on the drone via a drone gimbal;
[0032] The human body counting unit is used to identify human bodies in ground images, output the position coordinates of the human bodies in the ground images, and count the total number of human bodies identified.
[0033] Clustering units are used to cluster identified human bodies to identify crowds and obtain the distance from the crowd to the drone;
[0034] The crowd density acquisition unit is used to acquire a crowd density distribution map based on the distance of the crowd to the drone.
[0035] And the monitoring terminal, which is used to receive crowd information sent by the drone and generate alarm information.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] The algorithm of this invention is simple and easy to implement. It can quickly detect and identify crowds on the ground based on drones, generate a Gaussian distribution map by the position coordinates and influence radius of each person, obtain the density influence coefficient from the Gaussian distribution map, and finally superimpose the density influence coefficient to quickly obtain a crowd density distribution map, so as to accurately and intuitively monitor the crowd situation in real time. Attached Figure Description
[0038] Figure 1 This is a flowchart of the steps in the crowd density detection method of the present invention;
[0039] Figure 2 A crowd image in a ground image;
[0040] Figure 3 This is a schematic diagram illustrating the distance between the crowd and the drone in this invention;
[0041] Figure 4 This is a schematic diagram of the population density detection system in this invention. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] Example 1:
[0044] like Figure 1 As shown, this embodiment provides a method for detecting crowd density based on unmanned aerial vehicles (UAVs), which includes the following steps:
[0045] S1. Control the drone to fly and inspect the designated area according to the set cruising altitude and route;
[0046] S2. During the drone inspection process, ground images are acquired in real time through imaging equipment (including visible light cameras) mounted on the drone gimbal; specifically, the imaging equipment acquires ground images at a downward angle of 45°-90° (preferably 65°) to obtain clear and complete ground images;
[0047] S3. Identify human bodies in the ground image, output the position coordinates of the human body in the ground image, and count the total number of human bodies identified.
[0048] S4. Cluster the identified human bodies to identify the crowd F and obtain the distance from the crowd F to the drone;
[0049] S5. Obtain a crowd density distribution map based on the distance between the crowd and the drone;
[0050] The system also includes S6 and drones that send crowd information to the monitoring terminal and generate alarm information for timely handling by monitoring terminal managers, such as dispatching personnel to the crowd gathering site for management. The monitoring terminal includes smart terminals such as smartphones, tablets, PCs, and wearable devices. The crowd information includes one or more of the following: the coordinates of the human body in the ground image, the total number of people in the crowd, and the crowd density distribution map.
[0051] Specifically, such as Figure 3 As shown, in step S4, the approximate distance s from the crowd F on the ground to the drone is obtained using formula (1):
[0052] s=H / sina (1)
[0053] Where H is the altitude of the UAV above the ground; a is the pitch angle of the imaging device on the UAV, which is used to acquire images of the crowd F on the ground.
[0054] Furthermore, in step S5, obtaining the crowd density distribution map based on the distance from the crowd to the drone includes the following steps:
[0055] According to formula (2), the radius r of the population density influence area for each person in the population F on the ground is obtained:
[0056] r=(R*S) / s (2)
[0057] Wherein, R is the radius of the crowd density influence area centered on a person in the image where the person is located when the distance from the person to the drone is S, and R is in the number of pixels. The correspondence between S and R can be set in advance; s is the distance from the person in the crowd F to the drone (the same as s in formula (1); Whether the crowd in a region is dense or sparse is usually determined by the number of people in that region, and each person in that region also affects the crowd density of the area around them. Therefore, in this embodiment, the radius of the area in which each person can affect the crowd density of the area around them is defined as the radius r of the crowd density influence area; at the same time, the crowd density influence area can be displayed in the form of a heat map;
[0058] The position coordinates (x, y) of each human body in the ground image and its influence radius r of the crowd density are converted into a Gaussian distribution map, and the density influence coefficient of the human body on the surrounding area is obtained based on the Gaussian distribution map.
[0059] The density influence coefficients of all human bodies are superimposed to obtain a population density distribution map.
[0060] Therefore, in this embodiment, drones can be used to quickly detect and identify people on the ground, and a Gaussian distribution map can be generated by the position coordinates and influence radius of each person. The density influence coefficient can be obtained from the Gaussian distribution map, and finally the density influence coefficient can be superimposed to quickly obtain a crowd density distribution map. This allows for accurate and intuitive real-time monitoring of the crowd situation on site, improving management efficiency and preventing risks.
[0061] Example 2:
[0062] The only difference between this embodiment and embodiment 1 is that, in step S3, the identification of human bodies in the ground image includes the following steps:
[0063] Based on dense target detection algorithms (such as Gao, J., Han, T., Yuan, Y., Wang, Q.: Learning independent instance maps for crowd localization. arXiv preprint arXiv:2012.04164,2020, etc.), human heads can be automatically identified in ground images.
[0064] Furthermore, in step S4, the identified human bodies are clustered to identify the population F, including the following steps:
[0065] Based on the distance between heads in the ground image, crowds are clustered. For example, in this embodiment, a hierarchical clustering algorithm can be used to automatically cluster people in the ground image whose head distance is less than or equal to a head distance threshold. When the number of people in a cluster is greater than or equal to a group size threshold, it is considered to form a crowd and is marked with different colors. For example, in this embodiment, the head distance threshold ranges from 0.3 to 0.5 meters, and the group size threshold ranges from 8 to 10 people. At the same time, both the head distance threshold and the group size threshold can be manually modified in the background according to actual monitoring needs.
[0066] Example 3:
[0067] This embodiment provides a crowd density detection system, which can implement the crowd density detection method described in Embodiment 1 or 2, such as... Figure 4 As shown, it includes:
[0068] Drone 1;
[0069] Imaging device 2 is mounted on drone 1 via a drone gimbal;
[0070] The human body number counting unit 3 is used to identify human bodies in the ground image, output the position coordinates of the human body in the ground image, and count the total number of human bodies identified. Its process is the same as step S3.
[0071] Clustering unit 4 is used to cluster the identified human bodies to identify the crowd F and obtain the distance from the crowd F to the drone. The process is the same as step S4.
[0072] The crowd density acquisition unit 5 is used to acquire a crowd density distribution map based on the distance between the crowd and the drone. The process is the same as step S5.
[0073] And monitoring terminal 6, which is used to receive crowd information sent by the drone and generate alarm information.
[0074] In summary, the algorithm of this invention is simple and easy to implement. It can quickly detect and identify crowds on the ground based on UAVs, generate a Gaussian distribution map by the position coordinates and influence radius of each person, obtain the density influence coefficient from the Gaussian distribution map, and finally superimpose the density influence coefficient to quickly obtain a crowd density distribution map, so as to accurately and intuitively monitor the crowd situation in real time.
[0075] It should be noted that the technical features in embodiments 1-3 above can be combined arbitrarily, and the resulting technical solutions all fall within the protection scope of this application. In this document, terms such as "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0076] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for detecting crowd density based on a UAV, characterized in that, include: S1. Control the drone to fly and inspect the designated area according to the set cruising altitude and route; S2. During the drone inspection process, ground images are acquired in real time through the imaging equipment mounted on the drone's gimbal; S3. Identify human bodies in the ground image, output the position coordinates of the human body in the ground image, and count the total number of human bodies identified. S4. Cluster the identified human bodies to identify the crowd and obtain the distance from the crowd to the drone; S5. Obtain the radius r of the population density influence area for each person in the population F on the ground according to the following formula: r = (R S) / s; Where R is the radius of the area affected by the crowd density centered on a person in the image where the person is located, when the distance from the person to the drone is S; and R is the number of pixels; s is the distance from the person to the drone. The position coordinates (x, y) of each human body in the ground image and its influence radius r of the crowd density are converted into a Gaussian distribution map, and the density influence coefficient of the human body on the surrounding area is obtained based on the Gaussian distribution map. The density influence coefficients of all human bodies are superimposed to obtain a population density distribution map.
2. The crowd density detection method of claim 1, wherein, The imaging equipment acquires ground images at a downward angle of 45°-90°.
3. The method of claim 1, wherein the step of detecting the crowd density is performed by using a camera. In step S4, the distance s from the crowd F on the ground to the drone is obtained using formula (1): s=H / sina (1) Where H is the altitude of the UAV above the ground; a is the pitch angle of the imaging device on the UAV.
4. The crowd density detection method as described in claim 1, characterized in that, In step S3, the human body recognition in the ground image includes the following steps: Automatically identify human heads in ground images based on dense target detection algorithms.
5. The crowd density detection method as described in claim 1, characterized in that, In step S4, the identified human bodies are clustered to identify the population, including the following steps: The crowd is clustered based on the distance between people's heads in the ground image.
6. The crowd density detection method as described in claim 5, characterized in that, Based on the distance between people's heads in the ground image, the crowd is clustered, including: In the ground image, people whose head distance is less than or equal to the head distance threshold are clustered. When the number of people in a cluster is greater than or equal to the number of people in the cluster, it is considered to form a group of people, and they are marked by different colors or other methods.
7. The crowd density detection method as described in claim 5, characterized in that, The crowd density detection method also includes: S6, the drone sends crowd information to the monitoring terminal and generates alarm information.
8. The crowd density detection method as described in claim 5, characterized in that, Crowd information includes the location coordinates of the human body in the ground image, the total number of human bodies in the crowd, and one or more items in the crowd density distribution map.
9. A crowd density detection system, used to implement the crowd density detection method according to any one of claims 1-8, characterized in that, include: Drones; Imaging equipment, which is mounted on the drone via a drone gimbal; The human body counting unit is used to identify human bodies in ground images, output the position coordinates of the human bodies in the ground images, and count the total number of human bodies identified. Clustering units are used to cluster identified human bodies to identify crowds and obtain the distance from the crowd to the drone; The crowd density acquisition unit is used to acquire a crowd density distribution map based on the distance of the crowd to the drone. And the monitoring terminal, which is used to receive crowd information sent by the drone and generate alarm information.
Citation Information
Patent Citations
Crowd density detection method, system and device, storage medium and robot
CN115797873A
Crowd gathering identification method and system
CN118053116A
