A method and device for analyzing crowd flow based on depth camera

Through deep cameras and deep learning human detection networks, the privacy issues and insufficient precise tracking capabilities in the current technology of abortion analysis are solved, and accurate tracking and in-depth information analysis of pedestrians are realized.

CN113034544BActive Publication Date: 2024-10-15SHENZHEN ORBBEC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110297860.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-19
Publication Date
2024-10-15
Estimated Expiration
2041-03-19

AI Technical Summary

Technical Problem

In the prior art, the color images of the abortion analysis obtained by the three-primary cameras have the risk of infringing on pedestrian privacy, and can only reflect information in the plane dimensions, and pedestrian tracking cannot be carried out accurately.

Method used

A depth camera is used to obtain a pedestrian image set and import it into a human body detection network obtained through deep learning training to generate a flow analysis information, avoid the privacy of color images, and use deep images to achieve accurate tracking of pedestrians.

Benefits of technology

Accurate tracking and analysis of pedestrians is achieved, which avoids privacy infringement, and can reflect in-depth information, solving the problem that color images cannot be accurately tracked.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113034544B_ABST
    Figure CN113034544B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of machine vision, and provides a method and device for analyzing crowd flow based on a depth camera, the method comprising: obtaining a set of pedestrian images in a target detection area through a depth camera; the set of pedestrian images includes multiple frames of pedestrian images; importing the pedestrian images into a human body detection network, and outputting a human body detection image corresponding to each frame of the pedestrian image; based on the human body detection images corresponding to multiple consecutive frames of the pedestrian images, determining the motion tracking data of several pedestrian objects contained in the target detection area; based on the motion tracking data of the several pedestrian objects, generating crowd flow analysis information about the target detection area. In the present application, the human body detection network is obtained through deep learning training, and can accurately track pedestrians. The pedestrian image is a depth image, thereby avoiding the problem of color images infringing on pedestrian privacy, and also showing information other than the plane dimension.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine vision, and in particular to a crowd flow analysis method and device based on a depth camera. Background Art

[0002] With the improvement of public safety awareness, public safety management and public safety warning are indispensable links, and crowd flow analysis is widely used in public places with large pedestrian flow, such as shopping malls, scenic spots, and airports, providing important basis for public safety management, public safety warning and business decision-making.

[0003] At present, the main method for crowd flow analysis is to use a three-primary color camera to obtain a set of pedestrian images in the area where the crowd flow analysis is required, and to achieve the purpose of pedestrian detection by identifying a single human feature (such as a face or a head) contained in the pedestrian image set, and to perform subsequent crowd flow analysis based on the detected pedestrian information. However, in this case, obtaining color images of pedestrians through a three-primary color camera may infringe on the privacy of pedestrians, and color images can often only reflect information in the plane dimension and cannot accurately track pedestrians. Summary of the invention

[0004] The embodiments of the present application provide a method and device for analyzing crowd flow based on a depth camera. A pedestrian image set can be obtained through a depth camera, and multiple frames of pedestrian images in the pedestrian image set are imported into a human body detection network, so as to determine the motion tracking data of pedestrian objects in the target detection area of ​​the depth camera, and further generate crowd flow analysis information, wherein the human body detection network is obtained through deep learning training and can accurately track pedestrians, and the input of the human body detection network is the pedestrian image obtained by the depth camera, that is, the depth image, thereby avoiding the problem of color images infringing on the privacy of pedestrians, and solving the problem in the prior art that color images can only reflect information in the plane dimension and cannot accurately track pedestrians.

[0005] In a first aspect, an embodiment of the present application provides a crowd flow analysis method based on a depth camera, comprising: acquiring a pedestrian image set of a target detection area through a depth camera; the pedestrian image set includes multiple frames of pedestrian images; importing the pedestrian images into a human body detection network, and outputting a human body detection image corresponding to each frame of the pedestrian image; the human body detection network is obtained through deep learning training; based on the human body detection images corresponding to multiple consecutive frames of the pedestrian images, determining motion tracking data of several pedestrian objects contained in the target detection area; based on the motion tracking data of the several pedestrian objects, generating crowd flow analysis information about the target detection area.

[0006] In the second aspect, an embodiment of the present application provides a crowd flow analysis device based on a depth camera, comprising: a pedestrian image acquisition module, used to acquire a set of pedestrian images related to a target detection area through a depth camera; the pedestrian image set contains multiple frames of pedestrian images; a human body detection network module, used to import the pedestrian image into a human body detection network, and output a human body detection image corresponding to each frame of the pedestrian image; the human body detection network is obtained through deep learning training; a motion tracking data determination module, used to determine the motion tracking data of several pedestrian objects contained in the target detection area based on the human body detection images corresponding to multiple consecutive frames of the pedestrian images; a crowd flow analysis information generation module, used to generate crowd flow analysis information about the target detection area based on the motion tracking data of the several pedestrian objects.

[0007] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods described in the first aspect when executing the computer program.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any one of the methods described in the first aspect above.

[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any of the methods described in the first aspect above.

[0010] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0011] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0012] Compared with the prior art, the crowd flow analysis method provided by the present application can obtain a pedestrian image set through a depth camera, and import multiple frames of pedestrian images in the pedestrian image set into a human body detection network, so as to determine the motion tracking data of pedestrian objects in the target detection area of ​​the depth camera, and further generate crowd flow analysis information, wherein the human body detection network is obtained through deep learning training, and can accurately track pedestrians. The input of the human body detection network is the pedestrian image obtained by the depth camera, that is, the depth image. This not only avoids the problem of easy infringement of pedestrian privacy due to the use of color images when performing crowd flow analysis, but also because the depth image can reflect depth information, it can solve the problem in the prior art that when performing crowd flow analysis through color images, only information in the plane dimension can be reflected, and pedestrians cannot be accurately tracked. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0014] Figure 1 is a flow chart of the implementation of the crowd flow analysis method provided in the first embodiment of the present application;

[0015] Figure 2 It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0016] Figure 3 is a flow chart of the implementation of the crowd flow analysis method provided in the second embodiment of the present application;

[0017] Figure 4 is a schematic diagram of a human body detection network provided by an embodiment of the present application;

[0018] Figure 5 is a flow chart of the implementation of the crowd flow analysis method provided in the third embodiment of the present application;

[0019] Figure 6 is a flow chart of the implementation of the crowd flow analysis method provided in the fourth embodiment of the present application;

[0020] Figure 7 is a flowchart of the implementation of the crowd flow analysis method provided in the fifth embodiment of the present application;

[0021] Figure 8 is a flowchart of the implementation of the crowd flow analysis method provided in the sixth embodiment of the present application;

[0022] Fig. 9This is a schematic diagram of the monitoring screen effect provided by the sixth embodiment of the present application;

[0023] Fig.10 This is a flow chart of a method for analyzing human flow provided by an embodiment of the present application;

[0024] Fig.11 is a structural schematic diagram of a human flow analysis device provided in an embodiment of the present application;

[0025] Fig.12 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0026] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0027] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0028] In the embodiment of the present application, the execution subject of the process is a terminal device, which includes but is not limited to: a server, a computer, a smart phone, a tablet computer, and other devices capable of executing the crowd flow analysis method provided in the present application. Figure 1 The implementation flow chart of the human flow analysis method provided by the first embodiment of the present application is shown, and the details are as follows:

[0029] In S101, a set of pedestrian images in a target detection area is acquired by a depth camera.

[0030] In this embodiment, the pedestrian image set includes multiple frames of pedestrian images.

[0031] In this embodiment, generally, the depth camera is set at a position where it can observe the target detection area. For example, the depth camera can take a bird's-eye view of the target detection area where crowd counting is required, so that the movement trajectory of pedestrians appearing in the target detection area can be obtained from a bird's-eye view to perform crowd counting and analysis. The picture taken by the depth camera is specifically a picture of the target detection area. In order to subsequently detect pedestrian objects in the target detection area and generate crowd analysis information based on the detection results, multiple frames of continuous images of the target detection area are required, so the pedestrian image set is obtained through the depth camera.

[0032] In one possible implementation, the method for obtaining the pedestrian image set may specifically be: controlling the depth camera to obtain multiple frames of pedestrian images corresponding to the target detection area at a preset acquisition time interval, and encapsulating a preset number of consecutive pedestrian images in the order of acquisition time of the pedestrian objects in each frame to obtain the above-mentioned pedestrian image set. For example, pedestrian images acquired within the same minute are encapsulated into a pedestrian image set.

[0033] It should be understood that the pedestrian images in the pedestrian image set are depth images, which only contain the depth values ​​corresponding to each pixel, and do not contain the three primary color pixel values ​​of each pixel, so as to reduce the amount of information of the input image of the subsequent human detection network and improve the efficiency of subsequent generation of crowd flow analysis information.

[0034] In S102, the pedestrian image is imported into a human body detection network, and a human body detection image corresponding to each frame of the pedestrian image is output.

[0035] In this embodiment, the human body detection network is obtained through deep learning training; specifically, multiple frames of training images are collected, and the true value human body region is marked in each frame of the training image; the training image is imported into the human body detection network, and the predicted human body region is divided in the training image based on the internal parameters of the human body detection network, and the mask loss value of this training is calculated based on the predicted human body region and the true value human body region. The internal parameters of the human body detection network are adjusted based on the mask loss value. When the mask loss value is less than the preset adjustment threshold, it is recognized that the above human body detection network has been adjusted. In S102, the human body detection image is recognized by the trained human body detection network. It should be understood that in S102, the input of the human body detection network is the above pedestrian image, and the output is the above human body detection image, which is an image with several human body regions marked in the pedestrian image. It should be understood that the human body detection image may contain at least one human body region, that is, the human body detection network detects that there is a pedestrian object in the target detection area; the human body detection image may also not contain a human body region, that is, the human body detection network detects that there is no pedestrian object in the target detection area.

[0036] In one possible implementation, the method of obtaining a human body detection image through a human body detection network can be specifically as follows: the human body detection network includes a feature extraction layer, a region division layer and a region identification layer; the pedestrian image is imported into the feature extraction layer to obtain a feature image; the feature image is imported into the region division layer to obtain the mask region of each object in the pedestrian image; the feature image is imported into the region identification layer to obtain classification information of each object in the pedestrian image (in order to improve the output efficiency of the human body detection network, the value range of the classification information only includes human body or non-human body); if the classification information of the object is human body, the mask region of the object is identified as the above-mentioned human body region; all human body regions are marked in the pedestrian image to obtain the above-mentioned human body detection image. Exemplarily, all human body regions are marked in the pedestrian image to obtain the human body detection image. Specifically, the depth values ​​of each pixel in the pedestrian image except the pixels in the human body region are marked as empty to obtain the human body detection image, that is, only the pixels in the human body region in the human body detection image are associated with corresponding depth values. When the motion tracking data is subsequently determined based on the human body detection image, the interference items can be reduced, and only the human body region is considered to improve efficiency.

[0037] It should be understood that the above-mentioned feature extraction layer can be a convolutional neural network (CNN), and the above-mentioned region division layer and region identification layer can be part of a Mask-RCNN (Mask-Resolution Convolutional Neural Networks) model, that is, the output of the region division layer is the output of the Mask-RCNN model after the mask layer (mask), and the output of the region identification layer is the output of the Mask-RCNN network after the classification layer (class).

[0038] In S103, based on the human body detection images corresponding to the multiple frames of continuous pedestrian images, the motion tracking data of several pedestrian objects included in the target detection area are determined.

[0039] In this embodiment, the motion tracking data includes the coordinate information of the pedestrian object in each frame of the pedestrian image. Taking the motion tracking data of a human body detection image corresponding to a frame of pedestrian image as an example, the motion tracking data can be the regional center of gravity of the human body area. In this case, the terminal device can set the weights of each pixel in the human body area to the same value, so as to determine the pixel coordinates of the regional center of gravity of the human body area, which refers to the coordinates of the regional center of gravity in the image pixel coordinate system corresponding to the human body image; according to the pixel coordinates of the regional center of gravity and the depth value corresponding to the regional center of gravity, determine the world coordinates of the regional center of gravity, which refers to the coordinates of the regional center of gravity in the world coordinate system corresponding to the target detection area; specifically, according to the pixel coordinates of the regional center of gravity, the depth value and the intrinsic parameters of the depth camera, calculate the camera coordinates of the regional center of gravity, which refers to the coordinates of the regional center of gravity in the camera coordinate system corresponding to the depth camera; according to the camera coordinates of the regional center of gravity and the extrinsic parameters of the depth camera (that is, the conversion matrix from the camera coordinate system to the world coordinate system), calculate the world coordinates of the regional center of gravity.

[0040] The above-mentioned human body detection image corresponding to the multiple frames of continuous pedestrian images determines the motion tracking data of several pedestrian objects contained in the target detection area, and specifically also includes: based on the world coordinates obtained above, matching the area centroid of all human body areas in the first pedestrian image with the area centroid of all human body areas in the second pedestrian image; if the match is successful, matching the human body feature information corresponding to the two successfully matched human body areas; if the match is successful, associating the two human body areas with the same pedestrian object; the first pedestrian image and the second pedestrian image are two frames of continuous pedestrian images, that is, the acquisition time of the first pedestrian image and the second pedestrian image is closest, and the human body feature information corresponding to the human body area can specifically be the contour information of the human body area; identifying the world coordinates of the area centroid of one of the successfully matched human body areas as the coordinate information of the associated pedestrian object in the pedestrian image.

[0041] It should be understood that the position of the depth camera remains unchanged during the process of acquiring the pedestrian image set, and both the intrinsic parameters and the extrinsic parameters of the depth camera can be obtained by calibrating the depth camera.

[0042] In S104, based on the motion tracking data of the plurality of pedestrian objects, crowd flow analysis information about the target detection area is generated.

[0043] In this embodiment, the crowd flow analysis information includes coordinate information of the several pedestrian objects in each frame of pedestrian images, which is used to characterize the positions of the pedestrian objects in each frame of pedestrian images. It may also include the walking speed of the several pedestrian objects in each frame of pedestrian images, and the walking speed can be calculated based on the coordinate information of the pedestrian objects in each frame of pedestrian images.

[0044] In one possible implementation, the generation of crowd flow analysis information about the target detection area based on the motion tracking data of the plurality of pedestrian objects may specifically include: taking the motion tracking data of a pedestrian object as an example for illustration, and calculating the walking speed of the pedestrian object in each frame of pedestrian image based on the motion tracking data. Specifically, taking an example pedestrian image as an example for illustration, and taking three adjacent frames of pedestrian images containing the example pedestrian image as a basis, and calculating the total displacement of the pedestrian object in the three adjacent frames of pedestrian images according to the motion tracking data of the pedestrian object in the three adjacent frames of pedestrian images (including the above-mentioned coordinate information); calculating the average speed of the pedestrian object in the three adjacent frames of pedestrian images based on the total displacement and the maximum acquisition time interval difference in the three adjacent frames of pedestrian images, and identifying the average speed as the walking speed of the pedestrian object in the example pedestrian image.

[0045] In particular, if the walking speed of the pedestrian object in the example pedestrian image is zero, the pedestrian object is identified as being in a stay state in the example pedestrian image; and the maximum acquisition time interval difference of a plurality of consecutive frames of pedestrian images in which the pedestrian object has been in a stay state is identified as the stay time period of the pedestrian object in the target detection area. It should be understood that the above-mentioned crowd flow analysis information includes the stay time periods of several pedestrian objects in the target detection area.

[0046] It should be understood that the crowd flow analysis information may also include the number of pedestrians in each frame of pedestrian images, which is determined based on the number of pedestrian objects in the pedestrian object; the crowd flow analysis information may also include the number of pedestrian flows in the target detection area, which refers to the total number of different pedestrian objects in the above-mentioned pedestrian image set.

[0047] In this embodiment, a pedestrian image set can be obtained through a depth camera, and multiple frames of pedestrian images in the pedestrian image set are imported into a human body detection network to determine motion tracking data of pedestrian objects in the target detection area of ​​the depth camera, and further generate crowd flow analysis information, wherein the human body detection network is obtained through deep learning training and can accurately track pedestrians, and the input of the human body detection network is the pedestrian image obtained by the depth camera, that is, the depth image. This not only avoids the problem of easy infringement of pedestrian privacy due to the use of color images when performing crowd flow analysis, but also because the depth image can reflect depth information, it can solve the problem in the prior art that when performing crowd flow analysis through color images, only information in the plane dimension can be reflected, and pedestrians cannot be accurately tracked.

[0048] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present application is shown. Figure 2 , the depth camera shoots the target detection area; the target detection area contains pedestrian objects; the depth camera obtains a pedestrian image set related to the target detection area; then multiple frames of pedestrian images in the pedestrian image set are imported into the human body detection network, so that the human body detection network outputs corresponding human body detection images based on the pedestrian images, and analyzes the human body detection images to obtain motion tracking data corresponding to the pedestrian object; according to the motion tracking data of several pedestrian objects in the target detection area, the crowd flow analysis information about the target detection area is generated.

[0049] Figure 3 FIG. 2 shows a flow chart of the implementation of the human flow analysis method provided in the second embodiment of the present application. Figure 3 , relative to Figure 1 In the embodiment, the crowd flow analysis method S102 provided in this embodiment includes S1021 to S1022, which are described in detail as follows:

[0050] Furthermore, the step of importing the pedestrian image into a human body detection network and outputting a human body detection image corresponding to each frame of the pedestrian image includes:

[0051] In S1021, the pedestrian image is imported into a human body detection network, so that the human body detection network divides a plurality of human body regions in the pedestrian image based on the depth value of each pixel in the pedestrian image.

[0052] In this embodiment, the human body detection network is a neural network model obtained through deep learning training. Specifically, the human body detection network is a classification model, which classifies various areas in the pedestrian image and identifies human body areas classified as human bodies. For details, please refer to the relevant description of S102 above, which will not be repeated here.

[0053] In one possible implementation, the human body detection network includes a region division layer and a region recognition layer; the pedestrian image is introduced into the human body detection network so that the human body detection network divides a number of human body regions in the pedestrian image based on the depth value of each pixel in the pedestrian image. For details, see Figure 4 , Figure 4 FIG. 1 shows a schematic diagram of a human body detection network provided by an embodiment of the present application. Figure 4 , import the pedestrian image into the region division layer of the human body detection network, perform edge detection on the pedestrian image based on the depth value of each pixel in the pedestrian image and the edge detection algorithm, and obtain a number of edge contours; perform region division on the pedestrian image based on the above-mentioned several edge contours to obtain a number of mask regions in the pedestrian image, each mask region corresponds to an object, and the edge detection algorithm can be a depth difference detection algorithm or a gradient difference detection algorithm; based on the parameters of the region division layer in the human body detection network, identify whether the object (category) corresponding to each mask region is a human body, if the object is a pedestrian object, identify the mask region of the object as a human body region, and mark all human body regions in the pedestrian image.

[0054] In S1021, based on the positions of the several human body regions in the pedestrian image, different region identifiers are configured for the respective human body regions, and the pedestrian image after marking the human body regions and the region identifiers corresponding to the human body regions is used as the human body detection image.

[0055] In this embodiment, different region identifiers are configured for the human body regions marked above, so as to subsequently identify the same pedestrian object between multiple frames of pedestrian images. In a possible implementation, based on the positions of the several human body regions in the pedestrian image, different region identifiers are configured for each of the human body regions, and the pedestrian image after marking the human body regions and the region identifiers corresponding to the human body regions are used as the human body detection image. Specifically, it can be as follows: according to the order of the pedestrian object from left to right and from top to bottom, a serial number is configured for each human body region, and the serial number is the above region identifier; the pedestrian image with the marked human body regions and the region identifiers corresponding to the human body regions is identified as the above human body detection image.

[0056] In this embodiment, when the pedestrian image is imported into the human body detection network, each mask area is divided based on the depth value of each pixel in the pedestrian object, and it is identified whether each mask area is a human body area, and each human body area is numbered to obtain the above-mentioned human body detection image, so that the same pedestrian object can be subsequently identified between multiple frames of pedestrian images.

[0057] Figure 5FIG. 2 shows a flow chart of the implementation of the human flow analysis method provided in the second embodiment of the present application. Figure 5 , relative to Figure 3 In the embodiment, the crowd flow analysis method S103 provided in this embodiment includes S501 to S505, which are described in detail as follows:

[0058] Furthermore, the determining of motion tracking data of a plurality of pedestrian objects contained in the target detection area based on the human body detection images corresponding to the plurality of continuous frames of pedestrian images includes:

[0059] In S502, based on the human body region in the human body detection image, the position of the human body center of gravity corresponding to the region identifier is determined.

[0060] In this embodiment, it should be noted that the difference from the embodiment described in S103 above is that what needs to be determined in this embodiment is the position of the center of gravity of the human body, rather than the center of gravity of the region. It should be understood that when the pedestrian object is not blocked by other obstructions in the pedestrian image, the position of the center of gravity of the region should be the same as the position of the center of gravity of the human body.

[0061] In one possible implementation, the above-mentioned method of determining the human body center of gravity position corresponding to the area identifier based on the human body area in the human body detection image can be specifically as follows: taking a human body detection image corresponding to a frame of pedestrian image as an example to illustrate, the human body center of gravity position of each human body area in the human body detection image is determined. Specifically, the human body area is imported into the human body center of gravity recognition network to obtain the human body center of gravity pixel coordinates and the human body center of gravity depth value of the human body area; based on the human body center of gravity pixel coordinates and the human body center of gravity depth value of the human body area, the world coordinates of the human body center of gravity of the human body area are determined, that is, the above-mentioned human body center of gravity position. The method for specifically determining the world coordinates of the human body center of gravity can refer to the relevant steps of determining the world coordinates of the area center of gravity in the above-mentioned S103, which will not be repeated here.

[0062] Exemplarily, based on the contour information of the human body area and the depth value of each pixel in the human body area, the pixel coordinates of the human body center of gravity and the depth value of the human body center of gravity of the human body area are determined; specifically, based on the contour information of the human body area, the human body center of gravity of the human body area is determined to obtain the above-mentioned pixel coordinates of the human body center of gravity; and the average value of the depth values ​​of each pixel in the human body area is identified as the above-mentioned depth value of the human body center of gravity.

[0063] It should be understood that the above-mentioned determination of the center of gravity of the human body region based on the contour information of the human body region can be specifically: by analyzing the contour information of the human body region, identifying at least one human feature point in the human body region, and determining the center of gravity of the human body region according to the human feature point (for example, the head). The more human feature points are identified in the human body region, the more accurate the determination of the center of gravity of the human body is.

[0064] In S503, any two adjacent frames of human body detection images are matched based on the human body center of gravity position and human body feature information marked by the region.

[0065] In this embodiment, the matching of the two adjacent frames of human body detection images refers to the two frames of human body detection images with the closest collection time interval. In a possible implementation method, the matching of any two adjacent frames of human body detection images based on the human body center of gravity position and human body feature information of the region identifier specifically refers to: one-to-one comparison of the human body center of gravity position of all region identifiers in the one frame of human body detection image with the human body center of gravity position of all region identifiers in the other frame of human body detection image; if there are two region identifiers in the different human body detection images, and the distance between the human body center of gravity positions of the two region identifiers is less than the preset distance threshold, then the human body feature information of the human body regions corresponding to the two region identifiers is compared; if the difference value between the human body feature information of the human body regions corresponding to the two region identifiers is less than the preset difference threshold, then the two region identifiers are identified as two region identifiers that have successfully matched; the human body feature information generally refers to the contour information of the human body region.

[0066] In S504, if there are two successfully matched region identifiers in the two adjacent frames of human body detection images, it is identified that the human body regions corresponding to the two region identifiers are associated with the same pedestrian object.

[0067] In this embodiment, if there are two successfully matched area identifiers in the above-mentioned two adjacent frames of human body detection images, it can be considered that the human body regions corresponding to the two area identifiers are the human body regions of the same pedestrian object, that is, the pedestrian objects associated with the human body regions corresponding to the two area identifiers are identified as the same pedestrian objects.

[0068] Specifically, firstly, the human body region with region identifier 1 in the first human body detection image is associated with a pedestrian object number 1, and the center of gravity position of the human body with region identifier 1 in the first human body detection image is used as a reference, and the region identifier matching the region identifier 1 in the first human body detection image is searched in other human body detection images, and the matching region identifier is associated with the pedestrian object number 1. This process is repeated until all human body regions in all human body detection images are associated with corresponding pedestrian objects.

[0069] Taking one matching as an example, illustratively, the human body region with area identification 1 in the first frame of the human body detection image is associated with the same pedestrian object as the human body region with area identification 2 in the second frame of the human body detection image. The pedestrian object associated with the above two human body regions can be identified as pedestrian object number one, that is, pedestrian object number one moves from the human body region with area identification 1 to the human body region with area identification 2 between the first frame of the human body detection image and the second frame of the human body detection image.

[0070] In S505, motion tracking data of the pedestrian object is determined according to the human body region associated with the human body detection image of each frame.

[0071] In this embodiment, after executing the above S504, the human body area associated with each pedestrian object in the human body detection image of each frame can be obtained. In order to determine the movement of the pedestrian object according to the data, it is only necessary to determine the specific position of the human body area associated with the pedestrian object in each frame of the human body detection image.

[0072] In one possible implementation, the motion tracking data of the pedestrian object is determined based on the human body area associated with the pedestrian object in each frame of the human body detection image. Specifically, the center of gravity position of the human body area associated with the same pedestrian object in each frame of the human body detection image is extracted, and converted into the world coordinates of the pedestrian object at the acquisition moment of each frame of the human body detection image, that is, the motion trajectory of the pedestrian object in the acquisition period of the pedestrian image set in the target detection area is obtained, that is, the motion tracking data of the pedestrian object mentioned above.

[0073] In this embodiment, by comparing the human body center of gravity and human body feature information of two adjacent frames of human body detection images, it is determined whether the area identifiers of the two adjacent frames of human body detection images are associated with the same pedestrian object, so as to determine the human body area corresponding to the same pedestrian object in each frame of human body detection image, so as to determine the motion tracking data of the pedestrian object.

[0074] Furthermore, the crowd flow analysis method provided in this embodiment also includes S501 before S502, which is described in detail as follows:

[0075] Before determining the position of the center of gravity of the human body corresponding to the region identifier based on the human body region in the human body detection image, the method further includes:

[0076] In S501, the depth camera is calibrated to obtain intrinsic parameters of the depth camera.

[0077] In this embodiment, generally, the depth camera is calibrated to obtain the intrinsic parameters of the depth camera, and the intrinsic parameters can be used to convert the position of a point in the human body detection image into the relative position of the point relative to the depth camera, which is specifically manifested as follows: according to the intrinsic parameters, the pixel coordinates of a point in the pixel coordinate system corresponding to the human body detection image can be converted into the camera coordinates in the camera coordinate system corresponding to the depth camera. In the process of calibrating the depth camera, it is necessary to obtain the pixel coordinates and camera coordinates of multiple feature points to derive a conversion model for converting pixel coordinates into camera coordinates, and the parameters of the conversion model are the intrinsic parameters of the above-mentioned depth camera. It should be understood that when calibrating the depth camera and subsequently acquiring the human body detection image through the depth camera, the depth camera is fixed.

[0078] Furthermore, the crowd flow analysis method S502 provided in this embodiment includes S5021 to S5023, which are described in detail as follows:

[0079] The determining, based on the human body region in the human body detection image, the position of the human body center of gravity corresponding to the region identifier includes:

[0080] In S5021, the pixel coordinates of the center of gravity of the human body are calculated based on the depth value of each pixel in the human body region.

[0081] In this embodiment, the pixel coordinates of the human body center of mass refer to the coordinates of the human body center of mass corresponding to the popular area in the pixel coordinate system corresponding to the human body detection image. The implementation of the above S5021 can refer to the relevant steps of determining the pixel coordinates of the human body center of mass in S502, which will not be repeated here.

[0082] In S5022, the pixel coordinates are converted into three-dimensional coordinates based on the intrinsic parameters of the depth camera and the depth value of the center of gravity of the human body in the human body detection image.

[0083] In this embodiment, the three-dimensional coordinates may refer to the camera coordinates of the center of gravity of the human body in the camera coordinate system of the depth camera. The pixel coordinates are converted into three-dimensional coordinates based on the intrinsic parameters of the depth camera and the depth value of the center of gravity of the human body in the human body detection image. Specifically, the following formula may be referred to:

[0084]

[0085] Among them, K is the intrinsic parameter of the camera, Zc is the depth value of the center of gravity of the human body in the human body detection image, (u, v) and (Xc, Yc, Zc) are the pixel coordinates and camera coordinates of the center of gravity of the human body; it should be understood that the camera coordinates (Xc, Yc, Zc) of the center of gravity of the human body, that is, the above-mentioned three-dimensional coordinates, can be determined by solving the above formula.

[0086] In S5023, the three-dimensional coordinates of the center of gravity of the human body are identified as the position of the center of gravity of the human body corresponding to the region mark.

[0087] In this embodiment, the three-dimensional coordinates of the center of gravity of the human body obtained in the above S5022 are the camera coordinates of the center of gravity of the human body in the camera coordinate system of the depth camera, and the center of gravity position of the human body described in this embodiment may refer to the camera coordinates of the center of gravity of the human body in the camera coordinate system of the depth camera, or may refer to the world coordinates of the center of gravity of the human body in the world coordinate system, which may be set specifically according to user needs. If the center of gravity position of the human body refers to the camera coordinates of the center of gravity of the human body in the camera coordinate system of the depth camera, the camera coordinates (Xc, Yc, Zc) of the center of gravity of the human body are identified as the center of gravity position of the human body. If the center of gravity position of the human body refers to the world coordinates of the center of gravity of the human body in the world coordinate system, the camera coordinates of the center of gravity of the human body shall be converted into world coordinates according to the external parameters of the depth camera, and the external parameters of the depth camera may be determined by the relative position between the depth camera and the world coordinate system.

[0088] In this embodiment, the intrinsic parameters of the depth camera are obtained by calibrating the depth camera, and the pixel coordinates of the center of gravity of the human body are converted into three-dimensional coordinates by using the intrinsic parameters, so as to determine the position of the center of gravity of the human body.

[0089] Figure 6 FIG. 2 shows a flow chart of the implementation of the human flow analysis method provided in the second embodiment of the present application. Figure 6 , relative to Figure 1 In the embodiment, the crowd flow analysis method provided in this embodiment includes S601 to S603, which are described in detail as follows:

[0090] Furthermore, before importing the pedestrian image into the human body detection network and outputting the human body detection image corresponding to each frame of the pedestrian image, the method further includes: preprocessing the pedestrian image, including:

[0091] In S601, based on the depth value of each pixel in the pedestrian image, the contour of the pedestrian image is extracted to obtain the contour line of the pedestrian image.

[0092] In this embodiment, the above-mentioned extraction of the contour of the pedestrian image based on the depth value of each pixel in the pedestrian image to obtain the contour line of the pedestrian image may specifically be: based on the depth value of each pixel in the pedestrian image, edge detection is performed on the pedestrian image, illustratively, the depth value of each pixel of the pedestrian image is processed based on the Prewitt operator to identify the edge pixels of the pedestrian image, and the contour line of the pedestrian image is determined and extracted based on all the edge pixels. The contour line is a line composed of multiple edge pixels.

[0093] In S602, foreground extraction is performed on the pedestrian image based on the background image and the contour line to obtain a foreground area of ​​the pedestrian image.

[0094] In this embodiment, the background image is determined after the pedestrian image set is imported into the background modeling algorithm, or is obtained based on the acquisition of the depth camera; generally, the background image can be obtained by taking pictures by the depth camera when there are no pedestrians in the target detection area; in particular, the background image can be obtained by importing multiple pedestrian image sets into the background modeling algorithm to identify the background pixels corresponding to each pixel coordinate (used to represent the position of the pixel in the pedestrian image) in each pedestrian image, and constructing the background image based on all the identified background pixels.

[0095] In this embodiment, the foreground extraction of the pedestrian image based on the background image and the contour line to obtain the foreground area of ​​the pedestrian image can be specifically as follows: the background image is compared with the pedestrian image, and if the difference in depth value of the same pixel coordinates in the pedestrian image and the background image is greater than a preset comparison threshold, the pixel corresponding to the pixel coordinate is identified as a foreground pixel; all foreground pixels are enclosed into at least one foreground area by the contour line, thereby obtaining the foreground area of ​​the pedestrian image.

[0096] In S603, the depth value of each pixel in the foreground area is normalized, and a pre-processed pedestrian image is obtained according to the normalized depth value of each pixel in the foreground area.

[0097] In this embodiment, the foreground area is used for the human body detection network to determine the human body area according to the normalized depth values ​​of each pixel in the foreground area. The pedestrian image is a depth image acquired by the depth camera. The depth value of each pixel in the depth image has a large range. In order to improve the output efficiency of the subsequent human body detection network, the depth value of each pixel in the pedestrian image can be normalized. The data that actually needs to be processed in the subsequent human body detection network is only the foreground image of the pedestrian image. Therefore, the depth value of each pixel in the foreground area is specifically normalized, and the preprocessed pedestrian image is obtained according to the normalized depth value of each pixel in the foreground area. Specifically, the depth value of the pixels in the non-foreground area in the preprocessed pedestrian image is zero or empty, so that when the preprocessed pedestrian image is subsequently imported into the human body detection network, the human body detection network does not need to process the pixels in the non-foreground area.

[0098] In this embodiment, the pedestrian image is preprocessed before being imported into the human body detection network in order to reduce the data at the input end of the human body detection network to improve efficiency; specifically, the contour line of the pedestrian image is obtained by performing contour extraction on the pedestrian image, so as to facilitate the determination of the foreground area of ​​the pedestrian image; only the depth value of each pixel in the foreground area is normalized, and the preprocessed pedestrian image is obtained according to the normalized depth value of each pixel in the foreground area, so as to facilitate the subsequent human body detection network to process the preprocessed pedestrian image, reduce the input amount, improve efficiency, and enable the human body detection network to converge faster during training, thereby accelerating the training process. It should be understood that when the above-mentioned preprocessed pedestrian image is imported into the human body detection network, the human body detection network only needs to identify the human body area in the above-mentioned foreground area.

[0099] Figure 7 FIG. 2 shows a flow chart of the implementation of the human flow analysis method provided in the second embodiment of the present application. Figure 7 , relative to any of the above method embodiments, the human flow analysis method S104 provided in this embodiment includes S1041 to S1042, which are described in detail as follows:

[0100] Furthermore, generating crowd flow analysis information about the target detection area based on the motion tracking data of the plurality of pedestrian objects includes:

[0101] In S1041, based on the motion tracking data of the plurality of pedestrian objects, pedestrian coordinates and pedestrian speeds of the pedestrian objects in the target detection area in each frame of the pedestrian image are respectively determined.

[0102] In this embodiment, the pedestrian coordinates may specifically be the world coordinates of the pedestrian object at the time of capturing each frame of pedestrian images; the pedestrian speed specifically refers to the walking speed of the pedestrian object at the time of capturing the pedestrian image; the motion tracking data is the motion data of the pedestrian object within the target detection area, recording the position of the pedestrian object at the time of capturing each frame of pedestrian images, and the motion trajectory during the capture period of the above-mentioned pedestrian image set.

[0103] In this embodiment, based on the motion tracking data of the plurality of pedestrian objects, the pedestrian coordinates and pedestrian speed of the pedestrian objects in the target detection area in the pedestrian images of each frame are determined respectively. Specifically, a pedestrian object is taken as an example for explanation. The world coordinates of the pedestrian object in each frame of the pedestrian image are obtained from the motion tracking data of the pedestrian object and are identified as the above-mentioned pedestrian coordinates. The world coordinates of the pedestrian object in each frame of the pedestrian image are specifically obtained in S103 and will not be repeated here. The pedestrian speed of the pedestrian object in each frame of the pedestrian image is calculated by the following formula:

[0104]

[0105] where v i is the pedestrian speed of the pedestrian object in the i-th frame pedestrian image; |s i s i-1 | is the position of the pedestrian object in the pedestrian image in the i-th frame (x i ,y i ,z i ) and the position of the pedestrian image in the i-1 frame (x i-1 ,y i-1 , z i-1 ); dt is the acquisition interval of the pedestrian image acquired by the depth camera. It should be understood that when calculating the pedestrian speed of the pedestrian object in the last frame of pedestrian image, the calculation is generally performed based on the distance between the position of the pedestrian object in the last frame of pedestrian image and the position of the previous frame of pedestrian image.

[0106] In S1042, the pedestrian coordinates and the pedestrian speed are imported into a preset crowd flow analysis template to obtain the crowd flow analysis information.

[0107] In this embodiment, the crowd flow analysis template is pre-set and can be adjusted according to needs. The crowd flow analysis information includes the pedestrian coordinates and pedestrian speed of the pedestrian object at the time of collecting the pedestrian object in each frame. For example,

[0108] It should be understood that the crowd flow analysis template can be adjusted according to needs; the crowd flow analysis information can also include the total number of pedestrian objects in the target detection area within the collection period of the pedestrian object, which can be determined by traversing the pedestrian objects in all pedestrian images; the crowd flow analysis information can also include abnormally lingering pedestrian objects and their corresponding abnormal lingering positions and abnormal lingering durations. The abnormally lingering pedestrian objects are pedestrian objects output after the pedestrian coordinates and pedestrian speeds of each pedestrian object in each frame of pedestrian image are imported into the crowd flow analysis template. Specifically, among each pedestrian object, a pedestrian object whose pedestrian speed in multiple consecutive frames of pedestrian images is zero and the frame number of the above-mentioned multiple consecutive frames of pedestrian images is greater than a preset threshold is identified as the abnormal pedestrian object, and the position of the abnormal pedestrian object in the pedestrian image with a pedestrian speed of zero is identified as the abnormal lingering position, and the abnormal lingering duration is calculated based on the frame number of the above-mentioned multiple consecutive frames of pedestrian images.

[0109] Figure 8 FIG. 2 shows a flow chart of the implementation of the human flow analysis method provided in the second embodiment of the present application. Figure 8 , relative to Figure 7 In the embodiment, the crowd flow analysis method provided in this embodiment includes S801 to S802, which are described in detail as follows:

[0110] Furthermore, after generating the crowd flow analysis information about the target detection area based on the motion tracking data of the plurality of pedestrian objects, the method further includes:

[0111] In S801, the first monitoring schematic diagram corresponding to each frame of the pedestrian image is displayed in sequence to generate a monitoring screen of the target detection area.

[0112] In this embodiment, the first monitoring schematic diagram includes the pedestrian image and the crowd flow analysis information corresponding to the pedestrian image.

[0113] In a possible implementation, the first monitoring schematic diagram corresponding to each frame of the pedestrian image is displayed in sequence to generate a monitoring screen of the target detection area. Specifically, it can be: taking the first monitoring schematic diagram corresponding to a frame of pedestrian image as an example, the crowd flow analysis information obtained in S1042 is displayed on the pedestrian image and encapsulated as the first monitoring schematic diagram. For details, please refer to Fig.10 , Fig.10 A schematic diagram of the monitoring screen effect provided by the sixth embodiment of the present application is shown. At this time, a frame of the first monitoring schematic diagram is displayed on the monitoring screen. On the first monitoring schematic diagram, the various contents in the crowd flow analysis information are distributed at corresponding positions in the pedestrian image. For example, the pedestrian coordinates and the pedestrian speed of the pedestrian object in the pedestrian image are marked (it should be understood that the pedestrian number of the pedestrian object can also be marked), and the total number of all pedestrian objects in the pedestrian image is marked in the upper left corner of the pedestrian image; the first monitoring schematic diagrams corresponding to all pedestrian images in the above-mentioned pedestrian image set form a monitoring screen of the target detection area.

[0114] In S802, the monitoring screen is updated in real time based on the second monitoring schematic diagram corresponding to the newly collected pedestrian image.

[0115] In this embodiment, the newly acquired pedestrian image refers to the new pedestrian image that is continuously acquired by the depth camera after the pedestrian image set is acquired by the depth camera in S101, and the second monitoring schematic diagram corresponding to the newly acquired pedestrian image is determined. For details, please refer to the relevant description of the first monitoring schematic diagram, which will not be repeated here. The above-mentioned real-time updating of the monitoring screen based on the second monitoring schematic diagram corresponding to the newly acquired pedestrian image is to maintain real-time monitoring of the target detection area, so as to obtain the crowd flow analysis information of the target detection area in each time period.

[0116] Fig.11 A flow chart of a method for analyzing human traffic provided by an embodiment of the present application is shown in FIG. Fig.11The crowd flow analysis method provided in this embodiment specifically obtains a pedestrian image set of a target detection area through the depth camera; pre-processes the pedestrian images in the pedestrian image set; imports the pre-processed pedestrian images into the human body detection network, detects and marks the human body area in the pedestrian image, and obtains the human body detection image; converts the pixel coordinates of each pedestrian object in the human body detection image into world coordinates to obtain motion tracking data of the pedestrian object; based on the motion tracking data of the pedestrian object, various attribute characteristics (including position and speed) of the pedestrian object are obtained according to a preset crowd flow analysis template, and crowd flow analysis information of the target detection area is generated; based on the crowd flow analysis information of the target detection area and the pedestrian image set of the target detection area, a monitoring screen of the target detection area is generated to intuitively display the crowd flow situation of the target detection area.

[0117] It should be understood that the crowd flow analysis information of the target detection area can be uploaded to the server to facilitate the statistics of the crowd flow in the target detection area.

[0118] Corresponding to the method described in the above embodiment, Fig.12 A schematic structural diagram of a human flow analysis device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0119] Reference Fig.12 The crowd flow analysis device includes: a pedestrian image acquisition module, which is used to acquire a pedestrian image set of a target detection area through a depth camera; the pedestrian image set includes multiple frames of pedestrian images; a human body detection network module, which is used to import the pedestrian image into a human body detection network and output a human body detection image corresponding to each frame of the pedestrian image; the human body detection network is obtained through deep learning training; a motion tracking data determination module, which is used to determine the motion tracking data of several pedestrian objects contained in the target detection area based on the human body detection images corresponding to multiple frames of continuous pedestrian images; a crowd flow analysis information generation module, which is used to generate crowd flow analysis information about the target detection area based on the motion tracking data of the several pedestrian objects.

[0120] It should be noted that the information interaction, execution process and other contents between the above-mentioned devices are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0121] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0122] Fig.12 FIG. 1 shows a schematic diagram of the structure of a terminal device provided by an embodiment of the present application. Fig.12 As shown, the terminal device 12 of this embodiment includes: at least one processor 120 ( Fig.12 Only one processor is shown in the figure), a memory 121, and a computer program 122 stored in the memory 121 and executable on the at least one processor 120, wherein the processor 120 implements the steps of any of the above-mentioned method embodiments when executing the computer program 122.

[0123] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0124] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above-mentioned method embodiments can be implemented.

[0125] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

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

[0128] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A crowd flow analysis method based on a depth camera, characterized in that: include: Acquire a set of pedestrian images in the target detection area through a depth camera; The pedestrian image set includes multiple frames of pedestrian images, and the pedestrian images only include depth values ​​corresponding to each pixel; Importing the pedestrian image into a human body detection network, and outputting a human body detection image corresponding to each frame of the pedestrian image; The human body detection network is obtained through deep learning training; Determining motion tracking data of a plurality of pedestrian objects contained in the target detection area based on the human body detection images corresponding to the plurality of continuous frames of the pedestrian images; generating crowd flow analysis information about the target detection area based on the motion tracking data of the plurality of pedestrian objects; Wherein, determining the motion tracking data of several pedestrian objects contained in the target detection area based on the human body detection images corresponding to the multiple frames of continuous pedestrian images includes: Based on the human body region in the human body detection image, determining the human body center of gravity position corresponding to the region identifier of the human body region; Matching any two adjacent frames of human body detection images based on the human body center of gravity position and human body feature information identified by the region, wherein the human body feature information is the contour information of the human body region; If there are two successfully matched region identifiers in the two adjacent frames of human body detection images, identifying that the human body regions corresponding to the two region identifiers are associated with the same pedestrian object; Determining motion tracking data of the pedestrian object according to the human body region associated with the human body detection image of each frame; The step of importing the pedestrian image into a human body detection network and outputting a human body detection image corresponding to each frame of the pedestrian image comprises: Importing the pedestrian image into a human body detection network, so that the human body detection network divides a plurality of human body regions in the pedestrian image based on the depth value of each pixel in the pedestrian image; Based on the positions of the several human body regions in the pedestrian image, different region identifiers are configured for the respective human body regions, and the pedestrian image after marking the human body regions and the region identifiers corresponding to the human body regions is used as the human body detection image.

2. The method according to claim 1, characterized in that Before determining the position of the center of gravity of the human body corresponding to the region identifier based on the human body region in the human body detection image, the method further includes: Calibrate the depth camera to obtain intrinsic parameters of the depth camera; The determining, based on the human body region in the human body detection image, the position of the human body center of gravity corresponding to the region identifier includes: Calculating the pixel coordinates of the center of gravity of the human body based on the depth value of each pixel in the human body region; Based on the intrinsic parameters of the depth camera and the depth value of the center of gravity of the human body in the human body detection image, converting the pixel coordinates into three-dimensional coordinates; The three-dimensional coordinates of the center of gravity of the human body are identified as the position of the center of gravity of the human body corresponding to the area mark.

3. The method according to claim 1, characterized in that Before importing the pedestrian image into a human body detection network and outputting a human body detection image corresponding to each frame of the pedestrian image, the method further includes: Preprocessing the pedestrian image includes: Based on the depth value of each pixel in the pedestrian image, extracting the contour of the pedestrian image to obtain the contour line of the pedestrian image; Performing foreground extraction on the pedestrian image based on the background image and the contour line to obtain a foreground area of ​​the pedestrian image; the background image is determined after the pedestrian image set is imported into a background modeling algorithm, or is acquired based on the depth camera; The depth value of each pixel in the foreground area is normalized, and a preprocessed pedestrian image is obtained according to the normalized depth value of each pixel in the foreground area; the foreground area is used for the human body detection network to determine the human body area according to the normalized depth value of each pixel in the foreground area.

4. The method according to any one of claims 1 to 3, characterized in that: The generating of crowd flow analysis information about the target detection area based on the motion tracking data of the plurality of pedestrian objects comprises: Based on the motion tracking data of the plurality of pedestrian objects, respectively determine the pedestrian coordinates and pedestrian speed of the pedestrian objects in the target detection area in each frame of the pedestrian image; The pedestrian coordinates and the pedestrian speed are imported into a preset crowd flow analysis template to obtain the crowd flow analysis information.

5. The method according to claim 4, characterized in that After generating the crowd flow analysis information about the target detection area based on the motion tracking data of the plurality of pedestrian objects, the method further includes: sequentially displaying the first monitoring schematic diagram corresponding to each frame of the pedestrian image to generate a monitoring screen of the target detection area; the first monitoring schematic diagram includes the pedestrian image and the crowd flow analysis information corresponding to the pedestrian image; Based on the second monitoring schematic diagram corresponding to the newly collected pedestrian image, the monitoring screen is updated in real time.

6. A crowd flow analysis device based on a depth camera, characterized in that: include: A pedestrian image acquisition module is used to acquire a pedestrian image set related to a target detection area through a depth camera; The pedestrian image set includes multiple frames of pedestrian images, and the pedestrian images only include depth values ​​corresponding to each pixel; A human body detection network module, used for importing the pedestrian image into a human body detection network, and outputting a human body detection image corresponding to each frame of the pedestrian image; The human body detection network is obtained through deep learning training; A motion tracking data determination module, used to determine the motion tracking data of several pedestrian objects contained in the target detection area based on the human body detection images corresponding to multiple frames of continuous pedestrian images; A crowd flow analysis information generating module, configured to generate crowd flow analysis information about the target detection area based on the motion tracking data of the plurality of pedestrian objects; Wherein, the motion tracking data determination module is specifically used to determine the human body center of gravity position corresponding to the area identifier of the human body area based on the human body area in the human body detection image; match any two adjacent frames of human body detection images based on the human body center of gravity position and human body feature information of the area identifier, and the human body feature information is the contour information of the human body area; if there are two successfully matched area identifiers in the two adjacent frames of human body detection images, then identify the human body areas corresponding to the two area identifiers and associated with the same pedestrian object; determine the motion tracking data of the pedestrian object according to the human body area associated with the pedestrian object in each frame of the human body detection image; The step of importing the pedestrian image into a human body detection network and outputting a human body detection image corresponding to each frame of the pedestrian image comprises: Importing the pedestrian image into a human body detection network, so that the human body detection network divides a plurality of human body regions in the pedestrian image based on the depth value of each pixel in the pedestrian image; Based on the positions of the several human body regions in the pedestrian image, different region identifiers are configured for the respective human body regions, and the pedestrian image after marking the human body regions and the region identifiers corresponding to the human body regions is used as the human body detection image.

7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.