CN113076922B - Object detection method and device - Google Patents
Object detection method and device Download PDFInfo
- Publication number
- CN113076922B CN113076922B CN202110430291.8A CN202110430291A CN113076922B CN 113076922 B CN113076922 B CN 113076922B CN 202110430291 A CN202110430291 A CN 202110430291A CN 113076922 B CN113076922 B CN 113076922B
- Authority
- CN
- China
- Prior art keywords
- voxel
- point cloud
- target
- cloud cluster
- cluster
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 112
- 238000000034 method Methods 0.000 claims description 26
- 238000000605 extraction Methods 0.000 claims description 15
- 239000013598 vector Substances 0.000 claims description 12
- 238000012216 screening Methods 0.000 claims description 11
- 238000012549 training Methods 0.000 claims description 6
- 238000013528 artificial neural network Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000010276 construction Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 1
- 238000007635 classification algorithm Methods 0.000 description 1
- 238000007621 cluster analysis Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/64—Three-dimensional objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23211—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with adaptive number of clusters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/58—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/58—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
- G06V20/584—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Biomedical Technology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Biology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
The invention provides an object detection method and device, which are applied to the technical field of automobiles. After the target number of the detection objects included in the point cloud cluster is determined according to the voxels corresponding to the point cloud cluster, clustering the voxels corresponding to the point cloud cluster until the target number of the voxel clusters is obtained, so that the laser points in the same voxel cluster correspond to the same detection object.
Description
Technical Field
The invention belongs to the technical field of automobiles, and particularly relates to an object detection method and device.
Background
In the fields of assisted driving and intelligent driving, vehicle-mounted lidar is widely used as a main means for detecting obstacles around a vehicle. In each detection period, the vehicle-mounted laser radar feeds back a point cloud consisting of a plurality of laser points, and the vehicle-mounted controller completes detection of obstacles around the vehicle by analyzing the point cloud.
Specifically, after obtaining the point cloud fed back by the laser radar, the vehicle-mounted controller firstly performs cluster analysis on the laser radar to obtain one or more point cloud clusters, considers that one point cloud cluster corresponds to one object, and further classifies the obtained point cloud clusters by applying a point cloud classification algorithm to determine the class of the object corresponding to each point cloud cluster.
However, in practical applications, the running environment of the vehicle is extremely complex, the objects around the vehicle and the distance between the objects are continuously changed, and the existing object detection method often has the problems of under-clustering and over-clustering when identifying the objects, wherein under-clustering refers to identifying a large object, such as a truck, as two independent objects; by overclustering, two problems with smaller distances, such as pedestrians and cars, are identified as one object. Obviously, the detection accuracy of the existing object detection method is not high, and the safe running of the vehicle is affected.
Disclosure of Invention
In view of the above, the present invention aims to provide an object detection method and apparatus, which solve the problems of over-clustering and under-clustering existing in the prior art, improve the accuracy of object detection, and help to improve the travel safety, and specifically adopts the following scheme:
In a first aspect, the present invention provides an object detection method, including:
Acquiring point cloud to be processed;
Clustering the laser points in the point cloud to be processed by taking a first preset distance threshold as an upper limit value of the laser point distance to obtain at least one point cloud cluster;
the point cloud cluster comprises at least one detection object, and the first preset distance threshold is set based on the maximum distance possibly occurring between different parts of the same detection object;
Constructing a directed bounding box of the point cloud cluster, and dividing a space corresponding to the directed bounding box into a plurality of voxels with preset specifications;
Determining the target number of detection objects included in the point cloud cluster according to the voxels corresponding to the point cloud cluster;
and clustering voxels corresponding to the point cloud clusters until the target number of voxel clusters are obtained, so that laser points in the same voxel cluster correspond to the same detection object.
Optionally, the determining, according to the voxel corresponding to the point cloud cluster, the target number of the detection objects included in the point cloud cluster includes:
acquiring voxel characteristics of each voxel corresponding to the point cloud cluster, wherein the voxel characteristics are characterized by feature vectors with preset dimensions;
And determining the target number of detection objects included in the point cloud cluster according to the voxel characteristics of each voxel corresponding to the point cloud cluster.
Optionally, the acquiring the voxel characteristic of each voxel corresponding to the point cloud cluster includes:
Taking each voxel corresponding to the point cloud cluster as a target voxel;
Inputting laser points included in the target voxel into a pre-trained feature extraction model to obtain voxel features of the target voxel;
the feature extraction model is obtained by training a neural network by taking a laser point included in a voxel as an input and taking a feature vector of a preset dimension as an output.
Optionally, the determining, according to the voxel characteristics of each voxel corresponding to the point cloud cluster, the target number of the detection objects included in the point cloud cluster includes:
acquiring a voxel standard feature set comprising a plurality of voxel standard features;
For each voxel corresponding to the point cloud cluster, respectively calculating the Euclidean distance between the voxel characteristic of the voxel and each voxel standard characteristic;
Taking the voxel characteristic with the Euclidean distance smaller than a second preset distance threshold as a target voxel characteristic;
And determining the target number of detection objects included in the point cloud cluster according to the number of the target voxel characteristics.
Optionally, the voxel standard feature set includes a plurality of feature subsets;
the determining, according to the number of target voxel features, the target number of detection objects included in the point cloud cluster includes:
respectively counting the number of target voxel characteristics corresponding to the voxel standard characteristics in each characteristic subset;
For each feature subset, taking the maximum value in the number of target voxel features corresponding to each voxel standard feature in the feature subset as the number of detection objects corresponding to the feature subset;
And taking the sum of the numbers of the detection objects corresponding to the feature subsets as the target number of the detection objects included in the point cloud cluster.
Optionally, one of the feature subsets corresponds to an object type, and the method further includes:
And determining the object type corresponding to the detection object according to the feature subset of the voxel standard feature corresponding to the target voxel feature.
Optionally, the process of acquiring the voxel standard feature set includes:
acquiring a sample point cloud of a sample object;
constructing a directed bounding box of the sample point cloud;
dividing a space corresponding to the directed bounding box of the sample point cloud into a plurality of sample voxels with the preset specification;
respectively inputting laser points included in the sample voxels into the feature extraction model to obtain corresponding candidate voxel standard features;
And screening the voxel standard features meeting a preset screening rule from the candidate voxel standard features to obtain the voxel standard feature set.
Optionally, clustering the laser points in the point cloud to be processed by using the first preset distance threshold as an upper limit value of the laser point distance to obtain at least one point cloud cluster, including:
And executing the following operations until the point cloud cluster to which all the laser points in the point cloud to be processed belong is determined:
Constructing a target laser point initial point cloud cluster, wherein the target laser point is any one of laser points of which the point cloud cluster is not determined to belong to in the point cloud cluster to be processed;
calculating Euclidean distance between the target laser point and the laser points outside the initial cluster;
storing the laser points with the Euclidean distance smaller than a first preset distance threshold value to the initial point cloud cluster;
Sequentially taking the laser points stored in the initial cluster as target laser points;
And returning to the step of calculating the Euclidean distance between the target laser points and the laser points outside the initial cluster until the Euclidean distance between the laser points outside the initial cluster and any target laser point in the initial cluster is greater than or equal to the first preset distance threshold value, so as to obtain a final point cloud cluster.
In a second aspect, the present invention provides an object detection apparatus comprising:
the first acquisition unit is used for acquiring point clouds to be processed;
the first clustering unit is used for clustering the laser points in the point cloud to be processed by taking a first preset distance threshold as an upper limit value of the laser point distance to obtain at least one point cloud cluster;
the point cloud cluster comprises at least one detection object, and the first preset distance threshold is set based on the maximum distance possibly occurring between different parts of the same detection object;
The dividing unit is used for constructing a directed bounding box of the point cloud cluster and dividing a space corresponding to the directed bounding box into a plurality of voxels with preset specifications;
The quantity determining unit is used for determining the target quantity of detection objects included in the point cloud cluster according to the voxels corresponding to the point cloud cluster;
And the second clustering unit is used for clustering voxels corresponding to the point cloud clusters until the target number of voxel clusters are obtained, so that the laser points in the same voxel cluster correspond to the same detection object.
Optionally, the number determining unit is configured to determine, according to the voxel corresponding to the point cloud cluster, a target number of detection objects included in the point cloud cluster, where the determining unit specifically includes:
acquiring voxel characteristics of each voxel corresponding to the point cloud cluster, wherein the voxel characteristics are characterized by feature vectors with preset dimensions;
And determining the target number of detection objects included in the point cloud cluster according to the voxel characteristics of each voxel corresponding to the point cloud cluster.
According to the object detection method provided by the invention, after the point cloud to be processed is obtained, the point cloud to be processed is clustered twice, and in the process of obtaining the point cloud cluster by clustering for the first time, the first preset distance threshold is set based on the maximum distance which possibly occurs between different parts of the same detection object, so that the detection object with a larger appearance can be prevented from being divided into a plurality of individuals, the problem of under-clustering is solved, then, for each point cloud cluster, the second clustering is carried out based on the voxels, and on the premise that the target number of the detection objects included in each point cloud cluster is determined, the target number is used as the ending condition of the ending clustering process, so that each detection object in the point cloud cluster can be detected, and the problem of over-clustering is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an object detection method according to an embodiment of the present invention;
FIG. 2 is a block diagram of an object detection apparatus according to an embodiment of the present invention;
fig. 3 is a block diagram of another object detecting apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The object detection method provided by the invention is applied to the vehicle-mounted controller for assisting driving or automatic driving, which is arranged in the whole vehicle, and of course, the object detection method can be applied to other vehicle-mounted controllers which need to carry out object detection and identification based on laser point clouds fed back by a laser radar in the whole vehicle, and can also be applied to a server on a network side under certain conditions.
Referring to fig. 1, fig. 1 is a flowchart of an object detection method according to an embodiment of the present invention, where the flowchart of the object detection method according to the embodiment of the present invention may include:
S100, acquiring point cloud to be processed.
In practical application, the laser radar feeds back the point cloud according to a fixed sampling period, and the point cloud to be processed in the embodiment of the invention can be the point cloud directly fed back by the laser radar or the point cloud temporarily stored in the memory, and any point cloud needing object detection and identification can be used as the point cloud to be processed in the embodiment.
S110, clustering laser points in the point cloud to be processed by taking a first preset distance threshold as an upper limit value of the laser point distance to obtain at least one point cloud cluster.
In this embodiment, the first preset distance threshold is set based on a maximum distance that may occur between different portions of the same detection object. It can be seen by combining the definition of the first preset distance threshold, in different application scenarios, the selection of the first preset distance threshold is different, for example, in a high-speed automatic driving scenario, the objects are usually continuous rigid bodies, the distance between the objects is larger, and the first preset distance threshold can be set to 0.2 m-1.5 m; in a port closing park scenario, where the truck is typically bulky and the spacing between the truck components is large, the first preset distance threshold may be set to 0.5-3.0 meters.
Optionally, after obtaining the point cloud to be processed, the following operations may be performed until the point cloud clusters to which all the laser points in the point cloud to be processed belong are determined:
Constructing a target laser point initial point cloud cluster, wherein the target laser point is any one of laser points of which the point cloud cluster is not determined to belong to in the point cloud cluster to be processed;
calculating Euclidean distance between a target laser point and a laser point outside the initial cluster;
Storing the laser points with the Euclidean distance smaller than a first preset distance threshold value to an initial point cloud cluster;
sequentially taking the laser points stored in the initial cluster as target laser points;
And returning to the step of calculating the Euclidean distance between the target laser points and the laser points outside the initial cluster until the Euclidean distance between the laser points outside the initial cluster and any target laser point in the initial cluster is greater than or equal to a first preset distance threshold value, so as to obtain a final point cloud cluster.
Based on the above method for dividing the point cloud clusters, a more specific method for dividing the point cloud clusters is given below:
S1, a point cloud to be processed is represented by a point cloud set P (P0, …, pi, … pn), and a Kd tree is created for the point cloud to be processed, wherein n is the number of laser points included in the point cloud to be processed.
Further, a list Q and a list C are preset, initial point cloud clusters in the current clustering process are stored in the list Q, and final point cloud clusters obtained after the clustering is completed are stored in the list C.
According to the basic principle of the Kd tree, the Kd tree of the point cloud to be processed is constructed, so that the screening and judging times of each laser point in the point cloud cluster to be processed in the subsequent selection process can be effectively reduced, and the processing efficiency of the step on dividing the point cloud cluster is further effectively improved. The specific construction process of the Kd-tree can be realized by referring to the prior art, and the invention is not limited to the specific construction process.
S2, assuming that the initial states of all laser points in the point cloud to be processed are marked as unprocessed states, executing the following steps for each laser point pi in the point cloud set P:
S21, judging the mark state of pi, if the mark state is an unprocessed state, adding pi into the list Q, and continuing to execute S22; if the point cloud is in the processed state, skipping pi, and executing S21-S24 on the next point cloud;
S22, marking the state of pi as processed, searching m laser points nearest to pi by using a Kd tree neighbor method, calculating the distance between the m laser points and pi, and adding the laser points with the distance smaller than the first preset distance threshold and the marked state as unprocessed into a list Q; if the distance is greater than a first preset distance threshold or the marking state is processed, skipping the laser point without any processing;
S23, returning to S22 for each unprocessed point in the list Q until each laser point in the list Q is marked as processed;
S24, if the number of laser points in the list Q is between [ A, B ], taking the current point cloud cluster in the list Q as the finally divided point cloud cluster, and storing the point cloud cluster into the list C. The list Q is set to an empty set for the next operation.
Wherein A represents the minimum laser point number corresponding to the object in the point cloud, and B represents the maximum laser point number corresponding to the object in the point cloud. In practical application, the values of a and B need to be selected in combination with specific application scenarios.
S3, when the states of all laser points in the point cloud to be processed are processed, the algorithm is terminated.
Based on the above, the present step is the first clustering process of the point cloud to be processed, and the general principle in the processing process is to ensure that the same object is not divided into two point cloud clusters, through this step, one or more point cloud clusters can be obtained, and each point cloud cluster includes at least one detection object.
It should be noted in advance that, through the processing of this step, the point cloud to be processed may be divided into a plurality of point cloud clusters, and based on this, the processing steps in the subsequent steps S120 to S140 are required to be performed for each point cloud cluster, that is, the steps S120 to S140 are performed for each point cloud cluster, and this will not be described separately in the subsequent contents.
S120, constructing a directed bounding box of the point cloud cluster, and dividing a space corresponding to the directed bounding box into a plurality of voxels with preset specifications.
After the point cloud clusters are obtained through dividing in the steps, a directional bounding box of the point cloud clusters is constructed, and then the space corresponding to the obtained directional bounding box is divided according to the preset specification, so that a plurality of voxels with the preset specification can be finally obtained.
It should be noted that, the construction of the directed bounding box for the point cloud cluster and the division of the voxels may be implemented with reference to the prior art, which is not limited by the present invention. As for the preset specification, the data processing capability of the controller and the accuracy requirement of object detection can be combined for flexible selection.
S130, determining the target number of detection objects included in the point cloud cluster according to voxels corresponding to the point cloud cluster.
In order to determine the specific number of detection objects included in each point cloud cluster, the detection method provided by the embodiment of the invention presets a voxel standard feature set, wherein the voxel standard feature set comprises a plurality of voxel standard features, and the number of detection objects included in each point cloud cluster is determined based on the voxel standard features.
Next, the process of acquiring the voxel standard feature set is described:
First, a sample point cloud of a sample object is acquired. The sample object mentioned in this embodiment refers to a known already marked sample object. In actual operation, real objects such as trucks, cars, human bodies and the like can be used as sample objects, and then sample point clouds of the sample objects fed back by the laser radar are obtained. It is conceivable that, since the object detected by the lidar is known, it is clearly known what sample object is specifically included in the obtained sample point cloud, and specifically includes several sample objects.
After the sample point cloud is obtained, a directional bounding box of the sample point cloud can be constructed, and a space corresponding to the directional bounding box of the sample point cloud is divided into a plurality of sample voxels with the preset specification. It should be noted that, in practical application, the preset specification according to which the voxels are divided should be consistent with the preset specification according to which the voxel standard features are set, so as to ensure the validity of the voxel standard features.
And then, respectively inputting the laser points included in each sample voxel into a preset feature extraction model to obtain corresponding candidate voxel standard features. The feature extraction model provided by the embodiment of the invention is obtained by training a neural network by taking a laser point included in a voxel as input and taking a feature vector of a preset dimension as output. As for the specific training process of the feature extraction model, it can be realized with reference to the prior art, and the present invention is not limited thereto.
Since feature vectors of sample objects of the same category in the same part are often very similar, after candidate voxel standard features of the sample objects are obtained, voxel standard features meeting preset screening rules need to be screened from all the candidate voxel standard features, and a set formed by the voxel features obtained after screening is the voxel standard feature set. Because the voxel standard feature set occupies a certain storage space, for the setting of the preset screening rule, the set of the preset screening rule can be selected according to parameters such as the storage space of the vehicle-mounted memory and the computing capability of the controller, for example, the number of voxel standard features can be limited, and the value taking mode of the similar voxel standard features can be limited.
Optionally, based on the voxel standard feature set provided above, each voxel of each point cloud cluster corresponding to the point cloud to be processed is first used as a target voxel, and the laser points included in the target voxel are input into the pre-trained feature extraction model described in the foregoing to obtain the voxel feature of each target voxel, that is, the feature vector of the preset dimension.
Then, the target number of detection objects included in the point cloud cluster is determined according to the voxel characteristics of each voxel corresponding to the point cloud cluster. Specifically, for each voxel corresponding to the point cloud cluster, respectively calculating the Euclidean distance between the voxel characteristic of the voxel and the standard characteristic of each voxel, and taking the voxel characteristic with the Euclidean distance smaller than a second preset distance threshold as a target voxel characteristic. The specific calculation formula of the Euclidean distance is as follows:
wherein d represents the Euclidean distance between the voxel feature and the voxel standard feature;
ei represents the ith voxel feature;
Vj represents the jth voxel standard feature;
L represents the length of a feature, e.g., the feature length is 128, and then this feature is represented by a sequence of 128 numbers;
eik denotes the kth element value of the ei feature;
Vjk denotes the kth element value of the Vj standard feature.
After the target voxel characteristics included in each point cloud cluster are determined, the target number of the detection objects included in the corresponding point cloud cluster can be determined according to the number of the target voxel characteristics in each point cloud cluster.
In particular, in the process of constructing the voxel standard feature set, different types of sample objects are selected, so that the voxel standard feature set can be further divided into a plurality of feature subsets according to different types of sample objects, and each feature subset corresponds to one object type. Based on the feature, the number of target voxel features corresponding to each voxel standard feature in each feature subset is counted; and regarding each feature subset, taking the maximum value in the number of target voxel features corresponding to each voxel standard feature in the feature subset as the number of detection objects corresponding to the feature subset.
Then, the sum of the numbers of detection objects corresponding to the feature subsets is used as the target number of detection objects included in the point cloud cluster.
And S140, clustering voxels corresponding to the point cloud clusters until a target number of voxel clusters are obtained, so that laser points in the same voxel cluster correspond to the same detection object.
After the target number of the detection objects included in the point cloud cluster is determined, the voxels corresponding to the point cloud cluster can be clustered until the target number of the voxel clusters is obtained, so that the laser points in the same voxel cluster correspond to the same detection object.
Through the step, the distinction of a plurality of detection objects in the point cloud cluster can be finally realized, and the problem of under-clustering in the prior art is solved.
It should be noted that, the process of clustering the voxels of the point cloud cluster may be implemented by referring to a clustering method in the prior art, which will not be described in detail herein.
In summary, in the object detection method provided by the embodiment of the invention, after the point cloud to be processed is obtained, the point cloud to be processed is clustered twice, and in the process of obtaining the point cloud cluster by clustering for the first time, the first preset distance threshold is set based on the maximum distance which may occur between different parts of the same detection object, so that the detection object with a larger appearance can be prevented from being divided into a plurality of individuals, the problem of under-clustering is solved, then, for each point cloud cluster, the second clustering is performed based on the voxels, and on the premise that the target number of the detection objects included in each point cloud cluster is determined, the target number is used as the ending condition of the ending clustering process, so that each detection object in the point cloud cluster can be detected, and the problem of over-clustering is solved.
Further, as mentioned above, each feature subset in the voxel standard feature set corresponds to an object class, while determining the target number of the detected objects included in the point cloud cluster in the foregoing step, the object type corresponding to the detected objects may be determined according to the feature subset to which the voxel standard feature corresponding to the target voxel feature belongs, for example, specifically determining whether the detected object is a vehicle or a pedestrian, etc.
The following describes an object detection apparatus provided in the embodiment of the present invention, where the object detection apparatus described below may be regarded as a functional module architecture to be set in a central device for implementing the object detection method provided in the embodiment of the present invention; the following description may be referred to with respect to the above.
Optionally, referring to fig. 2, fig. 2 is a block diagram of an object detection device according to an embodiment of the present invention, where the object detection device provided in the embodiment includes:
a first acquiring unit 10, configured to acquire a point cloud to be processed;
The first clustering unit 20 is configured to cluster the laser points in the point cloud to be processed by using the first preset distance threshold as an upper limit value of the laser point distance, so as to obtain at least one point cloud cluster;
The point cloud cluster comprises at least one detection object, and the first preset distance threshold is set based on the maximum distance which possibly occurs between different parts of the same detection object;
The dividing unit 30 is configured to construct a directed bounding box of the point cloud cluster, and divide a space corresponding to the directed bounding box into a plurality of voxels with preset specifications;
A number determining unit 40, configured to determine, according to voxels corresponding to the point cloud clusters, a target number of detection objects included in the point cloud clusters;
and the second clustering unit 50 is configured to cluster voxels corresponding to the point cloud clusters until a target number of voxel clusters are obtained, so that laser points in the same voxel cluster correspond to the same detection object.
Optionally, the number determining unit 40 is configured to determine, according to the voxels corresponding to the point cloud clusters, the target number of the detection objects included in the point cloud clusters, specifically including:
Acquiring voxel characteristics of each voxel corresponding to the point cloud cluster, wherein the voxel characteristics are represented by feature vectors of preset dimensions;
and determining the target number of the detection objects included in the point cloud cluster according to the voxel characteristics of each voxel corresponding to the point cloud cluster.
Optionally, the number determining unit 40 is configured to obtain voxel characteristics of each voxel corresponding to the point cloud cluster, and specifically includes:
taking each voxel corresponding to the point cloud cluster as a target voxel;
Inputting laser points included in the target voxel into a pre-trained feature extraction model to obtain the voxel feature of the target voxel;
The feature extraction model is obtained by taking a laser point included in a voxel as input, taking a feature vector of a preset dimension as output and training a neural network.
Optionally, the number determining unit 40 is configured to determine, according to voxel characteristics of each voxel corresponding to the point cloud cluster, a target number of detection objects included in the point cloud cluster, and specifically includes:
acquiring a voxel standard feature set comprising a plurality of voxel standard features;
For each voxel corresponding to the point cloud cluster, respectively calculating Euclidean distance between the voxel characteristic of the voxel and the standard characteristic of each voxel;
Taking the voxel characteristic with the Euclidean distance smaller than a second preset distance threshold as a target voxel characteristic;
and determining the target number of the detection objects included in the point cloud cluster according to the number of the target voxel characteristics.
Optionally, the voxel standard feature set comprises a plurality of feature subsets;
The number determining unit 40 is configured to determine, according to the number of target voxel features, the target number of detection objects included in the point cloud cluster, and specifically includes:
respectively counting the number of target voxel characteristics corresponding to each voxel standard characteristic in each characteristic subset;
for each feature subset, taking the maximum value in the number of target voxel features corresponding to each voxel standard feature in the feature subset as the number of detection objects corresponding to the feature subset;
and taking the sum of the numbers of the detection objects corresponding to the feature subsets as the target number of the detection objects included in the point cloud cluster.
Optionally, the number determining unit 40 is configured to acquire the voxel standard feature set, and specifically includes:
acquiring a sample point cloud of a sample object;
constructing a directed bounding box of the sample point cloud;
Dividing a space corresponding to the directed bounding box of the sample point cloud into a plurality of sample voxels with preset specifications;
inputting laser points included in the sample voxels into a feature extraction model to obtain corresponding candidate voxel standard features;
And screening the voxel standard features meeting the preset screening rule from the candidate voxel standard features to obtain a voxel standard feature set.
Optionally, the first clustering unit 20 is configured to cluster the laser points in the point cloud to be processed with a first preset distance threshold as an upper limit value of the laser point distance, so as to obtain at least one point cloud cluster, and specifically includes:
the following operations are executed until the point cloud clusters to which all laser points in the point cloud to be processed belong are determined:
Constructing a target laser point initial point cloud cluster, wherein the target laser point is any one of laser points of which the point cloud cluster is not determined to belong to in the point cloud cluster to be processed;
calculating Euclidean distance between a target laser point and a laser point outside the initial cluster;
Storing the laser points with the Euclidean distance smaller than a first preset distance threshold value to an initial point cloud cluster;
sequentially taking the laser points stored in the initial cluster as target laser points;
And returning to the step of calculating the Euclidean distance between the target laser points and the laser points outside the initial cluster until the Euclidean distance between the laser points outside the initial cluster and any target laser point in the initial cluster is greater than or equal to a first preset distance threshold value, so as to obtain a final point cloud cluster.
Optionally, a feature subset corresponds to an object type, and referring to fig. 3, fig. 3 is a block diagram of another object detection device according to an embodiment of the present invention, and further includes, on the basis of the embodiment shown in fig. 2:
the type determining unit 60 is configured to determine an object type corresponding to the detected object according to the feature subset to which the voxel standard feature corresponding to the target voxel feature belongs.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (6)
1. An object detection method, comprising:
Acquiring point cloud to be processed;
Clustering the laser points in the point cloud to be processed by taking a first preset distance threshold as an upper limit value of the laser point distance to obtain at least one point cloud cluster;
the point cloud cluster comprises at least one detection object, and the first preset distance threshold is set based on the maximum distance possibly occurring between different parts of the same detection object;
Constructing a directed bounding box of the point cloud cluster, and dividing a space corresponding to the directed bounding box into a plurality of voxels with preset specifications;
Determining the target number of detection objects included in the point cloud cluster according to the voxels corresponding to the point cloud cluster;
Clustering voxels corresponding to the point cloud clusters until the target number of voxel clusters are obtained, so that laser points in the same voxel cluster correspond to the same detection object;
The determining, according to the voxels corresponding to the point cloud clusters, the target number of the detection objects included in the point cloud clusters includes:
acquiring voxel characteristics of each voxel corresponding to the point cloud cluster, wherein the voxel characteristics are characterized by feature vectors with preset dimensions;
Determining the target number of detection objects included in the point cloud cluster according to the voxel characteristics of each voxel corresponding to the point cloud cluster;
the obtaining the voxel characteristics of each voxel corresponding to the point cloud cluster includes:
Taking each voxel corresponding to the point cloud cluster as a target voxel;
Inputting laser points included in the target voxel into a pre-trained feature extraction model to obtain voxel features of the target voxel;
the feature extraction model is obtained by training a neural network by taking a laser point included in a voxel as input and taking a feature vector of a preset dimension as output;
The determining, according to the voxel characteristics of each voxel corresponding to the point cloud cluster, the target number of detection objects included in the point cloud cluster includes:
acquiring a voxel standard feature set comprising a plurality of voxel standard features;
For each voxel corresponding to the point cloud cluster, respectively calculating the Euclidean distance between the voxel characteristic of the voxel and each voxel standard characteristic;
Taking the voxel characteristic with the Euclidean distance smaller than a second preset distance threshold as a target voxel characteristic;
And determining the target number of detection objects included in the point cloud cluster according to the number of the target voxel characteristics.
2. The object detection method of claim 1, wherein the voxel standard feature set comprises a plurality of feature subsets;
the determining, according to the number of target voxel features, the target number of detection objects included in the point cloud cluster includes:
respectively counting the number of target voxel characteristics corresponding to the voxel standard characteristics in each characteristic subset;
For each feature subset, taking the maximum value in the number of target voxel features corresponding to each voxel standard feature in the feature subset as the number of detection objects corresponding to the feature subset;
And taking the sum of the numbers of the detection objects corresponding to the feature subsets as the target number of the detection objects included in the point cloud cluster.
3. The object detection method of claim 2, wherein one of the feature subsets corresponds to an object type, the method further comprising:
And determining the object type corresponding to the detection object according to the feature subset of the voxel standard feature corresponding to the target voxel feature.
4. The object detection method of claim 3, wherein the process of obtaining the voxel standard feature set comprises:
acquiring a sample point cloud of a sample object;
constructing a directed bounding box of the sample point cloud;
dividing a space corresponding to the directed bounding box of the sample point cloud into a plurality of sample voxels with the preset specification;
Inputting the laser points included in the sample voxels into a feature extraction model to obtain corresponding candidate voxel standard features;
And screening the voxel standard features meeting a preset screening rule from the candidate voxel standard features to obtain the voxel standard feature set.
5. The method for detecting an object according to claim 4, wherein clustering the laser points in the point cloud to be processed with the first preset distance threshold as an upper limit value of the laser point pitch to obtain at least one point cloud cluster comprises:
And executing the following operations until the point cloud cluster to which all the laser points in the point cloud to be processed belong is determined:
Constructing a target laser point initial point cloud cluster, wherein the target laser point is any one of laser points of which the point cloud cluster is not determined to belong to in the point cloud cluster to be processed;
calculating Euclidean distance between the target laser point and the laser points outside the initial cluster;
storing the laser points with the Euclidean distance smaller than a first preset distance threshold value to the initial point cloud cluster;
Sequentially taking the laser points stored in the initial cluster as target laser points;
And returning to the step of calculating the Euclidean distance between the target laser points and the laser points outside the initial cluster until the Euclidean distance between the laser points outside the initial cluster and any target laser point in the initial cluster is greater than or equal to the first preset distance threshold value, so as to obtain a final point cloud cluster.
6. An object detection device, characterized by comprising:
the first acquisition unit is used for acquiring point clouds to be processed;
the first clustering unit is used for clustering the laser points in the point cloud to be processed by taking a first preset distance threshold as an upper limit value of the laser point distance to obtain at least one point cloud cluster;
the point cloud cluster comprises at least one detection object, and the first preset distance threshold is set based on the maximum distance possibly occurring between different parts of the same detection object;
The dividing unit is used for constructing a directed bounding box of the point cloud cluster and dividing a space corresponding to the directed bounding box into a plurality of voxels with preset specifications;
The quantity determining unit is used for determining the target quantity of detection objects included in the point cloud cluster according to the voxels corresponding to the point cloud cluster;
The second clustering unit is used for clustering voxels corresponding to the point cloud clusters until the target number of voxel clusters are obtained, so that the laser points in the same voxel cluster correspond to the same detection object;
the number determining unit is configured to determine, according to voxels corresponding to the point cloud cluster, a target number of detection objects included in the point cloud cluster, where the number determining unit specifically includes:
acquiring voxel characteristics of each voxel corresponding to the point cloud cluster, wherein the voxel characteristics are characterized by feature vectors with preset dimensions;
Determining the target number of detection objects included in the point cloud cluster according to the voxel characteristics of each voxel corresponding to the point cloud cluster;
the step of obtaining voxel characteristics of each voxel corresponding to the point cloud cluster specifically includes:
Taking each voxel corresponding to the point cloud cluster as a target voxel;
Inputting laser points included in the target voxel into a pre-trained feature extraction model to obtain voxel features of the target voxel;
the feature extraction model is obtained by training a neural network by taking a laser point included in a voxel as input and taking a feature vector of a preset dimension as output;
The determining, according to the voxel characteristics of each voxel corresponding to the point cloud cluster, the target number of detection objects included in the point cloud cluster specifically includes:
acquiring a voxel standard feature set comprising a plurality of voxel standard features;
For each voxel corresponding to the point cloud cluster, respectively calculating the Euclidean distance between the voxel characteristic of the voxel and each voxel standard characteristic;
Taking the voxel characteristic with the Euclidean distance smaller than a second preset distance threshold as a target voxel characteristic;
And determining the target number of detection objects included in the point cloud cluster according to the number of the target voxel characteristics.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110430291.8A CN113076922B (en) | 2021-04-21 | 2021-04-21 | Object detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110430291.8A CN113076922B (en) | 2021-04-21 | 2021-04-21 | Object detection method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113076922A CN113076922A (en) | 2021-07-06 |
CN113076922B true CN113076922B (en) | 2024-05-10 |
Family
ID=76618274
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110430291.8A Active CN113076922B (en) | 2021-04-21 | 2021-04-21 | Object detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113076922B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113447928B (en) * | 2021-08-30 | 2022-01-21 | 广东电网有限责任公司湛江供电局 | False alarm rate reduction target identification method and system based on synthetic aperture radar |
CN113781639B (en) * | 2021-09-22 | 2023-11-28 | 交通运输部公路科学研究所 | Quick construction method for digital model of large-scene road infrastructure |
CN114332795A (en) * | 2021-12-23 | 2022-04-12 | 北京经纬恒润科技股份有限公司 | Laser radar target identification method and device and electronic equipment |
CN114724109A (en) * | 2022-04-06 | 2022-07-08 | 深兰人工智能(深圳)有限公司 | Target detection method, device, equipment and storage medium |
CN115453545A (en) * | 2022-09-28 | 2022-12-09 | 北京京东乾石科技有限公司 | Target object detection method, apparatus, mobile device and storage medium |
CN116520289B (en) * | 2023-07-04 | 2023-09-01 | 东莞市新通电子设备有限公司 | Intelligent control method and related device for hardware machining process |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105184852A (en) * | 2015-08-04 | 2015-12-23 | 百度在线网络技术(北京)有限公司 | Laser-point-cloud-based urban road identification method and apparatus |
CN108717540A (en) * | 2018-08-03 | 2018-10-30 | 浙江梧斯源通信科技股份有限公司 | The method and device of pedestrian and vehicle are distinguished based on 2D laser radars |
CN111289998A (en) * | 2020-02-05 | 2020-06-16 | 北京汽车集团有限公司 | Obstacle detection method, obstacle detection device, storage medium, and vehicle |
WO2021046716A1 (en) * | 2019-09-10 | 2021-03-18 | 深圳市大疆创新科技有限公司 | Method, system and device for detecting target object and storage medium |
CN112528781A (en) * | 2020-11-30 | 2021-03-19 | 广州文远知行科技有限公司 | Obstacle detection method, device, equipment and computer readable storage medium |
WO2021056499A1 (en) * | 2019-09-29 | 2021-04-01 | 深圳市大疆创新科技有限公司 | Data processing method and device, and movable platform |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9110163B2 (en) * | 2013-06-14 | 2015-08-18 | Microsoft Technology Licensing, Llc | Lidar-based classification of object movement |
-
2021
- 2021-04-21 CN CN202110430291.8A patent/CN113076922B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105184852A (en) * | 2015-08-04 | 2015-12-23 | 百度在线网络技术(北京)有限公司 | Laser-point-cloud-based urban road identification method and apparatus |
CN108717540A (en) * | 2018-08-03 | 2018-10-30 | 浙江梧斯源通信科技股份有限公司 | The method and device of pedestrian and vehicle are distinguished based on 2D laser radars |
WO2021046716A1 (en) * | 2019-09-10 | 2021-03-18 | 深圳市大疆创新科技有限公司 | Method, system and device for detecting target object and storage medium |
WO2021056499A1 (en) * | 2019-09-29 | 2021-04-01 | 深圳市大疆创新科技有限公司 | Data processing method and device, and movable platform |
CN111289998A (en) * | 2020-02-05 | 2020-06-16 | 北京汽车集团有限公司 | Obstacle detection method, obstacle detection device, storage medium, and vehicle |
CN112528781A (en) * | 2020-11-30 | 2021-03-19 | 广州文远知行科技有限公司 | Obstacle detection method, device, equipment and computer readable storage medium |
Non-Patent Citations (2)
Title |
---|
基于VG-DBSCAN算法的大场景散乱点云去噪;赵凯;徐友春;李永乐;王任栋;;光学学报(10);全文 * |
基于标记的多状态离群点去除算法;陈逍遥;任小玲;夏邢;史政坤;;国外电子测量技术(01);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113076922A (en) | 2021-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113076922B (en) | Object detection method and device | |
Chen et al. | Pointlanenet: Efficient end-to-end cnns for accurate real-time lane detection | |
CN109087510B (en) | Traffic monitoring method and device | |
CN109932730B (en) | Laser radar target detection method based on multi-scale monopole three-dimensional detection network | |
CN114022847A (en) | Intelligent agent trajectory prediction method, system, equipment and storage medium | |
CN105354273A (en) | Method for fast retrieving high-similarity image of highway fee evasion vehicle | |
CN109658442B (en) | Multi-target tracking method, device, equipment and computer readable storage medium | |
CN112200231A (en) | Dangerous goods vehicle identification method, system, device and medium | |
CN109034024B (en) | Logistics vehicle type classification and identification method based on image target detection | |
CN101710422B (en) | Image segmentation method based on overall manifold prototype clustering algorithm and watershed algorithm | |
CN112434566B (en) | Passenger flow statistics method and device, electronic equipment and storage medium | |
CN113255444A (en) | Training method of image recognition model, image recognition method and device | |
CN114581761A (en) | Remote sensing image recognition method, device, equipment and computer readable storage medium | |
CN114241448A (en) | Method and device for obtaining heading angle of obstacle, electronic equipment and vehicle | |
CN113900101A (en) | Obstacle detection method and device and electronic equipment | |
CN115083199A (en) | Parking space information determination method and related equipment thereof | |
CN112163521A (en) | Vehicle driving behavior identification method, device and equipment | |
CN111091140A (en) | Object classification method and device and readable storage medium | |
CN111338336B (en) | Automatic driving method and device | |
CN116184344A (en) | Self-adaptive vehicle-mounted millimeter wave radar DBSCAN clustering method and device | |
Rajavarshini et al. | Comparative analysis of image processing techniques for obstacle avoidance and path deduction | |
Baghdadi et al. | View-independent vehicle category classification system | |
CN117991250B (en) | Mobile robot positioning detection method, system, equipment and medium | |
US20240046625A1 (en) | De-biasing datasets for machine learning | |
CN113936255B (en) | Intersection multi-steering vehicle counting method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |