Vehicle re-identification method based on laser radar
Through the vehicle re-identification method based on lidar, we use lidar data and graph convolution network to construct a point cloud completion model and loss function, which solves the problem of inaccurate identification of vehicle re-identification in complex scenes in the existing technology, and achieves It achieves all-round capture and accurate identification of vehicle shapes and structures.
Patent Information
- Application Number
- CN202410561935.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-08-23
AI Technical Summary
Existing camera-based vehicle re-identification methods have the problem of inaccurate recognition in poor lighting conditions or complex scenes. Affected by lighting and background environment, it is difficult to capture vehicle changes in multiple viewing angles and incomplete feature information.
A vehicle re-identification method based on LiDAR is used to obtain point cloud data from multiple perspectives through LiDAR data collection, build a point cloud completion model, combine with graph convolution network to extract local and global features of the vehicle, and construct classification and measurement losses. function to optimize the model for accurate recognition.
It achieves all-round capture of vehicle shape and structure, improves data quality and recognition accuracy, reduces errors, enhances vehicle recognition capabilities, and can accurately identify the location and distance of vehicles in complex scenes.
Smart Images

Figure CN118537814A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a vehicle re-identification method based on laser radar. Background Art
[0002] In recent years, with the development of urban areas, the population has continued to increase, the number of cars has continued to increase, the traffic flow has continued to increase, and the complexity of traffic has continued to increase. At the same time, with the development of software and hardware technology and algorithms, by installing camera-based monitoring equipment at various traffic locations such as roadsides, intersections, and highways, the collection of traffic data from video images can provide data information support for the analysis of traffic scenes, which plays an important role in improving the accuracy of traffic scene analysis.
[0003] Among them, vehicle ReID, or vehicle re-identification task, has important applications. Vehicle Re-identification refers to the technology of finding the specified vehicle in images taken by different cameras given an image of a vehicle. This plays an important role in applications such as vehicle tracking, vehicle behavior judgment, suspicious vehicle search, and vehicle automatic parking fee management in traffic scenarios.
[0004] However, current vehicle ReID methods mainly use cameras as sensors to find the same target vehicle in videos or images captured by different cameras. However, camera-based ReID methods still have some limitations in poor lighting conditions or complex scenes. Affected by lighting, background environment, etc., camera-based ReID methods are limited and it is not easy to capture the changes of vehicles in multiple perspectives. In addition, the feature information under a single perspective is easily incomplete, resulting in the inability to accurately identify the vehicle ReID. Summary of the invention
[0005] The embodiment of the present application provides a vehicle re-identification method based on laser radar, which solves the problem of target vehicle feature changes caused by different viewing angles and incomplete feature information caused by a single viewing angle in the prior art, thereby achieving accurate vehicle ReID recognition.
[0006] The present application provides a laser radar-based vehicle re-identification method, including:
[0007] Step 1: Install the LiDAR data collection equipment at different traffic locations, obtain the laser point cloud data, and perform vehicle ReID data annotation;
[0008] Step 2: Obtain laser point cloud data from multiple perspectives by using modeling and simulation technology;
[0009] Step 3: Build a point cloud completion model based on laser point cloud data from multiple perspectives;
[0010] Step 4: Use the point cloud completion model as input data to build a vehicle ReID model;
[0011] Step 5: Based on the constructed vehicle ReID model, construct a loss function, and perform model iteration and optimization.
[0012] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0013] By collecting vehicle point cloud data from different traffic positions and angles, we can capture the vehicle's shape, structure and details in all directions, providing a rich data foundation for subsequent vehicle identification.
[0014] By targeting possible occlusions or data missing in point cloud data, a point cloud completion model was constructed to achieve automatic completion and recovery of incomplete point cloud data, improve the quality and integrity of the data, and reduce errors for subsequent recognition.
[0015] By using graph convolutional networks to process and analyze point cloud data, key local and global features are effectively extracted from complex point cloud data, the expression and discrimination capabilities of features are enhanced, and core technical support is provided for accurate vehicle identification.
[0016] By constructing a classification loss function and a metric loss function for vehicle ReID recognition, the position and relative distance of the vehicle can be accurately identified when judging the distance of the vehicle, making the vehicle features more compact, thereby enhancing the recognition ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The present invention is a flow chart of a laser radar-based vehicle re-identification method. DETAILED DESCRIPTION
[0018] To facilitate the understanding of the present invention, the present application will be described more comprehensively below with reference to the relevant drawings; the drawings show preferred embodiments of the present invention, but the present invention can be implemented in many different forms and is not limited to the embodiments described herein; on the contrary, the purpose of providing these embodiments is to enable a more thorough and comprehensive understanding of the disclosed content of the present invention.
[0019] It should be noted that the terms “vertical”, “horizontal”, “up”, “down”, “left”, “right” and similar expressions used in this document are only for illustrative purposes and do not represent the only implementation method.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs; the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the term "and / or" used herein includes any and all combinations of one or more related listed items.
[0021] In order to improve the accuracy of vehicle re-identification and reduce the influence of light and complex background, the present invention first obtains the vehicle ReID data set through the lidar point cloud, and uses the deep learning model to learn the three-dimensional features of the vehicle, so as to reduce the changes in target vehicle features caused by different viewing angles and the problem of incomplete feature information caused by a single viewing angle; not only that, the dynamic and static features of the target vehicle are also obtained to accurately identify the vehicle ReID; for example, a graph convolutional neural network is used to extract static features, and a time fusion model is constructed to extract the dynamic features of the vehicle (such as opening and closing vehicle doors, opening the trunk, etc.).
[0022] Embodiment 1
[0023] like Figure 1 As shown, the present application provides a vehicle re-identification method based on laser radar, comprising:
[0024] Step 1: Install the LiDAR data collection equipment at different traffic locations, obtain the laser point cloud data, and perform vehicle ReID data annotation.
[0025] Preferably, the different traffic locations include major urban roads, intersections, roadside parking areas, expressways, and entrances of key areas such as schools and hospitals, and dynamic and static data of vehicles at different traffic locations are obtained.
[0026] Preferably, the laser point cloud data includes obtaining three-dimensional information of vehicles and pedestrians in different traffic positions and generating three-dimensional stereo frames of vehicles and pedestrians.
[0027] Using lidar to obtain three-dimensional information of vehicles, pedestrians and other targets in roadside parking scenarios and generate three-dimensional stereo frames of vehicles, pedestrians and other targets can more accurately determine the distribution, location and corresponding parking conditions of vehicles in different scenarios, so as to subsequently identify vehicles in complex scenarios.
[0028] Preferably, in combination with the geographical environment of different traffic locations, the lidar equipment can be installed using a high pole to obtain more comprehensive three-dimensional information and scene information.
[0029] Preferably, after acquiring the lidar point cloud data, the vehicle ReID is annotated using a preset standard.
[0030] In order to make the vehicle information and vehicle information expression of the current scene more comprehensive, when processing the laser point cloud data, a simulation model is constructed to accurately reconstruct the parking space so that the vehicle posture and scene information can be fully displayed.
[0031] Step 2: Obtain laser point cloud data from multiple perspectives by using modeling and simulation technology.
[0032] The roadside parking scene is modeled based on the simulation modeling technology to simulate the vehicle image of the roadside parking scene based on the lidar, and generate complete point cloud data of the same vehicle based on multiple perspectives; specifically, the modeling simulation technology includes but is not limited to modeling the roadside parking scene based on game engines such as Unity and Unreal, using simulation software such as Carla and Arisim to obtain virtual roadside parking lot scenic spot cloud data.
[0033] In this step, modeling and simulation technology is used to obtain laser point cloud data from multiple perspectives, and based on this data, the three-dimensional information of the parking lot presented in the current parking scene is determined to identify the coordinates and position related to the vehicle.
[0034] Step 3: Build a point cloud completion model based on laser point cloud data from multiple perspectives.
[0035] After acquiring laser point cloud data from multiple perspectives, the laser point cloud data from multiple perspectives are completed to obtain complete point cloud data of the vehicle in three-dimensional space, and then the vehicle ReID is performed based on the completed data.
[0036] The point cloud completion model adopts a commonly used completion network PCN (Point completion network) and a learning-based shape completion method to generate a dense and complete point cloud in a coarse-to-fine manner.
[0037] Generally speaking, PCN consists of two parts: an encoder and a decoder; the encoder input is the collected point cloud data X, and the output is a k-dimensional feature vector; the decoder input is a k-dimensional feature vector, outputs a rough point cloud representation, and then refines it to obtain a detailed and complete point cloud representation; the entire network is trained by constructing a loss function and using the back propagation algorithm; the encoder consists of two stacked PointNet layers, and the decoder consists of multiple fully connected layers.
[0038] In this step, based on the laser point cloud data obtained from multiple visuals, the laser point cloud data is taken as input, and the completion network PCN is used to divide the input laser point cloud data into k-dimensional feature vectors, and each point feature is compared with the global feature to obtain more comprehensive details and scene information.
[0039] Step 4: Use the point cloud completion model as input data to build a vehicle ReID model.
[0040] The vehicle ReID model includes a backbone network module based on graph convolution, a complementary feature extraction module, and a time fusion module.
[0041] The backbone network module based on graph convolution is used to extract local and global features of laser point cloud data, cluster the extracted local and global features according to preset rules, generate a graph network, and update the graph network according to the feature similarity between nodes.
[0042] For the acquired laser point cloud data, a graph network G(V,E) is created by using the KNN (K nearest neighbor) algorithm, where V represents the nodes in the graph network, E represents the edges, and the length of E is determined by the distance between the nodes; then, the feature similarity between points in each layer of the feature space of the graph network is used to update the graph.
[0043] Preferably, when updating the graph network, the similarity of adjacent nodes of each node in the current feature space is judged, and judging the feature similarity of the nodes further includes:
[0044] Get the common neighbor coefficient corresponding to the node. The common neighbor coefficient is the Adamic-Adar coefficient, which is used to measure the similarity between two nodes in the converted graph network. When considering the common nodes between different nodes, the common neighbor coefficient gives higher weight to common neighbors with small degrees.
[0045] Based on the obtained common neighbor coefficients, the similarity between nodes is determined.
[0046] Specifically, the method for obtaining the common neighbor coefficient is:
[0047]
[0048] Among them, AA(u, v) represents the common neighbor coefficient between node u and node v, N(u) represents the set of neighbor nodes of node u, N(v) represents the set of neighbor nodes of node v, ω represents the set of common neighbor nodes between node u and node v, and d(ω) is the degree of node ω, which represents the number of edges directly connected to node ω.
[0049] In order to make the current common neighbor coefficients able to express the status of the current scene, the common neighbor coefficients are sorted in order from large to small, and the sorted graph network is output.
[0050] Preferably, the implementation method of the backbone network based on graph convolution also includes: converting the m input points into an m×3 matrix P, where each row is an input point p i = (x, y, z) 3D coordinates, and determine each input point p i The eigenvector f i , and determine the features of the adjacent points of each input point, perform feature splicing on the input point and the adjacent points, and determine the splicing features after splicing.
[0051] In order to integrate the differences between the global shape features of the point cloud and the local point cloud features, the implementation formula of feature splicing is expressed as:
[0052] f ij =[f i ,f j -f i ]
[0053] Among them, f ij represents the concatenated features after aggregation, f i Represents the input point p i The characteristics of j Represents the input point p i Features of neighboring points.
[0054] After completing the point cloud feature splicing of the input point, the processing method for the input point also includes determining the center point corresponding to the input point, determining the output features of the center point and the nodes adjacent to the center point, and determining the output result of the backbone network of the graph convolution based on the output features of the center point corresponding to the input point.
[0055] The output feature of the center point is expressed as:
[0056]
[0057] Among them, f' i represents the output feature of the center point, k represents the size of the convolution kernel, and f ij represents the concatenated features after aggregation, max represents the maximum pooling operation in the channel dimension, σ represents the activation function, and the LeakyReLU activation function is used.
[0058] The complementary feature extraction module is used to extract the feature similarity between the key frame and the supplementary frame, and remove the features that exceed the preset similarity value. The function is to avoid extracting highly redundant vehicle features. The complementary feature extraction module is used to optimize the feature representation of the vehicle.
[0059] The complementary feature extraction module includes a graph convolution layer, a maximum pooling layer and an erasing module; wherein the erasing module includes a correlation calculation layer and a binarization layer; wherein the graph convolution layer and the maximum pooling layer are used to extract the significant features of the key frame; the correlation calculation layer is used to calculate the feature similarity between the key frame and the supplementary frame; the binarization layer is used to obtain a binarization mask based on the feature similarity matrix obtained by the correlation calculation layer, which is used to erase redundant features.
[0060] The calculation process of the complementary feature extraction module is as follows: each frame of point cloud is taken as a key frame, and the next frame is taken as a supplementary frame. The erasing module will erase the significant features found in the previous frame; for the last frame of point cloud, it will be copied as its supplementary frame.
[0061] When judging the feature similarity between the key frame and the supplementary frame, it is measured by judging the similarity between the feature vectors of the key frame and the supplementary frame, that is, determining the Euler distance between the feature vectors. The smaller the Euler distance, the more similar the two feature vectors are, that is, the higher the similarity between the key frame and the supplementary frame, and the most similar feature vector is removed to obtain the different information between the key frame and the supplementary frame.
[0062] The complementary feature module will erase the previously discovered significant features during processing to highlight the new or changed information in the current frame, and use the last frame of the continuous frames as a supplementary frame to ensure the continuity of image processing. When the correlation calculation layer calculates the feature similarity between the key frame and the supplementary frame, it will output the part greater than the preset threshold and erase the redundant features with high similarity.
[0063] The time fusion module is used to fuse the time series in the laser point cloud data and output the fused time features. A transformer module is used to extract the dynamic features of the vehicle. The time features in a point cloud sequence are used as input and the fused time features are output to represent the ReID of the vehicle. The transformer module includes multiple feature encoding layers.
[0064] Preferably, when fusing the dynamic features of the vehicle, the time features of multiple perspectives are fused to determine that the scene represented by the currently acquired laser point cloud data is at the same timestamp, and based on the nodes in the data in the currently acquired laser point cloud, the relative distance between each center point is calculated, and based on the obtained relative distance, the cosine similarity of each center point in the current scene is determined, and the part with a cosine similarity greater than a preset threshold is used as the main identified point cloud image area.
[0065] Step 5: Based on the constructed vehicle ReID model, construct a loss function, and perform model iteration and optimization.
[0066] Preferably, in order to determine the construction effect of the current vehicle ReID model, the loss function includes a classification loss function based on classification correlation and a metric loss function based on distance correlation.
[0067] The classification loss function uses the vehicle ID as the training label to determine whether two types of vehicles are the same vehicle. The cross entropy loss function is used for calculation, which is expressed as:
[0068]
[0069] in, represents the ID category of the predicted output, L represents the true value of the annotation, l cls represents the classification loss.
[0070] The metric loss function aims to make the distance between two positive samples (i.e. the same car in different frames) as small as possible and the distance between negative samples as large as possible (different cars).
[0071] The metric loss function takes the form of a triplet loss function. The triplet consists of Anchor (A), Negative (N), and Positive (P). The base point is A, the positive match is P, and the negative match is N. The purpose of the triplet loss function is to make the distance between features of the same class as small as possible, and the distance between features of different classes as large as possible.
[0072] In order to determine the implementation effect of the current completion network and vehicle ReID model, the constructed metric loss function is also implemented in the following way, using Chamfer Distance (CD) and Earth Mover's Distance (EMD) to represent the distance between different feature vectors.
[0073] Preferably, when determining the distance between vehicles, the method further includes obtaining the chamfer distance and land movement distance of the corresponding vehicles.
[0074] If the global features of the shape are currently captured, the land movement distance is used as the distance between vehicle features; if only the local similarity of the shape is currently concerned, the chamfer distance is used as the distance between vehicle features.
[0075] When calculating the chamfer distance, determine the currently input point cloud data, and calculate the sum of the distances from each point in the two point sets to the nearest point in the other point set, which is the chamfer distance; the minimum change distance between the two point sets is the corresponding land movement distance.
[0076] Given two point sets X1 and X2, the ways to obtain the chamfer distance include:
[0077]
[0078] Among them, d_CD(X1,X2) represents the chamfer distance, d(p,q) represents the Euclidean distance between point p and point q. This formula actually calculates the average closest distance between two point sets.
[0079] Given two distributions P and Q, the formula for land movement distance is defined as:
[0080]
[0081] Among them, EMD(P,Q) represents the land movement distance, d_ij represents the distance from element i in distribution P to element j in distribution Q, and fij represents the value of moving from element i to element j; this value represents the "cost" or "amount" of element conversion between the two distributions; in practical applications, this value may represent different things, such as the number of items, the amount of data, or the probability mass.
[0082] After obtaining the land moving distance and chamfer distance, the distance corresponding to the current vehicle is accurately converted into a quantized value. Therefore, the metric loss function between different vehicles and the same vehicle in the current scheme is implemented as follows:
[0083]
[0084] Among them, L1 is the metric loss, Represents the distance between two identical vehicle features, the goal is to continuously reduce, Represents the distance between two different vehicle features. The purpose is to provide continuous prompts. ∝ is a constant parameter.
[0085] After obtaining the metric loss and classification loss, the two losses are used as input to obtain a more comprehensive loss rate, which is expressed as:
[0086] L loss =β×l cls +γ×L1
[0087] Among them, L loss is the final loss rate, l cls represents classification loss, L1 is the metric loss, and β and γ are weight factors.
[0088] By weighting the classification loss and metric loss separately, we can obtain a loss rate value that is more suitable for the current scenario, so as to achieve a reasonable evaluation of the overall model.
[0089] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A vehicle re-identification method based on laser radar, characterized in that: It includes: Step 1: Install the laser radar data acquisition equipment at different traffic locations, obtain laser point cloud data, and perform vehicle ReID data annotation; Step 2: Obtain laser point cloud data from multiple perspectives by using modeling and simulation technology; Step 3: Build a point cloud completion model based on laser point cloud data from multiple perspectives; Step 4: Use the point cloud completion model as input data to build a vehicle ReID model; Step 5: Based on the constructed vehicle ReID model, construct a loss function, and perform model iteration and optimization.
2. The vehicle re-identification method based on laser radar as claimed in claim 1, characterized in that: The traffic locations include major urban roads, intersections, roadside parking areas, expressways, and entrances to key areas.
3. The vehicle re-identification method based on laser radar as claimed in claim 1, characterized in that: The laser point cloud data includes obtaining three-dimensional information of vehicles and pedestrians in different traffic positions and generating three-dimensional frames of vehicles and pedestrians.
4. The vehicle re-identification method based on laser radar as claimed in claim 1, characterized in that: The vehicle ReID model includes a backbone network module based on graph convolution, a complementary feature extraction module, and a time fusion module; The backbone network module based on graph convolution is used to extract local and global features of laser point cloud data, perform cluster analysis on the extracted local and global features according to preset rules, generate a graph network, and update the graph network according to the feature similarity between nodes; A complementary feature extraction module is used to extract the feature similarity between the key frame and the supplementary frame, and remove the features that exceed the preset similarity value; The time fusion module is used to fuse the time series in the laser point cloud data and output the fused time features.
5. The vehicle re-identification method based on laser radar as claimed in claim 4, characterized in that: When updating the graph network, the similarity of the adjacent nodes of each node in the current feature space is judged. The feature similarity of the nodes is also judged by: The common neighbor coefficients corresponding to the nodes are obtained, and the similarity between the nodes is determined based on the obtained common neighbor coefficients.
6. The vehicle re-identification method based on laser radar as claimed in claim 5, characterized in that: The method for obtaining the common neighbor coefficient is: Among them, AA(u, v) represents the common neighbor coefficient between node u and node v, N(u) represents the set of neighbor nodes of node u, N(v) represents the set of neighbor nodes of node v, ω represents the set of common neighbor nodes between node u and node v, and d(ω) is the degree of node ω, which represents the number of edges directly connected to node ω.
7. The vehicle re-identification method based on laser radar as claimed in claim 4, characterized in that: The implementation method of the backbone network based on graph convolution also includes: converting the m input points into an m×3 matrix P, where each row is an input point p i = (x, y, z) 3D coordinates, and determine each input point p i The eigenvector f i , and determine the features of the adjacent points of each input point, perform feature splicing on the input point and the adjacent points, and determine the splicing features after splicing; The implementation formula of feature splicing is expressed as: f ij =[f i ,f j -f i ] Among them, f ij represents the concatenated features after aggregation, f i Represents the input point p i The characteristics of f j Represents the input point p i Features of neighboring points.
8. The vehicle re-identification method based on laser radar as claimed in claim 7, characterized in that: After completing the point cloud feature splicing of the input point, the processing method for the input point also includes determining the center point corresponding to the input point, determining the output features of the center point and the nodes adjacent to the center point, and determining the output result of the backbone network of the graph convolution based on the output features of the center point corresponding to the input point; The output feature of the center point is expressed as: Among them, f' i represents the output feature of the center point, k represents the size of the convolution kernel, and f ij represents the concatenated features after aggregation, max represents the maximum pooling operation in the channel dimension, σ represents the activation function, and the LeakyReLU activation function is used.
9. The vehicle re-identification method based on laser radar as claimed in claim 1, characterized in that: The loss function includes a classification loss function based on classification correlation and a metric loss function based on distance correlation; The classification loss function uses the vehicle ID as the training label to determine whether two types of vehicles are the same vehicle. The cross entropy loss function is used for calculation, which is expressed as: in, represents the ID category of the predicted output, L represents the true value of the annotation, l cls represents the classification loss; The metric loss function is implemented as follows: Among them, L1 is the metric loss, Represents the distance between two identical vehicle features, the goal is to continuously reduce, Represents the distance between two different vehicle features. The purpose is to provide continuous prompts. ∝ is a constant parameter.
10. The vehicle re-identification method based on laser radar as claimed in claim 9, characterized in that: When determining the distance between vehicles, the method further includes obtaining the chamfer distance and the land movement distance of the corresponding vehicle; If the global features of the shape are currently captured, the land movement distance is used as the distance between vehicle features; If we only focus on the local similarity of shapes, we can use the chamfer distance as the distance between vehicle features.
