Pedestrian detection method and device, computer device and storage medium

By constructing an occupied grid map and performing transformation and clustering on the laser point cloud, the problem of high computational load caused by complex models was solved, and efficient pedestrian detection was achieved.

CN115188026BActive Publication Date: 2025-12-19SHENZHEN PUDU TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210893955.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2025-12-19
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

Existing pedestrian detection methods require complex models, resulting in high computational costs and making real-time detection difficult.

Method used

An occupied grid map is constructed based on a preset global point cloud map. By converting the laser point cloud to the map coordinate system, foreground points are determined, and clustering is performed on the foreground points. The pedestrian detection results are determined using a preset classification model.

Benefits of technology

While ensuring detection accuracy, it reduces detection time, improves detection efficiency, and achieves real-time pedestrian detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115188026B_ABST
    Figure CN115188026B_ABST
Patent Text Reader

Abstract

The application relates to a pedestrian detection method and device, computer equipment and a storage medium. The method comprises the following steps: constructing an occupancy grid map based on a preset global point cloud map; acquiring a laser point cloud of a current frame and converting the laser point cloud to a map coordinate system of the preset global point cloud map to obtain a converted point cloud, wherein the converted point cloud comprises a plurality of converted points; determining a plurality of foreground points in the plurality of converted points based on the occupancy grid map; performing clustering processing on all the determined foreground points to obtain a plurality of target clusters; inputting each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian. The method can improve the pedestrian detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision, and in particular to a pedestrian detection method and device, a computer device and a storage medium. BACKGROUND

[0002] Pedestrian detection has always been a hot and difficult point in computer vision research. Pedestrian detection is a necessary perception task for robots to interact with the environment. Image-based pedestrian detection is becoming mature, but current pedestrian detection needs to use complex models, which requires a large amount of computation, and thus it is difficult to achieve real-time detection. SUMMARY

[0003] Therefore, it is necessary to provide a pedestrian detection method and device, a computer device and a storage medium capable of improving detection efficiency.

[0004] In a first aspect, the present application provides a pedestrian detection method. The method comprises:

[0005] constructing an occupancy grid map based on a preset global point cloud map;

[0006] obtaining a laser point cloud of a current frame, and converting the laser point cloud to a map coordinate system of the preset global point cloud map to obtain a converted point cloud, wherein the converted point cloud comprises a plurality of converted points;

[0007] determining a plurality of foreground points in the plurality of converted points based on the occupancy grid map;

[0008] performing clustering processing on all determined foreground points to obtain a plurality of target clusters;

[0009] inputting each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian.

[0010] In one embodiment, the determining a plurality of foreground points in the plurality of converted points based on the occupancy grid map comprises:

[0011] obtaining a plurality of invalid voxel grids in the occupancy grid map;

[0012] for each converted point in the plurality of converted points, determining a grid in which the converted point is located in the occupancy grid map;

[0013] if a grid in which any converted point in the plurality of converted points is located is an invalid voxel grid, determining the any converted point as a foreground point.

[0014] In one of the embodiments, the occupancy grid map comprises a plurality of global points; and the determining of the grid in which each of the converted points is located in the occupancy grid map comprises:

[0015] obtaining a first minimum value of a first coordinate axis, a second minimum value of a second coordinate axis, and a third minimum value of a third coordinate axis in the plurality of global points;

[0016] determining a grid index of each of the converted points based on the coordinate value of each of the converted points, the first minimum value, the second minimum value, the third minimum value, and a preset voxel value;

[0017] determining the grid in which each of the converted points is located in the occupancy grid map according to the grid index of each of the converted points.

[0018] In one of the embodiments, the clustering of all the determined foreground points to obtain a plurality of target clusters comprises:

[0019] performing clustering on all the determined foreground points by using a Euclidean clustering to obtain a plurality of initial clusters;

[0020] dividing any initial cluster into a plurality of sub-clusters, wherein the diameter of each sub-cluster is less than a preset human body width threshold;

[0021] judging whether there is a gap between any sub-cluster and other sub-clusters;

[0022] if there is no gap between the any sub-cluster and at least one other sub-cluster, merging the any sub-cluster and the at least one other sub-cluster to obtain a target cluster, and if there is a gap between the any sub-cluster and any other sub-cluster, taking the any sub-cluster as a target cluster.

[0023] In one of the embodiments, the judging of whether there is a gap between the any sub-cluster and other sub-clusters comprises:

[0024] determining a plurality of histogram intervals based on the any sub-cluster and the other sub-clusters;

[0025] determining a first average number of observation points based on the number of foreground points in each histogram interval;

[0026] determining a center histogram interval in the plurality of histogram intervals, and determining a second average number of observation points based on the number of foreground points in the center histogram interval;

[0027] if the first average number of observation points and the second average number of observation points satisfy a preset gap condition, determining that there is a gap between the any sub-cluster and the other sub-clusters;

[0028] If the first average number of observation points and the second average number of observation points do not satisfy the preset interval condition, it is determined that there is no interval between the any sub-cluster and the other sub-cluster.

[0029] In one of the embodiments, the inputting each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster comprises:

[0030] For any target cluster, a plurality of horizontal section features of the any target cluster in a target direction are determined.

[0031] The plurality of horizontal section features of the any target cluster are input into a preset classification model to obtain a pedestrian detection result of the any target cluster.

[0032] In one of the embodiments, the determining a plurality of horizontal section features of the any target cluster in a target direction comprises:

[0033] A maximum value of the any target cluster in a target direction is obtained, and the any target cluster is evenly divided into a preset number of cubic blocks based on the maximum value;

[0034] For any cubic block, foreground points in the any cubic block are projected onto a horizontal plane to obtain a plurality of projection points;

[0035] A minimum circumscribed rectangle of the plurality of projection points is determined, and a width and a length of the minimum circumscribed rectangle are taken as horizontal section features of the cubic block.

[0036] In a second aspect, the present application further provides a pedestrian detection device. The device comprises:

[0037] An occupancy grid map construction module configured to construct an occupancy grid map based on a preset global point cloud map;

[0038] A coordinate conversion module configured to obtain a laser point cloud of a current frame, and convert the laser point cloud to a map coordinate system of the preset global point cloud map to obtain a converted point cloud, wherein the converted point cloud comprises a plurality of converted points;

[0039] A foreground point determination module configured to determine a plurality of foreground points from the plurality of converted points based on the occupancy grid map;

[0040] A cluster processing module configured to perform cluster processing on all determined foreground points to obtain a plurality of target clusters;

[0041] A pedestrian detection module configured to input each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian.

[0042] In a third aspect, the present application provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0043] constructing an occupancy grid map based on a preset global point cloud map;

[0044] obtaining laser point cloud of a current frame, and converting the laser point cloud to a map coordinate system of the preset global point cloud map to obtain converted point cloud, wherein the converted point cloud comprises a plurality of converted points;

[0045] determining a plurality of foreground points in the plurality of converted points based on the occupancy grid map;

[0046] performing clustering processing on all determined foreground points to obtain a plurality of target clusters;

[0047] inputting each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian.

[0048] In a fourth aspect, the present application provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0049] constructing an occupancy grid map based on a preset global point cloud map;

[0050] obtaining laser point cloud of a current frame, and converting the laser point cloud to a map coordinate system of the preset global point cloud map to obtain converted point cloud, wherein the converted point cloud comprises a plurality of converted points;

[0051] determining a plurality of foreground points in the plurality of converted points based on the occupancy grid map;

[0052] performing clustering processing on all determined foreground points to obtain a plurality of target clusters;

[0053] inputting each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian.

[0054] In a fifth aspect, the present application provides a computer program product. The computer program product comprises a computer program, and the computer program is executed by a processor to implement the following steps:

[0055] constructing an occupancy grid map based on a preset global point cloud map;

[0056] obtain a laser point cloud of a current frame, and convert the laser point cloud to a map coordinate system of the preset global point cloud map to obtain a converted point cloud, wherein the converted point cloud comprises a plurality of converted points;

[0057] determine a plurality of foreground points in the plurality of converted points based on the occupancy grid map;

[0058] perform clustering processing on all the determined foreground points to obtain a plurality of target clusters;

[0059] input each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian.

[0060] The above-mentioned pedestrian detection method, device, computer equipment, storage medium and computer program product construct an occupancy grid map based on a preset global point cloud map, the occupancy grid map comprises a plurality of grids, and each grid corresponds to a region of a scene in which a robot is located; a laser point cloud is converted into a map coordinate system to obtain a converted point cloud, the converted point cloud comprises a plurality of converted points, if a grid corresponding to a converted point is in an idle state, the converted point is taken as a foreground point, clustering processing is performed on all the foreground points to obtain a plurality of target clusters, and then it is determined according to a preset classification model whether an object corresponding to each cluster is a pedestrian. In the converted point cloud, the foreground points are determined, and only all the determined foreground points are subjected to clustering processing, which is equivalent to eliminating background points in the converted point cloud. The background points are points corresponding to obstacles in the scene in which the robot is located, and the foreground points are not points corresponding to obstacles in the scene in which the robot is located. Compared with clustering processing on all the converted points in the converted point cloud, the amount of data subjected to clustering processing is reduced, and the amount of data subjected to clustering processing is reduced by eliminating the background points (points corresponding to obstacles in the scene in which the robot is located), and the accuracy of pedestrian detection is not affected. Therefore, the above-mentioned pedestrian detection method reduces the pedestrian detection time length while ensuring the accuracy of pedestrian detection, improves the pedestrian detection efficiency, and can obtain real-time pedestrian detection results. BRIEF DESCRIPTION OF DRAWINGS

[0061] Figure 1 a flowchart of a pedestrian detection method in an embodiment;

[0062] Figure 2 a flowchart of determining a plurality of foreground points in a plurality of converted points in an embodiment;

[0063] Figure 3 a schematic diagram of dividing a target cluster into a preset number of cubic blocks in an embodiment;

[0064] Figure 4This is a schematic diagram of projecting the foreground point in the cube onto the horizontal plane in another embodiment to obtain the horizontal cross-sectional features of the cube;

[0065] Figure 5 This is a structural block diagram of a pedestrian detection device in one embodiment;

[0066] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0068] In one embodiment, such as Figure 1 As shown, a pedestrian detection method is provided. This embodiment illustrates the application of this method to a robot. In this embodiment, the method includes the following steps:

[0069] S101, constructs an occupied grid map based on a preset global point cloud map.

[0070] Among them, the preset global point cloud map is a map of the scene in which the robot is located. The preset global point cloud map can be pre-built by the robot's mapping unit, which may include 3D LiDAR, wheel encoder, inertial testing unit or RGB camera, etc.

[0071] The occupancy grid map consists of multiple grids. Each grid represents a fixed-volume area within the robot's scene, and each grid is either occupied or idle. If a grid is occupied, it indicates that the area corresponding to that grid in the robot's scene may be an obstacle; if a grid is idle, it indicates that the area corresponding to that grid in the robot's scene may not be an obstacle. Specifically, the robot acquires a pre-built global point cloud map and converts it into a 3D occupancy grid map.

[0072] S102, acquire the laser point cloud of the current frame, and convert the laser point cloud to the map coordinate system of the preset global point cloud map to obtain the converted point cloud, wherein the converted point cloud includes multiple conversion points.

[0073] Specifically, the robot obtains the laser point cloud of the current frame by scanning with a 3D LiDAR. This 3D LiDAR can be the 3D LiDAR used to build a preset global point cloud map, or it can be a different 3D LiDAR than the one used to build the preset global point cloud map.

[0074] The robot determines a conversion matrix between a robot coordinate system and a map coordinate system of a preset global point cloud map, converts the laser point cloud from the robot coordinate system to the map coordinate system through the conversion matrix, and obtains a converted point cloud. The converted point cloud includes a plurality of converted points, which correspond one-to-one to a plurality of laser points included in the laser point cloud.

[0075] The robot obtains a pose thereof in the preset global point cloud map, the pose including a position and a heading, and determines the conversion matrix between the robot coordinate system and the map coordinate system according to the position and the heading of the robot in the global map.

[0076] In S103, a plurality of foreground points in the plurality of converted points are determined based on the occupancy grid map.

[0077] Specifically, for each converted point, a target grid of the converted point is determined in the occupancy grid map. The target grid of the converted point is a grid in which the converted point is located in the occupancy grid map. If the state of the target grid of the converted point is an idle state, the converted point is regarded as a foreground point. If the state of the target grid of the converted point is an occupancy state, the converted point is regarded as a background point.

[0078] In the occupancy grid map, the grid in the occupancy state can be an obstacle in the scene in which the robot is located, and the grid in the idle state can not be an obstacle in the scene in which the robot is located. Therefore, if the state of the target grid of any converted point is an occupancy state, it indicates that the any converted point can be a converted point corresponding to a laser point obtained by scanning an obstacle in the scene, and the any converted point is regarded as a background point. If the state of the target grid of any converted point is an idle state, it indicates that the any converted point can be a converted point corresponding to a laser point obtained by scanning a non-obstacle in the scene, and the any converted point is regarded as a foreground point.

[0079] The background point is a point corresponding to an obstacle in the scene, and the foreground point is a point corresponding to a non-obstacle (or a non-fixed obstacle) in the scene. Pedestrians are non-obstacles, or can be considered as non-fixed obstacles. Therefore, in a pedestrian detection task, the background points can be excluded, and only the foreground points are detected to detect pedestrians.

[0080] That is, for a scene, a preset global point cloud map thereof is generated based on obstacles (fixed obstacles, such as walls, tables, columns, and other articles that cannot be actively moved) in the scene. Therefore, when the obstacles are projected to the occupancy grid map, the corresponding grids are in the occupancy state.

[0081] For the laser point cloud of the current frame, it includes point cloud information of original obstacles (fixed obstacles such as walls, tables, columns and other non-active moving articles), idle areas and other obstacles (such as non-fixed obstacles), and thus the converted points correspond to information of the original obstacles and information of the other obstacles. By removing the original obstacles (background point removal), the information of the other obstacles (foreground points) can be obtained.

[0082] S104, cluster processing is performed on all the determined foreground points to obtain a plurality of target clusters.

[0083] Specifically, Euclidean clustering can be used to perform cluster processing on all the foreground points to obtain a plurality of target clusters, and the plurality of target clusters correspond to a plurality of different objects respectively. Only the foreground points are subjected to cluster processing, which reduces the data amount of cluster processing, improves the efficiency of obtaining the plurality of target clusters, and further improves the efficiency of pedestrian detection.

[0084] S105, each target cluster is input into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian.

[0085] Specifically, the preset classification model is used to perform a binary classification task. For each target cluster, a feature of the target cluster is extracted, the extracted feature is input into the preset classification model, and a pedestrian detection result is output by the preset classification model.

[0086] The feature of the target cluster can be a Point Feature Histograms (PFH) descriptor of the target cluster or a fast point feature histogram of the target cluster. The pedestrian detection result can be represented by a numerical value. For example, when the preset classification model outputs 1, the target cluster is a pedestrian, and when the preset classification model outputs 0, the target cluster is not a pedestrian.

[0087] In the pedestrian detection method, a global point cloud map is constructed according to a preset global point cloud map, and the occupancy grid map includes a plurality of grids, each grid corresponding to a region of a scene in which the robot is located; the laser point cloud is converted into a map coordinate system to obtain a converted point cloud, and the converted point cloud includes a plurality of converted points; if the converted point corresponds to an idle grid, the converted point is regarded as a foreground point; all foreground points are clustered to obtain a plurality of target clusters; and a preset classification model is used to determine whether each cluster corresponds to a pedestrian. In the converted point cloud, the foreground points are determined, and only the determined foreground points are clustered, which is equivalent to eliminating the background points in the converted point cloud. The background points are points corresponding to obstacles in the scene in which the robot is located, and the foreground points are not points corresponding to obstacles in the scene in which the robot is located. Compared with clustering all converted points in the converted point cloud, the amount of data for clustering is reduced, and the accuracy of pedestrian detection is not affected because the amount of data for clustering is reduced by eliminating the background points (points corresponding to obstacles in the scene in which the robot is located) in the converted point cloud. Therefore, the pedestrian detection method can reduce the pedestrian detection time and improve the pedestrian detection efficiency while ensuring the accuracy of pedestrian detection, and real-time pedestrian detection results can be obtained.

[0088] In one embodiment, as shown in FIG. 1, Figure 2 determining a plurality of foreground points in the plurality of converted points based on the occupancy grid map, includes:

[0089] S301, a plurality of invalid voxel grids in the occupancy grid map are obtained.

[0090] Specifically, the occupancy grid map includes a plurality of global points in a preset global point cloud map, and the plurality of global points are obtained by scanning a scene in which a robot is located. Therefore, the plurality of global points are obstacles in the scene in which the robot is located. The occupancy grid map includes a plurality of grids, and one grid is a fixed volume region in the scene in which the robot is located. Each grid in the occupancy grid map includes part of the global points in the preset global point cloud map. For each grid, the number of global points included in the grid can be used to determine whether the grid is an invalid voxel grid or a valid voxel grid.

[0091] In one embodiment, the invalid voxel grids in the occupancy grid map can be determined in advance. The invalid voxel grids in the occupancy grid map are determined in advance, including: determining the number of global points in any grid in the occupancy grid map; and if the number is less than or equal to a preset voxel value, determining that the any grid is an invalid voxel grid.

[0092] Specifically, if the number of global points in any grid is less than or equal to a preset voxel value, the state of the any grid is an idle state, and the any grid is an invalid voxel grid; if the number of global points in any grid is greater than the preset voxel value, the state of the any grid is an occupied state, and the any grid is a valid voxel grid.

[0093] S302, for each conversion point in the plurality of conversion points, determining a grid in which the each conversion point is located in the occupied grid map.

[0094] Specifically, in the map coordinate system, a horizontal plane formed by an X axis and a Y axis can be set, and a Z axis is perpendicular to the horizontal plane; coordinate values of any conversion point in the map coordinate system are obtained, and coordinate values of a plurality of global points in the map coordinate system are obtained; the grid index corresponding to any conversion point is calculated according to the coordinate values of any conversion point in the map coordinate system and the coordinate values of the plurality of global points in the map coordinate system; and in the occupied grid map, the grid in which any conversion point is located is determined according to the grid index corresponding to any conversion point.

[0095] In one embodiment, determining the grid in which the each conversion point is located in the occupied grid map comprises: obtaining a first minimum value of a first coordinate axis, a second minimum value of a second coordinate axis, and a third minimum value of a third coordinate axis in the plurality of global points; determining the grid index of the each conversion point based on the coordinate value of the each conversion point, the first minimum value, the second minimum value, the third minimum value, and a preset voxel value; and determining the grid in which the each conversion point is located in the occupied grid map according to the grid index of the each conversion point.

[0096] Specifically, a first global coordinate value of each global point on the first coordinate axis is determined, the minimum value of all first global coordinate values is taken as the first minimum value, a second global coordinate value of each global point on the second coordinate axis is determined, the minimum value of all second global coordinate values is taken as the second minimum value, and a third coordinate value of each global point on the third coordinate axis is determined, and the minimum value of all third global coordinate values is taken as the third minimum value.

[0097] For each conversion point, the coordinate value of the conversion point includes: a first coordinate value of the conversion point on the first coordinate axis, a second coordinate value of the conversion point on the second coordinate axis, and a third coordinate value of the conversion point on the third coordinate axis. The grid index of each conversion point includes a first index value, a second index value, and a third index value. The grid index of the conversion point is calculated by the following formula.

[0098]

[0099]

[0100]

[0101] wherein the coordinate value of the conversion point is (x, y, z), voxelsize is the preset voxel value, index(x) is the first index value of the conversion point with the coordinate value (x, y, z), index(y) is the second index value of the conversion point with the coordinate value (x, y, z), index(z) is the third index value of the conversion point with the coordinate value (x, y, z), x min is the first minimum value, y min is the second minimum value, and z min is the third minimum value.

[0102] After obtaining the grid index of each conversion point, the grid in which each conversion point is located is determined according to the grid index of each conversion point.

[0103] S303, if the grid in which any conversion point in the plurality of conversion points is located is an invalid voxel grid, it is determined that the any conversion point is a foreground point.

[0104] Specifically, since the plurality of global points are obstacles in the scene in which the robot is located, the number of global points in the valid voxel grid is greater than the preset voxel value, and therefore the valid voxel grid in a region of the scene in which the robot is located is likely to be an obstacle. The number of global points in the invalid voxel grid is less than or equal to the preset voxel value, and therefore the invalid voxel grid in a region of the scene in which the robot is located is likely not to be an obstacle; if the grid in which any conversion point is located is an invalid voxel grid, the object corresponding to the any conversion point is likely not to be an obstacle, and therefore the object corresponding to the any conversion point is a foreground point in the scene in which the robot is located.

[0105] In one embodiment, clustering processing is performed on all the determined foreground points to obtain a plurality of target clusters, including: performing clustering on all the determined foreground points by using Euclidean clustering to obtain a plurality of initial clusters; for any initial cluster, dividing the any initial cluster into a plurality of sub-clusters, wherein the diameter of each sub-cluster is less than a preset human body width threshold; for any sub-cluster, determining whether there is a gap between the any sub-cluster and other sub-clusters; if there is no gap between the any sub-cluster and at least one other sub-cluster, merging the any sub-cluster and the at least one other sub-cluster to obtain a target cluster, and if there is a gap between the any sub-cluster and any other sub-cluster, taking the any sub-cluster as a target cluster.

[0106] Specifically, a Euclidean distance between any two foreground points is determined, all foreground points are clustered according to the Euclidean distance between any two foreground points to obtain a plurality of initial clusters. In this way, two initial clusters can correspond to different objects respectively. For any initial cluster, the initial cluster is divided into a plurality of sub-clusters according to a preset human body width threshold, so that the diameter of each sub-cluster is less than the preset human body width threshold. The preset human body width threshold can be 45 cm.

[0107] According to the preset human body width threshold, the any initial cluster is divided into a plurality of sub-clusters, that is, the maximum value of the diameter of each sub-cluster is the preset human body width threshold, and the minimum value of the diameter of each sub-cluster can be set according to actual needs, which is not limited in the present application. The diameter of each sub-cluster is less than the preset human body width threshold, so that the foreground points belonging to different objects are not included in each sub-cluster.

[0108] According to the preset human body width threshold, the initial cluster is divided into a plurality of sub-clusters, which can result in different sub-clusters belonging to the same object. In order to avoid this situation, for any sub-cluster, it is determined whether there is a gap between the any sub-cluster and other sub-clusters. If there is no gap between the any sub-cluster and other sub-clusters, it indicates that the any sub-cluster and other sub-clusters belong to the same object, and the any sub-cluster and other sub-clusters are merged to obtain a target cluster. There can be multiple other sub-clusters without a gap with the any sub-cluster, indicating that the any sub-cluster and multiple other sub-clusters belong to the same object, and the any sub-cluster and multiple other sub-clusters are merged to obtain a target cluster. If there is a gap between the any sub-cluster and any one of the other sub-clusters, it indicates that the any sub-cluster belongs to an object alone, and the any sub-cluster is taken as a target cluster.

[0109] In an embodiment, it is determined whether there is a gap between the any sub-cluster and other sub-clusters, including: determining a plurality of histogram intervals based on the any sub-cluster and the other sub-clusters; determining a first average number of observation points based on the number of foreground points in each histogram interval; determining a center histogram interval in the plurality of histogram intervals, and determining a second average number of observation points based on the number of foreground points in the center histogram interval; if the first average number of observation points and the second average number of observation points satisfy a preset gap condition, it is determined that there is a gap between the any sub-cluster and the other sub-clusters; if the first average number of observation points and the second average number of observation points do not satisfy the preset gap condition, it is determined that there is no gap between the any sub-cluster and the other sub-clusters.

[0110] Specifically, according to any sub-cluster and other sub-clusters, K initial centers of any sub-cluster and other sub-clusters are determined, K histogram intervals of any sub-cluster and other sub-clusters are determined based on the K initial centers; the number of foreground points in each histogram interval is obtained; the number of foreground points in each histogram interval is averaged to obtain a first average observation point number; a center histogram interval is selected from the K histogram intervals, a second average observation point number is determined according to the number of foreground points in the center histogram interval, and if the first average observation point number and the second average observation point number satisfy a preset interval condition, it is determined that there is an interval between any sub-cluster and other sub-clusters, and if the first average observation point number and the second average observation point number do not satisfy the preset interval condition, it is determined that there is no interval between any sub-cluster and other sub-clusters.

[0111] The center histogram interval in the plurality of histogram intervals (K histogram intervals) is determined, including: if K is an odd number, selecting a histogram interval at the center from the K histogram intervals as the center histogram interval, and accordingly, determining the second average observation point number according to the number of foreground points in the center histogram interval, including: taking the number of foreground points in the center histogram interval as the second average observation point number;

[0112] If K is an even number, two histogram intervals at the center are selected from the K histogram intervals as the center histogram intervals, and accordingly, the second average observation point number is determined according to the number of foreground points in the center histogram interval, including: the number of foreground points in the two histogram intervals at the center is averaged to obtain the second average observation point number.

[0113] Exemplarily, the preset interval condition is: the first average observation point number < the second average observation point number x 0.8.

[0114] For example, all the determined foreground points are clustered by using the Euclidean clustering to obtain multiple initial clusters, including C1, C2, …, Cn; taking the initial cluster C1 as an example, C1 is divided into multiple sub-clusters according to a preset human body width threshold, including c11, c12, …, c1n, wherein the diameters of c11, c12, …, c1n are all less than the preset human body width threshold; for any sub-cluster in c11, c12, …, c1n, any sub-cluster that has a gap with any other sub-cluster is taken as a target cluster of C1, for example, c11 has a gap with any other sub-cluster, and c11 is taken as a target cluster d11 of C1; c15 has a gap with any other sub-cluster, and c15 is taken as a target cluster d12 of C1; the sub-clusters in c11, c12, …, c1n that have no gap are merged to obtain the target clusters of C1, for example, c12, c13 and c14 have no gap, and c12, c13 and c14 are merged to obtain a target cluster d13 of C1; c16 and c1n have no gap, and c16 and c1n are merged to obtain a target cluster d14 of C1.

[0115] In the embodiment, only all the foreground points are clustered, the data amount of the clustering processing is reduced, the efficiency of obtaining multiple target clusters is improved, and the efficiency of pedestrian detection is improved; the initial cluster is divided into multiple sub-clusters by using the preset human body width threshold, so that the sub-clusters conform to the width feature of the pedestrian, and the sub-clusters that have no gap in the multiple sub-clusters are merged to obtain at least one target cluster of the initial cluster, so that the target cluster corresponds to the same object, and the target cluster conforms to the width feature of the pedestrian, and the accuracy of the pedestrian detection is improved.

[0116] In one embodiment, each target cluster is input into a preset classification model to determine a pedestrian detection result of each target cluster, including: for any target cluster, multiple horizontal section features of the target cluster in a target direction are determined; the multiple horizontal section features of the target cluster are input into the preset classification model to obtain a pedestrian detection result of the target cluster.

[0117] Specifically, the target cluster is processed by using the principal component analysis method to obtain features of the target cluster in three direction axes, the three direction axes are: a first direction axis, a second direction axis and a third direction axis, the first direction axis and the second direction axis form a horizontal plane, and the third direction axis is perpendicular to the horizontal plane; since the pedestrian is generally upright on the ground with the head up and the legs down, the feature on the third direction axis is the main feature, and the main direction axis of the target cluster can be determined as the third direction axis. The height direction is taken as the target direction.

[0118] The height of the plurality of horizontal section features of any target cluster is different, and the plurality of horizontal section features can reflect the features of the target cluster at different heights. Since the human body has different features at different heights, for example, the cross section of the head is approximately circular, and the cross section of the shoulder is an elongated oval, the horizontal section features of the target cluster at different heights can be used to determine whether the target cluster is a pedestrian. The plurality of horizontal section features of any target cluster are input into a preset classification model to obtain a pedestrian detection result of any target; the pedestrian detection result is used to reflect that the object corresponding to the target cluster is a pedestrian, or the object corresponding to the target cluster is not a pedestrian. The preset classification model can be implemented based on a support vector machine of a radial basis kernel.

[0119] In one embodiment, the determination of the plurality of horizontal section features of the target cluster in the target direction includes: obtaining a maximum value of the target cluster in the target direction, and dividing the target cluster into a preset number of cubic blocks based on the maximum value; for any cubic block, projecting the foreground points in the cubic block to a horizontal plane to obtain a plurality of projection points; determining a minimum circumscribed rectangle of the plurality of projection points, and taking the width and length of the minimum circumscribed rectangle as the horizontal section feature of the cubic block.

[0120] Specifically, three direction axes are determined, the first direction axis and the second direction axis constitute a horizontal plane, and the third direction axis is perpendicular to the horizontal plane, wherein the third direction axis is the target direction; as shown in Figure 3 The target cluster is divided into a preset number of cubic blocks along the third direction axis, and part of the foreground points in the target cluster exist in each cubic block; as shown in Figure 4 For any cubic block, the foreground points in the cubic block are projected to a horizontal plane to obtain a plurality of projection points corresponding to the cubic block, a minimum circumscribed rectangle of the plurality of projection points corresponding to the cubic block is determined, and the width w and the length h of the minimum circumscribed rectangle are determined to obtain the horizontal section feature of the cubic block.

[0121] Let the preset number be N, and the target cluster is divided into N cubic blocks, then the number of horizontal section features of the target cluster is 2N.

[0122] In this embodiment, the global point cloud map is used to construct an occupancy grid map, and the occupancy grid map includes a plurality of grids, each of which corresponds to a region of the scene in which the robot is located. The laser point cloud is converted into the map coordinate system to obtain a converted point cloud, which includes a plurality of converted points. If the converted point corresponds to an idle grid, the converted point is regarded as a foreground point. All foreground points are clustered to obtain a plurality of target clusters. A preset classification model is used to determine whether each cluster corresponds to a pedestrian. In the converted point cloud, only the foreground points are clustered, which is equivalent to removing the background points in the converted point cloud. The background points are points corresponding to obstacles in the scene in which the robot is located, and the foreground points are not points corresponding to obstacles in the scene in which the robot is located. Compared with clustering all converted points in the converted point cloud, the amount of data for clustering is reduced, and the accuracy of pedestrian detection is not affected by removing the background points (points corresponding to obstacles in the scene in which the robot is located) in the converted point cloud. A plurality of horizontal section features of the target cluster are determined in the target direction, and the heights of each horizontal section feature are different. The plurality of horizontal section features can reflect the characteristics of the target cluster in different height cross sections. Since the human body has different characteristics in different height cross sections, the preset classification model and the horizontal section features of the target cluster at different heights can obtain a pedestrian detection result of the target cluster with high accuracy. Therefore, the pedestrian detection method of this embodiment can reduce the pedestrian detection time while ensuring the accuracy of pedestrian detection, improve the pedestrian detection efficiency, and obtain real-time pedestrian detection results.

[0123] It should be understood that, although each step in the flowchart involved in each of the above-described embodiments is shown in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each of the above-described embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or stages.

[0124] Based on the same inventive concept, the embodiments of the present application also provide a pedestrian detection device for implementing the above-mentioned pedestrian detection method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more pedestrian detection device embodiments provided below can refer to the limitations of the pedestrian detection method described above, which will not be described here again.

[0125] In one embodiment, as shown in Figure 5 A pedestrian detection device is provided, comprising:

[0126] An occupancy grid map construction module 100 is configured to construct an occupancy grid map based on a preset global point cloud map

[0127] A coordinate conversion module 200 is configured to acquire laser point cloud of a current frame, and convert the laser point cloud to a map coordinate system of the preset global point cloud map to obtain converted point cloud, wherein the converted point cloud comprises a plurality of converted points.

[0128] A foreground point determination module 300 is configured to determine a plurality of foreground points from the plurality of converted points based on the occupancy grid map.

[0129] A clustering processing module 400 is configured to perform clustering processing on all determined foreground points to obtain a plurality of target clusters.

[0130] A pedestrian detection module 500 is configured to input each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian.

[0131] In one embodiment, the foreground point determination module comprises:

[0132] An occupancy grid map processing unit is configured to acquire a plurality of invalid voxel grids in the occupancy grid map.

[0133] A grid determination unit is configured to determine a grid in which each converted point of the plurality of converted points is located in the occupancy grid map.

[0134] A foreground point determination unit is configured to determine any converted point of the plurality of converted points as a foreground point if the grid in which the any converted point is located is an invalid voxel grid.

[0135] In one embodiment, the occupancy grid map comprises a plurality of global points, and the grid determination unit comprises:

[0136] A first processing subunit is configured to acquire a first minimum value of a first coordinate axis, a second minimum value of a second coordinate axis, and a third minimum value of a third coordinate axis from the plurality of global points.

[0137] A second processing subunit is configured to determine a grid index of each converted point based on a coordinate value of each converted point, the first minimum value, the second minimum value, the third minimum value, and a preset voxel value.

[0138] The third processing subunit is configured to determine a grid in which each conversion point is located in the occupancy grid map according to a grid index of the conversion point.

[0139] In one of the embodiments, the clustering processing module comprises:

[0140] An initial clustering unit is configured to cluster all the determined foreground points by using Euclidean clustering to obtain a plurality of initial clusters.

[0141] A cluster division unit is configured to divide any initial cluster into a plurality of sub-clusters, wherein a diameter of each sub-cluster is less than a preset human body width threshold.

[0142] A judging unit is configured to judge whether there is a gap between any sub-cluster and other sub-clusters.

[0143] A cluster merging unit is configured to merge any sub-cluster and at least one other sub-cluster to obtain a target cluster if there is no gap between the any sub-cluster and the at least one other sub-cluster, and to take the any sub-cluster as the target cluster if there is a gap between the any sub-cluster and any other sub-cluster.

[0144] In one of the embodiments, the judging unit comprises:

[0145] A fourth processing subunit is configured to determine a plurality of histogram intervals based on the any sub-cluster and the other sub-clusters.

[0146] A fifth processing subunit is configured to determine a first average observation point number based on a number of foreground points in each histogram interval.

[0147] A sixth processing subunit is configured to determine a center histogram interval in the plurality of histogram intervals, and determine a second average observation point number based on a number of foreground points in the center histogram interval.

[0148] A seventh processing subunit is configured to determine that there is a gap between the any sub-cluster and the other sub-clusters if the first average observation point number and the second average observation point number satisfy a preset gap condition.

[0149] If the first average observation point number and the second average observation point number do not satisfy the preset gap condition, it is determined that there is no gap between the any sub-cluster and the other sub-clusters.

[0150] In one of the embodiments, the pedestrian detection module comprises:

[0151] a horizontal section feature determination unit, configured to determine, for any target cluster, a plurality of horizontal section features of the target cluster in a target direction;

[0152] a pedestrian detection unit, configured to input the plurality of horizontal section features of the target cluster into a preset classification model to obtain a pedestrian detection result of the target cluster.

[0153] In one of the embodiments, the horizontal section feature determination unit comprises:

[0154] a cuboid determination subunit, configured to obtain a maximum value of the target cluster in the target direction, and divide the target cluster into a preset number of cuboids based on the maximum value;

[0155] a projection subunit, configured to project foreground points in any cuboid to a horizontal plane to obtain a plurality of projection points;

[0156] a horizontal section feature determination subunit, configured to determine a minimum circumscribed rectangle of the plurality of projection points, and take a width and a length of the minimum circumscribed rectangle as horizontal section features of the cuboid.

[0157] The above-mentioned modules in the pedestrian detection device can be realized by software, hardware and combinations thereof in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned modules.

[0158] In one embodiment, a computer device is provided, which can be a terminal, and the internal structure diagram thereof can be as shown in Figure 6 The computer device comprises a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by the processor to implement a pedestrian detection method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or can be a key, trackball or touchpad arranged on the shell of the computer device, or can be an external keyboard, touchpad or mouse, etc.

[0159] Those skilled in the art can understand that Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0160] In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0161] constructing an occupancy grid map based on a preset global point cloud map;

[0162] obtaining a laser point cloud of a current frame, and converting the laser point cloud to a map coordinate system of the preset global point cloud map to obtain a converted point cloud, wherein the converted point cloud comprises a plurality of converted points;

[0163] determining a plurality of foreground points in the plurality of converted points based on the occupancy grid map;

[0164] performing clustering processing on all the determined foreground points to obtain a plurality of target clusters;

[0165] inputting each of the target clusters into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian.

[0166] In one embodiment, the determining a plurality of foreground points in the plurality of converted points based on the occupancy grid map comprises:

[0167] obtaining a plurality of invalid voxel grids in the occupancy grid map;

[0168] for each converted point in the plurality of converted points, determining a grid in which the each converted point is located in the occupancy grid map;

[0169] if a grid in which any converted point in the plurality of converted points is located is an invalid voxel grid, determining the any converted point as a foreground point.

[0170] In one embodiment, the occupancy grid map comprises a plurality of global points, and the determining a grid in which the each converted point is located in the occupancy grid map comprises:

[0171] obtaining a first minimum value of a first coordinate axis, a second minimum value of a second coordinate axis, and a third minimum value of a third coordinate axis in the plurality of global points;

[0172] determine a grid index of each conversion point based on the coordinate value of each conversion point, the first minimum value, the second minimum value, the third minimum value and a preset voxel value;

[0173] determine a grid where each conversion point is located in the occupancy grid map according to the grid index of each conversion point.

[0174] In one of the embodiments, the determined all foreground points are clustered to obtain a plurality of target clusters, including:

[0175] The determined all foreground points are clustered by using Euclidean clustering to obtain a plurality of initial clusters;

[0176] For any initial cluster, the any initial cluster is divided into a plurality of sub-clusters, wherein the diameter of each sub-cluster is less than a preset human body width threshold;

[0177] For any sub-cluster, it is judged whether there is a gap between the any sub-cluster and other sub-clusters;

[0178] If there is no gap between the any sub-cluster and at least one other sub-cluster, the any sub-cluster and the at least one other sub-cluster are merged to obtain a target cluster, and if there is a gap between the any sub-cluster and any other sub-cluster, the any sub-cluster is taken as a target cluster.

[0179] In one of the embodiments, the judgment of whether there is a gap between the any sub-cluster and other sub-clusters includes:

[0180] determine K histogram intervals based on the any sub-cluster and the other sub-clusters;

[0181] determine a first average observation point number based on the number of foreground points in each histogram interval;

[0182] determine a center histogram interval in the K histogram intervals, and determine a second average observation point number based on the number of foreground points in the center histogram interval;

[0183] If the first average observation point number and the second average observation point number satisfy a preset gap condition, it is determined that there is a gap between the any sub-cluster and the other sub-clusters;

[0184] If the first average observation point number and the second average observation point number do not satisfy the preset gap condition, it is determined that there is no gap between the any sub-cluster and the other sub-clusters.

[0185] In one of the embodiments, the input of each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster includes:

[0186] determining, for any target cluster, a plurality of horizontal section features of the any target cluster in the target direction;

[0187] inputting the plurality of horizontal section features of the any target cluster into a preset classification model to obtain a pedestrian detection result of the any target cluster.

[0188] In one embodiment, the determining, for any target cluster, a plurality of horizontal section features of the any target cluster in the target direction comprises:

[0189] obtaining a maximum value of the any target cluster in the target direction, and dividing the any target cluster into a preset number of cubic blocks based on the maximum value;

[0190] for any cubic block, projecting foreground points in the any cubic block to a horizontal plane to obtain a plurality of projection points;

[0191] determining a minimum circumscribed rectangle of the plurality of projection points, and taking a width and a length of the minimum circumscribed rectangle as the horizontal section features of the cubic block.

[0192] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the following steps are implemented:

[0193] constructing an occupancy grid map based on a preset global point cloud map;

[0194] obtaining a laser point cloud of a current frame, and converting the laser point cloud to a map coordinate system of the preset global point cloud map to obtain a converted point cloud, wherein the converted point cloud comprises a plurality of converted points;

[0195] determining a plurality of foreground points from the plurality of converted points based on the occupancy grid map;

[0196] performing clustering processing on all the determined foreground points to obtain a plurality of target clusters;

[0197] inputting each of the target clusters into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian.

[0198] In one embodiment, the determining a plurality of foreground points from the plurality of converted points based on the occupancy grid map comprises:

[0199] obtaining a plurality of invalid voxel grids in the occupancy grid map;

[0200] For each of the plurality of conversion points, a grid in which the each conversion point is located in the occupancy grid map is determined;

[0201] If a grid in which any of the plurality of conversion points is located is an invalid voxel grid, the any conversion point is determined as a foreground point.

[0202] In one of the embodiments, the occupancy grid map comprises a plurality of global points; the determining the grid in which the each conversion point is located in the occupancy grid map comprises:

[0203] A first minimum value of a first coordinate axis, a second minimum value of a second coordinate axis and a third minimum value of a third coordinate axis in the plurality of global points are obtained;

[0204] Based on a coordinate value of the each conversion point, the first minimum value, the second minimum value, the third minimum value and a preset voxel value, a grid index of the each conversion point is determined;

[0205] According to the grid index of the each conversion point, the grid in which the each conversion point is located in the occupancy grid map is determined.

[0206] In one of the embodiments, the clustering processing of all the determined foreground points to obtain a plurality of target clusters comprises:

[0207] The clustering of all the determined foreground points is performed by using a Euclidean clustering to obtain a plurality of initial clusters;

[0208] For any initial cluster, the any initial cluster is divided into a plurality of sub-clusters, wherein a diameter of each sub-cluster is less than a preset human body width threshold;

[0209] For any sub-cluster, it is judged whether there is a gap between the any sub-cluster and other sub-clusters;

[0210] If there is no gap between the any sub-cluster and at least one other sub-cluster, the any sub-cluster and the at least one other sub-cluster are merged to obtain a target cluster, and if there is a gap between the any sub-cluster and any other sub-cluster, the any sub-cluster is taken as a target cluster.

[0211] In one of the embodiments, the judging whether there is a gap between the any sub-cluster and other sub-clusters comprises:

[0212] Based on the any sub-cluster and the other sub-clusters, K histogram intervals are determined;

[0213] Based on a number of foreground points in each histogram interval, a first average observation point number is determined;

[0214] determining a center histogram interval of the K histogram intervals, and determining a second average number of observation points based on a number of foreground points in the center histogram interval;

[0215] if the first average number of observation points and the second average number of observation points satisfy a preset interval condition, determining that there is an interval between the any sub-cluster and the other sub-clusters;

[0216] if the first average number of observation points and the second average number of observation points do not satisfy the preset interval condition, determining that there is no interval between the any sub-cluster and the other sub-clusters.

[0217] In one of the embodiments, the inputting each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster comprises:

[0218] determining, for any target cluster, a plurality of horizontal section features of the any target cluster in a target direction;

[0219] inputting the plurality of horizontal section features of the any target cluster into a preset classification model to obtain a pedestrian detection result of the any target cluster.

[0220] In one of the embodiments, the determining, for any target cluster, a plurality of horizontal section features of the any target cluster in a target direction comprises:

[0221] obtaining a maximum value of the any target cluster in the target direction, and dividing the any target cluster into a preset number of cubic blocks based on the maximum value;

[0222] for any cubic block, projecting foreground points in the any cubic block to a horizontal plane to obtain a plurality of projection points;

[0223] determining a minimum circumscribed rectangle of the plurality of projection points, and taking a width and a length of the minimum circumscribed rectangle as horizontal section features of the cubic block.

[0224] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:

[0225] constructing an occupancy grid map based on a preset global point cloud map;

[0226] obtaining a laser point cloud of a current frame, and converting the laser point cloud to a map coordinate system of the preset global point cloud map to obtain a converted point cloud, wherein the converted point cloud comprises a plurality of converted points;

[0227] determining a plurality of foreground points from the plurality of converted points based on the occupancy grid map;

[0228] cluster all the determined foreground points to obtain a plurality of target clusters;

[0229] input each of the target clusters into a preset classification model to determine a pedestrian detection result of each of the target clusters, wherein the pedestrian detection result of each of the target clusters is used to reflect whether each of the target clusters is a pedestrian.

[0230] In one of the embodiments, the determining the plurality of foreground points from the plurality of conversion points based on the occupancy grid map comprises:

[0231] obtaining a plurality of invalid voxel grids in the occupancy grid map;

[0232] for each of the plurality of conversion points, determining a grid in which the each of the conversion points is located in the occupancy grid map;

[0233] if a grid in which any of the plurality of conversion points is located is an invalid voxel grid, determining that the any of the conversion points is a foreground point.

[0234] In one of the embodiments, the occupancy grid map comprises a plurality of global points, and the determining the grid in which the each of the conversion points is located in the occupancy grid map comprises:

[0235] obtaining a first minimum value of a first coordinate axis, a second minimum value of a second coordinate axis, and a third minimum value of a third coordinate axis in the plurality of global points;

[0236] determining a grid index of the each of the conversion points based on a coordinate value of the each of the conversion points, the first minimum value, the second minimum value, the third minimum value, and a preset voxel value;

[0237] determining the grid in which the each of the conversion points is located in the occupancy grid map according to the grid index of the each of the conversion points.

[0238] In one of the embodiments, the clustering all the determined foreground points to obtain a plurality of target clusters comprises:

[0239] performing clustering on all the determined foreground points by using a Euclidean clustering to obtain a plurality of initial clusters;

[0240] for any of the initial clusters, dividing the any of the initial clusters into a plurality of sub-clusters, wherein a diameter of each of the sub-clusters is less than a preset human body width threshold;

[0241] for any of the sub-clusters, judging whether there is a gap between the any of the sub-clusters and other sub-clusters;

[0242] if there is no interval between the any sub-cluster and at least one other sub-cluster, merging the any sub-cluster and the at least one other sub-cluster to obtain a target cluster, and if there is an interval between the any sub-cluster and any other sub-cluster, taking the any sub-cluster as a target cluster.

[0243] In one embodiment, the determining whether there is an interval between the any sub-cluster and other sub-clusters comprises:

[0244] determining K histogram intervals based on the any sub-cluster and the other sub-clusters;

[0245] determining a first average observation point number based on the number of foreground points in each histogram interval;

[0246] determining a center histogram interval in the K histogram intervals, and determining a second average observation point number based on the number of foreground points in the center histogram interval;

[0247] if the first average observation point number and the second average observation point number satisfy a preset interval condition, determining that there is an interval between the any sub-cluster and the other sub-clusters;

[0248] if the first average observation point number and the second average observation point number do not satisfy the preset interval condition, determining that there is no interval between the any sub-cluster and the other sub-clusters.

[0249] In one embodiment, the inputting each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster comprises:

[0250] for any target cluster, determining a plurality of horizontal section features of the any target cluster in a target direction;

[0251] inputting the plurality of horizontal section features of the any target cluster into a preset classification model to obtain a pedestrian detection result of the any target cluster.

[0252] In one embodiment, the determining a plurality of horizontal section features of the any target cluster in a target direction comprises:

[0253] obtaining a maximum value of the any target cluster in a target direction, and dividing the any target cluster into a preset number of cubic blocks based on the maximum value;

[0254] for any cubic block, projecting foreground points in the any cubic block to a horizontal plane to obtain a plurality of projection points;

[0255] Determine a minimum circumscribed rectangle of the plurality of projection points, and take a width and a length of the minimum circumscribed rectangle as the horizontal section feature of the cuboid.

[0256] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0257] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0258] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, as long as the combinations of technical features do not have contradictions, they shall be considered within the scope of the present disclosure.

[0259] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it shall not be understood as a limitation on the patent scope of the present application. It shall be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these shall be within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A pedestrian detection method, characterized by, The method comprises: occupancy grid map is constructed based on a preset global point cloud map; acquire laser point cloud of a current frame, and convert the laser point cloud to a map coordinate system of the preset global point cloud map to obtain a converted point cloud, wherein the converted point cloud comprises a plurality of converted points; determine a plurality of foreground points in the plurality of converted points based on the occupancy grid map; perform clustering processing on all determined foreground points to obtain a plurality of target clusters; input each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian; the inputting each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster comprises: for any target cluster, a plurality of horizontal section features of the any target cluster are determined in a target direction; the plurality of horizontal section features of the any target cluster are input into a preset classification model to obtain a pedestrian detection result of the any target cluster.

2. The method of claim 1, wherein, the determining a plurality of foreground points in the plurality of converted points based on the occupancy grid map comprises: acquire a plurality of invalid voxel grids in the occupancy grid map; for each converted point in the plurality of converted points, determine a grid in which the each converted point is located in the occupancy grid map; if a grid in which any converted point in the plurality of converted points is located is an invalid voxel grid, the any converted point is determined as a foreground point.

3. The method of claim 2, wherein, the occupancy grid map comprises a plurality of global points; the determining a grid in which the each converted point is located in the occupancy grid map comprises: acquire a first minimum value of a first coordinate axis, a second minimum value of a second coordinate axis, and a third minimum value of a third coordinate axis in the plurality of global points; determine a grid index of the each converted point based on a coordinate value of the each converted point, the first minimum value, the second minimum value, the third minimum value, and a preset voxel value; determine a grid in which the each converted point is located in the occupancy grid map according to the grid index of the each converted point.

4. The method of claim 1, wherein, the performing clustering processing on all determined foreground points to obtain a plurality of target clusters comprises: perform clustering on all determined foreground points by using a Euclidean clustering to obtain a plurality of initial clusters; for any initial cluster, divide the any initial cluster into a plurality of sub-clusters, wherein a diameter of each sub-cluster is less than a preset human body width threshold; for any sub-cluster, judge whether there is a gap between the any sub-cluster and other sub-clusters; if there is no gap between the any sub-cluster and at least one other sub-cluster, merge the any sub-cluster and the at least one other sub-cluster to obtain a target cluster, and if there is a gap between the any sub-cluster and any other sub-cluster, take the any sub-cluster as a target cluster.

5. The method of claim 4, wherein, the judging whether there is a gap between the any sub-cluster and other sub-clusters comprises: determine a plurality of histogram intervals based on the any sub-cluster and the other sub-clusters; determine a first average observation point number based on a number of foreground points in each histogram interval; determining a center histogram interval of the plurality of histogram intervals, and determining a second average number of observation points based on a number of foreground points in the center histogram interval; if the first average number of observation points and the second average number of observation points satisfy a preset interval condition, determining that there is an interval between the any sub-cluster and the other sub-clusters; if the first average number of observation points and the second average number of observation points do not satisfy the preset interval condition, determining that there is no interval between the any sub-cluster and the other sub-clusters.

6. The method of claim 1, wherein, The method further includes: obtaining a maximum value of the any target cluster in a target direction, and dividing the any target cluster into a preset number of cubic blocks based on the maximum value; projecting foreground points in the any cubic block to a horizontal plane to obtain a plurality of projection points; determining a minimum circumscribed rectangle of the plurality of projection points, and taking a width and a length of the minimum circumscribed rectangle as horizontal section features of the cubic block.

7. A pedestrian detection device characterized by comprising: The device includes: an occupancy grid map construction module configured to construct an occupancy grid map based on a preset global point cloud map; a coordinate conversion module configured to obtain laser point cloud of a current frame, and convert the laser point cloud to a map coordinate system of the preset global point cloud map to obtain converted point cloud, wherein the converted point cloud includes a plurality of converted points; a foreground point determination module configured to determine a plurality of foreground points from the plurality of converted points based on the occupancy grid map; a clustering processing module configured to perform clustering processing on all determined foreground points to obtain a plurality of target clusters; a pedestrian detection module configured to input each target cluster into a preset classification model to determine a pedestrian detection result of each target cluster, wherein the pedestrian detection result of each target cluster is used to reflect whether each target cluster is a pedestrian; The pedestrian detection module includes: a horizontal section feature determination unit configured to determine a plurality of horizontal section features of the any target cluster in a target direction for any target cluster; a pedestrian detection unit configured to input the plurality of horizontal section features of the any target cluster into a preset classification model to obtain the pedestrian detection result of the any target cluster.

8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Environmental perception method and system based on multi-radar data fusion

    CN112666535A